summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Scroll.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/Scroll.c
parent80b15646d73587f4e15a2897314692b58aa1a47f (diff)
downloadtempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.tar.gz
tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.zip
r0.921
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Scroll.c')
-rw-r--r--TemplePushing.c4s/System.c4g/Scroll.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/TemplePushing.c4s/System.c4g/Scroll.c b/TemplePushing.c4s/System.c4g/Scroll.c
index 7228fe0..6156e26 100644
--- a/TemplePushing.c4s/System.c4g/Scroll.c
+++ b/TemplePushing.c4s/System.c4g/Scroll.c
@@ -2,12 +2,28 @@
#appendto SCRL
+static SCRL_spells;
+
protected func Initialize()
{
- var spells = [ABLA, MBOT, MFRB, MDBT, GVTY, MMTR, MLGT, CFAL, MSSH, MINV, MQKE, MARK, MFWV, MGFL, LAVS, MGPL, ICNL];
- if (mode == MODE_Festive) spells = [ABLA, MFWV, MICS, MLGT, MGPL, ICNL];
-
- SetSpell(spells[Random(GetLength(spells))]);
+ SetSpell(SCRL_spells[Random(GetLength(SCRL_spells))]);
return _inherited();
}
+
+public func SpellFailed(id idSpell, object pAimingClonk)
+{
+ // Spell canceled? Give back the scroll
+ SetSpell(idSpell);
+ if(pAimingClonk && !pAimingClonk->~RejectCollect(GetID(this), this))
+ {
+ Enter(pAimingClonk, this);
+ }
+ pAimingClonk = 0;
+ return 0;
+}
+
+global func SetScrollSpells(array spells)
+{
+ SCRL_spells = spells;
+}