diff options
author | yenatch <yenatch@gmail.com> | 2015-04-09 12:25:29 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-04-09 12:25:29 -0400 |
commit | 941d2b9eb8a59b42ea71a08b34b25c06477cf36d (patch) | |
tree | b304682416ef55ddb763759cab6d03aeb1af5f55 /engine/battle/moveEffects/one_hit_ko_effect.asm | |
parent | c2efe700ac1c5cca88bac710b98388a99665741e (diff) | |
parent | 9739c26ed7fa89492cbc8609445d292ced48ee65 (diff) |
Merge pull request #93 from xCrystal/master
Document some move effects
Diffstat (limited to 'engine/battle/moveEffects/one_hit_ko_effect.asm')
-rw-r--r-- | engine/battle/moveEffects/one_hit_ko_effect.asm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm index 84418e33..cc0eca7b 100644 --- a/engine/battle/moveEffects/one_hit_ko_effect.asm +++ b/engine/battle/moveEffects/one_hit_ko_effect.asm @@ -7,12 +7,13 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld [wCriticalHitOrOHKO], a ld hl, wBattleMonSpeed + 1 ld de, wEnemyMonSpeed + 1 - ld a, [H_WHOSETURN] ; $fff3 + ld a, [H_WHOSETURN] and a - jr z, .asm_33f72 + jr z, .compareSpeed ld hl, wEnemyMonSpeed + 1 ld de, wBattleMonSpeed + 1 -.asm_33f72 +.compareSpeed +; set damage to 65535 and OHKO flag is the user's current speed is higher than the target's ld a, [de] dec de ld b, a @@ -22,7 +23,7 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld b, a ld a, [hl] sbc b - jr c, .asm_33f8a + jr c, .userIsSlower ld hl, W_DAMAGE ld a, $ff ld [hli], a @@ -30,7 +31,8 @@ OneHitKOEffect_: ; 33f57 (c:7f57) ld a, $2 ld [wCriticalHitOrOHKO], a ret -.asm_33f8a +.userIsSlower +; keep damage at 0 and set move missed flag if target's current speed is higher instead ld a, $1 ld [W_MOVEMISSED], a ret |