Fix multi-hit moves
This commit is contained in:
parent
9f2a785fdd
commit
006c918e0b
|
@ -4537,7 +4537,7 @@ export class PokemonTurnData {
|
||||||
public flinched: boolean = false;
|
public flinched: boolean = false;
|
||||||
public acted: boolean = false;
|
public acted: boolean = false;
|
||||||
public hitCount: number = 0;
|
public hitCount: number = 0;
|
||||||
public hitsLeft: number = 0;
|
public hitsLeft: number = -1;
|
||||||
public damageDealt: number = 0;
|
public damageDealt: number = 0;
|
||||||
public currDamageDealt: number = 0;
|
public currDamageDealt: number = 0;
|
||||||
public damageTaken: number = 0;
|
public damageTaken: number = 0;
|
||||||
|
|
|
@ -69,7 +69,7 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
* resolve the move's total hit count. This block combines the
|
* resolve the move's total hit count. This block combines the
|
||||||
* effects of the move itself, Parental Bond, and Multi-Lens to do so.
|
* effects of the move itself, Parental Bond, and Multi-Lens to do so.
|
||||||
*/
|
*/
|
||||||
if (user.turnData.hitsLeft === undefined) {
|
if (user.turnData.hitsLeft === -1) {
|
||||||
const hitCount = new Utils.IntegerHolder(1);
|
const hitCount = new Utils.IntegerHolder(1);
|
||||||
// Assume single target for multi hit
|
// Assume single target for multi hit
|
||||||
applyMoveAttrs(MultiHitAttr, user, this.getTarget() ?? null, move, hitCount);
|
applyMoveAttrs(MultiHitAttr, user, this.getTarget() ?? null, move, hitCount);
|
||||||
|
|
|
@ -83,11 +83,11 @@ export class MovePhase extends BattlePhase {
|
||||||
this.pokemon.turnData.hitCount = 0;
|
this.pokemon.turnData.hitCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Check move to see if arena.ignoreAbilities should be true.
|
||||||
* Check move to see if arena.ignoreAbilities should be true.
|
|
||||||
*/
|
|
||||||
if (!this.followUp) {
|
if (!this.followUp) {
|
||||||
this.scene.arena.ignoreAbilities = this.move.getMove().checkFlag(MoveFlags.IGNORE_ABILITIES, this.pokemon, null);
|
if (this.move.getMove().checkFlag(MoveFlags.IGNORE_ABILITIES, this.pokemon, null)) {
|
||||||
|
this.scene.arena.setIgnoreAbilities();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.resolveRedirectTarget();
|
this.resolveRedirectTarget();
|
||||||
|
|
Loading…
Reference in New Issue