blob: 1704ef89b63e9726bef5224515850d4283a21701 (
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
30
31
32
33
34
35
36
37
38
|
/*-- Make Ice Strike compatible with scrolls and Aimer --*/
#strict 2
#appendto MICS
func Activate(pCaller, pRealcaller)
{
var pClonk;
if(pRealcaller) pClonk=pRealcaller;
else pClonk=pCaller;
// Effekt prüfen
var iResult;
if (iResult = CheckEffect("IcestrikeNSpell", 0, 125)) return(iResult!=-1 && RemoveObject());
// Zauber
Sound("Magic*");
var iX, iY;
iX=AbsX(GetX(pCaller)-25+50*GetDir(pCaller));
iY=AbsY(GetY(pCaller));
pBall=CreateObject(ICEB, AbsX(GetX(pCaller)-25+50*GetDir(pCaller)), AbsY(GetY(pCaller)), GetOwner(pCaller));
pBall->SetCaster(pCaller);
// Zielen wenn möglich
if (pClonk->~DoSpellAim(this(), pCaller)) return(1);
return(1);
}
// Aktivierung nach Zielen (iAngle: -90=links; 0=oben; +90=rechts)
public func ActivateAngle(object pCaller, int iAngle)
{
// Eisball freigeben (wenn noch existent)
if (pBall) pBall->SetAngle(iAngle);
// Objekt löschen
return(RemoveObject());
}
|