From 406fdab125ec26d3e12c5172b65575e13587f560 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 24 Jul 2016 12:22:51 +0200 Subject: [PATCH] attack assault paradrop: Spies hide rather than defend Defending spies get spotted like any other defending land unit. They don't contribute to the defense (their defense value is zero), and they always survive the fight unscathed (lacking mil, they take no casualties). If the sector is lost, they either hide or get executed. Before the previous commit, they could also be damaged and captured. Possible outcomes: * Spy isn't spotted, attack fails * Spy isn't spotted, attack succeeds, spy gets executed * Spy isn't spotted, attack succeeds, spy hides * Spy is spotted, attack fails This lets players use probing attacks to spot spies with a much better chance than spy or llook have. But they can already repeat spy or llook to increase their detection chances as close to 100% as they want, so this doesn't make things materially worse. * Spy is spotted, attack succeeds, spy gets executed * Spy is spotted, attack succeeds, spy hides Since the spy has already been spotted, hiding is largely useless. The attacker can board the spy as soon as he has mobility. This obviously hasn't been thought through. Get rid of the "spy is spotted" cases by skipping spies when collecting the list of defending land units. Signed-off-by: Markus Armbruster --- src/lib/subs/attsub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/subs/attsub.c b/src/lib/subs/attsub.c index f0c18647..4398efe6 100644 --- a/src/lib/subs/attsub.c +++ b/src/lib/subs/attsub.c @@ -1189,6 +1189,8 @@ get_dlist(struct combat *def, struct emp_qelem *list, int a_spy, continue; if (def->type == EF_SECTOR && land.lnd_land >= 0) continue; + if (def->type == EF_SECTOR && (lchr[land.lnd_type].l_flags & L_SPY)) + continue; if (def->type == EF_SHIP && land.lnd_ship != def->shp_uid) continue; if (def->type == EF_LAND && land.lnd_land != def->lnd_uid)