-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneral.lua
144 lines (123 loc) · 2.86 KB
/
general.lua
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
general = {
help = {
[""] = function()
if (rooms[current_room].picture == pic_forest) then
transcribe("if only i could tell if i'd been here before...")
else
transcribe("try going in some direction ex:north, south, east, west, up, down") --extra spaces added for Pico-8 display friendliness
end
end
},
with = {
gun = function(held)
if (held) then
if (var_gun_was_shot == false) then
transcribe("your gun is now empty")
else
transcribe("your gun is empty")
end
var_gun_was_shot = true
else
command_handled = false
end
end
},
go = {
window = "windows are boarded up except the attic window",
},
u = {
tree = function()
if (rooms[current_room].picture == pic_forest) then
transcribe("there is nothing special")
else
command_handled = false
end
end
},
look = {
window = "windows are boarded up except the attic window",
note = function(held)
if (held) then
transcribe("there is writing on it")
else
--in original, what triggers "im not carrying that"?
transcribe("im not carrying that")
end
end,
room = function()
temp_room = 0 --side effect sets command_handled to true
end,
tree = function()
if (rooms[current_room].picture == pic_forest) then
transcribe("there is nothing special")
else
command_handled = false
end
end,
gun = "there is one bullet in the gun" --BUG; ALWAYS reports one bullet
},
read = {
note = function(held)
if (held) temp_room = objects[held][temp_num]
end
},
light = {
matches = function(held)
if (held) then
var_match_duration = 4
transcribe("ok")
else
transcribe("you are not carrying it")
end
end,
candle = function(held)
if (key_in_inventory("matches")) then
swap(inventory, "unlit_candle", "lit_candle", "ok", "you don't have it")
else
transcribe("you have nothing to light it with")
end
end
},
unlight = {
candle = function(held)
if (held) then
swap(inventory, "lit_candle", "unlit_candle")
else
command_handled = false
end
end
},
drink = {
water = function()
swap(inventory, "full_pitcher", "empty_pitcher", "ok", "i dont understand what you mean")
end },
pour = {
water = function()
swap(inventory, "full_pitcher", "empty_pitcher", "the pitcher is empty", "i see no water")
end
},
["break"] = {
window = "windows are boarded up except the attic window"
},
quit = {
[""] = replay_game
},
fuck = {
[""] = function()
transcribe("if you feel that way i refuse to play with you...")
quit_game()
end
},
sleep = {
[""] = "i feel much more rested now"
},
save = {
game = save_game
},
restore = {
game = restore_game
},
inventor = {
[""] = list_inventory
}
}