Author: cazfi
Date: Sat Sep  5 17:15:45 2015
New Revision: 29782

URL: http://svn.gna.org/viewcvs/freeciv?rev=29782&view=rev
Log:
Removed code discouraging AI from building more attackers.

See patch #6307

Modified:
    branches/S2_6/ai/default/aiunit.c

Modified: branches/S2_6/ai/default/aiunit.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aiunit.c?rev=29782&r1=29781&r2=29782&view=diff
==============================================================================
--- branches/S2_6/ai/default/aiunit.c   (original)
+++ branches/S2_6/ai/default/aiunit.c   Sat Sep  5 17:15:45 2015
@@ -1387,21 +1387,8 @@
         /* Units able to occupy really needed there! */
         want = bcost * SHIELD_WEIGHTING;
       } else {
-        int a_squared = acity_data->attack * acity_data->attack;
-
         want = kill_desire(benefit, attack, bcost + acity_data->bcost,
                            vulnerability, victim_count);
-        if (benefit * a_squared > acity_data->bcost * vulnerability) {
-          /* If there're enough units to do the job, we don't need this
-           * one. */
-          /* FIXME: The problem with ai.bcost is that bigger it is, less is
-           * our desire to go help other units.  Now suppose we need five
-           * cavalries to take over a city, we have four (which is not
-           * enough), then we will be severely discouraged to build the
-           * fifth one.  Where is logic in this??!?! --GB */
-          want -= kill_desire(benefit, a_squared, acity_data->bcost,
-                              vulnerability, victim_count);
-        }
       }
       want -= move_time * (unhap ? SHIELD_WEIGHTING + 2 * TRADE_WEIGHTING 
                            : SHIELD_WEIGHTING);


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

Reply via email to