mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Add subdirectories to engine/ similar to pokecrystal
This commit is contained in:
parent
5559d51c86
commit
f275790aec
124 changed files with 342 additions and 346 deletions
47
engine/battle/move_effects/paralyze.asm
Normal file
47
engine/battle/move_effects/paralyze.asm
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
ParalyzeEffect_:
|
||||
ld hl, wEnemyMonStatus
|
||||
ld de, wPlayerMoveType
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
jp z, .next
|
||||
ld hl, wBattleMonStatus
|
||||
ld de, wEnemyMoveType
|
||||
.next
|
||||
ld a, [hl]
|
||||
and a ; does the target already have a status ailment?
|
||||
jr nz, .didntAffect
|
||||
; check if the target is immune due to types
|
||||
ld a, [de]
|
||||
cp ELECTRIC
|
||||
jr nz, .hitTest
|
||||
ld b, h
|
||||
ld c, l
|
||||
inc bc
|
||||
ld a, [bc]
|
||||
cp GROUND
|
||||
jr z, .doesntAffect
|
||||
inc bc
|
||||
ld a, [bc]
|
||||
cp GROUND
|
||||
jr z, .doesntAffect
|
||||
.hitTest
|
||||
push hl
|
||||
callab MoveHitTest
|
||||
pop hl
|
||||
ld a, [wMoveMissed]
|
||||
and a
|
||||
jr nz, .didntAffect
|
||||
set PAR, [hl]
|
||||
callab QuarterSpeedDueToParalysis
|
||||
ld c, 30
|
||||
call DelayFrames
|
||||
callab PlayCurrentMoveAnimation
|
||||
jpab PrintMayNotAttackText
|
||||
.didntAffect
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
jpab PrintDidntAffectText
|
||||
.doesntAffect
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
jpab PrintDoesntAffectText
|
||||
Loading…
Add table
Add a link
Reference in a new issue