mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-22 07:02:17 +13:00
Rename battle files and split move effects Part 4
e.asm, e_2. asm, and 14.asm
This commit is contained in:
parent
77d0e5ff84
commit
2fe782b11a
11 changed files with 651 additions and 651 deletions
62
engine/battle/unused_stats_functions.asm
Normal file
62
engine/battle/unused_stats_functions.asm
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
; does nothing since no stats are ever selected (barring glitches)
|
||||
DoubleSelectedStats: ; 39680 (e:5680)
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld a, [wPlayerStatsToDouble]
|
||||
ld hl, wBattleMonAttack + 1
|
||||
jr z, .notEnemyTurn
|
||||
ld a, [wEnemyStatsToDouble]
|
||||
ld hl, wEnemyMonAttack + 1
|
||||
.notEnemyTurn
|
||||
ld c, 4
|
||||
ld b, a
|
||||
.loop
|
||||
srl b
|
||||
call c, .doubleStat
|
||||
inc hl
|
||||
inc hl
|
||||
dec c
|
||||
ret z
|
||||
jr .loop
|
||||
|
||||
.doubleStat
|
||||
ld a, [hl]
|
||||
add a
|
||||
ld [hld], a
|
||||
ld a, [hl]
|
||||
rl a
|
||||
ld [hli], a
|
||||
ret
|
||||
|
||||
; does nothing since no stats are ever selected (barring glitches)
|
||||
HalveSelectedStats: ; 396a7 (e:56a7)
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
ld a, [wPlayerStatsToHalve]
|
||||
ld hl, wBattleMonAttack
|
||||
jr z, .notEnemyTurn
|
||||
ld a, [wEnemyStatsToHalve]
|
||||
ld hl, wEnemyMonAttack
|
||||
.notEnemyTurn
|
||||
ld c, 4
|
||||
ld b, a
|
||||
.loop
|
||||
srl b
|
||||
call c, .halveStat
|
||||
inc hl
|
||||
inc hl
|
||||
dec c
|
||||
ret z
|
||||
jr .loop
|
||||
|
||||
.halveStat
|
||||
ld a, [hl]
|
||||
srl a
|
||||
ld [hli], a
|
||||
rr [hl]
|
||||
or [hl]
|
||||
jr nz, .nonzeroStat
|
||||
ld [hl], 1
|
||||
.nonzeroStat
|
||||
dec hl
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue