Skip to content

Commit e29aa90

Browse files
authored
Add canRModeKnockbackSpark to logic (#2318)
1 parent 00bc6a6 commit e29aa90

5 files changed

Lines changed: 124 additions & 0 deletions

File tree

helpers.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,15 @@
15171517
"Morph will not be a usable alternative to get up very constrained ledges, such as in a morph tunnel.",
15181518
"IBJ is not usable for underwater rooms without Gravity."
15191519
]
1520+
},
1521+
{
1522+
"name": "h_RModeKnockbackSpark",
1523+
"requires": [
1524+
{"partialRefill": {"type": "ReserveEnergy", "limit": 4}},
1525+
{"autoReserveTrigger": {"minReserveEnergy": 1, "maxReserveEnergy": 4}},
1526+
"canRModeKnockbackSpark",
1527+
{"shinespark": {"frames": 4, "excessFrames": 4}}
1528+
]
15201529
}
15211530
]
15221531
}

logicalRequirements.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,3 +730,5 @@ __Example:__
730730
```json
731731
{"disableEquipment": "HiJump"}
732732
```
733+
734+
Note that the requirement `{"disableEquipment": "ETank"}` occurs in some strats. This is not a functionality of the vanilla game but may be supported in randomizers or other modifications of the game: it means that the player has a way to control the amount of ETanks that are currently active. It is commonly required in R-mode strats where the player may need to farm non-respawning enemies in the room to put energy back into reserves.

