diff options
author | yenatch <yenatch@gmail.com> | 2013-09-08 22:44:20 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-09-08 22:44:20 -0400 |
commit | bd7563e0b6110f6425d5c1ad820c6c1669d2b632 (patch) | |
tree | 275fa6eaea1c75c8fdd836e543942366b25cad68 | |
parent | 05db4b4cb6ec2247c321a5ad7d842db9233fda2f (diff) |
comment arena trap move effect asm
-rw-r--r-- | battle/effect_commands.asm | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/battle/effect_commands.asm b/battle/effect_commands.asm index 3c997eb86..953aee752 100644 --- a/battle/effect_commands.asm +++ b/battle/effect_commands.asm @@ -9413,17 +9413,27 @@ BattleCommand50: ; 37492 BattleCommand51: ; 37517 ; arenatrap + +; Doesn't work on an absent opponent. + call CheckHiddenOpponent - jr nz, .asm_37530 ; 3751a $14 + jr nz, .failed + +; Don't trap if the opponent is already trapped. + ld a, BATTLE_VARS_SUBSTATUS5 call GetBattleVarPair - bit 7, [hl] - jr nz, .asm_37530 ; 37523 $b - set 7, [hl] + bit SUBSTATUS_CANT_RUN, [hl] + jr nz, .failed + +; Otherwise trap the opponent. + + set SUBSTATUS_CANT_RUN, [hl] call Function0x37e01 ld hl, CantEscapeNowText jp StdBattleTextBox -.asm_37530 + +.failed call Function0x37e77 jp PrintButItFailed ; 37536 |