From b6b5d862f4410566f8bba22fc3fb15404ffbc0bf Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 23 Dec 2021 08:37:11 -0500 Subject: [PATCH] update role play mechanics --- data/battle_scripts_1.s | 11 +++++++++++ src/battle_script_commands.c | 1 + 2 files changed, 12 insertions(+) diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 24a3d16ed..77e790a1d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -5285,8 +5285,19 @@ BattleScript_EffectRolePlay:: trycopyability BattleScript_ButItFailed attackanimation waitanimation +.if B_ABILITY_POP_UP == TRUE + setbyte sFIXED_ABILITY_POPUP, TRUE + showabilitypopup BS_ATTACKER + pause 60 + sethword sABILITY_OVERWRITE, 0 + updateabilitypopup BS_ATTACKER + pause 20 + destroyabilitypopup + pause 40 +.endif printstring STRINGID_PKMNCOPIEDFOE waitmessage B_WAIT_TIME_LONG + switchinabilities BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectWish:: diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 175fe6a67..3987177fa 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -12344,6 +12344,7 @@ static void Cmd_trycopyability(void) // role play } else { + gBattleScripting.abilityPopupOverwrite = gBattleMons[gBattlerAttacker].ability; gBattleMons[gBattlerAttacker].ability = defAbility; gLastUsedAbility = defAbility; gBattlescriptCurrInstr += 5;