mail[Wesnoth-commits] r33364 - /trunk/src/ai_move.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by dave on March 06, 2009 - 05:43:
Author: dave
Date: Fri Mar  6 05:43:00 2009
New Revision: 33364

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33364&view=rev
Log:
make AI 'supporting' other units disabled by default, since it seems to mess 
up a lot

Modified:
    trunk/src/ai_move.cpp

Modified: trunk/src/ai_move.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_move.cpp?rev=33364&r1=33363&r2=33364&view=diff
==============================================================================
--- trunk/src/ai_move.cpp (original)
+++ trunk/src/ai_move.cpp Fri Mar  6 05:43:00 2009
@@ -151,13 +151,17 @@
 
                        if (ally_village)
                        {
-                               double enemy = power_projection(*t, 
enemy_dstsrc);
-                               if (enemy > 0)
-                               {
-                                       enemy *= 1.7;
-                                       double our = power_projection(*t, 
friends_dstsrc);
-                                       double value = village_value * our / 
enemy;
-                                       add_target(target(*t, value, 
target::SUPPORT));
+                               //Support seems to cause the AI to just 'sit 
around' a lot, so
+                               //only turn it on if it's explicitly enabled.
+                               
if(current_team().ai_parameters()["support_villages"] == "yes") {
+                                       double enemy = power_projection(*t, 
enemy_dstsrc);
+                                       if (enemy > 0)
+                                       {
+                                               enemy *= 1.7;
+                                               double our = 
power_projection(*t, friends_dstsrc);
+                                               double value = village_value 
* our / enemy;
+                                               add_target(target(*t, value, 
target::SUPPORT));
+                                       }
                                }
                        }
                        else




Related Messages


Powered by MHonArc, Updated Fri Mar 06 07:40:24 2009