Welcome to the Wizard101 Message Boards


Player Guide
Fansites
News
Game Updates
Help

By posting on the Wizard101 Message Boards you agree to the Code of Conduct.

Algorithm for stat boosts: How does it work?

AuthorMessage
Survivor
Dec 27, 2008
7
I have a question for our lovely instructors and KI reps out there. What is the algorithm for accuracy boosting? Namely, lets take my favorite spell (Wild Bolt) which normally has 10% accuracy. Now lets say that I have 17% accuracy boost from my gear. What is the effective accuracy of my Wild Bolt?

Is it (10% + 17%) = 27%?

Or

Is it (10%x1.17)=11.7%?

On a related note: If I have 30% damage boost, then stormblade for another 30% when is this applied? Do I get a flat 60% boost to my damage? Or do I get a 30% boost followed by a 30% boost?

Is is X damage time 1.6 or is it X damage times (1.3x1.3)?

I apologize if this is already posted somewhere, but I really have no idea where to find it.

Thanks,

Alric Stormblade

Squire
Dec 02, 2008
543
I haven't experimented with accuracy gear. Wild Bolt is definitely the card to test it with, though, as picking out the difference between 11.7% and 27% should be easy to do experimentally.

For damage, I can answer your question.

The game starts by picking the base amount of damage that a damage card will do. For some cards such as wands, this is a fixed number. For cards that have a damage range, there are five possible damage values spread equally among the damage range. For example, Evil Snowman is 240-300 damage. The base damage that the card will do when used is one of 240, 255, 270, 285, and 300. My guess is that it chooses from the possible damage values uniformly at random (well, using a pseudorandom number generator, which is actually completely deterministic, but as close to random as computer software can come), but I don't know.

Next, the game applies any damage boost from your gear. If you use the evil snowman above and the game picks that you have 255 base damage, and your gear gives you +5% damage, then the damage after your gear boost would be 255*(1.05) = 267.75.

The game then truncates the damage to an integer. This is not rounding to the nearest integer, but always truncation to the next lower integer. More precisely, it uses the greatest integer function. In the above case, the 267.75 damage becomes 267, not 268.

After this, the game goes through the blades (Mythblade, Elemental Blade, Balanceblade, Weakness, etc.) on you to see which applies. It checks the last one cast and applies it if relevant, then the next to last one, and so forth. If a blade is identical to one that was already applied to that cast, then it will not also be applied. Different blades do stack, however. When determining whether a blade applies, all that matters is the damage class of the card, before any damage type conversions from prisms. I'm not sure whether spectral blast or hydra can trigger elemental blades.

If the game finds a blade that applies, it applies the damage modification. For example, if you had used an iceblade in the above example, your new damage would be 267*(1.4) = 373.8.

The game then truncates the damage to an integer again. In this case, it would be 373 damage. Note that the game really does truncate the damage at multiple internal steps, and not merely at the end. In the above example, if the damage were not truncated, it would be 374.85, which would truncate to 374, not 373. If there are no other modifications after this, the game will display 373 damage, not 374.

The game repeats with any other blades that it finds that apply, again going in order from the last one cast back to the first. The game multplies to get the new damage, and truncates to an integer, multiplies for the next blade, truncates again, and so forth.

Once the blades are done, the game next checks traps, shields, and prisms. In the case here, things like ice trap, curse, hex, snow shield, elemental shield, elemental trap, and thermal shield could all apply, among others. As with blades, the game checks in order from the last trap applied to the first. Also as with blades, different traps or shields that all apply can stack, but only one of a particular trap will trigger on a given damage pulse.

Note that when a prism is applied, that changes which traps and shields can subsequently apply. If you use a fire prism to convert ice damage to fire, then before the prism is applied, a snow shield and ice trap will apply, but a fire shield and fire trap will not. After the prism is applied, the situation is reversed. I'm not sure whether the fire and ice shields from separate casts of thermal shield (one cast before the prism and one after) can apply separately before and after the prism.

The damage multipliers for traps work the same as for shields. The game multiplies by the relevant damage for one trap, truncates to an integer, then goes to the next and repeats.

Finally, the game applies the damage boost or resistance of the target. The damage boost pairs are fire/ice, myth/storm, and life/death. A rank n mob will generally have 10(n-1)% damage resistance against its own damage type, but suffer a 10(n-1)% damage boost against the paired damage type. The exception is that balance mobs take a 10(n-1)/3% damage boost against each of myth, life, and death. Bosses generally have an extra 20% damage resistance against their own damage type, with the damage resistance capped at 80%. There are exceptions to these, however. For a player, the damage resistance is determined by the gear worn.

