]> git.pond.sub.org Git - empserver/commitdiff
attack assault paradrop: Spies hide rather than defend
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 24 Jul 2016 10:22:51 +0000 (12:22 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:18 +0000 (20:09 +0200)
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 <armbru@pond.sub.org>
src/lib/subs/attsub.c

index f0c18647f028d280b09961600e5624e853e3cb40..4398efe60fb0829d8ebb9871ca5df9d73415e105 100644 (file)
@@ -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)