From 4b3b1331838026e4ab1fec06b96f7f154d7e92ec Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 24 Jul 2016 09:00:02 +0200 Subject: [PATCH] assault: Improve chance for spies sneaking ashore undetected 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 --- info/Spies.t | 10 +++++----- src/lib/commands/assa.c | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/info/Spies.t b/info/Spies.t index 9f4dc504..36315662 100644 --- a/info/Spies.t +++ b/info/Spies.t @@ -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 diff --git a/src/lib/commands/assa.c b/src/lib/commands/assa.c index d1e60d97..ba9fccaf 100644 --- a/src/lib/commands/assa.c +++ b/src/lib/commands/assa.c @@ -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));