Fix multi-hit moves

This commit is contained in:
NightKev 2024-09-06 01:08:50 -07:00
parent 9f2a785fdd
commit 006c918e0b
3 changed files with 6 additions and 6 deletions

View File

@ -4537,7 +4537,7 @@ export class PokemonTurnData {
public flinched: boolean = false;
public acted: boolean = false;
public hitCount: number = 0;
public hitsLeft: number = 0;
public hitsLeft: number = -1;
public damageDealt: number = 0;
public currDamageDealt: number = 0;
public damageTaken: number = 0;

View File

@ -69,7 +69,7 @@ export class MoveEffectPhase extends PokemonPhase {
* resolve the move's total hit count. This block combines the
* 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);
// Assume single target for multi hit
applyMoveAttrs(MultiHitAttr, user, this.getTarget() ?? null, move, hitCount);

View File

@ -83,11 +83,11 @@ export class MovePhase extends BattlePhase {
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) {
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();