diff options
author | xCrystal <rgr.crystal@gmail.com> | 2015-04-08 12:15:08 +0200 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2015-04-08 23:54:29 +0200 |
commit | b2dc57576d13ebf4dfa35b0132b003d2cfe4d39e (patch) | |
tree | 1be14a85d0771092f5833b575a1c613c39f42a57 /engine/battle/moveEffects/haze_effect.asm | |
parent | c2efe700ac1c5cca88bac710b98388a99665741e (diff) |
Document move effects
Document mist effect
Document recoil effect
Document heal effect
Update conversion_effect.asm
Update haze_effect.asm
Update leech_seed_effect.asm
Update pay_day_effect.asm
Update reflect_light_screen_effect.asm
Update substitute_effect.asm
Update transform_effect.asm
Diffstat (limited to 'engine/battle/moveEffects/haze_effect.asm')
-rw-r--r-- | engine/battle/moveEffects/haze_effect.asm | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/engine/battle/moveEffects/haze_effect.asm b/engine/battle/moveEffects/haze_effect.asm index 2343e784..87ab48b0 100644 --- a/engine/battle/moveEffects/haze_effect.asm +++ b/engine/battle/moveEffects/haze_effect.asm @@ -1,9 +1,11 @@ HazeEffect_: ; 139da (4:79da) ld a, $7 +; store 7 on every stat mod ld hl, wPlayerMonAttackMod call ResetStatMods ld hl, wEnemyMonAttackMod call ResetStatMods +; copy unmodified stats to battle stats ld hl, wPlayerMonUnmodifiedAttack ld de, wBattleMonAttack call ResetStats @@ -14,19 +16,20 @@ HazeEffect_: ; 139da (4:79da) ld de, wEnemySelectedMove ld a, [H_WHOSETURN] and a - jr z, .asm_13a09 + jr z, .cureStatuses ld hl, wBattleMonStatus - dec de + dec de ; wPlayerSelectedMove -.asm_13a09 +.cureStatuses ld a, [hl] ld [hl], $0 - and $27 - jr z, .asm_13a13 + and SLP | (1 << FRZ) + jr z, .cureVolatileStatuses +; prevent the Pokemon from executing a move if it was asleep or frozen ld a, $ff ld [de], a -.asm_13a13 +.cureVolatileStatuses xor a ld [W_PLAYERDISABLEDMOVE], a ld [W_ENEMYDISABLEDMOVE], a @@ -34,19 +37,21 @@ HazeEffect_: ; 139da (4:79da) ld [hli], a ld [hl], a ld hl, W_PLAYERBATTSTATUS1 - call CureStatuses + call CureVolatileStatuses ld hl, W_ENEMYBATTSTATUS1 - call CureStatuses + call CureVolatileStatuses ld hl, PlayCurrentMoveAnimation call CallBankF ld hl, StatusChangesEliminatedText jp PrintText -CureStatuses: ; 13a37 (4:7a37) +CureVolatileStatuses: ; 13a37 (4:7a37) +; only cures statuses of the Pokemon not using Haze res Confused, [hl] inc hl ; BATTSTATUS2 ld a, [hl] - and (1 << UsingRage) | (1 << NeedsToRecharge) | (1 << HasSubstituteUp) | (1 << 3) ; clear all but these from BATTSTATUS2 + ; clear UsingXAccuracy, ProtectedByMist, GettingPumped, and Seeded statuses + and (1 << UsingRage) | (1 << NeedsToRecharge) | (1 << HasSubstituteUp) | (1 << 3) ld [hli], a ; BATTSTATUS3 ld a, [hl] and %11110000 | (1 << Transformed) ; clear Bad Poison, Reflect and Light Screen statuses @@ -56,7 +61,7 @@ CureStatuses: ; 13a37 (4:7a37) ResetStatMods: ; 13a43 (4:7a43) ld b, $8 .loop - ld [hli], a + ld [hli], a dec b jr nz, .loop ret |