PaulQbFeng / too-tanky

3 stars 0 forks source link

Have individual items, runes, summoner spells as direct champion attribute #86

Closed PaulQbFeng closed 1 year ago

PaulQbFeng commented 1 year ago

On top of having the items stored in champion.items, have them referenced as direct attribute to enable this type of behaviour:

champion.luden_echo.damage instead of champion.get_item("Luden's Echo").damage

has to be done after InventoryMixin is created

PaulQbFeng commented 1 year ago

Opinion @Lysxia @LinSun00 ?

Lysxia commented 1 year ago

I find it harder to read because you have to recognize the attribute as an item to understand that it's handled specially, and you have to mangle non-alphabetic characters in names.

PaulQbFeng commented 1 year ago

Ok I see. Do we settle for a get_ method for runes, items and summoner spells then ?

champion.get_item("Luden's Echo").damage champion.get_rune("Electrocute").damage champion.get_summoner_spell("Ignite").damage

Lysxia commented 1 year ago

That looks good to me.