summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Plague.c
diff options
context:
space:
mode:
authorJan <>2015-02-02 17:58:18 +0100
committerJan <_>2015-07-10 17:51:43 +0200
commitca61c54b9bd69af897e4cc9d4385137fb56fd11a (patch)
treea4363f466cea6de48ca81fadc08273d58698d2ff /TemplePushing.c4s/System.c4g/Plague.c
parent32a9632fbca3dd7a88bd3154b84a3773af39c276 (diff)
downloadtempelschubsen-ca61c54b9bd69af897e4cc9d4385137fb56fd11a.tar.gz
tempelschubsen-ca61c54b9bd69af897e4cc9d4385137fb56fd11a.zip
TemplePushingBeta.c4s
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Plague.c')
-rw-r--r--TemplePushing.c4s/System.c4g/Plague.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Plague.c b/TemplePushing.c4s/System.c4g/Plague.c
new file mode 100644
index 0000000..ea80c2e
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Plague.c
@@ -0,0 +1,33 @@
+/*-- Plague --*/
+
+#strict
+
+#appendto MGPL
+
+func FxPoisonTimer(pClonk, iEffectNumber, iEffectTime)
+{
+ if(iEffectTime >= 1200) return(-1);
+ var fSnake = EffectVar(1, pClonk, iEffectNumber);
+ var idType = GetID(pClonk);
+ CreateParticle("PoisonWave", GetX(pClonk), GetY(pClonk), 0, -1, EffectVar(0, pClonk, iEffectNumber)*5+50, RGBa(fSnake*200, 255, 0), pClonk, 1);
+ CreateParticle("PSpark", GetX(pClonk), GetY(pClonk), 0, -1, EffectVar(0, pClonk, iEffectNumber)*5+50, RGBa(fSnake*55, 55, 0), pClonk, 1);
+ if(GBackLiquid(GetX(pClonk), GetY(pClonk))) return(-1);
+
+ if(!Random(7)) DoEnergy(-2, pClonk);
+ var obj;
+ var iRadius = EffectCall(pClonk,iEffectNumber,"MaxRange");
+ while(obj = FindObject(0, -iRadius+GetX(pClonk),-iRadius+GetY(pClonk),iRadius*2,iRadius*2, OCF_Alive(),0,0, NoContainer(), obj))
+ {
+ if(!GetEffect("Poison", obj))
+ {
+ if(!GetAction(obj)S="Field")
+ {
+ AddEffect("Poison",obj,182,10,0,MGPL,fSnake);
+ }
+ }
+ }
+ return(1);
+}
+
+func FxPoisonMaxRange() { return(100); }
+