With the current implementation for keeping track of damage rolls, the Sitrus Berry is activated across all rolls at the moment it is consumed in the current strategy. For the above link, the Sitrus Berry healing is applied across all possible damage rolls after the first hit, even ones that don't get Maushold below 50% HP, which messes up overall %chance to KO calculations.
In this branch, an effort is made to only apply the Sitrus Berry healing to rolls where it is valid to do so, and it saves the other rolls to check for Sitrus Healing for any subsequent damage. The above link should show Maushold having a nonzero %chance to KO across all roll cases (Worst, Average, and Best).
Handling of Accuracy, Paralysis, and Confusion
Added option to allow moves to miss or be prevented by paralysis or confusion
allowMiss field in MoveOptions
also requires a min roll
Warnings in HP Display
Added warnings for several situations
possible misses
possible lost turns due to paralysis, confusion, etc
closes #221
Overal KO Chance Calculation
These changes are intended to be useful for handling Sitrus Berry activation.
Example: http://localhost:3000/tera-raid-builder/#WZ4cF0tB
With the current implementation for keeping track of damage rolls, the Sitrus Berry is activated across all rolls at the moment it is consumed in the current strategy. For the above link, the Sitrus Berry healing is applied across all possible damage rolls after the first hit, even ones that don't get Maushold below 50% HP, which messes up overall %chance to KO calculations.
In this branch, an effort is made to only apply the Sitrus Berry healing to rolls where it is valid to do so, and it saves the other rolls to check for Sitrus Healing for any subsequent damage. The above link should show Maushold having a nonzero %chance to KO across all roll cases (Worst, Average, and Best).
Handling of Accuracy, Paralysis, and Confusion
Added option to allow moves to miss or be prevented by paralysis or confusion
allowMiss
field inMoveOptions
min
rollWarnings in HP Display
Added warnings for several situations