diff options
| author | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
| commit | 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch) | |
| tree | dde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /engine/battle/moveEffects/one_hit_ko_effect.asm | |
| parent | Merge pull request #55 from Deokishisu/patch-1 (diff) | |
| download | pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip | |
Sync with pokered
Diffstat (limited to 'engine/battle/moveEffects/one_hit_ko_effect.asm')
| -rw-r--r-- | engine/battle/moveEffects/one_hit_ko_effect.asm | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/engine/battle/moveEffects/one_hit_ko_effect.asm b/engine/battle/moveEffects/one_hit_ko_effect.asm deleted file mode 100644 index 827e2197..00000000 --- a/engine/battle/moveEffects/one_hit_ko_effect.asm +++ /dev/null @@ -1,38 +0,0 @@ -OneHitKOEffect_: - ld hl, wDamage - xor a - ld [hli], a - ld [hl], a ; set the damage output to zero - dec a - ld [wCriticalHitOrOHKO], a - ld hl, wBattleMonSpeed + 1 - ld de, wEnemyMonSpeed + 1 - ld a, [H_WHOSETURN] - and a - jr z, .compareSpeed - ld hl, wEnemyMonSpeed + 1 - ld de, wBattleMonSpeed + 1 -.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 - ld a, [hld] - sub b - ld a, [de] - ld b, a - ld a, [hl] - sbc b - jr c, .userIsSlower - ld hl, wDamage - ld a, $ff - ld [hli], a - ld [hl], a - ld a, $2 - ld [wCriticalHitOrOHKO], a - ret -.userIsSlower -; keep damage at 0 and set move missed flag if target's current speed is higher instead - ld a, $1 - ld [wMoveMissed], a - ret |
