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 <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-07-24 09:00:02 +02:00
parent 9b97d68bb3
commit 4b3b133183
2 changed files with 8 additions and 6 deletions

View 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));