Wed 28 Mar 2007 04:36:26 PM UTC, original submission:
I'd like to be able to write filter(s) in [attack] with which the attack could be made unusable against some units (or usable only against some units) as well as usable or unusable when the user itself matches arbitrary conditions.
More specifically:
1. Allow a [filter] (a SUF) to be written inside [attack]. When opening the attack menu, the attack will only be available and listed if the filter matches the target unit. If the filter doesn't match, the attack won't be available (note: this shouldn't affect just the UI, but for example the AI as well, so the attack must be unusable, not just invisible).
2. Allow a [filter_self] (a SUF) as well, that filters on this unit using the attack. Again, when opening the attack menu, this attack would only be listed and available if the filter matches this unit (of course, assuming that the [filter], if present, matched).
Alternatively (sounds like a very viable alternative to me), a weapon special tag for disabling the attack could be implemented (something like [disable_attack]): this weapon special would render the whole attack unusable if it is active, and whether it's active or inactive would be determined in the same way as for other weapon specials. This would most likely be simpler code-wise, since the weapon special mechanisms for filtering for the target and self exist already as well as the concepts of active and inactive.
|