mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-07 16:15:23 +13:00
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
This commit is contained in:
parent
c2efe700ac
commit
b2dc57576d
11 changed files with 158 additions and 129 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue