summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/Scroll.c
blob: 6156e2606f39d7818e95241a4df25e9c8613ffae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#strict 2

#appendto SCRL

static SCRL_spells;

protected func Initialize()
{
	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;
}