Author: sveinung
Date: Sat May  6 22:58:47 2017
New Revision: 35423

URL: http://svn.gna.org/viewcvs/freeciv?rev=35423&view=rev
Log:
Auto help: only show Spy escape when relevant.

Spy actions are action enabler controlled from Freeciv 2.6. There is no
longer a guarantee that a unit with the Spy unit type flag can perform any
of the spy actions where a unit with the Spy utype flag is able to escape.
Since a unit type like that can't perform any of those actions its veterans
aren't more likely to survive missions.

See hrm Bug #657644

Modified:
    trunk/client/helpdata.c

Modified: trunk/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=35423&r1=35422&r2=35423&view=diff
==============================================================================
--- trunk/client/helpdata.c     (original)
+++ trunk/client/helpdata.c     Sat May  6 22:58:47 2017
@@ -2487,7 +2487,17 @@
         CATLSTR(buf, bufsz,
                 _("  * Veterans have improved chances in diplomatic "
                   "contests.\n"));
-        if (utype_has_flag(utype, UTYF_SPY)) {
+        if (utype_has_flag(utype, UTYF_SPY) &&
+            (utype_can_do_action(utype, ACTION_SPY_POISON)
+             || utype_can_do_action(utype, ACTION_SPY_SABOTAGE_UNIT)
+             || utype_can_do_action(utype, ACTION_SPY_STEAL_TECH)
+             || utype_can_do_action(utype, ACTION_SPY_TARGETED_STEAL_TECH)
+             || utype_can_do_action(utype, ACTION_SPY_INCITE_CITY)
+             || utype_can_do_action(utype, ACTION_SPY_SABOTAGE_CITY)
+             || utype_can_do_action(utype, ACTION_SPY_TARGETED_SABOTAGE_CITY)
+             || utype_can_do_action(utype, ACTION_SPY_STEAL_GOLD)
+             || utype_can_do_action(utype, ACTION_STEAL_MAPS)
+             || utype_can_do_action(utype, ACTION_SPY_NUKE))) {
           CATLSTR(buf, bufsz,
                   _("  * Veterans are more likely to survive missions.\n"));
         }


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

Reply via email to