Skip to content

Commit

Permalink
flip other_ self_
Browse files Browse the repository at this point in the history
  • Loading branch information
newfrenchy83 committed Jan 10, 2021
1 parent b68b2e4 commit b294aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/units/abilities.cpp
Expand Up @@ -475,7 +475,7 @@ void attack_type::add_formula_context(wfl::map_formula_callable& callable) const
if(unit_const_ptr & att = is_attacker_ ? self_ : other_) {
callable.add("attacker", wfl::variant(std::make_shared<wfl::unit_callable>(*att)));
}
if(unit_const_ptr & def = !is_attacker_ ? self_ : other_) {
if(unit_const_ptr & def = is_attacker_ ? other_ : self_) {
callable.add("defender", wfl::variant(std::make_shared<wfl::unit_callable>(*def)));
}
}
Expand Down

0 comments on commit b294aaa

Please sign in to comment.