Fixes Destiny Bond against Dynamax no failing (#6501)
This commit is contained in:
parent
68a869da99
commit
093e265515
@ -13864,10 +13864,29 @@ static void Cmd_trychoosesleeptalkmove(void)
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool32 IsDanamaxMonPresent(void)
|
||||
{
|
||||
for (u32 battler = 0; battler < gBattlersCount; battler++)
|
||||
{
|
||||
if (battler == gBattlerAttacker)
|
||||
continue;
|
||||
|
||||
if (GetActiveGimmick(battler) == GIMMICK_DYNAMAX)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void Cmd_trysetdestinybond(void)
|
||||
{
|
||||
CMD_ARGS(const u8 *failInstr);
|
||||
if (DoesDestinyBondFail(gBattlerAttacker))
|
||||
|
||||
if (IsDanamaxMonPresent())
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_MoveBlockedByDynamax;
|
||||
}
|
||||
else if (DoesDestinyBondFail(gBattlerAttacker))
|
||||
{
|
||||
gBattlescriptCurrInstr = cmd->failInstr;
|
||||
}
|
||||
|
||||
@ -1624,3 +1624,15 @@ SINGLE_BATTLE_TEST("Dynamax: Dynamax is reverted before switch out")
|
||||
MESSAGE("Wobbuffet used Tackle!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Dynamax: Destiny Bond if a dynamaxed battler is present on field")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_DESTINY_BOND); MOVE(player, MOVE_TACKLE, gimmick: GIMMICK_DYNAMAX); }
|
||||
} SCENE {
|
||||
MESSAGE("The move was blocked by the power of Dynamax!");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user