Skip to content

Commit

Permalink
Fix effects being unable to decrease weapon parry/accuracy
Browse files Browse the repository at this point in the history
fixes #3181
  • Loading branch information
CelticMinstrel authored and Vultraz committed May 31, 2018
1 parent 30c08cd commit 4062c1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/units/attack_type.cpp
Expand Up @@ -266,7 +266,7 @@ bool attack_type::apply_modification(const config& cfg)
}

if(increase_damage.empty() == false) {
damage_ = utils::apply_modifier(damage_, increase_damage, 0);
damage_ = utils::apply_modifier(damage_, increase_damage);
if (damage_ < 0) {
damage_ = 0;
}
Expand All @@ -289,15 +289,15 @@ bool attack_type::apply_modification(const config& cfg)
}

if(increase_accuracy.empty() == false) {
accuracy_ = utils::apply_modifier(accuracy_, increase_accuracy, 1);
accuracy_ = utils::apply_modifier(accuracy_, increase_accuracy);
}

if(set_parry.empty() == false) {
parry_ = std::stoi(set_parry);
}

if(increase_parry.empty() == false) {
parry_ = utils::apply_modifier(parry_, increase_parry, 1);
parry_ = utils::apply_modifier(parry_, increase_parry);
}

if(set_movement.empty() == false) {
Expand Down

0 comments on commit 4062c1e

Please sign in to comment.