diff options
author | mid-kid <esteve.varela@gmail.com> | 2018-04-04 23:27:40 +0200 |
---|---|---|
committer | mid-kid <esteve.varela@gmail.com> | 2018-04-04 23:27:40 +0200 |
commit | d4025863cf56466b79827bace6d6b3e48ffd05e9 (patch) | |
tree | 0c12d4c119da0cab5a7acb17ddaba5d389bc1f8f /engine/battle/move_effects/false_swipe.asm | |
parent | 2958188fc6d1ea8d9a5c2d4f0d5a4e3d6ca8faaa (diff) |
Rename some battle commands
`hittarget` was misleading, as it doesn't actually "hit" the target, it
only plays the animation. As such, I've renamed it to `moveanim`.
`checkfaint` has nothing to do with checking if the user or target has
fainted, instead, it applies wCurDamage onto the target's HP, hitting
the substitute if applicable. I've renamed the command to `applydamage`
and all of its subfunctions accordingly.
Diffstat (limited to 'engine/battle/move_effects/false_swipe.asm')
-rw-r--r-- | engine/battle/move_effects/false_swipe.asm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm index e93b627ec..f00de91e7 100644 --- a/engine/battle/move_effects/false_swipe.asm +++ b/engine/battle/move_effects/false_swipe.asm @@ -1,6 +1,8 @@ BattleCommand_FalseSwipe: ; 35c94 ; falseswipe +; Makes sure wCurDamage < MonHP + ld hl, wEnemyMonHP ld a, [hBattleTurn] and a @@ -15,12 +17,14 @@ BattleCommand_FalseSwipe: ; 35c94 pop de pop hl jr c, .done + ld a, [hli] ld [de], a inc de ld a, [hl] dec a ld [de], a + inc a jr nz, .okay dec de @@ -28,11 +32,13 @@ BattleCommand_FalseSwipe: ; 35c94 dec a ld [de], a .okay + ld a, [wCriticalHit] cp 2 jr nz, .carry xor a ld [wCriticalHit], a + .carry scf ret |