mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-02-06 16:15: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
26
engine/battle/move_effects/frustration.asm
Normal file
26
engine/battle/move_effects/frustration.asm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
BattleCommand_FrustrationPower:
|
||||
; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md)
|
||||
push bc
|
||||
ld hl, wBattleMonHappiness
|
||||
ldh a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .ok
|
||||
ld hl, wEnemyMonHappiness
|
||||
.ok
|
||||
ld a, $ff
|
||||
sub [hl]
|
||||
ldh [hMultiplicand + 2], a
|
||||
xor a
|
||||
ldh [hMultiplicand + 0], a
|
||||
ldh [hMultiplicand + 1], a
|
||||
ld a, 10
|
||||
ldh [hMultiplier], a
|
||||
call Multiply
|
||||
ld a, 25
|
||||
ldh [hDivisor], a
|
||||
ld b, 4
|
||||
call Divide
|
||||
ldh a, [hQuotient + 3]
|
||||
ld d, a
|
||||
pop bc
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue