mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-27 17:05:22 -04:00
Set lastHit to true when target faints during multi-hit move
This commit is contained in:
parent
0712f86462
commit
09e38bad39
1 changed files with 8 additions and 0 deletions
|
@ -905,6 +905,14 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||
|
||||
target.destroySubstitute();
|
||||
target.lapseTag(BattlerTagType.COMMANDED);
|
||||
|
||||
// Force `lastHit` to be true if this is a multi hit move with hits left
|
||||
// `hitsLeft` must be left as-is in order for the message displaying the number of hits
|
||||
// to display the proper number.
|
||||
// Note: When Dragon Darts' smart targeting is implemented, this logic may need to be adjusted.
|
||||
if (!this.lastHit && user.turnData.hitsLeft > 1) {
|
||||
this.lastHit = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue