-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinjection-shortcut-boulders.rb
More file actions
33 lines (29 loc) · 995 Bytes
/
injection-shortcut-boulders.rb
File metadata and controls
33 lines (29 loc) · 995 Bytes
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
def crawli_handle_shortcut_boulders(map, rock, boulder, tile)
map.events[rock].patch(:killtheboulder) { |page|
matched = page.lookForAll([:ControlSelfSwitch, "A", true])
for insn in matched
page.insertAfter(insn, [:Script, "pbSetSelfSwitch(#{boulder},'A',true)"])
end
}
map.events[boulder].patch(:theboulderisunsure) { |page|
if page.graphic.character_name == "Object boulder"
page.graphic.character_name = ""
page.setTile(tile)
page.interact()
end
}
map.events[boulder].name = "Obstruction"
map.events[boulder].newPage { |page| page.requiresSelfSwitch("A") }
end
# Alamissa
InjectionHelper.defineMapPatch(518) { |map|
for rock, boulder in [[62, 7], [10, 9], [8, 49], [11, 12]]
crawli_handle_shortcut_boulders(map, rock, boulder, 472)
end
}
# Zone Zero
InjectionHelper.defineMapPatch(573) { |map|
for rock, boulder in [[62, 7], [10, 9], [8, 49], [11, 12]]
crawli_handle_shortcut_boulders(map, rock, boulder, 620)
end
}