summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s
diff options
context:
space:
mode:
authorMittendrein Markus <maxmitti@gmx.net>2015-09-08 21:38:39 +0200
committerMittendrein Markus <maxmitti@gmx.net>2015-09-08 21:38:39 +0200
commit510eec29df7b29a928d0244b58d9d110729e1508 (patch)
tree446b603d8d35b8e5db476c047dae14606ce82a99 /TemplePushing.c4s
parent14ea123b3950acd08d136ee0a6a23201df074756 (diff)
downloadtempelschubsen-510eec29df7b29a928d0244b58d9d110729e1508.tar.gz
tempelschubsen-510eec29df7b29a928d0244b58d9d110729e1508.zip
Remove scrolls after succesfull spell cast even if FadeOut effect ist active
Diffstat (limited to 'TemplePushing.c4s')
-rw-r--r--TemplePushing.c4s/System.c4g/Scroll.c12
1 files changed, 12 insertions, 0 deletions
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";
+}