Closed PaulQbFeng closed 1 year ago
Interesting changes. I don't know personally which one is best, but one thing to take into account in our final choice is that we are gonna need to be able to transfer certain properties to damage instances based on their type (Black Cleaver for instance). Maybe this favors composition a bit more ? idk
Interesting changes. I don't know personally which one is best, but one thing to take into account in our final choice is that we are gonna need to be able to transfer certain properties to damage instances based on their type (Black Cleaver for instance). Maybe this favors composition a bit more ? idk
Yeah let's start with that
I do not know enough about the subject, but:
BaseDamageInstance
can be a mixin if it only implements methods IMO, otherwise let's opt for the other solution.ActiveItem
could have an attribute of instance BaseDamageInstance
?I do not know enough about the subject, but:
BaseDamageInstance
can be a mixin if it only implements methods IMO, otherwise let's opt for the other solution.- I do not know what you mean by "composition", you mean that
ActiveItem
could have an attribute of instanceBaseDamageInstance
?
Yes exactly. Something like this:
item = ActiveItem(BaseItem)
subclass. active_effect = ItemActiveEffect(BaseDamageInstance)
item.active = active_effect
then we can do item.active.damage()
Btw I remember that there was a discussion about putting the on hits in do_auto_attack / do_damage. Is this still on the table or not ?
Btw I remember that there was a discussion about putting the on hits in do_auto_attack / do_damage. Is this still on the table or not ?
It means that we can't test on-hit nor apply_buff in the damage
method, is it ok like that ?
It means that we can't test on-hit nor apply_buff in the
damage
method, is it ok like that ?
Mh, I don't know, I think it was @Lysxia 's idea. I'm also fine with keeping everything in damage method tbh
attack.BaseDamageMixin
I understood everything super fast which means that at the very least, it's clear and intuitive. Gj
I merge to develop but feel free to comment @Lysxia
CHANGES
BaseDamageInstance
class that will be used byBaseSpell
,ActiveItem
,BaseRune
damage
/do_damage
methodsActiveItem(BaseItem, BaseDamageInstance)
BaseItem
andBaseDamageInstance
are 2 standalone classes, should we still do mulitiple inheritance ? https://stackoverflow.com/a/50465583self.base_dmg = BaseDamageInstance()
or something insideActiveItem(BaseItem)
item_factory.py
Comments: