From 510eec29df7b29a928d0244b58d9d110729e1508 Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Tue, 8 Sep 2015 21:38:39 +0200 Subject: Remove scrolls after succesfull spell cast even if FadeOut effect ist active --- TemplePushing.c4s/System.c4g/Scroll.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'TemplePushing.c4s') diff --git a/TemplePushing.c4s/System.c4g/Scroll.c b/TemplePushing.c4s/System.c4g/Scroll.c index 6156e26..f79bb63 100644 --- a/TemplePushing.c4s/System.c4g/Scroll.c +++ b/TemplePushing.c4s/System.c4g/Scroll.c @@ -14,6 +14,7 @@ protected func Initialize() public func SpellFailed(id idSpell, object pAimingClonk) { // Spell canceled? Give back the scroll + SetActionTargets(0, 0, this); SetSpell(idSpell); if(pAimingClonk && !pAimingClonk->~RejectCollect(GetID(this), this)) { @@ -27,3 +28,14 @@ global func SetScrollSpells(array spells) { SCRL_spells = spells; } + +protected func WannaRemove() +{ + // manche Zauber hängen gerne Effekte an den Caster + if(!(GetEffectCount(0,this()) - GetEffectCount("FadeOut", this)) && !pAimingClonk) RemoveObject(); +} + +public func AvoidFadeOut() +{ + return GetAction(this) == "WannaRemove"; +} -- cgit v1.2.3-54-g00ecf