]> git.pond.sub.org Git - empserver/commitdiff
attack assault paradrop: Execute spies on takeover
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 24 Jul 2016 09:34:13 +0000 (11:34 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:18 +0000 (20:09 +0200)
When the attacker takes a sector, spies try to hide.  If they fail,
they're treated like any other land unit: they attempt to
self-destruct, and if the damage isn't lethal, they get captured.
Successful self-destruct is reported as "blown up by the crew", which
makes no sense for spies.  Spies surviving self-destruct is odd, as
any damage is normally fatal for them.

Extend the special case for spies: summarily execute the ones that
fail to hide.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/takeover.c

index 484cc3787d5a8c230064f509ed687bed0c8450d8..7cb34ef0d795d520e8d06696657f55e406ed0587 100644 (file)
@@ -29,7 +29,7 @@
  *  Known contributors to this file:
  *     Dave Pare, 1986
  *     Steve McClure, 1996-2000
- *     Markus Armbruster, 2007-2012
+ *     Markus Armbruster, 2007-2016
  */
 
 #include <config.h>
@@ -94,11 +94,20 @@ takeover(struct sctstr *sp, natid newown)
            continue;
        if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
            continue;
-       /* Spies get a chance to hide */
+
+       /* Spies either hide or get executed */
        if (lchr[(int)lp->lnd_type].l_flags & L_SPY) {
            if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic))))
                continue;
+           mpr(newown, "%s summarily executed!\n", prland(lp));
+           wu(0, lp->lnd_own, "%s summarily executed when %s took %s!\n",
+              prland(lp),
+              cname(newown), xyas(lp->lnd_x, lp->lnd_y, lp->lnd_own));
+           lp->lnd_own = 0;
+           putland(lp->lnd_uid, lp);
+           continue;
        }
+
        n = lp->lnd_effic - (29 + roll(100));
        if (n < 0)
            n = 0;