-
Notifications
You must be signed in to change notification settings - Fork 0
/
StateLogic.py
155 lines (99 loc) · 3.85 KB
/
StateLogic.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
def canDig(state, player):
return state.has("Green Goblet", player) and state.has("Hammers", player)
def canMini(state, player):
return state.has("Red Goblet", player) and state.has("Hammers", player)
def canDash(state, player):
return state.has("Red Pearl Bean", player) and state.has("Firebrand", player)
def canCrash(state, player):
return state.has("Green Pearl Bean", player) and state.has("Thunderhand", player)
def hammers(state, player):
return state.has("Hammers", player)
def super(state, player):
return state.has("Hammers", player, 2)
def ultra(state, player):
return state.has("Hammers", player, 3)
def fruits(state, player):
return (
state.has("Red Chuckola Fruit", player)
and state.has("Purple Chuckola Fruit", player)
and state.has("White Chuckola Fruit", player)
)
def pieces(state, player):
return (
state.has("Beanstar Piece 1", player)
and state.has("Beanstar Piece 2", player)
and state.has("Beanstar Piece 3", player)
and state.has("Beanstar Piece 4", player)
)
def neon(state, player):
return (
state.has("Blue Neon Egg", player)
and state.has("Red Neon Egg", player)
and state.has("Green Neon Egg", player)
and state.has("Yellow Neon Egg", player)
and state.has("Purple Neon Egg", player)
and state.has("Orange Neon Egg", player)
and state.has("Azure Neon Egg", player)
)
def spangle(state, player):
return state.has("Spangle", player)
def rose(state, player):
return state.has("Peasley's Rose", player)
def brooch(state, player):
return state.has("Beanbean Brooch", player)
def thunder(state, player):
return state.has("Thunderhand", player)
def fire(state, player):
return state.has("Firebrand", player)
def dressBeanstar(state, player):
return state.has("Peach's Extra Dress", player) and state.has("Fake Beanstar", player)
def membership(state, player):
return state.has("Membership Card", player)
def winkle(state, player):
return state.has("Winkle Card", player)
def beanFruit(state, player):
return (
state.has("Bean Fruit 1", player)
and state.has("Bean Fruit 2", player)
and state.has("Bean Fruit 3", player)
and state.has("Bean Fruit 4", player)
and state.has("Bean Fruit 5", player)
and state.has("Bean Fruit 6", player)
and state.has("Bean Fruit 7", player)
)
def surfable(state, player):
return ultra(state, player) and (
(canDig(state, player) and canMini(state, player)) or (membership(state, player) and fire(state, player))
)
def postJokes(state, player):
return (
surfable(state, player)
and canDig(state, player)
and dressBeanstar(state, player)
and pieces(state, player)
and fruits(state, player)
and brooch(state, player)
and rose(state, player)
and canDash(state, player)
)
def teehee(state, player):
return super(state, player) or canDash(state, player)
def castleTown(state, player):
return fruits(state, player) and brooch(state, player)
def fungitown(state, player):
return (
castleTown(state, player)
and thunder(state, player)
and rose(state, player)
and (super(state, player) or canDash(state, player))
)
def piranha_shop(state, player):
return state.can_reach("Shop Mom Piranha Flag", "Region", player)
def fungitown_shop(state, player):
return state.can_reach("Shop Enter Fungitown Flag", "Region", player)
def star_shop(state, player):
return state.can_reach("Shop Beanstar Complete Flag", "Region", player)
def birdo_shop(state, player):
return state.can_reach("Shop Birdo Flag", "Region", player)
def fungitown_birdo_shop(state, player):
return state.can_reach("Fungitown Shop Birdo Flag", "Region", player)