Skip to content

Commit

Permalink
use only_active bollean to checking abilities in UI only and rename p…
Browse files Browse the repository at this point in the history
…refix
  • Loading branch information
newfrenchy83 committed Feb 9, 2022
1 parent 296624b commit 27429f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/units/abilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,11 @@ std::string attack_type::weapon_specials(bool only_active, bool is_backstab) con
}
std::string temp_string;
std::set<std::string> checking_name;
if(self_){
if(self_ && only_active){
weapon_specials_impl_self(temp_string, self_, shared_from_this(), other_attack_, self_loc_, AFFECT_SELF, checking_name);
weapon_specials_impl_adj(temp_string, self_, shared_from_this(), other_attack_, self_loc_, AFFECT_SELF, checking_name);
}
if(other_){
if(other_ && only_active){
weapon_specials_impl_self(temp_string, other_, other_attack_, shared_from_this(), other_loc_, AFFECT_OTHER, checking_name);
weapon_specials_impl_adj(temp_string, other_, other_attack_, shared_from_this(), other_loc_, AFFECT_OTHER, checking_name);
}
Expand Down Expand Up @@ -921,13 +921,13 @@ std::string attack_type::weapon_specials_value(const std::set<std::string> check
add_name_list(temp_string, weapon_abilities, checking_name, "");
if(self_){
weapon_specials_impl_self(temp_string, self_, shared_from_this(), other_attack_, self_loc_, AFFECT_SELF, checking_name, checking_tags, true);
add_name_list(temp_string, weapon_abilities, checking_name, "Self: ");
add_name_list(temp_string, weapon_abilities, checking_name, "Owned: ");

weapon_specials_impl_adj(temp_string, self_, shared_from_this(), other_attack_, self_loc_, AFFECT_SELF, checking_name, checking_tags, "affect_allies", true);
add_name_list(temp_string, weapon_abilities, checking_name, "Teachers: ");
add_name_list(temp_string, weapon_abilities, checking_name, "Teached: ");

weapon_specials_impl_adj(temp_string, self_, shared_from_this(), other_attack_, self_loc_, AFFECT_SELF, checking_name, checking_tags, "affect_enemies", true);
add_name_list(temp_string, weapon_abilities, checking_name, "Enemies Teachers: ");
add_name_list(temp_string, weapon_abilities, checking_name, "Teached (by an ennemy): ");
}

if(other_) {
Expand All @@ -941,7 +941,7 @@ std::string attack_type::weapon_specials_value(const std::set<std::string> check
}
weapon_specials_impl_self(temp_string, other_, other_attack_, shared_from_this(), other_loc_, AFFECT_OTHER, checking_name, checking_tags);
weapon_specials_impl_adj(temp_string, other_, other_attack_, shared_from_this(), other_loc_, AFFECT_OTHER, checking_name, checking_tags);
add_name_list(temp_string, weapon_abilities, checking_name, "Opponent: ");
add_name_list(temp_string, weapon_abilities, checking_name, "Inflicted (by opponent): ");
}
return weapon_abilities;
}
Expand Down

0 comments on commit 27429f5

Please sign in to comment.