Author: sveinung
Date: Tue Jun  2 10:14:35 2015
New Revision: 29150

Don't let the sabotage victim unit defend it self in a dipl battle.

A diplomatic battle results in the attacker or the defender being
eliminated. The player expects the victim to be sabotaged, not eliminated.

Bribe unit, the other action with a single unit target, will only allow
units that aren't targeted engage in a defensive diplomatic battle. Make
sabotage unit consistent with that.

See patch #6103


Modified: trunk/server/diplomats.c
--- trunk/server/diplomats.c    (original)
+++ trunk/server/diplomats.c    Tue Jun  2 10:14:35 2015
@@ -351,8 +351,9 @@
   /* N.B: unit_link() always returns the same pointer. */
   sz_strlcpy(victim_link, unit_link(pvictim));
-  /* Check if the Diplomat/Spy succeeds against defending Diplomats/Spies. */
-  if (!diplomat_infiltrate_tile(pplayer, uplayer, pdiplomat, NULL,
+  /* Diplomatic battle against any diplomatic defender except the intended
+   * victim of the sabotage. */
+  if (!diplomat_infiltrate_tile(pplayer, uplayer, pdiplomat, pvictim,
                                 unit_tile(pvictim))) {

Freeciv-commits mailing list

Reply via email to