diff options
| author | Mittendrein Markus <maxmitti@gmx.net> | 2016-02-14 23:04:19 +0100 |
|---|---|---|
| committer | Mittendrein Markus <maxmitti@gmx.net> | 2016-02-14 23:04:19 +0100 |
| commit | 6573021f13f21f11a981439bdf2dc8070f25b68c (patch) | |
| tree | 0ed3cedc947c6a329dd0fe1c266ad3b047cbe0bd /TemplePushing.c4s/System.c4g/Stoneshield.c | |
| parent | 3b6d7c535d35470de849890e747dcbc428c6c60d (diff) | |
| download | tempelschubsen-6573021f13f21f11a981439bdf2dc8070f25b68c.tar.gz tempelschubsen-6573021f13f21f11a981439bdf2dc8070f25b68c.zip | |
Show selector for deflection and stoneshield, but only if targets are available
Diffstat (limited to 'TemplePushing.c4s/System.c4g/Stoneshield.c')
| -rw-r--r-- | TemplePushing.c4s/System.c4g/Stoneshield.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/TemplePushing.c4s/System.c4g/Stoneshield.c b/TemplePushing.c4s/System.c4g/Stoneshield.c new file mode 100644 index 0000000..885b921 --- /dev/null +++ b/TemplePushing.c4s/System.c4g/Stoneshield.c @@ -0,0 +1,30 @@ +/*-- Show selector, but only if targets are available --*/
+#strict 2
+#appendto MSSH
+
+func Activate(pCaster,pRealcaster)
+{
+ var pClonk=pRealcaster;
+ if(!pClonk) pClonk=pCaster;
+
+ var pCombo;
+ // Stein verlängert die Wirkungsdauer
+ if (pCombo = FindContents(ROCK, pCaster))
+ {
+ fRock = true;
+ RemoveObject(pCombo);
+ }
+
+ // Auswählen wenn möglich
+ var selector;
+ if ((selector = pClonk->~DoSpellSelect(this,300,pCaster)) && (selector->CountTargets() > 1 || !SelectorTarget(pClonk))) return 1;
+ if (selector) RemoveObject(selector);
+
+ // Clonk kann nicht auswählen: Clonk bekommst selbst ein Schild
+ if (SelectorTarget(pClonk))
+ return(ActivateTarget(pClonk, pClonk));
+
+ // ansonsten geth nich
+ RemoveObject();
+ return(0);
+}
|
