Author: cazfi
Date: Sat Dec  6 09:31:35 2014
New Revision: 27187

URL: http://svn.gna.org/viewcvs/freeciv?rev=27187&view=rev
Log:
Fixed check that prevented AI from building military units for their
martial law value only.

See bug #22997

Modified:
    trunk/ai/default/advmilitary.c

Modified: trunk/ai/default/advmilitary.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/default/advmilitary.c?rev=27187&r1=27186&r2=27187&view=diff
==============================================================================
--- trunk/ai/default/advmilitary.c      (original)
+++ trunk/ai/default/advmilitary.c      Sat Dec  6 09:31:35 2014
@@ -1504,7 +1504,7 @@
         CITY_LOG(LOG_DEBUG, pcity,
                  "m_a_c_d wants defense building with " ADV_WANT_PRINTF,
                  choice->want);
-      } else if (danger > 0 && num_defenders <= urgency) {
+      } else if ((danger > 0 && num_defenders <= urgency) || martial_value > 
0) {
         /* Consider building defensive units */
         if (process_defender_want(ait, pplayer, pcity, danger, choice)) {
           /* Potential defender found */


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

Reply via email to