[P2][Move] Fix Tera Shell to apply to all hits of multi-strike moves #4541
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes the user will see?
Tera Shell now correctly reduces the effectiveness of all hits of multi-strike moves instead of just the first hit.
Why am I making these changes?
closes #4218
What are the changes from a developer perspective?
field/pokemon
: Added newmoveEffectiveness
field toturnData
which caches a move effectiveness value for the current move being used against the associated Pokemon. If notnull
, this value overrides the output ofPokemon.getMoveEffectiveness(...)
. This field is currently only used for and modified by Tera Shell's effect.data/ability
: Tera Shell now changespokemon.turnData.moveEffectiveness
to 0.5 when the ability applies.phases/move-effect-phase
: now resetstarget.turnData.moveEffectiveness
for all targets of the phase's move on the move's last strike.test/abilities/tera_shell.test
: New test for Tera Shell covering all hits of a multi-strike move (specifically Double Hit).Screenshots/Videos
How to test the changes?
npm run test tera_shell
(includes new test)Checklist
beta
as my base branchnpm run test
)