Fixes Beak Blast burning attacker when charging 2 turn move (#9026)
This commit is contained in:
parent
b27eb839ed
commit
cb697f5d7d
@ -6173,7 +6173,7 @@ static void Cmd_moveend(void)
|
||||
// Not strictly a protect effect, but works the same way
|
||||
if (IsBattlerUsingBeakBlast(gBattlerTarget)
|
||||
&& CanBeBurned(gBattlerAttacker, gBattlerAttacker, GetBattlerAbility(gBattlerAttacker))
|
||||
&& !(gBattleStruct->moveResultFlags[gBattlerTarget] & MOVE_RESULT_NO_EFFECT))
|
||||
&& IsBattlerTurnDamaged(gBattlerTarget))
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].touchedProtectLike = FALSE;
|
||||
gBattleMons[gBattlerAttacker].status1 = STATUS1_BURN;
|
||||
|
||||
@ -87,7 +87,6 @@ SINGLE_BATTLE_TEST("Beak Blast burns only when contact moves are used")
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move); MOVE(player, MOVE_BEAK_BLAST); }
|
||||
TURN {}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_BEAK_BLAST_SETUP, player);
|
||||
MESSAGE("Wobbuffet started heating up its beak!");
|
||||
@ -112,6 +111,35 @@ SINGLE_BATTLE_TEST("Beak Blast burns only when contact moves are used")
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Beak Blast doesn't burn when charging a two turn move")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; }
|
||||
PARAMETRIZE { move = MOVE_DIG; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(MoveMakesContact(MOVE_BOUNCE));
|
||||
ASSUME(MoveMakesContact(MOVE_DIG));
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_BOUNCE)].twoTurnEffect);
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_DIG)].twoTurnEffect);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, move); MOVE(player, MOVE_BEAK_BLAST); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_BEAK_BLAST_SETUP, player);
|
||||
MESSAGE("Wobbuffet started heating up its beak!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
|
||||
NONE_OF {
|
||||
HP_BAR(player);
|
||||
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponent);
|
||||
MESSAGE("The opposing Wobbuffet was burned!");
|
||||
STATUS_ICON(opponent, burn: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Beak Blast doesn't burn fire types")
|
||||
{
|
||||
GIVEN {
|
||||
|
||||
@ -125,6 +125,36 @@ SINGLE_BATTLE_TEST("Protect: King's Shield, Silk Trap and Obstruct protect from
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: King's Shield, Silk Trap and Obstruct don't lower stats when charging a two turn move")
|
||||
{
|
||||
u32 move, protectMove;
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; protectMove = MOVE_KINGS_SHIELD; }
|
||||
PARAMETRIZE { move = MOVE_DIG; protectMove = MOVE_KINGS_SHIELD; }
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; protectMove = MOVE_SILK_TRAP; }
|
||||
PARAMETRIZE { move = MOVE_DIG; protectMove = MOVE_SILK_TRAP; }
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; protectMove = MOVE_OBSTRUCT; }
|
||||
PARAMETRIZE { move = MOVE_DIG; protectMove = MOVE_OBSTRUCT; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(MoveMakesContact(MOVE_BOUNCE));
|
||||
ASSUME(MoveMakesContact(MOVE_DIG));
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_BOUNCE)].twoTurnEffect);
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_DIG)].twoTurnEffect);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, protectMove); MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, protectMove, player);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
NONE_OF {
|
||||
HP_BAR(player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Spiky Shield does 1/8 dmg of max hp of attackers making contact and may faint them")
|
||||
{
|
||||
u16 usedMove = MOVE_NONE;
|
||||
@ -162,6 +192,32 @@ SINGLE_BATTLE_TEST("Protect: Spiky Shield does 1/8 dmg of max hp of attackers ma
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Spiky Shield doesn't hurt attacker when charging a two turn move")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; }
|
||||
PARAMETRIZE { move = MOVE_DIG; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(MoveMakesContact(MOVE_BOUNCE));
|
||||
ASSUME(MoveMakesContact(MOVE_DIG));
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_BOUNCE)].twoTurnEffect);
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_DIG)].twoTurnEffect);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_SPIKY_SHIELD); MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPIKY_SHIELD, player);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
NONE_OF {
|
||||
HP_BAR(player);
|
||||
HP_BAR(opponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Baneful Bunker poisons Pokémon for moves making contact")
|
||||
{
|
||||
u16 usedMove = MOVE_NONE;
|
||||
@ -214,6 +270,32 @@ SINGLE_BATTLE_TEST("Protect: Baneful Bunker can't poison Pokémon if they are al
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Baneful Bunker doesn't poison attacker when charging a two turn move")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; }
|
||||
PARAMETRIZE { move = MOVE_DIG; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(MoveMakesContact(MOVE_BOUNCE));
|
||||
ASSUME(MoveMakesContact(MOVE_DIG));
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_BOUNCE)].twoTurnEffect);
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_DIG)].twoTurnEffect);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_BANEFUL_BUNKER); MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BANEFUL_BUNKER, player);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
NONE_OF {
|
||||
HP_BAR(player);
|
||||
STATUS_ICON(opponent, STATUS1_POISON);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Burning Bulwark burns Pokémon for moves making contact")
|
||||
{
|
||||
u16 usedMove = MOVE_NONE;
|
||||
@ -266,6 +348,32 @@ SINGLE_BATTLE_TEST("Protect: Burning Bulwark can't burn Pokémon if they are alr
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Burning Bulwark doesn't burn attacker when charging a two turn move")
|
||||
{
|
||||
u32 move;
|
||||
PARAMETRIZE { move = MOVE_BOUNCE; }
|
||||
PARAMETRIZE { move = MOVE_DIG; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(MoveMakesContact(MOVE_BOUNCE));
|
||||
ASSUME(MoveMakesContact(MOVE_DIG));
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_BOUNCE)].twoTurnEffect);
|
||||
ASSUME(gBattleMoveEffects[GetMoveEffect(MOVE_DIG)].twoTurnEffect);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_BURNING_BULWARK); MOVE(opponent, move); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_BURNING_BULWARK, player);
|
||||
|
||||
ANIMATION(ANIM_TYPE_MOVE, move, opponent);
|
||||
NONE_OF {
|
||||
HP_BAR(player);
|
||||
STATUS_ICON(opponent, STATUS1_BURN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Protect: Recoil damage is not applied if target was protected")
|
||||
{
|
||||
u32 j, k;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user