Fix a stupid mistake i made for attack weapon rating
This commit is contained in:
parent
e803e4d52a
commit
b04eaa14df
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue