diff --git a/src/data/ability.ts b/src/data/ability.ts index e60394c97..6fa451440 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -10,7 +10,7 @@ import { BattlerTagType } from "./enums/battler-tag-type"; import { StatusEffect, getStatusEffectDescriptor, getStatusEffectHealText } from "./status-effect"; import { Gender } from "./gender"; import Move, { AttackMove, MoveCategory, MoveFlags, MoveTarget, RecoilAttr, StatusMoveTypeImmunityAttr, FlinchAttr, OneHitKOAttr, HitHealAttr, StrengthSapHealAttr, allMoves } from "./move"; -import { ArenaTagSide } from "./arena-tag"; +import { ArenaTagSide, ArenaTrapTag } from "./arena-tag"; import { ArenaTagType } from "./enums/arena-tag-type"; import { Stat } from "./pokemon-stat"; import { PokemonHeldItemModifier } from "../modifier/modifier"; @@ -558,7 +558,7 @@ export class PostDefendStatChangeAbAttr extends PostDefendAbAttr { export class PostDefendApplyArenaTrapTagAbAttr extends PostDefendAbAttr { private condition: PokemonDefendCondition; - private tagType: ArenaTrapTag; + private tagType: ArenaTagType; constructor(condition: PokemonDefendCondition, tagType: ArenaTagType) { super(true); diff --git a/src/data/move.ts b/src/data/move.ts index 08f03ac05..5ae46c55d 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -845,7 +845,7 @@ export class HitHealAttr extends MoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const healAmount = Math.max(Math.floor(user.turnData.damageDealt * this.healRatio), 1); - const reverseDrain = pokemon.hasAbilityWithAttr(ReverseDrainAbAttr); + const reverseDrain = user.hasAbilityWithAttr(ReverseDrainAbAttr); user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(), !reverseDrain ? healAmount : healAmount * -1, !reverseDrain ? getPokemonMessage(target, ` had its\nenergy drained!`) : undefined, @@ -865,7 +865,7 @@ export class StrengthSapHealAttr extends MoveEffectAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { const healAmount = target.stats[Stat.ATK] * (Math.max(2, 2 + target.summonData.battleStats[BattleStat.ATK]) / Math.max(2, 2 - target.summonData.battleStats[BattleStat.ATK])); - const reverseDrain = pokemon.hasAbilityWithAttr(ReverseDrainAbAttr); + const reverseDrain = user.hasAbilityWithAttr(ReverseDrainAbAttr); user.scene.unshiftPhase(new PokemonHealPhase(user.scene, user.getBattlerIndex(), !reverseDrain ? healAmount : healAmount * -1, !reverseDrain ? getPokemonMessage(user, ` regained\nhealth!`) : undefined,