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

GenId modifier stacking (Unit-tied unique stacking) #15

Open Chillu1 opened 11 months ago

Chillu1 commented 11 months ago

Description Currently, instance stackable modifiers are always stacked when added, no matter what. It would be nice to have stackable modifiers based on who is the source of the modifier. Meaning that a single Unit can only apply one instance of the modifier, but if another Unit applies the same modifier type, it will be another instance. With its own independent refresh, stack, etc.

Example: Two Units have a modifier named "DamageOverTime", Unit 1 applies it, then Unit 2 applies it. The target Unit now has two unique instances of that modifier, ticking together, if Unit 1 applies it again, the modifier will be refreshed, stacked, etc. But the 2nd instance applied by Unit 2

Implementation Only ModifierController will need to have extra logic, by checking if the modifier exist and if they're instance stackable, and instance genId stackable or not.