Open ackao opened 3 years ago
also maybe actually write __repr__()
for enums lmao
suggestion:
PercentageBuff = float
DurationSecs = int
Cooldown = int
AppropriateName = Tuple[PercentageBuff, DurationSecs, Cooldown]
...
class Buffs(Enum):
# aoe
Chain: AppropriateName = (0.1, 15, 120)
i used
# Class variable to convert stats
P_scalars = tuple[int, int] # for less ugly
CRIT_CONVERT: ClassVar[dict[Stats, P_scalars]] = {
Stats.CRIT: (200, 50),
Stats.DH: (550, 0),
}
but i dunno
It might be nice to do a util/types.py
to locate types into if they're generally useful (like things like PScalars). Might also help to document what the types represent there just because it would be useful for those that are not math- or statistics-inclined but want to help.
replace with:
and similar
also consider typing.IntEnum (example: https://github.com/xivlogs/nari/blob/9f3169a7112654a8ab25ae390374983a0750f32d/nari/types/event/directorupdate.py#L14)