summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Icestrike.c
diff options
context:
space:
mode:
authorJan <>2015-07-10 18:11:22 +0200
committerJan <_>2015-07-10 18:47:01 +0200
commitf1ece16c08d8c01e1d49a25f0314a96c021e73cb (patch)
tree9bc9f547f2524dee8e62f168f317df465a6cbcdd /TemplePushing.c4s/System.c4g/Icestrike.c
parent80b15646d73587f4e15a2897314692b58aa1a47f (diff)
downloadtempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.tar.gz
tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.zip
r0.921
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Icestrike.c')
-rw-r--r--TemplePushing.c4s/System.c4g/Icestrike.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Icestrike.c b/TemplePushing.c4s/System.c4g/Icestrike.c
new file mode 100644
index 0000000..ccff6a9
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Icestrike.c
@@ -0,0 +1,38 @@
+/*-- Icestrike --*/
+
+#strict 2
+
+#appendto MICS
+
+func Activate(pCaller, pRealcaller)
+{
+ var pClonk;
+ if(pRealcaller) pClonk=pRealcaller;
+ else pClonk=pCaller;
+
+ // Effekt prüfen
+ var iResult;
+ if (iResult = CheckEffect("IcestrikeNSpell", 0, 125)) return(iResult!=-1 && RemoveObject());
+
+ // Zauber
+ Sound("Magic*");
+ var iX, iY;
+ iX=AbsX(GetX(pCaller)-25+50*GetDir(pCaller));
+ iY=AbsY(GetY(pCaller));
+ pBall=CreateObject(ICEB, AbsX(GetX(pCaller)-25+50*GetDir(pCaller)), AbsY(GetY(pCaller)), GetOwner(pCaller));
+ pBall->SetCaster(pCaller);
+
+ // Zielen wenn möglich
+ if (pClonk->~DoSpellAim(this(), pCaller)) return(1);
+ return(1);
+}
+
+// Aktivierung nach Zielen (iAngle: -90=links; 0=oben; +90=rechts)
+public func ActivateAngle(object pCaller, int iAngle)
+{
+ // Eisball freigeben (wenn noch existent)
+ if (pBall) pBall->SetAngle(iAngle);
+
+ // Objekt löschen
+ return(RemoveObject());
+} \ No newline at end of file