Skip to content

Commit

Permalink
fix lowest sub used instead of highest
Browse files Browse the repository at this point in the history
if heals with sub =8 and another heals with sub=4 it is sub=4 who is used. i changed this rule in effect for highest sub was used
  • Loading branch information
newfrenchy83 authored and gfgtdf committed Dec 16, 2018
1 parent 5978228 commit f264dc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/units/abilities.cpp
Expand Up @@ -1215,7 +1215,7 @@ effect::effect(const unit_ability_list& list, int def, bool backstab) :
return formula.evaluate(callable).as_int();
});
std::map<std::string,individual_effect>::iterator sub_effect = values_add.find(effect_id);
if(sub_effect == values_add.end() || sub > sub_effect->second.value) {
if(sub_effect == values_add.end() || sub < sub_effect->second.value) {
values_add[effect_id].set(ADD, sub, ability.first, ability.second);
}
}
Expand Down

0 comments on commit f264dc6

Please sign in to comment.