diff options
| author | Jan <> | 2015-07-10 18:11:22 +0200 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 18:47:01 +0200 |
| commit | f1ece16c08d8c01e1d49a25f0314a96c021e73cb (patch) | |
| tree | 9bc9f547f2524dee8e62f168f317df465a6cbcdd /TemplePushing.c4s/System.c4g/Blackout.c | |
| parent | 80b15646d73587f4e15a2897314692b58aa1a47f (diff) | |
| download | tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.tar.gz tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.zip | |
r0.921
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Blackout.c')
| -rw-r--r-- | TemplePushing.c4s/System.c4g/Blackout.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Blackout.c b/TemplePushing.c4s/System.c4g/Blackout.c new file mode 100644 index 0000000..b3f3bdb --- /dev/null +++ b/TemplePushing.c4s/System.c4g/Blackout.c @@ -0,0 +1,51 @@ +/*-- Kill tracking Blackout --*/ + +#appendto MBOT +#strict 2 + +public func Activate(object pCaster, object pRealcaster) { + // Effekte! + Sound("Magic*", 0, this(), 70); + var iRange=100; + var iDuration = 37; + var iAng, iX, iY, iRng; + // Kombo: Stein verlängert Dauer + var pComboObj; + if (pComboObj = FindContents(ROCK, pCaster)) + { + iDuration *= 2; + RemoveObject(pComboObj); + } + // Kombo: Fisch und Kohle vergrößert Radius + pComboObj = FindContents(FISH, pCaster); + if (!pComboObj) pComboObj = FindContents(DFSH, pCaster); + if (!pComboObj) pComboObj = FindContents(COAL, pCaster); + if (pComboObj) + { + if (GetAlive(pComboObj)) + iRange *= 3; + else + iRange *= 2; + RemoveObject(pComboObj); + } + for(var i=iRange/2; i>0; --i) + { + iAng=Random(360); + iRng=Random(iRange/2); + iX=Sin(iAng, iRng); + iY=Cos(iAng, iRng); + CreateParticle("Feather", iX, iY, RandomX(-5,5), -3, 50+Random(25)); + } + var pClonk,pVictim; + if(!(pClonk=pRealcaster)) pClonk=pCaster; + // alle Clonks im näheren Umkreis prüfen + while(pVictim=FindObject(0,-iRange/2,-iRange/2,iRange,iRange,OCF_CrewMember,0,0,NoContainer(),pVictim)) + // die Opfer sind feindliche Clonks oder alle Clonks außer dem Zauberer selbst wenn NoTeamMagic aktiviert ist + if((Hostile(GetOwner(pVictim),GetOwner(pClonk)) || ObjectCount(NTMG)) && pClonk!=pVictim) + { + // wirkt länger bei heruntergekämpften Clonks + AddEffect("SleepNSpell",pVictim,123,25,0,GetID(),iDuration*((115-GetEnergy(pVictim)*100000/GetPhysical("Energy",0, pVictim))/5)); + SetKiller(GetController(pClonk), pVictim); + } + return(1); +} |
