mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-18 06:51:08 +00:00
[Bug] Add user Pokemon check to multi-hit early stopping (#2726)
This commit is contained in:
parent
53ef64f61b
commit
f4c8f0080a
@ -2262,11 +2262,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
|
||||
/**
|
||||
* If this Pokemon is using a multi-hit move, cancels all subsequent strikes
|
||||
* @param {Pokemon} target If specified, this only cancels subsequent strikes against this Pokemon
|
||||
* @param {Pokemon} target If specified, this only cancels subsequent strikes against the given target
|
||||
*/
|
||||
stopMultiHit(target?: Pokemon): void {
|
||||
const effectPhase = this.scene.getCurrentPhase();
|
||||
if (effectPhase instanceof MoveEffectPhase) {
|
||||
if (effectPhase instanceof MoveEffectPhase && effectPhase.getUserPokemon() === this) {
|
||||
effectPhase.stopMultiHit(target);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user