diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 235a03345a0..f12816f4303 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -132,7 +132,7 @@ export class RechargingTag extends BattlerTag { */ export class BeakBlastChargingTag extends BattlerTag { constructor() { - super(BattlerTagType.BEAK_BLAST_CHARGING, [BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END, BattlerTagLapseType.ON_GET_HIT], 1, Moves.BEAK_BLAST); + super(BattlerTagType.BEAK_BLAST_CHARGING, [BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.TURN_END, BattlerTagLapseType.AFTER_HIT], 1, Moves.BEAK_BLAST); } onAdd(pokemon: Pokemon): void { @@ -151,7 +151,7 @@ export class BeakBlastChargingTag extends BattlerTag { * @returns `true` if invoked with the ON_GET_HIT lapse type; `false` otherwise */ lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { - if (lapseType === BattlerTagLapseType.ON_GET_HIT) { + if (lapseType === BattlerTagLapseType.AFTER_HIT) { const phaseData = getMoveEffectPhaseData(pokemon); if (phaseData?.move.hasFlag(MoveFlags.MAKES_CONTACT)) { phaseData.attacker.trySetStatus(StatusEffect.BURN, true, pokemon); @@ -171,7 +171,7 @@ export class ShellTrapTag extends BattlerTag { public activated: boolean; constructor() { - super(BattlerTagType.SHELL_TRAP, [BattlerTagLapseType.TURN_END, BattlerTagLapseType.ON_GET_HIT], 1); + super(BattlerTagType.SHELL_TRAP, [BattlerTagLapseType.TURN_END, BattlerTagLapseType.AFTER_HIT], 1); this.activated = false; } @@ -186,11 +186,11 @@ export class ShellTrapTag extends BattlerTag { * @returns `true` if invoked with the `CUSTOM` lapse type; `false` otherwise */ lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { - if (lapseType === BattlerTagLapseType.ON_GET_HIT) { + if (lapseType === BattlerTagLapseType.AFTER_HIT) { const phaseData = getMoveEffectPhaseData(pokemon); /* Trap should only be triggered by opponent's Physical moves */ - if (phaseData?.move.category === MoveCategory.PHYSICAL && pokemon.isOpponentTo(phaseData.attacker)) { + if (phaseData?.move.category === MoveCategory.PHYSICAL && pokemon.isOpponent(phaseData.attacker)) { this.triggerTrap(pokemon); } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index b0453192d57..081e58b9628 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1867,11 +1867,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } /** - * Compares if 'this' and {@linkcode target} are on the same team. + * Compares if `this` and {@linkcode target} are on the same team. * @param target the {@linkcode Pokemon} to compare against. - * @returns true if the two pokemon are both player owned or both not, false otherwise + * @returns `true` if the two pokemon are allies, `false` otherwise */ - isOpponentTo(target: Pokemon) : boolean { + isOpponent(target: Pokemon): boolean { return this.isPlayer() !== target.isPlayer(); } diff --git a/src/phases/move-effect-phase.ts b/src/phases/move-effect-phase.ts index c5b9fce74a5..ae3c54d3fcd 100644 --- a/src/phases/move-effect-phase.ts +++ b/src/phases/move-effect-phase.ts @@ -258,7 +258,7 @@ export class MoveEffectPhase extends PokemonPhase { // Apply the target's post-defend ability effects (as long as the target is active or can otherwise apply them) return Utils.executeIf(!target.isFainted() || target.canApplyAbility(), () => applyPostDefendAbAttrs(PostDefendAbAttr, target, user, this.move.getMove(), hitResult).then(() => { // If the invoked move is an enemy attack, apply the enemy's status effect-inflicting tags and tokens - target.lapseTags(BattlerTagLapseType.ON_GET_HIT); + target.lapseTags(BattlerTagLapseType.AFTER_HIT); if (!user.isPlayer() && this.move.getMove() instanceof AttackMove) { user.scene.applyShuffledModifiers(this.scene, EnemyAttackStatusEffectChanceModifier, false, target);