Closed PaulQbFeng closed 1 year ago
J'avoue j'ai pas tout compris
vas y je t'expliquerai pdnt un de nos meetings 2nd job
Mais sen gros le decorateur registerspell au dessus de chaque spell permet de stocker le spell dans SpellFactory avec le bon champion et le bon spellkey, ce qui permet a l'initialisation des spells de le faire dans BaseChampion et non pas dans chaque module annie, xerath.py etc
very cool
Add spell factory that registers the class name with a decorator. spells can now be initialised inside BaseChampion.
Credit to @michaelbenayoun (btw see how it works without importing it first in init.py)