mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-25 11:09:20 +01:00
Fix using defender instead of attacker when applying magic guard
This commit is contained in:
parent
bcdeb8a36a
commit
e7e7ec97bc
@ -794,7 +794,7 @@ export class ReverseDrainAbAttr extends PostDefendAbAttr {
|
||||
|
||||
override applyPostDefend(pokemon: Pokemon, passive: boolean, simulated: boolean, attacker: Pokemon, move: Move, hitResult: HitResult | null, args: any[]): void {
|
||||
const cancelled = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BlockNonDirectDamageAbAttr, pokemon, cancelled);
|
||||
applyAbAttrs(BlockNonDirectDamageAbAttr, attacker, cancelled);
|
||||
if (!cancelled.value) {
|
||||
const damageAmount = move.getAttrs<HitHealAttr>(HitHealAttr)[0].getHealAmount(attacker, pokemon);
|
||||
pokemon.turnData.damageTaken += damageAmount;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user