fix minor bug in get_healing_phase

This commit is contained in:
Kevin_Xi 2014-04-10 14:52:43 +08:00
parent 7fc8e9797b
commit 841284881a
2 changed files with 5 additions and 1 deletions

View file

@ -1036,6 +1036,10 @@
name = "Groggy Dice (groggydice)"
comment = "wmllint enhancements"
[/entry]
[entry]
name = "Guorui Xi (Kevin_Xi)"
email = "kevin_DOT_xgr_AT_gmail_DOT_com"
[/entry]
[entry]
name = "Hans-Joachim Gurt (HaJo)"
[/entry]

View file

@ -1741,7 +1741,7 @@ double get_healing_phase::evaluate()
while(it.first != it.second) {
const map_location& dst = it.first->second;
if (resources::game_map->gives_healing(dst) && (units_.find(dst) == units_.end() || dst == u_it->get_location())) {
const double vuln = power_projection(it.first->first, get_enemy_dstsrc());
const double vuln = power_projection(dst, get_enemy_dstsrc());
DBG_AI_TESTING_AI_DEFAULT << "found village with vulnerability: " << vuln << "\n";
if(vuln < best_vulnerability) {
best_vulnerability = vuln;