Fix bug in overwrite_specials

I forget what abilities is the only who can use 'overwrite_specials' and what'filter_student' must ever checked instead of 'filter_self' in reference list
This commit is contained in:
newfrenchy83 2023-06-29 14:15:56 +02:00 committed by Steve Cotton
parent 58a29bcad8
commit ef020f8702

View file

@ -1302,10 +1302,10 @@ unit_ability_list attack_type::overwrite_special_checking(const std::string& abi
bool is_overwritable = (is_special || !overwrite_special_affects(*j.ability_cfg));
bool one_side_overwritable = true;
if(affect_side && is_overwritable){
if(special_active_impl(shared_from_this(), other_attack_, *i.ability_cfg, AFFECT_SELF, ability, filter_self)){
if(special_active_impl(shared_from_this(), other_attack_, *i.ability_cfg, AFFECT_SELF, ability, "filter_student")){
one_side_overwritable = special_active_impl(shared_from_this(), other_attack_, *j.ability_cfg, AFFECT_SELF, ability, filter_self);
}
else if(special_active_impl(other_attack_, shared_from_this(), *i.ability_cfg, AFFECT_OTHER, ability, filter_self)){
else if(special_active_impl(other_attack_, shared_from_this(), *i.ability_cfg, AFFECT_OTHER, ability, "filter_student")){
one_side_overwritable = special_active_impl(other_attack_, shared_from_this(), *j.ability_cfg, AFFECT_OTHER, ability, filter_self);
}
}