Skip to content

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

Description

@Chillu1

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.

Issues
For this to work, a GenId needs to be fed into ModifierController.Add, and currently we don't have access to the GenId a lot of the time, so it would either need a new id system based on casters, or some refactoring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmodifier logic requestNew modifier logic for more lacking functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions