PaulQbFeng / too-tanky

3 stars 0 forks source link

Create base damage class #61

Closed PaulQbFeng closed 1 year ago

PaulQbFeng commented 1 year ago

CHANGES

Comments:

LinSun00 commented 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

PaulQbFeng commented 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

Yeah let's start with that

michaelbenayoun commented 1 year ago

I do not know enough about the subject, but:

PaulQbFeng commented 1 year ago

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 instance BaseDamageInstance?

Yes exactly. Something like this:

then we can do item.active.damage()

LinSun00 commented 1 year ago

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 ?

PaulQbFeng commented 1 year ago

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 ?

LinSun00 commented 1 year ago

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

PaulQbFeng commented 1 year ago

UPDATE

LinSun00 commented 1 year ago

I understood everything super fast which means that at the very least, it's clear and intuitive. Gj

PaulQbFeng commented 1 year ago

I merge to develop but feel free to comment @Lysxia