diff options
| author | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
|---|---|---|
| committer | yenatch <yenatch@gmail.com> | 2015-04-01 12:56:42 -0400 |
| commit | c2efe700ac1c5cca88bac710b98388a99665741e (patch) | |
| tree | b30d2f676d5ad0d78b959c8ffcf0f8dcfca13943 /engine/battle/moveEffects/paralyze_effect.asm | |
| parent | Merge pull request #88 from YamaArashi/master (diff) | |
| parent | Further split bank e stuff (diff) | |
| download | pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.tar.gz pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.tar.xz pokeyellow-c2efe700ac1c5cca88bac710b98388a99665741e.zip | |
Merge pull request #90 from xCrystal/master
Rename/split battle and move effect files. Battle functions, AI, and attack animations
Diffstat (limited to 'engine/battle/moveEffects/paralyze_effect.asm')
| -rw-r--r-- | engine/battle/moveEffects/paralyze_effect.asm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/engine/battle/moveEffects/paralyze_effect.asm b/engine/battle/moveEffects/paralyze_effect.asm new file mode 100644 index 00000000..69acbb01 --- /dev/null +++ b/engine/battle/moveEffects/paralyze_effect.asm @@ -0,0 +1,53 @@ +ParalyzeEffect_: ; 52601 (14:6601) + ld hl, wEnemyMonStatus + ld de, W_PLAYERMOVETYPE + ld a, [H_WHOSETURN] + and a + jp z, .next + ld hl, wBattleMonStatus + ld de, W_ENEMYMOVETYPE +.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, [W_MOVEMISSED] + and a + jr nz, .didntAffect + set PAR, [hl] + callab QuarterSpeedDueToParalysis + ld c, 30 + call DelayFrames + callab PlayCurrentMoveAnimation + ld hl, PrintMayNotAttackText + ld b, BANK(PrintMayNotAttackText) + jp Bankswitch +.didntAffect + ld c, 50 + call DelayFrames + ld hl, PrintDidntAffectText + ld b, BANK(PrintDidntAffectText) + jp Bankswitch +.doesntAffect + ld c, 50 + call DelayFrames + ld hl, PrintDoesntAffectText + ld b, BANK(PrintDoesntAffectText) + jp Bankswitch |
