Skip to content

Commit 27bc2b6

Browse files
authored
Merge pull request #2714 from blkerby/slow-short-charge-test
Add test for canSlowShortCharge
2 parents f5aa1e2 + a2cadd1 commit 27bc2b6

7 files changed

Lines changed: 15 additions & 12 deletions

File tree

helpers.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,6 @@
17021702
"This represents using Speed Booster to jump with blue speed or to run off of a ledge with blue speed."
17031703
],
17041704
"devNote": [
1705-
"This needs Speed Booster, but it would be covered by a preceding `getBlueSpeed` or similar requirement.",
17061705
"This helper exists to help support modified Speed Booster items in randomizers."
17071706
]
17081707
},

region/brinstar/green/Brinstar Pre-Map Room.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@
309309
"link": [2, 1],
310310
"name": "Speedball (In-Room)",
311311
"requires": [
312-
"canSlowShortCharge",
313312
{"getBlueSpeed": {"usedTiles": 14, "openEnd": 1}},
313+
"canSlowShortCharge",
314314
"canSpeedball"
315315
],
316316
"clearsObstacles": ["A"],
@@ -323,8 +323,8 @@
323323
"name": "Speedball (In-Room) Extended Runway With Frozen Zeela",
324324
"requires": [
325325
"h_frozenEnemyRunway",
326-
"canSlowShortCharge",
327326
{"getBlueSpeed": {"usedTiles": 15, "openEnd": 1}},
327+
"canSlowShortCharge",
328328
"canSpeedball"
329329
],
330330
"clearsObstacles": ["A"],

region/brinstar/kraid/Warehouse Kihunter Room.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,8 @@
11071107
{"obstaclesNotCleared": ["D"]},
11081108
{"or": [
11091109
{"and": [
1110-
"canSlowShortCharge",
11111110
{"getBlueSpeed": {"usedTiles": 17, "openEnd": 0}},
1111+
"canSlowShortCharge",
11121112
"canSpeedball"
11131113
]},
11141114
{"and": [

region/brinstar/pink/Big Pink.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4222,8 +4222,8 @@
42224222
"requires": [
42234223
{"notable": "Off Screen Super Block"},
42244224
{"notable": "Break Raised Bomb Blocks with Blue Speed"},
4225-
"canSlowShortCharge",
42264225
{"getBlueSpeed": {"usedTiles": 20, "openEnd": 2}},
4226+
"canSlowShortCharge",
42274227
"canSpeedball",
42284228
"canLateralMidAirMorph",
42294229
"canTrickyJump",

region/wreckedship/main/Wrecked Ship East Super Room.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,9 +855,9 @@
855855
"requires": [
856856
{"notable": "Robot Clip Run-In-Place"},
857857
"canMidAirMorph",
858+
{"getBlueSpeed": {"usedTiles": 15, "openEnd": 1}},
858859
"canSlowShortCharge",
859-
"canKago",
860-
{"getBlueSpeed": {"usedTiles": 15, "openEnd": 1}}
860+
"canKago"
861861
],
862862
"flashSuitChecked": true,
863863
"note": [

tech.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,8 +2346,8 @@
23462346
"Being able to 4 tap is expected as that brings out the most value from this tech."
23472347
],
23482348
"devNote": [
2349-
"The SpeedBooster and canDash requirements are included to be safe, though they would be redundant",
2350-
"with the shinecharge or blue speed requirements that should always accompany this tech"
2349+
"The SpeedBooster and canDash requirements are included for clarity, though they are redundant",
2350+
"with the shinecharge or blue speed requirements that always accompany this tech (enforced by tests)."
23512351
]
23522352
},
23532353
{
@@ -2895,8 +2895,9 @@
28952895
"This is not a momentum continuing action like canBlueSpaceJump."
28962896
],
28972897
"devNote": [
2898-
"This does not include a requirement to gain blue speed or a shinecharge,",
2899-
"which would depend on the runway and hence vary from strat to strat.",
2898+
"The SpeedBooster and canDash requirements are included for clarity, though they are redundant",
2899+
"with the shinecharge or blue speed requirements that always accompany this tech.",
2900+
"Such requirements would depend on the runway and hence vary from strat to strat.",
29002901
"Tests enforce that some such requirement always precedes this tech."
29012902
],
29022903
"extensionTechs": [

tests/asserts/keywords.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,11 @@ def process_req_speed_state(req, states, err_fn):
492492
states = {"normal"}
493493
elif req in ["canTemporaryBlue", "canChainTemporaryBlue", "canLongChainTemporaryBlue"]:
494494
if not states.issubset(["shinecharging", "blue"]):
495-
err_fn(f"{req} while not in blue state")
495+
err_fn(f"{req} while not in shinecharging/blue state")
496496
states = {"blue"}
497+
elif req in ["canSlowShortCharge"]:
498+
if not states.issubset(["shinecharging", "blue"]):
499+
err_fn(f"{req} while not in shinecharging/blue state")
497500
elif req in ["canSpeedball", "canBlueSpaceJump", "h_blueJump"]:
498501
if not states.issubset(["blue"]):
499502
err_fn(f"{req} while not in blue state")

0 commit comments

Comments
 (0)