]> git.pond.sub.org Git - empserver/commitdiff
assault: Improve chance for spies sneaking ashore undetected
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 24 Jul 2016 07:00:02 +0000 (09:00 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:18 +0000 (20:09 +0200)
Spies assaulting a foreign sector have only a 10% chance to evade
detection, regardless of efficiency.  With odds like that, players
basically don't bother.

All the other spy detection checks use LND_SPY_DETECT_CHANCE(eff),
which gives 100% spies a 90% chance to evade detection.  That's
perhaps a bit to good here, so let's try LND_SPY_DETECT_CHANCE(eff/2).
A 100% spy now has a 40% chance to sneak ashore undetected.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
info/Spies.t
src/lib/commands/assa.c

index 9f4dc504665309d0233f5bf78e91dd8f82433187..363156626cb896eae4f1884b7c7a8c5554f7a4c6 100644 (file)
@@ -13,16 +13,16 @@ If a spy is caught by a friendly or neutral country, the country will get a
 message that a spy was spotted in their country.  If the spy is caught
 by a hostile or at war nation, the spy gets shot on the spot.  The chance
 of getting caught while marching about is inverse to the efficiency of the
-spy.  So, at 100%, a spy has a 10% chance of getting caught.  at 10%,
+spy.  So, at 100%, a spy has a 10% chance of getting caught.  At 10%,
 a spy has a 100% chance of getting caught.  Thus, you want efficient spies.
 .s1
 Spies are also very fragile.  If they are caught in any kind of combat,
 shelling, bombing, etc. and take ANY damage at all, they die.
 .s1
-Spies may also be snuck on shore via ships using the "assault" command.  If
-you assault a sector using just spies, they have a 10% chance of making it on
-shore without being spotted (no matter what their efficiency).  If spotted,
-the same rules apply for how a spy is dealt with.  If you mix spies and mil,
+Spies may also be snuck on shore via ships using the "assault"
+command.  If you assault a sector using just spies, a 100% spy has a
+60% chance of getting caught, which increases to 100% for a 20% spy.
+If you mix spies and mil,
 the spies must fight just like normal units.  And, since any damage they take
 kills them, this is very risky usage of spies.
 .s1
index d1e60d979aa8ce623388935f7a84c238d3a31439..ba9fccaf0bf4db189209b660bb467e440fd6e160 100644 (file)
@@ -202,7 +202,9 @@ sneak_ashore(struct combat off[], struct emp_qelem *olist,
        llp = (struct ulist *)qp;
        lp = &llp->unit.land;
        rel = relations_with(def->own, player->cnum);
-       if (chance(0.10) || rel == ALLIED || !def->own) {
+       if (rel == ALLIED || !def->own
+           || !chance(LND_SPY_DETECT_CHANCE(lp->lnd_effic / 2))) {
+                               /* eff/2 because this is hard */
            pr("%s made it on shore safely.\n", prland(lp));
        } else {
            pr("%s was spotted", prland(lp));