summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g
diff options
context:
space:
mode:
Diffstat (limited to 'TemplePushing.c4s/System.c4g')
-rw-r--r--TemplePushing.c4s/System.c4g/Axe.c20
-rw-r--r--TemplePushing.c4s/System.c4g/Clonk.c27
-rw-r--r--TemplePushing.c4s/System.c4g/EmptyGoblet.c13
-rw-r--r--TemplePushing.c4s/System.c4g/Flint.c20
-rw-r--r--TemplePushing.c4s/System.c4g/Goblet.c12
-rw-r--r--TemplePushing.c4s/System.c4g/Meteor.c7
-rw-r--r--TemplePushing.c4s/System.c4g/Rock.c20
-rw-r--r--TemplePushing.c4s/System.c4g/Scroll.c10
-rw-r--r--TemplePushing.c4s/System.c4g/StringTblDE.txt2
-rw-r--r--TemplePushing.c4s/System.c4g/StringTblUS.txt2
-rw-r--r--TemplePushing.c4s/System.c4g/Sword.c20
11 files changed, 153 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Axe.c b/TemplePushing.c4s/System.c4g/Axe.c
new file mode 100644
index 0000000..1de4d9a
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Axe.c
@@ -0,0 +1,20 @@
+#strict
+#appendto AXE1
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast2");
+ Exit(this(),-10+20*GetDir(pClonk));
+ SetXDir(-80+160*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+}
+
+func Hit()
+{
+ if (Random(2)) return(_inherited());
+ SetYDir(-20);
+ Sound("BOING");
+ return(1);
+}
diff --git a/TemplePushing.c4s/System.c4g/Clonk.c b/TemplePushing.c4s/System.c4g/Clonk.c
new file mode 100644
index 0000000..2308576
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Clonk.c
@@ -0,0 +1,27 @@
+#strict 2
+#appendto CLNK
+
+protected func ControlSpecial()
+{
+ [$Push$|Image=CXIV]
+
+ if (GetAction() != "Walk") return 0;
+
+ // Use action "Throw" starting with phase 3
+ SetAction("Throw");
+ SetPhase(3);
+
+ // Find clonks in range
+ var clonks = FindObjects(
+ Find_ID(CLNK),
+ Find_InRect(-10 + GetDir() * 20, 0, 10, 10),
+ Find_OCF(OCF_Alive),
+ // Only include allied players' clonks if "friendly pushing" rule is present
+ Find_Or(Find_Func(FindObject(FYPG)), Find_Hostile(GetOwner())));
+
+ if (GetLength(clonks) == 0) return 0;
+
+ // Randomly select clonk to be pushed
+ Fling(clonks[Random(GetLength(clonks))], -1 + GetDir() * 2, -1);
+ return 1;
+}
diff --git a/TemplePushing.c4s/System.c4g/EmptyGoblet.c b/TemplePushing.c4s/System.c4g/EmptyGoblet.c
new file mode 100644
index 0000000..7c48007
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/EmptyGoblet.c
@@ -0,0 +1,13 @@
+#strict
+#appendto EGBL
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast2");
+ Sound("Crystal3");
+ Exit(this(),-20+40*GetDir(pClonk));
+ SetXDir(-100+200*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+} \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/Flint.c b/TemplePushing.c4s/System.c4g/Flint.c
new file mode 100644
index 0000000..978319d
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Flint.c
@@ -0,0 +1,20 @@
+#strict
+#appendto FLNT
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast2");
+ Exit(this(),-10+20*GetDir(pClonk));
+ SetXDir(-80+160*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+}
+
+func Hit()
+{
+ if (Random(2)) return(_inherited());
+ SetYDir(-20);
+ Sound("BOING");
+ return(1);
+} \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/Goblet.c b/TemplePushing.c4s/System.c4g/Goblet.c
new file mode 100644
index 0000000..eb4911f
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Goblet.c
@@ -0,0 +1,12 @@
+#strict
+#appendto OGBT
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast2");
+ Exit(this(),-10+20*GetDir(pClonk));
+ SetXDir(-80+160*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+}
diff --git a/TemplePushing.c4s/System.c4g/Meteor.c b/TemplePushing.c4s/System.c4g/Meteor.c
new file mode 100644
index 0000000..600733a
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Meteor.c
@@ -0,0 +1,7 @@
+#strict
+#appendto METO
+
+protected func Hit() {
+ if (FindObject(RCKF)) Explode(Random(75));
+ Explode(explosion_base+Random(12));
+} \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/Rock.c b/TemplePushing.c4s/System.c4g/Rock.c
new file mode 100644
index 0000000..e094b4c
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Rock.c
@@ -0,0 +1,20 @@
+#strict
+#appendto ROCK
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast1");
+ Exit(this(),-15+30*GetDir(pClonk));
+ SetXDir(-100+200*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+}
+
+func Hit()
+{
+ if (Random(5)) return(_inherited());
+ SetYDir(-25);
+ Sound("BOING");
+ return(1);
+} \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/Scroll.c b/TemplePushing.c4s/System.c4g/Scroll.c
new file mode 100644
index 0000000..0bc56ba
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Scroll.c
@@ -0,0 +1,10 @@
+#strict
+#appendto SCRL
+static SpID;
+
+func Initialize()
+{
+ SpID=[ABLA,MBOT,MFRB,MDBT,GVTY,MMTR,MLGT,CFAL,MSSH,MINV,MQKE,MARK,_FWV,_MFL];
+ SetSpell(SpID[Random(GetLength(SpID))]);
+ return(_inherited());
+} \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/StringTblDE.txt b/TemplePushing.c4s/System.c4g/StringTblDE.txt
new file mode 100644
index 0000000..8e22f20
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/StringTblDE.txt
@@ -0,0 +1,2 @@
+Shot=Schießen
+Push=Schubsen \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/StringTblUS.txt b/TemplePushing.c4s/System.c4g/StringTblUS.txt
new file mode 100644
index 0000000..42b3635
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/StringTblUS.txt
@@ -0,0 +1,2 @@
+Shot=Shoot
+Push=Push \ No newline at end of file
diff --git a/TemplePushing.c4s/System.c4g/Sword.c b/TemplePushing.c4s/System.c4g/Sword.c
new file mode 100644
index 0000000..9fc46af
--- /dev/null
+++ b/TemplePushing.c4s/System.c4g/Sword.c
@@ -0,0 +1,20 @@
+#strict
+#appendto SWOR
+
+func Activate(pClonk)
+{
+ [$Shot$|Image=GNPW]
+ Sound("Blast2");
+ Exit(this(),-10+20*GetDir(pClonk));
+ SetXDir(-80+160*GetDir(pClonk));
+ SetYDir(-10);
+ return(1);
+}
+
+func Hit()
+{
+ if (Random(2)) return(_inherited());
+ SetYDir(-20);
+ Sound("BOING");
+ return(1);
+}