You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a Buff on an entity does not bear any information on how this buff actually appeared.
This is annoying because it prevents for doing later things depending on the source (for example, who put the debuff/buff in the first place).
I believe this can be fixed by adding to Buff a type parameter Source representing the type of information representing the source. For exemple it could be Entity.Id to tell that the buff was placed by that entity. Then concrete implementations of Buffs should have a value source: Source.
We could also be a bit more restrictive and create an ADT with possible sources, and ask that as a parameter. This, I believe, will fulfil everything that we need and will ease many other implementations.
Currently, a
Buff
on an entity does not bear any information on how this buff actually appeared.This is annoying because it prevents for doing later things depending on the source (for example, who put the debuff/buff in the first place).
I believe this can be fixed by adding to
Buff
a type parameterSource
representing the type of information representing the source. For exemple it could beEntity.Id
to tell that the buff was placed by that entity. Then concrete implementations ofBuffs
should have a valuesource: Source
.We could also be a bit more restrictive and create an ADT with possible sources, and ask that as a parameter. This, I believe, will fulfil everything that we need and will ease many other implementations.
Such an ADT could look like
The text was updated successfully, but these errors were encountered: