Check whether special is active by tag name or by id #3915
Labels
Engine
General game engine issues that do not fit in any other category.
Enhancement
Issues that are requests for new features or changes to existing ones.
Good first issue
Issues deemed adequate for contributors without prior experience to work on.
In-progress
Issues for which a fix is currently being worked on.
WML
Issues involving the WML engine or WML APIs.
Currently, checking whether a weapon special is active is done by looking for a weapon special whose tag name or id match the specified value:
wesnoth/src/units/abilities.cpp
Lines 607 to 614 in 80b00fc
For example, the
initiative
special in HttT would be matched by eitherspecial_active=initiative
orspecial_active=firststrike
:wesnoth/data/campaigns/Heir_To_The_Throne/utils/abilities.cfg
Lines 4 to 14 in 80b00fc
Which can be confusing, because some tag names are also used as ids:
wesnoth/data/core/macros/abilities.cfg
Lines 402 to 406 in 80b00fc
It would be good to separate "search by tag name" and "search by id" and expose that in StandardWeaponFilter, as @gfgtdf said in #3800 (comment).
Labeling "Good first issue" since this isn't a difficult change, but it will require some work on the C++ side.
The text was updated successfully, but these errors were encountered: