Fix a stupid mistake i made for attack weapon rating

This commit is contained in:
Benoît Timbert 2006-01-09 01:32:08 +00:00
parent e803e4d52a
commit b04eaa14df

View file

@ -106,7 +106,7 @@ protected:
for(size_t n = 0; n != attacks.size(); ++n) {
if (attacks[n].attack_weight() > 0){
const battle_stats stats = evaluate_battle_stats(get_info().map, get_info().teams, attacker, defender, n, get_info().units, get_info().state);
const int attack_rating = stats.damage_defender_takes
const double attack_rating = stats.damage_defender_takes
*stats.nattacks*stats.chance_to_hit_defender*attacks[n].attack_weight();
if(best_attack == -1 || attack_rating > best_attack_rating) {
best_attack = n;