-
Notifications
You must be signed in to change notification settings - Fork 2
/
castertypes.py
60 lines (47 loc) · 1.18 KB
/
castertypes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from typing import (
Callable,
cast,
FrozenSet,
Literal,
Mapping,
NamedTuple,
Optional,
Sequence,
Union,
)
from spells import (
DamType,
Spell,
SpellType,
)
from utils import NoValue
class Category(NoValue):
BLAST_BIG = "blast_big"
BLAST_SMALL = "blast_small"
HEAL = "heal"
TYPEPROT = "typeprot"
PROT = "prot"
UTILITY = "utility"
class CategoryBind(NamedTuple):
key: str
category: Category
explanation: str
SPELL_BIND_ID = Literal["Q", "W", "E", "R", "T", "A", "S", "D", "F", "G"]
class SpellBind(NamedTuple):
key: str
spellBindId: SPELL_BIND_ID
atTarget: bool
CategoryBinds = Sequence[Sequence[CategoryBind]]
SpellBinds = Sequence[SpellBind]
PartyReportSpellTypes = FrozenSet[SpellType]
PartyReportSpells = FrozenSet[Spell]
SpellsForCategory = Mapping[Category, Mapping[SPELL_BIND_ID, Optional[Spell]]]
class State(NamedTuple):
category: Category
target: Optional[str]
categoryBinds: CategoryBinds
spellsForCategory: SpellsForCategory
spellBinds: SpellBinds
partyReportSpells: PartyReportSpells
partyReportSpellTypes: PartyReportSpellTypes
currentSpell: Optional[str]