theastrogoth / tera-raid-builder

A tool for simulating Tera Raid battles in Pokémon Scarlet & Violet
https://theastrogoth.github.io/tera-raid-builder/
4 stars 3 forks source link

More tools for checking strategies #225

Closed theastrogoth closed 1 month ago

theastrogoth commented 1 month ago

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

Warnings in HP Display

Added warnings for several situations