diff options
author | xCrystal <rgr.crystal@gmail.com> | 2015-04-08 12:15:08 +0200 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-08 23:54:29 +0200 |
commit | b2dc57576d13ebf4dfa35b0132b003d2cfe4d39e (patch) | |
tree | 1be14a85d0771092f5833b575a1c613c39f42a57 /engine/battle/moveEffects/one_hit_ko_effect.asm | |
parent | c2efe700ac1c5cca88bac710b98388a99665741e (diff) |
Document move effects
Document mist effect
Document recoil effect
Document heal effect
Update conversion_effect.asm
Update haze_effect.asm
Update leech_seed_effect.asm
Update pay_day_effect.asm
Update reflect_light_screen_effect.asm
Update substitute_effect.asm
Update transform_effect.asm
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 |