mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
Set lastHit to true when target faints during multi-hit move
This commit is contained in:
parent
0712f86462
commit
09e38bad39
@ -905,6 +905,14 @@ export class MoveEffectPhase extends PokemonPhase {
|
|||||||
|
|
||||||
target.destroySubstitute();
|
target.destroySubstitute();
|
||||||
target.lapseTag(BattlerTagType.COMMANDED);
|
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…
Reference in New Issue
Block a user