Chillu1 / ModiBuff

Buff/Debuff/Modifier library focused on feature set and performance, while maintaining 0 GC. Fully pooled
Mozilla Public License 2.0
139 stars 4 forks source link

Internal Modifier Dispelling #34

Closed Chillu1 closed 10 months ago

Chillu1 commented 10 months ago

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.

Chillu1 commented 10 months ago

Not fully internal, still using an IEffect register, but at least no custom logic needs to be added to use it.