Skip to content

Commit

Permalink
[filter_specials] -> [experimental_filter_specials]
Browse files Browse the repository at this point in the history
Since it calls into the same code as [filter_ability] did.
  • Loading branch information
Pentarctagon committed Nov 17, 2023
1 parent 4753038 commit ce5c5b6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions data/schema/units/specials.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{DEFAULT_KEY overwrite_specials ability_overwrite none}
[tag]
name="overwrite"
{FILTER_TAG "filter_specials" abilities ()}
{FILTER_TAG "experimental_filter_specials" abilities ()}
{SIMPLE_KEY priority real}
[/tag]
[/tag]
Expand Down Expand Up @@ -85,7 +85,7 @@
{DEFAULT_KEY overwrite_specials ability_overwrite none}
[tag]
name="overwrite"
{FILTER_TAG "filter_specials" abilities ()}
{FILTER_TAG "experimental_filter_specials" abilities ()}
{SIMPLE_KEY priority real}
[/tag]
[/tag]
Expand Down Expand Up @@ -114,7 +114,7 @@
{DEFAULT_KEY overwrite_specials ability_overwrite none}
[tag]
name="overwrite"
{FILTER_TAG "filter_specials" abilities ()}
{FILTER_TAG "experimental_filter_specials" abilities ()}
{SIMPLE_KEY priority real}
[/tag]
[/tag]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#####
# API(s) being tested: [damage]with overwrite_specials attibute and [overwrite][filter_specials]
# API(s) being tested: [damage]overwrite_specials,[overwrite][experimental_filter_specials]
##
# Actions:
# Three [damage] abilities are added, one with value=5, other with add=11 and the last with multiply=2.
# The one with multiply=2 have overwrite_specials=both_sides and [overwrite][filter_specials] for overwrite [damage] with add=11 but not value=5.
# The one with multiply=2 have overwrite_specials=both_sides and [overwrite][experimental_filter_specials] for overwrite [damage] with add=11 but not value=5.
# Have alice attack bob.
##
# Expected end state:
Expand Down Expand Up @@ -41,9 +41,9 @@
multiply=2
overwrite_specials=both_sides
[overwrite]
[filter_specials]
[experimental_filter_specials]
add=1-14
[/filter_specials]
[/experimental_filter_specials]
[/overwrite]
[/damage]
[chance_to_hit]
Expand Down
2 changes: 1 addition & 1 deletion src/units/abilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ bool attack_type::overwrite_special_checking(unit_ability_list& overwriters, con
// check whether the current overwriter is disabled due to a filter
bool special_matches = true;
if(overwrite_specials){
auto overwrite_filter = (*overwrite_specials).optional_child("filter_specials");
auto overwrite_filter = (*overwrite_specials).optional_child("experimental_filter_specials");
if(overwrite_filter && is_overwritable && one_side_overwritable){
if(self_){
special_matches = (*self_).ability_matches_filter(cfg, tag_name, *overwrite_filter);
Expand Down

0 comments on commit ce5c5b6

Please sign in to comment.