<URL: http://bugs.freeciv.org/Ticket/Display.html?id=37851 >

 Evaluation of EFT_UPGRADE_UNIT multiplies value of earlier effects.
Fix attached. Affects S2_1 also.


 - ML

diff -Nurd -X.diff_ignore freeciv/ai/aicity.c freeciv/ai/aicity.c
--- freeciv/ai/aicity.c	2007-03-08 03:00:00.000000000 +0200
+++ freeciv/ai/aicity.c	2007-03-09 19:03:36.000000000 +0200
@@ -561,13 +561,12 @@
 	  + ai->stats.units.amphibious);
     break;
   case EFT_UPGRADE_UNIT:
-    v += ai->stats.units.upgradeable;
     if (amount == 1) {
-      v *= 2;
+      v += ai->stats.units.upgradeable * 2;
     } else if (amount == 2) {
-      v *= 3;
+      v += ai->stats.units.upgradeable * 3;
     } else {
-      v *= 4;
+      v += ai->stats.units.upgradeable * 4;
     }
     break;
   case EFT_DEFEND_BONUS:
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to