summaryrefslogtreecommitdiff
path: root/src/engine/effect_functions.asm
diff options
context:
space:
mode:
authorxCrystal <rgr.crystal@gmail.com>2016-09-17 22:20:34 +0200
committerxCrystal <rgr.crystal@gmail.com>2016-09-17 22:20:34 +0200
commit2163db9ef29abe6507a1da4c8e77fe8d3fd77df2 (patch)
tree638496c1945b237ba6082533c8943967d4606889 /src/engine/effect_functions.asm
parent3d80668e91fe1812c86b2f1517d75f547479de7b (diff)
Acid effect and CheckNoDamageOrEffect
Diffstat (limited to 'src/engine/effect_functions.asm')
-rw-r--r--src/engine/effect_functions.asm41
1 files changed, 39 insertions, 2 deletions
diff --git a/src/engine/effect_functions.asm b/src/engine/effect_functions.asm
index 8ebacdc..a7d44d1 100644
--- a/src/engine/effect_functions.asm
+++ b/src/engine/effect_functions.asm
@@ -94,7 +94,33 @@ Func_2c09c: ; 2c09c (b:409c)
ret
; 0x2c0a2
-INCBIN "baserom.gbc",$2c0a2,$2c6f8 - $2c0a2
+INCBIN "baserom.gbc",$2c0a2,$2c149 - $2c0a2
+
+; apply a status condition identified by register a to the target if able
+ApplySubstatus2ToDefendingCard: ; 2c149 (b:4149)
+ push af
+ call CheckNoDamageOrEffect
+ jr c, .noDamageOrEffect
+ ld a, DUELVARS_ARENA_CARD_SUBSTATUS2
+ call GetNonTurnDuelistVariable
+ pop af
+ ld [hl], a
+ ld l, $f6
+ ld [hl], a
+ ret
+
+.noDamageOrEffect
+ pop af
+ push hl
+ bank1call $4f9d
+ pop hl
+ ld a, l
+ or h
+ call nz, DrawWideTextBox_PrintText
+ ret
+; 0x2c166
+
+INCBIN "baserom.gbc",$2c166,$2c6f8 - $2c166
SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8)
text_de PoisonCheckText
@@ -106,4 +132,15 @@ SpitPoison_Poison50PercentEffect: ; 2c6f8 (b:46f8)
ret
; 0x2c70a
-INCBIN "baserom.gbc",$2c70a,$30000 - $2c70a
+INCBIN "baserom.gbc",$2c70a,$2c77e - $2c70a
+
+AcidEffect: ; 2c77e (b:477e)
+ text_de AcidCheckText
+ call TossCoin_BankB
+ ret nc
+ ld a, SUBSTATUS2_UNABLE_RETREAT
+ call ApplySubstatus2ToDefendingCard
+ ret
+; 0x2c78b
+
+INCBIN "baserom.gbc",$2c78b,$30000 - $2c78b