Skip to content

Commit

Permalink
Fixes Copycat issues with Z-Moves and 2 turn moves (rh-hideout#4549)
Browse files Browse the repository at this point in the history
* Fixes Copycat 2-turn moves animation

* Fixes Copycat being able to call Z-Moves
  • Loading branch information
PhallenTree authored and Pawkkie committed May 29, 2024
1 parent 13a3d75 commit 1a41b3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,8 @@ BattleScript_EffectCopycat:
trycopycat BattleScript_CopycatFail
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0
setbyte sB_ANIM_TARGETS_HIT, 0
jumptocalledmove TRUE
BattleScript_CopycatFail:
ppreduce
Expand Down
2 changes: 1 addition & 1 deletion src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -16601,7 +16601,7 @@ void BS_TryCopycat(void)
{
NATIVE_ARGS(const u8 *failInstr);

if (gLastUsedMove == MOVE_NONE || gLastUsedMove == MOVE_UNAVAILABLE || gBattleMoves[gLastUsedMove].copycatBanned)
if (gLastUsedMove == MOVE_NONE || gLastUsedMove == MOVE_UNAVAILABLE || gBattleMoves[gLastUsedMove].copycatBanned || IsZMove(gLastUsedMove))
{
gBattlescriptCurrInstr = cmd->failInstr;
}
Expand Down

0 comments on commit 1a41b3c

Please sign in to comment.