Author: sveinung
Date: Tue Jun  2 10:32:28 2015
New Revision: 29152

URL: http://svn.gna.org/viewcvs/freeciv?rev=29152&view=rev
Log:
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:
    branches/S2_6/server/diplomats.c

Modified: branches/S2_6/server/diplomats.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/diplomats.c?rev=29152&r1=29151&r2=29152&view=diff
==============================================================================
--- branches/S2_6/server/diplomats.c    (original)
+++ branches/S2_6/server/diplomats.c    Tue Jun  2 10:32:28 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))) {
     return;
   }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to