region/wreckedship/main/Basement.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,33 @@
336336
"gModeRegainMobility": {},
337337
"flashSuitChecked": true
338338
},
339+
{
340+
"link": [1, 1],
341+
"name": "Gain Flash Suit (R-Mode Knockback Spark)",
342+
"entranceCondition": {
343+
"comeInWithRMode": {}
344+
},
345+
"requires": [
346+
"f_DefeatedPhantoon",
347+
{"or": [
348+
{"and": [
349+
{"disableEquipment": "ETank"},
350+
{"resourceAvailable": [{"type": "Energy", "count": 80}]}
351+
]},
352+
"h_CrystalFlash"
353+
]},
354+
{"canShineCharge": {"usedTiles": 38, "openEnd": 1}},
355+
"h_RModeKnockbackSpark"
356+
],
357+
"note": [
358+
"Disable E-tanks and with a full Reserve tank enter the room in R-Mode. Farm Energy from the first and if necessary second Atomic to put Energy into reserves.",
359+
"Damage down and ensure there is between 1-4 energy in reserves. Lure the third Atomic down towards Samus while shooting the robot to move it back.",
360+
"Shinecharge and stop just before the Atomic, allow it to make contact with Samus while stationary, triggering the reserves and an R-Mode forced standup.",
361+
"Frame perfectly press jump to shinespark and gain a flash suit. The Atomic will not move out of the way so as soon as Samus starts to turn blue",
362+
"shinespark to kill it before i-frames run out and it kills Samus. Sparking too early will not gain a flashsuit."
363+
],
364+
"devNote": "If E-tanks cannot be disabled, a crystalflash can be used to put energy into reserves."
365+
},
339366
{
340367
"id": 13,
341368
"link": [1, 2],
@@ -724,6 +751,34 @@
724751
],
725752
"devNote": "This is only for indirect G-Mode, because it is trivial while in direct, and would use a different strat."
726753
},
754+
{
755+
"link": [2, 2],
756+
"name": "Gain Flash Suit (R-Mode Knockback Spark)",
757+
"entranceCondition": {
758+
"comeInWithRMode": {},
759+
"comesThroughToilet": "any"
760+
},
761+
"requires": [
762+
"f_DefeatedPhantoon",
763+
{"or": [
764+
{"and": [
765+
{"disableEquipment": "ETank"},
766+
{"resourceAvailable": [{"type": "Energy", "count": 80}]}
767+
]},
768+
"h_CrystalFlash"
769+
]},
770+
{"canShineCharge": {"usedTiles": 38, "openEnd": 1}},
771+
"h_RModeKnockbackSpark"
772+
],
773+
"note": [
774+
"Disable E-tanks and with a full Reserve tank enter the room in R-Mode. Farm Energy from the first and if necessary second Atomic near the top door to put Energy into reserves.",
775+
"Lure the third Atomic near the left door down toward samus and use it damage down if the first two Atomic's were used for farming, shooting the robot to move it back gives more runway.",
776+
"Shinecharge and stop just before the Atomic, allow it to make contact with Samus while stationary, triggering the reserves and an R-Mode forced standup.",
777+
"Frame perfectly press jump to shinespark and gain a flash suit. The Atomic will not move out of the way so as soon as Samus starts to turn blue",
778+
"shinespark to kill it before i-frames run out and it kills Samus. Sparking too early will not gain a flashsuit."
779+
],
780+
"devNote": "If E-tanks cannot be disabled, a crystalflash can be used to put energy into reserves."
781+
},
727782
{
728783
"id": 28,
729784
"link": [2, 3],
@@ -1233,6 +1288,34 @@
12331288
"leaveWithGModeSetup": {}
12341289
},
12351290
"flashSuitChecked": true
1291+
},
1292+
{
1293+
"link": [3, 3],
1294+
"name": "Gain Flash Suit (R-Mode Knockback Spark)",
1295+
"entranceCondition": {
1296+
"comeInWithRMode": {}
1297+
},
1298+
"requires": [
1299+
"f_DefeatedPhantoon",
1300+
{"or": [
1301+
{"and": [
1302+
{"disableEquipment": "ETank"},
1303+
{"resourceAvailable": [{"type": "Energy", "count": 80}]}
1304+
]},
1305+
"h_CrystalFlash"
1306+
]},
1307+
"h_bombThings",
1308+
{"canShineCharge": {"usedTiles": 38, "openEnd": 1}},
1309+
"h_RModeKnockbackSpark"
1310+
],
1311+
"note": [
1312+
"Disable E-tanks and with a full Reserve tank enter the room in R-Mode. Farm Energy from the first and if necessary, second Atomic closest to the right the door to put Energy into reserves.",
1313+
"Lure the third Atomic near the left door down toward samus and use it damage down if the first two Atomic's were used for farming, shooting the robot to move it back gives more runway.",
1314+
"Shinecharge and stop just before the Atomic, allow it to make contact with Samus while stationary, triggering the reserves and an R-Mode forced standup.",
1315+
"Frame perfectly press jump to shinespark and gain a flash suit. The Atomic will not move out of the way so as soon as Samus starts to turn blue",
1316+
"shinespark to kill it before i-frames run out and it kills Samus. Sparking too early will not gain a flashsuit."
1317+
],
1318+
"devNote": "If E-tanks cannot be disabled, a crystalflash can be used to put energy into reserves."
12361319
}
12371320
],
12381321
"notables": [

tech.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,6 +2333,32 @@
23332333
"Holding back and jump for more than 5 frames will cause Samus to spark horizontally. If the direction switch was exactly one frame late, Samus will land on the slope but no spark will occur."
23342334
]
23352335
},
2336+
{
2337+
"name": "canRModeKnockbackSpark",
2338+
"techRequires": [
2339+
"canRMode",
2340+
"canCarryFlashSuit",
2341+
"canPreciseReserveRefill"
2342+
],
2343+
"otherRequires": [
2344+
"SpeedBooster",
2345+
{"gainFlashSuit": {}}
2346+
],
2347+
"note": [
2348+
"The ability to gain a flash suit without Morph by using enemy damage to trigger reserves and cause a forced standup.",
2349+
"After entering a room in R-Mode, farm enemies to add between 1-4 energy into the reserve tank.",
2350+
"Damage down until the next enemy contact will trigger reserves.",
2351+
"Shinecharge and get hit by an enemy while stationary.",
2352+
"Frame perfectly press jump to activate a shinespark on the last frame before the knockback timer expires, 4 frames after the enemy contact."
2353+
],
2354+
"detailNote": [
2355+
"Pressing jump very early, before the enemy contact, will usually result in an interrupted shinespark resulting in a blue suit.",
2356+
"Pressing jump early, during the reserve refill (1 to 4 frames depending on reserve energy), will result in no shinespark.",
2357+
"Pressing jump 1 frame late likewise results in no shinespark.",
2358+
"Pressing jump 2 or more frames late will result in a vertical shinespark.",
2359+
"Damage from a slow moving enemy will usually kill Samus after i-frames expire; for this type of enemy shinespark away as soon as Samus starts to turn blue."
2360+
]
2361+
},
23362362
{
23372363
"id": 208,
23382364
"name": "canComplexCarryFlashSuit",

tests/asserts/keywords.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@ def process_req_speed_state(req, states, err_fn):
483483
states = {"blue"}
484484
elif req in ["h_flashSuitIceClip"]:
485485
states = {"preshinespark"}
486+
elif req in ["h_RModeKnockbackSpark"]:
487+
if not states.issubset(["shinecharging", "shinecharged"]):
488+
err_fn(f"shinespark requirement while not in shinecharging/shinecharged/shinespark state: {req}")
489+
states = {"shinespark"}
486490
elif req in ["canTemporaryBlue", "canChainTemporaryBlue", "canLongChainTemporaryBlue", "canSpeedball", "canXRayCancelShinecharge"]:
487491
if not states.issubset(["shinecharging", "blue"]):
488492
err_fn(f"{req} while not in blue state")

0 commit comments

Comments
 (0)