summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/System.c4g/MagicFlint.c
blob: a158248b475106381b9af19f4c9690f083a5fd8d (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
/*-- Summon flint --*/

#strict 2

#appendto MGFL

public func Activate(object caster, object realcaster)
{
	var result = CheckEffect("FlintNSpell", 0, 125);
	if (result)
	{
		RemoveObject();
		return result != -1;
	}

	Sound("Magic*");
	CreateParticle("MSpark", 0,0, 1000, RGBa(255,50,50,150));

	if (realcaster) caster = realcaster;
	
	var flints = [FLNT, SFLN, EFLN];
	caster->CreateContents(flints[Random(GetLength(flints))]);
	
	RemoveObject();
	return 1;
}