From ca61c54b9bd69af897e4cc9d4385137fb56fd11a Mon Sep 17 00:00:00 2001 From: Jan <> Date: Mon, 2 Feb 2015 17:58:18 +0100 Subject: TemplePushingBeta.c4s --- TemplePushing.c4s/System.c4g/Plague.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 TemplePushing.c4s/System.c4g/Plague.c (limited to 'TemplePushing.c4s/System.c4g/Plague.c') 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); } + -- cgit v1.2.3-54-g00ecf