Author: sveinung
Date: Wed Apr 26 14:02:48 2017
New Revision: 35296

URL: http://svn.gna.org/viewcvs/freeciv?rev=35296&view=rev
Log:
Auto help for the "Provoking" utype flag.

Auto document the "Provoking" unit type flag. The current text may confuse
users unaware that autoattack must be turned on. Explaining what autoattack
is would make the text even longer. Use hrm Feature #654853 to check if
autoattack is enabled. Only show the help text if it is.

See hrm Feature #655118

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=35296&r1=35295&r2=35296&view=diff
==============================================================================
--- branches/S3_0/client/helpdata.c     (original)
+++ branches/S3_0/client/helpdata.c     Wed Apr 26 14:02:48 2017
@@ -43,6 +43,7 @@
 #include "multipliers.h"
 #include "reqtext.h"
 #include "research.h"
+#include "server_settings.h"
 #include "specialist.h"
 #include "tilespec.h"
 #include "unit.h"
@@ -2041,6 +2042,14 @@
     CATLSTR(buf, bufsz,
             _("* A field unit: one unhappiness applies even when 
non-aggressive.\n"));
   }
+  if (utype_has_flag(utype, UTYF_PROVOKING)
+      && server_setting_value_bool_get(
+        server_setting_by_name("autoattack"))) {
+    CATLSTR(buf, bufsz,
+            _("* An enemy unit considering to auto attack this unit will "
+              "choose to do so even if it has better odds when defending "
+              "against it than when attacking it.\n"));
+  }
   if (utype_has_flag(utype, UTYF_SHIELD2GOLD)) {
     /* FIXME: the conversion shield => gold is activated if
      *        EFT_SHIELD2GOLD_FACTOR is not equal null; how to determine


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

Reply via email to