diff options
Diffstat (limited to 'TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c')
| -rw-r--r-- | TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c new file mode 100644 index 0000000..d4008c2 --- /dev/null +++ b/TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c @@ -0,0 +1,46 @@ +/* Luftklaue */ + +#strict 2 + +func Activate(pCaster,pRealcaster) { + var pClonk; + if(pRealcaster) pClonk=pRealcaster; + else pClonk=pCaster; + + // Nicht im Gebäude zaubern + if(Contained(pClonk)) + { + Sound("Error"); + PlayerMessage(GetOwner(pClonk), "$must_be_in_free$", pClonk); + RemoveObject(); + return 0; + } + + // Zielen wenn möglich + if (pClonk->~DoSpellAim(this(), pCaster)) return 1; + + // Sonst einfach ungezielt loslassen + var angle=-90; + if(GetDir(pClonk) == DIR_Right) angle=90; + ActivateAngle(pClonk,angle); + + return; +} + +// Aktivierung nach Zielen (iAngle: -90=links; 0=oben; +90=rechts) +public func ActivateAngle(object pCaller, int iAngle) +{ + // Klaue erzeugen und losschicken + CreateObject(AFTF,AbsX(GetX(pCaller))+Cos(iAngle-90,10),AbsY(GetY(pCaller))+Sin(iAngle-90,10)+19,GetOwner(pCaller))->Activate(pCaller,iAngle); + + // Objekt löschen + RemoveObject(); + return 1; +} + +public func IsBattlemageSpell() { return true; } + +/* Zaubercombo */ + +public func GetSpellStaff(object pMage) { return SMAR; } +public func GetSpellStaffCombo(pMage) { return ("44"); } // (1: Backward; 2: Down; 3: Forward; 4: Throw; 5: Jump; 6: Dig) |
