summaryrefslogtreecommitdiff
path: root/src/engine/effect_functions.asm
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2016-03-06 22:14:47 +0100
committerxCrystal <rgr.crystal@gmail.com>2016-03-06 22:22:21 +0100
commit845e54b091ca11b1c32416515ca10eb477ff5716 (patch)
treee567fe5d36748f390e81cc709b9f6cf7d6d1b95f /src/engine/effect_functions.asm
parentd351b99bd529c265d6084c51789006ee378c19be (diff)
temp card id addresses and some status handling functions
Diffstat (limited to 'src/engine/effect_functions.asm')
-rw-r--r--src/engine/effect_functions.asm26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm
index 143ab22..df4bb99 100644
--- a/src/engine/effect_functions.asm
+++ b/src/engine/effect_functions.asm
@@ -36,28 +36,30 @@ applyEffect
ld a, [$ff97]
ld hl, $cc05
cp [hl]
- jr nz, .asm_2c061
- ld a, [wccc4]
- cp $cb
- jr z, .asm_2c058
- cp $cc
- jr z, .asm_2c058
- cp $be
- jr nz, .asm_2c061
+ jr nz, .canInduceStatus
+ ld a, [wTempNonTurnDuelistCardId]
+ cp CLEFAIRY_DOLL
+ jr z, .cantInduceStatus
+ cp MYSTERIOUS_FOSSIL
+ jr z, .cantInduceStatus
+ ; snorlax's thick skinned prevents it from being statused...
+ cp SNORLAX
+ jr nz, .canInduceStatus
call SwapTurn
xor a
- call Func_34f0
+ ; ...unless already so, or if affected by muk's toxic gas
+ call CheckIfUnderAnyCannotUseStatus2
call SwapTurn
- jr c, .asm_2c061
+ jr c, .canInduceStatus
-.asm_2c058
+.cantInduceStatus
ld a, c
ld [wccf1], a
call Func_2c09c
or a
ret
-.asm_2c061
+.canInduceStatus
ld hl, wcccd
push hl
ld e, [hl]