You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Move-unique effect commands consistently go in engine/battle/move_effects/
This commit is contained in:
61
engine/battle/move_effects/fury_cutter.asm
Normal file
61
engine/battle/move_effects/fury_cutter.asm
Normal file
@@ -0,0 +1,61 @@
|
||||
BattleCommand_FuryCutter: ; 37792
|
||||
; furycutter
|
||||
|
||||
ld hl, PlayerFuryCutterCount
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .go
|
||||
ld hl, EnemyFuryCutterCount
|
||||
|
||||
.go
|
||||
ld a, [AttackMissed]
|
||||
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
|
||||
ld hl, CurDamage + 1
|
||||
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
|
||||
|
||||
ld hl, PlayerFuryCutterCount
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .reset
|
||||
ld hl, EnemyFuryCutterCount
|
||||
|
||||
.reset
|
||||
xor a
|
||||
ld [hl], a
|
||||
|
||||
pop hl
|
||||
ret
|
||||
|
||||
; 377ce
|
||||
Reference in New Issue
Block a user