In the above example, if the mob has 10% damage resistance to ice, the damage done will be 373*(.9) = 335.7. The game truncates this to an integer to get 335 as the final damage. Note that in this example, had the game not truncated until the very end, the damage would have been 337.

Damage over time spells do damage in multiple pulses and are kind of an exception. The base damage is as normal and gear boosts work as normal. If a blade applies to a damage over time spell, it is used once at cast, and then applied to every pulse of the spell. In the case of something that does initial damage and then also damage over time, such as fire elf or frostbite, if a blade is used in the initial cast, it applies to both the initial damage and also the damage over time. The game does not check for blades again after the initial cast, so it will neither use up additional blades for later damage pulses nor offer additional damage boosts from later blades, apart from what was used at cast.

When the game checks for traps, shields, and prisms, however, it checks separately with every damage pulse. In the above case of fire elf, if a player has several fire shields up, the initial damage can use one, and each subsequent damage pulse can also use one, so a single spell can burn four identical shields. This ability to clear enemy shields is one main advantage of damage over time spells, and much of the point of the fire class.

If a trap is applied to a damage over time spell, it only applies to that particular damage pulse. For example, the base stats on fire elf are 50 damage up front, plus 70 per pulse for each of three pulses. If the target has two fire shields (-80% fire damage) and there are no other damage modifications, then the initial hit will do 10 damage and the first damage over time pulse will do 14 damage, but the last two pulses will each do 70 damage. The game checks for traps separately at each pulse, so a shield cast after the initial spell but before the final damage pulse can affect the next damage pulse from the spell.

Finally, when the game applies damage boosts or resistances to a damage over time spell, it applies them twice. For example, if you use fire elf against Ngozi the Beguiler (a rank 5 ice boss, so you have a +40% damage boost), the initial hit will do 50*(1.4) = 70 damage. Each damage pulse will do 70*(1.4)*(1.4) = 137.2 damage, which truncates to 137 damage. In principle, it probably also truncates after multiplying by 1.4 the first time, but at that point, the number is exactly 98, which is an integer, so it is unchanged.

Survivor
Dec 27, 2008
7
Thank you VERY much for that most excellent reply. The damage and resist is crystal clear now. If this information isn't posted somewhere accessible, I whoelheartedly encourage the moderators to make this sticky or readily available for those of us who are into the mathematical strategy behind the game.

I have not done any statistical study with Wild Bolt and Accuracy, but it "seems" that it works about 20%-25% of the time for me these days. so I am guessing that accuracy boost is additive.

Could someone from KI please confirm this??

Thank you,

Alric

Administrator
Survivor
Dec 27, 2008
7
Thank you VERY much professor! :-)
When I hand in your faculty evaluation form, I will be sure to give you high marks!

Alric

Survivor
Sep 27, 2008
19
kilroy21 wrote:
I have a question for our lovely instructors and KI reps out there. What is the algorithm for accuracy boosting? Namely, lets take my favorite spell (Wild Bolt) which normally has 10% accuracy. Now lets say that I have 17% accuracy boost from my gear. What is the effective accuracy of my Wild Bolt?

Is it (10% + 17%) = 27%?

Or

Is it (10%x1.17)=11.7%?

On a related note: If I have 30% damage boost, then stormblade for another 30% when is this applied? Do I get a flat 60% boost to my damage? Or do I get a 30% boost followed by a 30% boost?

Is is X damage time 1.6 or is it X damage times (1.3x1.3)?

I apologize if this is already posted somewhere, but I really have no idea where to find it.

Thanks,

Alric Stormblade
whats wild bolt? how strong is it? and i notice your a diviner i am a pyromancer (lvl 44) masterd fire and balance

Squire
Dec 02, 2008
543
drago529 wrote:
whats wild bolt? how strong is it? and i notice your a diviner i am a pyromancer (lvl 44) masterd fire and balance


Wild Bolt is a storm spell. It does 1000 damage, which is probably the highest base damage of any fixed pip spell in the game. It costs only two pips. It is given as a quest reward for the quest Bad News...; as a fire wizard, you got Scald as a reward for the same quest.

If that sounds incredibly overpowered, it's because you haven't heard the drawback. It has only a 10% chance of hitting, so it takes quite a bit of accuracy gear to make it worth much, and still usually fizzles.

Survivor
Jul 05, 2009
10
Thanks for the info Quizzical. I didn't notice anything about the dome spells like Time of Legend though. When are they applied in the formula? Sorry if I overlooked it in your OP. Thanks for your reply.