mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-07 00:25:24 +13:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
53
engine/battle/move_effects/fury_cutter.asm
Normal file
53
engine/battle/move_effects/fury_cutter.asm
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
BattleCommand_FuryCutter:
|
||||
ld hl, wPlayerFuryCutterCount
|
||||
ldh a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .go
|
||||
ld hl, wEnemyFuryCutterCount
|
||||
|
||||
.go
|
||||
ld a, [wAttackMissed]
|
||||
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, wCurDamage + 1
|
||||
sla [hl]
|
||||
dec hl
|
||||
rl [hl]
|
||||
jr nc, .checkdouble
|
||||
|
||||
; No overflow
|
||||
ld a, $ff
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
ResetFuryCutterCount:
|
||||
push hl
|
||||
|
||||
ld hl, wPlayerFuryCutterCount
|
||||
ldh a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .reset
|
||||
ld hl, wEnemyFuryCutterCount
|
||||
|
||||
.reset
|
||||
xor a
|
||||
ld [hl], a
|
||||
|
||||
pop hl
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue