from dataclasses import dataclass from enum import Enum slot=Enum("Slot",["Buff","Attack","Special","Rest","Passive","Class"]) @dataclass class Skill(): name:str slot:slot hooks:dict={} def __getitem__(self,item): return self.hooks.get(item) attack=Skill('attack',slot.Attack,{'action':actions.attack}) shikigami=Skill('shikigami',slot.Attack,{'action':actions.allattack}) retaliate=Skill('retaliate',slot.Class,{'attacked':reactions.counter})