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 <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-07-24 11:34:13 +02:00
parent 223ff1d75f
commit eb77d64b55

View file

@ -29,7 +29,7 @@
* Known contributors to this file: * Known contributors to this file:
* Dave Pare, 1986 * Dave Pare, 1986
* Steve McClure, 1996-2000 * Steve McClure, 1996-2000
* Markus Armbruster, 2007-2012 * Markus Armbruster, 2007-2016
*/ */
#include <config.h> #include <config.h>
@ -94,11 +94,20 @@ takeover(struct sctstr *sp, natid newown)
continue; continue;
if (lp->lnd_ship >= 0 || lp->lnd_land >= 0) if (lp->lnd_ship >= 0 || lp->lnd_land >= 0)
continue; continue;
/* Spies get a chance to hide */
/* Spies either hide or get executed */
if (lchr[(int)lp->lnd_type].l_flags & L_SPY) { if (lchr[(int)lp->lnd_type].l_flags & L_SPY) {
if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic)))) if (!(chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic))))
continue; 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)); n = lp->lnd_effic - (29 + roll(100));
if (n < 0) if (n < 0)
n = 0; n = 0;