Skip to content

Commit

Permalink
[1.17] Fix FORCE_CHANCE_TO_HIT macro
Browse files Browse the repository at this point in the history
FORCE_CHANCE_TO_HIT macro use overwrite_specials for overwrite chance_to_hit specials or abilities, but if abilities used like special own this attribute, it can't be overwrited.

The use of filter_abilities in [effect]remove_ability authorize to remove all chance_to_hit ability using this attribute in fighter and potential leader.
  • Loading branch information
newfrenchy83 committed Sep 24, 2023
1 parent af74b8f commit 90b3827
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/core/macros/utils.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,9 @@
cumulative=no
affect_self=yes
overwrite_specials=both_sides
[overwrite]
priority=1000
[/overwrite]
[filter_opponent]
{SECOND_FILTER}
[/filter_opponent]
Expand Down Expand Up @@ -605,6 +608,9 @@
cumulative=no
affect_self=yes
overwrite_specials=both_sides
[overwrite]
priority=1000
[/overwrite]
[filter_opponent]
{SECOND_FILTER}
[/filter_opponent]
Expand Down
18 changes: 18 additions & 0 deletions data/test/scenarios/macro_tests/test_force_chance_to_hit_macro.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
[/chance_to_hit]
[/set_specials]
[/effect]
[effect]#test if macro work when ability with overwrite_special is used
apply_to=new_ability
[abilities]
[chance_to_hit]
value=100
overwrite_specials=one_side
[/chance_to_hit]
[/abilities]
[/effect]
[filter]
id=bob
[/filter]
Expand All @@ -64,6 +73,15 @@
[/chance_to_hit]
[/set_specials]
[/effect]
[effect]#test if macro work when ability with overwrite_special is used
apply_to=new_ability
[abilities]
[chance_to_hit]
value=100
overwrite_specials=one_side
[/chance_to_hit]
[/abilities]
[/effect]
[filter]
id=alice
[/filter]
Expand Down

0 comments on commit 90b3827

Please sign in to comment.