diff options
| author | Jan <> | 2015-07-10 18:11:22 +0200 |
|---|---|---|
| committer | Jan <_> | 2015-07-10 18:47:01 +0200 |
| commit | f1ece16c08d8c01e1d49a25f0314a96c021e73cb (patch) | |
| tree | 9bc9f547f2524dee8e62f168f317df465a6cbcdd /TemplePushing.c4s/Misc.c4d/AdditionalSpells.c4d/Airclaw.c4d/Script.c | |
| parent | 80b15646d73587f4e15a2897314692b58aa1a47f (diff) | |
| download | tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.tar.gz tempelschubsen-f1ece16c08d8c01e1d49a25f0314a96c021e73cb.zip | |
r0.921
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) |
