diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-03 09:38:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-03 09:38:52 -0400 |
| commit | c85050497c1bd062e9cd40bf5b32fa3beca366cc (patch) | |
| tree | 9593ddd3ab820223ab580d5fc0ae133b485b8315 /engine/battle/move_effects/paralyze.asm | |
| parent | Actually run .travis/webhook.sh (diff) | |
| parent | Add engine/movie/oak_speech/ subdirectory (diff) | |
| download | pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.gz pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.tar.xz pokeyellow-c85050497c1bd062e9cd40bf5b32fa3beca366cc.zip | |
Merge pull request #256 from Rangi42/master
Add subdirectories to engine/ similar to pokecrystal
Diffstat (limited to 'engine/battle/move_effects/paralyze.asm')
| -rw-r--r-- | engine/battle/move_effects/paralyze.asm | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/engine/battle/move_effects/paralyze.asm b/engine/battle/move_effects/paralyze.asm new file mode 100644 index 00000000..95979ae6 --- /dev/null +++ b/engine/battle/move_effects/paralyze.asm @@ -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 |
