add [disable] abilityto abilities used like weapon special

This commit is contained in:
newfrenchy83 2024-08-11 18:21:34 +02:00 committed by Pentarctagon
parent f11fbee7fe
commit 6ebca64acc
3 changed files with 7 additions and 1 deletions

View File

@ -120,6 +120,7 @@
{DEFAULT_KEY delayed_variable_substitution bool yes}
[/tag]
[/tag]
{BASED_ON_SPECIAL "disable"}
{BASED_ON_SPECIAL "attacks"}
{BASED_ON_SPECIAL "swarm"}
{BASED_ON_SPECIAL "chance_to_hit"}

View File

@ -31,6 +31,11 @@
max=infinite
super="units/unit_type/attack/specials/~generic~"
[/tag]
[tag]
name="disable"
max=infinite
super="units/unit_type/attack/specials/~generic~"
[/tag]
[tag]
name="slow"
max=infinite

View File

@ -1865,7 +1865,7 @@ public:
private:
const std::set<std::string> checking_tags_{"attacks", "damage", "chance_to_hit", "berserk", "swarm", "drains", "heal_on_hit", "plague", "slow", "petrifies", "firststrike", "poison", "damage_type"};
const std::set<std::string> checking_tags_{"disable", "attacks", "damage", "chance_to_hit", "berserk", "swarm", "drains", "heal_on_hit", "plague", "slow", "petrifies", "firststrike", "poison", "damage_type"};
/**
* Check if an ability is active.
* @param ability The type (tag name) of the ability