Why this logic should be in the library, and not user game logic
While dispelling is possible to do outside ModiBuff.Core, it becomes a hassle to manage, and add extra boilerplate code for each recipe and unit implementation. So internal modifier dispel functionality could be of value.
Describe the solution you'd like
Internal callback event list when adding a new modifier.
Internal logic
Probably an event callback in ModifierController that registers every new modifier added, and gets called on dispel call.
Possible issues
Manually removing the modifier is impossible by design, the modifiers can only be removed by themselves (stack, duration), or callbacks. So that needs to be changed, or some kind of ModifierController callback is needed.
Why this logic should be in the library, and not user game logic While dispelling is possible to do outside
ModiBuff.Core
, it becomes a hassle to manage, and add extra boilerplate code for each recipe and unit implementation. So internal modifier dispel functionality could be of value.Describe the solution you'd like Internal callback event list when adding a new modifier.
Internal logic Probably an event callback in
ModifierController
that registers every new modifier added, and gets called on dispel call.Possible issues Manually removing the modifier is impossible by design, the modifiers can only be removed by themselves (stack, duration), or callbacks. So that needs to be changed, or some kind of
ModifierController
callback is needed.