Skip to content

Commit 4989e11

Browse files
committed
Ridley Room side platform jumps
1 parent 5e90179 commit 4989e11

2 files changed

Lines changed: 193 additions & 0 deletions

File tree

region/lowernorfair/east/Ridley's Room.json

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,168 @@
167167
"flashSuitChecked": true,
168168
"devNote": "FIXME: Ridley could also be used to set up G-mode, but the chaos of the fight makes this difficult."
169169
},
170+
{
171+
"link": [1, 2],
172+
"name": "Side Platform Cross Room Speedy Jump",
173+
"entranceCondition": {
174+
"comeInWithSidePlatform": {
175+
"platforms": [
176+
{
177+
"minHeight": 1,
178+
"maxHeight": 1,
179+
"minTiles": 17,
180+
"obstructions": [[1, 0]],
181+
"speedBooster": true,
182+
"requires": [
183+
{"or": [
184+
{"and": [
185+
"HiJump",
186+
{"heatFrames": 90}
187+
]},
188+
{"and": [
189+
"canTrickyDashJump",
190+
"canTrickySpringBallJump",
191+
{"heatFrames": 115}
192+
]}
193+
]}
194+
],
195+
"note": ["This applies to Warehouse Entrance."]
196+
},
197+
{
198+
"minHeight": 2,
199+
"maxHeight": 2,
200+
"minTiles": 11.4375,
201+
"obstructions": [[1, 0]],
202+
"speedBooster": true,
203+
"requires": [
204+
"canTrickyDashJump",
205+
"canTrickySpringBallJump",
206+
{"heatFrames": 100}
207+
],
208+
"note": ["This applies to Ridley Tank Room, Halfie Climb Room, and Dust Torizo Room."]
209+
},
210+
{
211+
"minHeight": 2,
212+
"maxHeight": 2,
213+
"minTiles": 12.4375,
214+
"obstructions": [[1, 0]],
215+
"speedBooster": true,
216+
"requires": [
217+
"HiJump",
218+
{"heatFrames": 95}
219+
],
220+
"note": ["This applies to Halfie Climb Room and Dust Torizo Room."]
221+
},
222+
{
223+
"minHeight": 3,
224+
"maxHeight": 3,
225+
"minTiles": 10.4375,
226+
"obstructions": [[1, 0]],
227+
"speedBooster": true,
228+
"requires": [
229+
"canTrickyDashJump",
230+
"canTrickySpringBallJump",
231+
{"heatFrames": 120}
232+
],
233+
"note": ["This applies to Big Boy Room and Mickey Mouse Room."]
234+
},
235+
{
236+
"minHeight": 2,
237+
"maxHeight": 2,
238+
"minTiles": 45,
239+
"obstructions": [[2, 0]],
240+
"speedBooster": true,
241+
"requires": [
242+
"canInsaneJump",
243+
{"heatFrames": 85}
244+
],
245+
"note": ["This applies to Waterway Energy Tank Room."]
246+
},
247+
{
248+
"minHeight": 2,
249+
"maxHeight": 2,
250+
"minTiles": 45,
251+
"obstructions": [[3, 0]],
252+
"speedBooster": true,
253+
"requires": [
254+
"canInsaneJump",
255+
"canMomentumConservingMorph",
256+
{"or": [
257+
{"and": [
258+
"HiJump",
259+
{"heatFrames": 80}
260+
]},
261+
{"and": [
262+
"canTrickySpringBallJump",
263+
{"heatFrames": 100}
264+
]}
265+
]}
266+
],
267+
"note": ["This applies to Statues Hallway."]
268+
},
269+
{
270+
"minHeight": 3,
271+
"maxHeight": 3,
272+
"minTiles": 37.4375,
273+
"obstructions": [[3, 0]],
274+
"speedBooster": true,
275+
"requires": [
276+
"canInsaneJump",
277+
"canMomentumConservingMorph",
278+
{"or": [
279+
{"and": [
280+
"HiJump",
281+
{"heatFrames": 85}
282+
]},
283+
{"and": [
284+
"canTrickySpringBallJump",
285+
{"heatFrames": 100}
286+
]}
287+
]}
288+
],
289+
"note": ["This applies to Flyway."]
290+
},
291+
{
292+
"minHeight": 2,
293+
"maxHeight": 2,
294+
"minTiles": 45,
295+
"obstructions": [[4, 0]],
296+
"speedBooster": true,
297+
"requires": [
298+
"canInsaneJump",
299+
"canMomentumConservingMorph",
300+
"canInsaneMidAirMorph",
301+
"canTrickySpringBallJump",
302+
{"heatFrames": 100}
303+
],
304+
"note": ["This applies to Baby Kraid Room."]
305+
},
306+
{
307+
"minHeight": 3,
308+
"maxHeight": 3,
309+
"minTiles": 39.4375,
310+
"obstructions": [[3, 2]],
311+
"speedBooster": true,
312+
"requires": [
313+
"canTrickyJump",
314+
{"or": [
315+
{"and": [
316+
"HiJump",
317+
{"heatFrames": 75}
318+
]},
319+
{"and": [
320+
"canTrickySpringBallJump",
321+
{"heatFrames": 115}
322+
]}
323+
]}
324+
],
325+
"note": ["This applies to Metal Pirates Room."]
326+
}
327+
]
328+
}
329+
},
330+
"requires": []
331+
},
170332
{
171333
"id": 23,
172334
"link": [1, 2],

tests/asserts/keywords.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,37 @@ def check_speed_states(strat, err_fn):
10681068
def strat_err_fn(msg):
10691069
messages["reds"].append(f"🔴ERROR: {stratRef}:{msg}")
10701070
messages["counts"]["reds"] += 1
1071+
1072+
def make_and(reqs):
1073+
if len(reqs) == 0:
1074+
return "free"
1075+
elif len(reqs) == 1:
1076+
return reqs[0]
1077+
else:
1078+
return {"and": reqs}
1079+
1080+
def make_or(reqs):
1081+
if len(reqs) == 0:
1082+
return "never"
1083+
elif len(reqs) == 1:
1084+
return reqs[0]
1085+
else:
1086+
out = []
1087+
for r in reqs:
1088+
if isinstance(r, dict) and "or" in r:
1089+
out.extend(r["or"])
1090+
else:
1091+
out.append(r)
1092+
return {"or": out}
1093+
1094+
1095+
requires = strat["requires"]
1096+
if "entranceCondition" in strat and "comeInWithSidePlatform" in strat["entranceCondition"]:
1097+
reqs = []
1098+
for platform in strat["entranceCondition"]["comeInWithSidePlatform"]["platforms"]:
1099+
reqs.append(make_and(platform.get("requires", [])))
1100+
requires.append(make_or(reqs))
1101+
10711102
for req in strat["requires"]:
10721103
check_and_or(req, strat_err_fn)
10731104
if heated and not check_heat_req({"and": strat["requires"]}):

0 commit comments

Comments
 (0)