Skip to content

Commit

Permalink
Another Pledge fix, Powder this time (rh-hideout#5341)
Browse files Browse the repository at this point in the history
Co-authored-by: Hedara <hedara90@gmail.com>
  • Loading branch information
hedara90 and Hedara authored Sep 8, 2024
1 parent d6d2f20 commit b8251e3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3551,6 +3551,7 @@ u8 AtkCanceller_UnableToUseMove(u32 moveType)
gProtectStructs[gBattlerAttacker].powderSelfDmg = TRUE;
gBattleMoveDamage = GetNonDynamaxMaxHP(gBattlerAttacker) / 4;
gBattlescriptCurrInstr = BattleScript_MoveUsedPowder;
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
effect = 1;
}
}
Expand Down
24 changes: 24 additions & 0 deletions test/battle/move_effect/pledge.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,3 +812,27 @@ DOUBLE_BATTLE_TEST("Pledge move combo doesn't trigger on opponent's Pledge move
HP_BAR(opponentRight);
}
}

DOUBLE_BATTLE_TEST("Pledge move combo doesn't trigger on opponent's Pledge move - Powder")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT);
} WHEN {
TURN { MOVE(playerLeft, MOVE_POWDER, target: opponentRight);
MOVE(opponentLeft, MOVE_GRASS_PLEDGE, target: playerLeft);
MOVE(opponentRight, MOVE_FIRE_PLEDGE, target: playerLeft);
MOVE(playerRight, MOVE_FIRE_PLEDGE, target: opponentLeft); }
} SCENE {
NONE_OF {
ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PLEDGE, opponentLeft);
ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PLEDGE, opponentRight);
ANIMATION(ANIM_TYPE_MOVE, MOVE_GRASS_PLEDGE, opponentRight);
ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PLEDGE, playerLeft);
}
ANIMATION(ANIM_TYPE_MOVE, MOVE_FIRE_PLEDGE, playerRight);
HP_BAR(opponentLeft);
}
}

0 comments on commit b8251e3

Please sign in to comment.