summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Scroll.c
diff options
context:
space:
mode:
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;
+}