-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinjection-underground-sanctuary.rb
More file actions
71 lines (65 loc) · 2.14 KB
/
injection-underground-sanctuary.rb
File metadata and controls
71 lines (65 loc) · 2.14 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
InjectionHelper.defineMapPatch(551, 104) { |event|
event.patch(:addskip) { |page|
page.insertBeforeEnd(
[:ConditionalBranch, :Switch, 1164, false],
[:ShowText, "Oh, you're blind? I think I can help..."],
[:ShowChoices, ["Yes", "No"], 2],
[:When, 0, "Yes"],
[:ShowText, "ANASTASIA: O-Okay!"],
[:ChangeScreenColorTone, Tone.new(-255,-255,-255,0), 10],
[:PlaySoundEvent, 'Exit Door', 100, 100],
[:Wait, 10],
[:ControlSwitch, 1164, true],
[:ChangeScreenColorTone, Tone.new(0,0,0,0), 10],
[:Wait, 10],
:Done,
[:When, 1, "No"],
[:ShowText, "ANASTASIA: O-Okay..."],
:Done,
:Done)
}
}
def patchmaid_underground_sanctuary(event, switch)
instructions = [
[:ConditionalBranch, :Switch, switch, false],
[:ShowText, "And yet, why... Why did Master Indriad order me to assist you?!"],
[:ShowText, "Will you make me debase myself so?"],
[:ShowChoices, ["Yes", "No"], 2],
[:When, 0, "Yes"],
[:ShowText, "So be it."],
[:ChangeScreenColorTone, Tone.new(-255,-255,-255,0), 10],
[:PlaySoundEvent, 'Exit Door', 100, 100],
[:Wait, 10],
[:ControlSwitch, switch, true],
[:ChangeScreenColorTone, Tone.new(0,0,0,0), 10],
[:Wait, 10],
:Done,
[:When, 1, "No"],
:Done,
:Done
]
event.pages[0].patch(:addskip) { |page|
matched = page.lookForSequence([:ControlSelfSwitch, "A", true])
if matched
page.insertAfter(matched, *instructions)
end
}
event.pages[1].patch(:addskip) { |page|
page.insertBeforeEnd(*instructions)
}
end
InjectionHelper.defineMapPatch(551, 104) { |event|
patchmaid_underground_sanctuary(event, 1165)
}
InjectionHelper.defineMapPatch(551, 96) { |event|
patchmaid_underground_sanctuary(event, 1166)
}
InjectionHelper.defineMapPatch(551, 97, 1) { |page|
page.insertBeforeEnd(
[:ConditionalBranch, :Switch, 1167, false],
[:ShowText, "Accessibility? Hah. That is not my place."],
:Done)
}
InjectionHelper.defineMapPatch(551, 98) { |event|
patchmaid_underground_sanctuary(event, 1167)
}