/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
y = com->y;
break;
case EF_LAND:
- if (!getland(com->lnd_uid, &land) || !land.lnd_own) {
+ if (!getland(com->lnd_uid, &land) || !land.lnd_own
+ || land.lnd_ship >= 0 || land.lnd_land >= 0) {
if (isdef)
pr("Land unit #%d is not in the same sector!\n",
com->lnd_uid);
return;
}
att_val = attack_val(combat_mode, &land);
- if (att_val < 1.0) {
+ /*
+ * We need to let spies assault even though they have no
+ * offensive strength, because assault is how they sneak
+ * ashore. If this assault turns out to be a fight, they'll
+ * be removed by get_ototal().
+ */
+ if (att_val < 1.0
+ && !(combat_mode == A_ASSAULT && (lcp->l_flags & L_SPY))) {
pr("%s has no offensive strength\n", prland(&land));
continue;
}
if (check && att_val < 1.0) {
/*
* No offensive strength, and fighting hasn't even begun.
- * Since ask_olist() doesn't offer such land units, the
- * strength must have been destroyed since then. Leave it
- * behind.
+ * Since ask_olist() doesn't offer such land units, except
+ * for spies sometimes, it's either a spy, or the strength
+ * must have been destroyed since then. Leave it behind.
*/
lnd_print(player->cnum, llp, "has no offensive strength");
lnd_put_one(llp);
pr("- Casualties -\n Yours: %d\n", a_cas);
pr(" Theirs: %d\n", d_cas);
- pr("Papershuffling ... %.1f B.T.U\n", (d_cas + a_cas) * 0.15);
+ pr("Paper-shuffling ... %.1f BTU\n", (d_cas + a_cas) * 0.15);
player->btused += (int)((d_cas + a_cas) * 0.015 + 0.5);
if (success) {