Author: sveinung
Date: Sat May  6 23:02:29 2017
New Revision: 35431

URL: http://svn.gna.org/viewcvs/freeciv?rev=35431&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:
    branches/S3_0/client/helpdata.c

Modified: branches/S3_0/client/helpdata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/client/helpdata.c?rev=35431&r1=35430&r2=35431&view=diff
==============================================================================
--- branches/S3_0/client/helpdata.c     (original)
+++ branches/S3_0/client/helpdata.c     Sat May  6 23:02:29 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