Closed PaulQbFeng closed 1 year ago
It's useful to have a function that purely computes the damage for testing. do_auto_attack
would handle applying on-hit effects, so I think of it as a quite different job.
I think the cases where we actually need to separe the two are not so common. But having both never hurts and the damage, do_damage seperation is quite intuitive and a good feature to have overall
do_auto_attack
, do_damage
or
hit_auto_attack
, hit_damage
I prefer first one. Second one can be confusing because it can be confused with on_hit_damage
damage
, do_damage
in https://github.com/PaulQbFeng/too-tanky/pull/61
in
champion.py
there is anauto_attack_damage
and ado_auto_attack
method.But all over the code, sometimes we inflict the damage to the target, sometimes not.
Should we have separate methods ? Or a single one that always does damage to the target.
What do you think ?