From eb77d64b55b3d906bf14e19e3a85520e25c11ccd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 24 Jul 2016 11:34:13 +0200 Subject: [PATCH] attack assault paradrop: Execute spies on takeover 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 --- src/lib/subs/takeover.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/subs/takeover.c b/src/lib/subs/takeover.c index 484cc378..7cb34ef0 100644 --- a/src/lib/subs/takeover.c +++ b/src/lib/subs/takeover.c @@ -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 @@ -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;