Skip to content

Commit

Permalink
Merge pull request #110 from randovania/patch-a3-gamma-spawns
Browse files Browse the repository at this point in the history
Patch Area 3 Gamma to spawn/remain in one room
  • Loading branch information
ThanatosGit authored Sep 29, 2023
2 parents ac81d8f + ff1fd49 commit df49a70
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 87 deletions.
30 changes: 15 additions & 15 deletions open_samus_returns_rando/files/levels/s030_area3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ function s030_area3.OnGamma_005_C_Generated(_ARG_0_, _ARG_1_)
_ARG_1_.AI:AddElectricMinesLogicPath(2, "PATH_Gamma005_C_mines_002")
_ARG_1_.AI:AddElectricMinesLogicPath(2, "PATH_Gamma005_C_mines_003")
_ARG_1_.AI:AddIdleLogicPath("PATH_Gamma005_C_Idle")
Gamma.SetArenaLife(_ARG_0_, _ARG_1_)
if Gamma.GetNumValveUsed(_ARG_0_) == 0 then
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
_ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.6)
_ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 60)
_ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
end
if Gamma.GetNumValveUsed(_ARG_0_) == 1 then
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
_ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
_ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.3)
_ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 90)
_ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
end
-- Gamma.SetArenaLife(_ARG_0_, _ARG_1_)
-- if Gamma.GetNumValveUsed(_ARG_0_) == 0 then
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.6)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 60)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
-- end
-- if Gamma.GetNumValveUsed(_ARG_0_) == 1 then
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_001")
-- _ARG_1_.AI:AddValve("LE_Valve_Gamma_005_C_002")
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveLifePct", 0.3)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveTime", 90)
-- _ARG_1_.AI:AddBlackboardParam("fGotoValveSamusLife", 99)
-- end
end
end
function s030_area3.OnEnter_Gamma_005_Dead()
Expand Down
94 changes: 22 additions & 72 deletions open_samus_returns_rando/specific_patches/static_fixes.py
Original file line number Diff line number Diff line change
@@ -1,81 +1,31 @@
from open_samus_returns_rando.patcher_editor import PatcherEditor

MULTI_ROOM_GAMMAS = [
{
"scenario": "s033_area3b",
"layer": 4,
"actor": "Gamma_004_A"
},
{
"scenario": "s033_area3b",
"layer": 4,
"actor": "Gamma_004_Intro_A"
},
{
"scenario": "s033_area3b",
"layer": 4,
"actor": "Gamma_004_C"
},
{
"scenario": "s033_area3b",
"layer": 4,
"actor": "Gamma_004_Intro_C"
},
{
"scenario": "s036_area3c",
"layer": 4,
"actor": "SP_Gamma_007_B"
},
{
"scenario": "s036_area3c",
"layer": 4,
"actor": "SP_Gamma_007_Intro_B"
},
{
"scenario": "s040_area4",
"layer": 4,
"actor": "SP_Gamma_001_B"
},
{
"scenario": "s040_area4",
"layer": 4,
"actor": "SP_Gamma_001_Intro_B"
},
{
"scenario": "s040_area4",
"layer": 4,
"actor": "SP_Gamma_001_C"
},
{
"scenario": "s040_area4",
"layer": 4,
"actor": "SP_Gamma_001_Intro_C"
},
{
"scenario": "s050_area5",
"layer": 4,
"actor": "Gamma_002_B"
},
{
"scenario": "s050_area5",
"layer": 4,
"actor": "Gamma_002_Intro_B"
},
{
"scenario": "s050_area5",
"layer": 4,
"actor": "Gamma_002_C"
},
{
"scenario": "s050_area5",
"layer": 4,
"actor": "Gamma_002_Intro_C"
},
{"scenario": "s030_area3", "layer": 4, "actor": "SP_Gamma_005_A"},
{"scenario": "s030_area3", "layer": 4, "actor": "SP_Gamma_004_Intro_A"},
{"scenario": "s030_area3", "layer": 4, "actor": "SP_Gamma_004_B"},
{"scenario": "s030_area3", "layer": 4, "actor": "SP_Gamma_004_Intro_B"},
{"scenario": "s033_area3b", "layer": 4, "actor": "Gamma_004_A"},
{"scenario": "s033_area3b", "layer": 4, "actor": "Gamma_004_Intro_A"},
{"scenario": "s033_area3b", "layer": 4, "actor": "Gamma_004_C"},
{"scenario": "s033_area3b", "layer": 4, "actor": "Gamma_004_Intro_C"},
{"scenario": "s036_area3c", "layer": 4, "actor": "SP_Gamma_007_B"},
{"scenario": "s036_area3c", "layer": 4, "actor": "SP_Gamma_007_Intro_B"},
{"scenario": "s040_area4", "layer": 4, "actor": "SP_Gamma_001_B"},
{"scenario": "s040_area4", "layer": 4, "actor": "SP_Gamma_001_Intro_B"},
{"scenario": "s040_area4", "layer": 4, "actor": "SP_Gamma_001_C"},
{"scenario": "s040_area4", "layer": 4, "actor": "SP_Gamma_001_Intro_C"},
{"scenario": "s050_area5", "layer": 4, "actor": "Gamma_002_B"},
{"scenario": "s050_area5", "layer": 4, "actor": "Gamma_002_Intro_B"},
{"scenario": "s050_area5", "layer": 4, "actor": "Gamma_002_C"},
{"scenario": "s050_area5", "layer": 4, "actor": "Gamma_002_Intro_C"},
]


def patch_multi_room_gammas(editor: PatcherEditor):
for reference in MULTI_ROOM_GAMMAS:
editor.remove_entity(reference)
editor.remove_entity(reference)


def apply_static_fixes(editor: PatcherEditor):
patch_multi_room_gammas(editor)
patch_multi_room_gammas(editor)

0 comments on commit df49a70

Please sign in to comment.