2018-01-26 16:36:00 +00:00
|
|
|
BattleCommand_FuryCutter: ; 37792
|
|
|
|
; furycutter
|
|
|
|
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wPlayerFuryCutterCount
|
2018-01-26 16:36:00 +00:00
|
|
|
ld a, [hBattleTurn]
|
|
|
|
and a
|
|
|
|
jr z, .go
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wEnemyFuryCutterCount
|
2018-01-26 16:36:00 +00:00
|
|
|
|
|
|
|
.go
|
2018-02-03 23:21:53 +00:00
|
|
|
ld a, [wAttackMissed]
|
2018-01-26 16:36:00 +00:00
|
|
|
and a
|
|
|
|
jp nz, ResetFuryCutterCount
|
|
|
|
|
|
|
|
inc [hl]
|
|
|
|
|
|
|
|
; Damage capped at 5 turns' worth (16x).
|
|
|
|
ld a, [hl]
|
|
|
|
ld b, a
|
|
|
|
cp 6
|
|
|
|
jr c, .checkdouble
|
|
|
|
ld b, 5
|
|
|
|
|
|
|
|
.checkdouble
|
|
|
|
dec b
|
|
|
|
ret z
|
|
|
|
|
|
|
|
; Double the damage
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wCurDamage + 1
|
2018-01-26 16:36:00 +00:00
|
|
|
sla [hl]
|
|
|
|
dec hl
|
|
|
|
rl [hl]
|
|
|
|
jr nc, .checkdouble
|
|
|
|
|
|
|
|
; No overflow
|
|
|
|
ld a, $ff
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
; 377be
|
|
|
|
|
|
|
|
|
|
|
|
ResetFuryCutterCount: ; 377be
|
|
|
|
|
|
|
|
push hl
|
|
|
|
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wPlayerFuryCutterCount
|
2018-01-26 16:36:00 +00:00
|
|
|
ld a, [hBattleTurn]
|
|
|
|
and a
|
|
|
|
jr z, .reset
|
2018-02-03 23:21:53 +00:00
|
|
|
ld hl, wEnemyFuryCutterCount
|
2018-01-26 16:36:00 +00:00
|
|
|
|
|
|
|
.reset
|
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
|
|
|
; 377ce
|