Fixed Max Attacks into Max Guards message printing (#5312)
* Fixed Max Attacks into Max Guards message printing * Updated the solution --------- Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
parent
33d5cbd7a2
commit
fb1f12aa1b
2 changed files with 22 additions and 2 deletions
|
@ -1730,7 +1730,12 @@ static void AccuracyCheck(bool32 recalcDragonDarts, const u8 *nextInstr, const u
|
||||||
else if (!JumpIfMoveAffectedByProtect(gCurrentMove))
|
else if (!JumpIfMoveAffectedByProtect(gCurrentMove))
|
||||||
gBattlescriptCurrInstr = nextInstr;
|
gBattlescriptCurrInstr = nextInstr;
|
||||||
if (GetActiveGimmick(gBattlerAttacker) == GIMMICK_DYNAMAX)
|
if (GetActiveGimmick(gBattlerAttacker) == GIMMICK_DYNAMAX)
|
||||||
AbilityBattleEffects(ABILITYEFFECT_ABSORBING, gBattlerTarget, 0, 0, gCurrentMove);
|
{
|
||||||
|
if (gProtectStructs[gBattlerTarget].maxGuarded)
|
||||||
|
gBattlescriptCurrInstr = nextInstr;
|
||||||
|
else
|
||||||
|
AbilityBattleEffects(ABILITYEFFECT_ABSORBING, gBattlerTarget, 0, 0, gCurrentMove);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT
|
else if (gSpecialStatuses[gBattlerAttacker].parentalBondState == PARENTAL_BOND_2ND_HIT
|
||||||
|| (gSpecialStatuses[gBattlerAttacker].multiHitOn
|
|| (gSpecialStatuses[gBattlerAttacker].multiHitOn
|
||||||
|
|
|
@ -400,6 +400,7 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves deal 1/4 damage through protect", s16 da
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This test will fail if it's the first test a thread runs
|
||||||
SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass Max Guard")
|
SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass Max Guard")
|
||||||
{
|
{
|
||||||
GIVEN {
|
GIVEN {
|
||||||
|
@ -1477,6 +1478,20 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Moxie clones can be triggered by Max Moves faintin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This test will fail if it's the first test a thread runs
|
||||||
|
SINGLE_BATTLE_TEST("(DYNAMAX) Max Attacks prints a message when hitting into Max Guard")
|
||||||
|
{
|
||||||
|
GIVEN {
|
||||||
|
PLAYER(SPECIES_WOBBUFFET);
|
||||||
|
OPPONENT(SPECIES_WOBBUFFET);
|
||||||
|
} WHEN {
|
||||||
|
TURN { MOVE(player, MOVE_GROWL, gimmick: GIMMICK_DYNAMAX); MOVE(opponent, MOVE_TACKLE, gimmick: GIMMICK_DYNAMAX); }
|
||||||
|
} SCENE {
|
||||||
|
MESSAGE("Wobbuffet used Max Guard!");
|
||||||
|
MESSAGE("Foe Wobbuffet used Max Strike!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass absorbing abilities")
|
SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass absorbing abilities")
|
||||||
{
|
{
|
||||||
u32 move, ability, species;
|
u32 move, ability, species;
|
||||||
|
@ -1512,4 +1527,4 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Max Moves don't bypass absorbing abilities")
|
||||||
}
|
}
|
||||||
ABILITY_POPUP(opponent, ability);
|
ABILITY_POPUP(opponent, ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue