Author: esr
Date: Wed Oct 22 20:58:19 2008
New Revision: 30310
URL: http://svn.gna.org/viewcvs/wesnoth?rev=30310&view=rev
Log:
Forward-port suokko's penalty for leader village grabbing if the enemy
can reach the village from r29484 (previously reverted as emergency fix).
Modified:
trunk/src/ai_village.cpp
Modified: trunk/src/ai_village.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai_village.cpp?rev=30310&r1=30309&r2=30310&view=diff
==============================================================================
--- trunk/src/ai_village.cpp (original)
+++ trunk/src/ai_village.cpp Wed Oct 22 20:58:19 2008
@@ -345,7 +345,8 @@
}
const unit& un = u->second;
- if(un.hitpoints() <
(threat*2*un.defense_modifier(map_.get_terrain(current_loc)))/100) {
+ const size_t threat_multipler = (current_loc == leader_loc?2:1)
* current_team().caution() * 10;
+ if(un.hitpoints() <
(threat_multipler*threat*2*un.defense_modifier(map_.get_terrain(current_loc)))/100)
{
continue;
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits