Added a variation of BattleScript_NotAffected

This one triggers the Ability PopUp.
This commit is contained in:
LOuroboros 2021-03-31 23:11:27 -03:00
parent da24b9c251
commit ed74430d26
3 changed files with 12 additions and 2 deletions

View file

@ -4183,6 +4183,15 @@ BattleScript_NotAffected::
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_NotAffectedAbilityPopUp::
copybyte gBattlerAbility, gBattlerTarget
pause 0x20
call BattleScript_AbilityPopUp
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
resultmessage
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_EffectUproar::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE

View file

@ -367,5 +367,6 @@ extern const u8 BattleScript_CustapBerryActivation[];
extern const u8 BattleScript_MicleBerryActivateEnd2[];
extern const u8 BattleScript_MicleBerryActivateRet[];
extern const u8 BattleScript_JabocaRowapBerryActivates[];
extern const u8 BattleScript_NotAffectedAbilityPopUp[];
#endif // GUARD_BATTLE_SCRIPTS_H

View file

@ -9689,7 +9689,7 @@ static void Cmd_tryinfatuating(void)
if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS)
{
gBattlescriptCurrInstr = BattleScript_NotAffected;
gBattlescriptCurrInstr = BattleScript_NotAffectedAbilityPopUp;
gLastUsedAbility = ABILITY_OBLIVIOUS;
RecordAbilityBattle(gBattlerTarget, ABILITY_OBLIVIOUS);
}
@ -11096,7 +11096,7 @@ static void Cmd_settaunt(void)
{
if (GetBattlerAbility(gBattlerTarget) == ABILITY_OBLIVIOUS)
{
gBattlescriptCurrInstr = BattleScript_NotAffected;
gBattlescriptCurrInstr = BattleScript_NotAffectedAbilityPopUp;
gLastUsedAbility = ABILITY_OBLIVIOUS;
RecordAbilityBattle(gBattlerTarget, ABILITY_OBLIVIOUS);
}