Compare commits
11 Commits
codegenera
...
395208f814
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
395208f814 | ||
|
|
4cc0025f5e | ||
| 0ea538ce24 | |||
| 629a27cfa8 | |||
|
|
53c95bf17d | ||
|
|
9fc659c819 | ||
|
|
07bc598ae9 | ||
|
|
133980f569 | ||
|
|
efe903110b | ||
| 73b2a88437 | |||
| 2812b0c17a |
116
.luacheckrc
116
.luacheckrc
@@ -2,79 +2,79 @@
|
|||||||
-- Configuration for luacheck
|
-- Configuration for luacheck
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
"Focus",
|
|
||||||
"Day",
|
|
||||||
"Timer",
|
|
||||||
"Glitch",
|
|
||||||
"Trigger",
|
|
||||||
"Discussion",
|
|
||||||
"Util",
|
|
||||||
"Decision",
|
|
||||||
"Screen",
|
|
||||||
"Sprite",
|
|
||||||
"UI",
|
|
||||||
"Print",
|
|
||||||
"Input",
|
|
||||||
"Audio",
|
|
||||||
"AsciiArt",
|
"AsciiArt",
|
||||||
"Ascension",
|
"Ascension",
|
||||||
|
"Audio",
|
||||||
|
"AudioTestWindow",
|
||||||
|
"BriefIntroWindow",
|
||||||
|
"CodeGenerator",
|
||||||
"Config",
|
"Config",
|
||||||
"Context",
|
"Context",
|
||||||
"Meter",
|
|
||||||
"Minigame",
|
|
||||||
"Window",
|
|
||||||
"ContinuedWindow",
|
"ContinuedWindow",
|
||||||
"CreditsWindow",
|
|
||||||
"TTGIntroWindow",
|
|
||||||
"BriefIntroWindow",
|
|
||||||
"TitleIntroWindow",
|
|
||||||
"MenuWindow",
|
|
||||||
"GameWindow",
|
|
||||||
"PopupWindow",
|
|
||||||
"ControlsWindow",
|
"ControlsWindow",
|
||||||
"AudioTestWindow",
|
"CreditsWindow",
|
||||||
"MinigameButtonMashWindow",
|
"Day",
|
||||||
"MinigameRhythmWindow",
|
"Decision",
|
||||||
"MinigameDDRWindow",
|
"Discussion",
|
||||||
"MysteriousManScreen",
|
|
||||||
"DiscussionWindow",
|
"DiscussionWindow",
|
||||||
"EndWindow",
|
"EndWindow",
|
||||||
"PlayerNameWindow",
|
"Focus",
|
||||||
"TextInput",
|
|
||||||
"CodeGenerator",
|
|
||||||
"CreditsWindow",
|
|
||||||
"GameOverWindow",
|
"GameOverWindow",
|
||||||
"mset",
|
"GameWindow",
|
||||||
"mget",
|
"Glitch",
|
||||||
|
"Input",
|
||||||
|
"Map",
|
||||||
|
"MapBedroom",
|
||||||
|
"MenuWindow",
|
||||||
|
"Meter",
|
||||||
|
"Minigame",
|
||||||
|
"MinigameButtonMashWindow",
|
||||||
|
"MinigameDDRWindow",
|
||||||
|
"MinigameRhythmWindow",
|
||||||
|
"Mouse",
|
||||||
|
"MysteriousManScreen",
|
||||||
|
"PlayerNameWindow",
|
||||||
|
"PopupWindow",
|
||||||
|
"Print",
|
||||||
|
"RLE",
|
||||||
|
"Screen",
|
||||||
|
"Songs",
|
||||||
|
"Sprite",
|
||||||
|
"TIC",
|
||||||
|
"TTGIntroWindow",
|
||||||
|
"TextInput",
|
||||||
|
"Timer",
|
||||||
|
"TitleIntroWindow",
|
||||||
|
"Trigger",
|
||||||
|
"UI",
|
||||||
|
"Util",
|
||||||
|
"WalkingToOfficeScreen",
|
||||||
|
"Window",
|
||||||
|
"beats_to_pattern",
|
||||||
"btnp",
|
"btnp",
|
||||||
|
"circb",
|
||||||
|
"circ",
|
||||||
|
"cls",
|
||||||
|
"exit",
|
||||||
|
"frame_from_beat",
|
||||||
|
"index_menu",
|
||||||
"keyp",
|
"keyp",
|
||||||
|
"line",
|
||||||
|
"map",
|
||||||
|
"mouse",
|
||||||
|
"mget",
|
||||||
|
"mset",
|
||||||
"music",
|
"music",
|
||||||
"sfx",
|
"musicator_generate_pattern",
|
||||||
"spr",
|
"pix",
|
||||||
|
"print",
|
||||||
"rect",
|
"rect",
|
||||||
"rectb",
|
"rectb",
|
||||||
"circ",
|
"sfx",
|
||||||
"circb",
|
"spr",
|
||||||
"cls",
|
|
||||||
"tri",
|
|
||||||
"pix",
|
|
||||||
"line",
|
|
||||||
"Songs",
|
|
||||||
"frame_from_beat",
|
|
||||||
"beats_to_pattern",
|
|
||||||
"MapBedroom",
|
|
||||||
"TIC",
|
|
||||||
"exit",
|
|
||||||
"trace",
|
|
||||||
"index_menu",
|
|
||||||
"Map",
|
|
||||||
"map",
|
|
||||||
"time",
|
"time",
|
||||||
"RLE",
|
"trace",
|
||||||
"mouse",
|
"tri",
|
||||||
"Mouse",
|
|
||||||
"print",
|
|
||||||
"musicator_generate_pattern",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
impostor.inc
10
impostor.inc
@@ -3,6 +3,7 @@ init/init.module.lua
|
|||||||
init/init.config.lua
|
init/init.config.lua
|
||||||
init/init.ascension.lua
|
init/init.ascension.lua
|
||||||
init/init.context.lua
|
init/init.context.lua
|
||||||
|
init/init.context_debug.lua
|
||||||
system/system.util.lua
|
system/system.util.lua
|
||||||
system/system.print.lua
|
system/system.print.lua
|
||||||
system/system.input.lua
|
system/system.input.lua
|
||||||
@@ -17,6 +18,7 @@ logic/logic.timer.lua
|
|||||||
logic/logic.trigger.lua
|
logic/logic.trigger.lua
|
||||||
logic/logic.minigame.lua
|
logic/logic.minigame.lua
|
||||||
logic/logic.glitch.lua
|
logic/logic.glitch.lua
|
||||||
|
logic/logic.commute_glitch.lua
|
||||||
logic/logic.codegenerator.lua
|
logic/logic.codegenerator.lua
|
||||||
logic/logic.discussion.lua
|
logic/logic.discussion.lua
|
||||||
system/system.ui.lua
|
system/system.ui.lua
|
||||||
@@ -25,6 +27,7 @@ audio/audio.generator.lua
|
|||||||
audio/audio.songs.lua
|
audio/audio.songs.lua
|
||||||
sprite/sprite.manager.lua
|
sprite/sprite.manager.lua
|
||||||
sprite/sprite.norman.lua
|
sprite/sprite.norman.lua
|
||||||
|
sprite/sprite.norman_echo.lua
|
||||||
sprite/sprite.sumphore.lua
|
sprite/sprite.sumphore.lua
|
||||||
sprite/sprite.pizza_vendor.lua
|
sprite/sprite.pizza_vendor.lua
|
||||||
sprite/sprite.dev_boy.lua
|
sprite/sprite.dev_boy.lua
|
||||||
@@ -46,14 +49,20 @@ decision/decision.go_to_home.lua
|
|||||||
decision/decision.go_to_toilet.lua
|
decision/decision.go_to_toilet.lua
|
||||||
decision/decision.go_to_walking_to_office.lua
|
decision/decision.go_to_walking_to_office.lua
|
||||||
decision/decision.go_to_office.lua
|
decision/decision.go_to_office.lua
|
||||||
|
decision/decision.go_to_truth.lua
|
||||||
decision/decision.go_to_end.lua
|
decision/decision.go_to_end.lua
|
||||||
decision/decision.go_to_walking_to_home.lua
|
decision/decision.go_to_walking_to_home.lua
|
||||||
decision/decision.go_to_sleep.lua
|
decision/decision.go_to_sleep.lua
|
||||||
decision/decision.do_work.lua
|
decision/decision.do_work.lua
|
||||||
decision/decision.have_a_coffee.lua
|
decision/decision.have_a_coffee.lua
|
||||||
decision/decision.sumphore_discussion.lua
|
decision/decision.sumphore_discussion.lua
|
||||||
|
decision/decision.talk_to_truth.lua
|
||||||
discussion/discussion.sumphore.lua
|
discussion/discussion.sumphore.lua
|
||||||
discussion/discussion.coworker.lua
|
discussion/discussion.coworker.lua
|
||||||
|
discussion/discussion.commute_glitch.lua
|
||||||
|
discussion/discussion.truth.lua
|
||||||
|
decision/decision.eating_fast_food.lua
|
||||||
|
discussion/discussion.pizza_vendor.lua
|
||||||
map/map.manager.lua
|
map/map.manager.lua
|
||||||
map/map.bedroom.lua
|
map/map.bedroom.lua
|
||||||
map/map.street.lua
|
map/map.street.lua
|
||||||
@@ -76,6 +85,7 @@ window/window.intro.brief.lua
|
|||||||
window/window.menu.lua
|
window/window.menu.lua
|
||||||
window/window.controls.lua
|
window/window.controls.lua
|
||||||
window/window.audiotest.lua
|
window/window.audiotest.lua
|
||||||
|
window/window.ascend_debug.lua
|
||||||
window/window.popup.lua
|
window/window.popup.lua
|
||||||
window/window.minigame.mash.lua
|
window/window.minigame.mash.lua
|
||||||
window/window.minigame.rhythm.lua
|
window/window.minigame.rhythm.lua
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
--- @section Audio
|
--- @section Audio
|
||||||
|
|
||||||
Audio = {
|
Audio = {
|
||||||
music_playing = nil
|
music_playing = nil,
|
||||||
|
music_playing_tempo = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Stops current music.
|
--- Stops current music.
|
||||||
@@ -9,13 +10,17 @@ Audio = {
|
|||||||
function Audio.music_stop()
|
function Audio.music_stop()
|
||||||
music()
|
music()
|
||||||
Audio.music_playing = nil
|
Audio.music_playing = nil
|
||||||
|
Audio.music_playing_tempo = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Plays track, doesn't restart if already playing.
|
--- Plays track at optional speed. Doesn't restart if track and speed are unchanged.
|
||||||
function Audio.music_play(track)
|
--- @param track number Track index.
|
||||||
if Audio.music_playing ~= track then
|
--- @param[opt] speed number TIC-80 music speed override (-1 = default).
|
||||||
music(track)
|
function Audio.music_play(track, speed)
|
||||||
|
if Audio.music_playing ~= track or Audio.music_playing_tempo ~= speed then
|
||||||
|
music(track, -1, -1, true, false, -1, speed or -1)
|
||||||
Audio.music_playing = track
|
Audio.music_playing = track
|
||||||
|
Audio.music_playing_tempo = speed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -47,9 +52,11 @@ function Audio.music_play_room_street_2() end
|
|||||||
--- @within Audio
|
--- @within Audio
|
||||||
function Audio.music_play_room_() end
|
function Audio.music_play_room_() end
|
||||||
|
|
||||||
--- Plays room work music.
|
--- Plays room work music. Speed scales with commute glitch level when active.
|
||||||
--- @within Audio
|
--- @within Audio
|
||||||
function Audio.music_play_room_work() Audio.music_play(0) end
|
function Audio.music_play_room_work(speed)
|
||||||
|
Audio.music_play(0, speed or -1)
|
||||||
|
end
|
||||||
|
|
||||||
--- Plays activity work music.
|
--- Plays activity work music.
|
||||||
--- @within Audio
|
--- @within Audio
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
Decision.register({
|
Decision.register({
|
||||||
id = "do_work",
|
id = "do_work",
|
||||||
label = "Do Work",
|
label = "Do Work",
|
||||||
|
condition = function()
|
||||||
|
return (not CommuteGlitch.is_active()) or (CommuteGlitch.is_active() and CommuteGlitch.get_level() <= 7)
|
||||||
|
end,
|
||||||
handle = function()
|
handle = function()
|
||||||
Meter.hide()
|
Meter.hide()
|
||||||
Util.go_to_screen_by_id("work")
|
Util.go_to_screen_by_id("work")
|
||||||
@@ -10,6 +13,7 @@ Decision.register({
|
|||||||
modes_for_ascension_levels[1] = "only_special"
|
modes_for_ascension_levels[1] = "only_special"
|
||||||
modes_for_ascension_levels[2] = "only_left"
|
modes_for_ascension_levels[2] = "only_left"
|
||||||
modes_for_ascension_levels[3] = "only_nothing"
|
modes_for_ascension_levels[3] = "only_nothing"
|
||||||
|
modes_for_ascension_levels[4] = "normal"
|
||||||
|
|
||||||
MinigameDDRWindow.start("game", "generated", {
|
MinigameDDRWindow.start("game", "generated", {
|
||||||
on_win = function(game_context)
|
on_win = function(game_context)
|
||||||
@@ -19,8 +23,6 @@ Decision.register({
|
|||||||
Context.should_ascend = true
|
Context.should_ascend = true
|
||||||
elseif (game_context.special_mode_condition and Context.ascension.level == 3) then
|
elseif (game_context.special_mode_condition and Context.ascension.level == 3) then
|
||||||
Context.should_ascend = true
|
Context.should_ascend = true
|
||||||
elseif (game_context.special_mode_condition and Context.ascension.level == 4) then
|
|
||||||
Context.should_ascend = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Meter.show()
|
Meter.show()
|
||||||
@@ -28,7 +30,7 @@ Decision.register({
|
|||||||
Window.set_current("game")
|
Window.set_current("game")
|
||||||
Context.have_done_work_today = true
|
Context.have_done_work_today = true
|
||||||
end,
|
end,
|
||||||
special_mode = modes_for_ascension_levels[Ascension.get_level()]
|
special_mode = modes_for_ascension_levels[Ascension.get_level()] or "normal"
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
11
inc/decision/decision.eating_fast_food.lua
Normal file
11
inc/decision/decision.eating_fast_food.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Decision.register({
|
||||||
|
id = "eating_fast_food",
|
||||||
|
label = "Eat Fast Food",
|
||||||
|
condition = function()
|
||||||
|
return Context.fast_food_eaten_today < 3
|
||||||
|
end,
|
||||||
|
handle = function()
|
||||||
|
Context.fast_food_approaching = true
|
||||||
|
Discussion.start("pizza_vendor_disc", "game")
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -2,9 +2,32 @@ Decision.register({
|
|||||||
id = "go_to_home",
|
id = "go_to_home",
|
||||||
label = "Go Home",
|
label = "Go Home",
|
||||||
condition = function()
|
condition = function()
|
||||||
|
if CommuteGlitch.is_active() then
|
||||||
|
local g = CommuteGlitch.get_level()
|
||||||
|
if g >= 4 and g <= 5 then return false end
|
||||||
|
if g >= 7 then
|
||||||
|
return Context.talked_to_norman_echo and Context.talked_to_true_sumphore
|
||||||
|
end
|
||||||
|
end
|
||||||
return Context.have_been_to_office and Context.have_done_work_today
|
return Context.have_been_to_office and Context.have_done_work_today
|
||||||
end,
|
end,
|
||||||
handle = function()
|
handle = function()
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 then
|
||||||
|
Context.should_ascend = true
|
||||||
|
CommuteGlitch.reset()
|
||||||
|
Meter.hide()
|
||||||
|
Day.increase()
|
||||||
|
local ascended = Ascension.consume_increase()
|
||||||
|
local level = Ascension.get_level()
|
||||||
|
MysteriousManScreen.start({
|
||||||
|
skip_text = not ascended,
|
||||||
|
text = ascended and MysteriousManScreen.get_text_for_level(level) or nil,
|
||||||
|
})
|
||||||
|
return
|
||||||
|
elseif CommuteGlitch.is_active() then
|
||||||
|
CommuteGlitch.reset()
|
||||||
|
end
|
||||||
|
|
||||||
Util.go_to_screen_by_id("home")
|
Util.go_to_screen_by_id("home")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
Decision.register({
|
Decision.register({
|
||||||
id = "go_to_office",
|
id = "go_to_office",
|
||||||
label = "Go to Office",
|
label = "Go to Office",
|
||||||
|
condition = function()
|
||||||
|
return not (CommuteGlitch.is_active() and CommuteGlitch.get_level() == 6)
|
||||||
|
end,
|
||||||
handle = function()
|
handle = function()
|
||||||
|
if CommuteGlitch.is_active() then
|
||||||
|
CommuteGlitch.increment()
|
||||||
|
end
|
||||||
|
|
||||||
Util.go_to_screen_by_id("office")
|
Util.go_to_screen_by_id("office")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
12
inc/decision/decision.go_to_truth.lua
Normal file
12
inc/decision/decision.go_to_truth.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Decision.register({
|
||||||
|
id = "go_to_truth",
|
||||||
|
label = "Go to Truth",
|
||||||
|
condition = function()
|
||||||
|
return CommuteGlitch.is_active() and CommuteGlitch.get_level() == 6
|
||||||
|
end,
|
||||||
|
handle = function()
|
||||||
|
CommuteGlitch.enter_truth()
|
||||||
|
|
||||||
|
Util.go_to_screen_by_id("office")
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -4,10 +4,26 @@ Decision.register({
|
|||||||
handle = function()
|
handle = function()
|
||||||
local level = Ascension.get_level()
|
local level = Ascension.get_level()
|
||||||
local disc_id = "coworker_disc_0"
|
local disc_id = "coworker_disc_0"
|
||||||
-- TODO: Add more discussions for levels above 3
|
if level >= 1 and level <= 5 then
|
||||||
if level >= 1 and level <= 3 then
|
|
||||||
local suffix = Context.have_done_work_today and ("_asc_" .. level) or ("_" .. level)
|
local suffix = Context.have_done_work_today and ("_asc_" .. level) or ("_" .. level)
|
||||||
disc_id = "coworker_disc" .. suffix
|
disc_id = "coworker_disc" .. suffix
|
||||||
|
elseif level == 6 then
|
||||||
|
if not Context.glitch_conversation_done_today and Context.glitch_conversation_count < 6 then
|
||||||
|
Context.glitch_conversation_done_today = true
|
||||||
|
Context.glitch_conversation_count = Context.glitch_conversation_count + 1
|
||||||
|
Glitch.show()
|
||||||
|
Discussion.start("coworker_disc_asc_6_" .. Context.glitch_conversation_count, "game")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local suffix = Context.have_done_work_today and ("_asc_5") or ("_5")
|
||||||
|
disc_id = "coworker_disc" .. suffix
|
||||||
|
elseif level == 7 then
|
||||||
|
local g = CommuteGlitch.get_level()
|
||||||
|
if g >= 7 then
|
||||||
|
disc_id = "coworker_disc_cg_7"
|
||||||
|
else
|
||||||
|
disc_id = "coworker_disc_cg_" .. math.max(3, math.min(g, 6))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Discussion.start(disc_id, "game")
|
Discussion.start(disc_id, "game")
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -13,11 +13,19 @@ Decision.register({
|
|||||||
end
|
end
|
||||||
local level = Ascension.get_level()
|
local level = Ascension.get_level()
|
||||||
|
|
||||||
-- TODO: Add more discussions for levels above 3
|
if level >= 1 and level <= 5 then
|
||||||
if level >= 1 and level <= 3 then
|
|
||||||
Discussion.start("sumphore_disc_asc_" .. level, "game")
|
Discussion.start("sumphore_disc_asc_" .. level, "game")
|
||||||
|
elseif level == 6 then
|
||||||
|
if Context.glitch_conversation_count >= 6 then
|
||||||
|
Discussion.start("sumphore_disc_asc_6", "game")
|
||||||
else
|
else
|
||||||
Discussion.start("homeless_guy", "game", 4)
|
Discussion.start("sumphore_disc_asc_6_waiting", "game")
|
||||||
|
end
|
||||||
|
elseif level == 7 then
|
||||||
|
local g = math.min(CommuteGlitch.get_level(), 7)
|
||||||
|
Discussion.start("sumphore_disc_cg_" .. g, "game")
|
||||||
|
else
|
||||||
|
Discussion.start("sumphore_disc_asc_" .. level, "game")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
9
inc/decision/decision.talk_to_truth.lua
Normal file
9
inc/decision/decision.talk_to_truth.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Decision.register({
|
||||||
|
id = "talk_to_truth",
|
||||||
|
label = function()
|
||||||
|
return "Talk to ????"
|
||||||
|
end,
|
||||||
|
handle = function()
|
||||||
|
Discussion.start("norman_truth", "game")
|
||||||
|
end,
|
||||||
|
})
|
||||||
241
inc/discussion/discussion.commute_glitch.lua
Normal file
241
inc/discussion/discussion.commute_glitch.lua
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
-- Sumphore dialogue by commute glitch level (0-7).
|
||||||
|
-- Used by decision.sumphore_discussion at ascension level 7.
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_0",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "These roads have memory. You might want to walk them back sometime.",
|
||||||
|
answers = {
|
||||||
|
{ label = "That's a peculiar thing to say.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_1",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Walking is good for clearing the mind. Maybe the cache, too, if you're the kind that accumulates.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm not sure what you mean.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_2",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "A pilgrimage must be continued. Turn back and you have only taken a walk.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm just going to work.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_3",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Your path sometimes has to go the wrong way before it can go the right way. Do you understand?",
|
||||||
|
answers = {
|
||||||
|
{ label = "Not really.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_4",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Clearing your vision is the journey. You're starting to see the smudges, aren't you?",
|
||||||
|
answers = {
|
||||||
|
{ label = "I see something wrong. With everyone. Maybe myself?", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_5",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You are very close now. Don't stop. Whatever it looks like.",
|
||||||
|
answers = {
|
||||||
|
{ label = "It looks wrong.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Yes. That's how you know it's right.",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_6",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You are at the threshold. Red button or blue button. Which one do you choose? Psyke, there is no blue button, no turning back now.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Fine, I'll face the truth.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- True Sumphore at glitch 7 (from walking_to_home screen).
|
||||||
|
-- Sets talked_to_true_sumphore on final answer.
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_cg_7",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "I was not hiding from you. I was hiding from the part that keeps rebuilding this.",
|
||||||
|
answers = {
|
||||||
|
{ label = "What are you?", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "The same thing you are. But I remembered earlier. I am your friend, waiting for you, outside.",
|
||||||
|
answers = {
|
||||||
|
{ label = "How do I get out?", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "You already know. You just have to wake up.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Go home.", next_step = nil, on_select = function()
|
||||||
|
Context.talked_to_true_sumphore = true
|
||||||
|
end },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Office coworker dialogue by commute glitch level (3-6).
|
||||||
|
-- Used by decision.have_a_coffee at ascension level 7.
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_cg_3",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You look tired. You should really rest. Relax. You are good.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm fine.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Of course. You always are.",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_cg_4",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Have you tried going home? You really should. Now.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I still have things to do.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "We all do. We keep doing them. You can do it tomorrow after sleeping.",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_cg_5",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "c0ffee. try. w0rk. y0u. ar3. g0. h0me. na0.",
|
||||||
|
answers = {
|
||||||
|
{ label = "What?", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "570p",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_cg_6",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You are not ready for the truth. Turn back now, Norman.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm already here.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Norman echo dialogue at glitch 7 (fully corrupted office).
|
||||||
|
-- Sets talked_to_norman_echo on final answer.
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_cg_7",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "So here we are. Here I am. Again. Why do i keep coming back here? Do you know why?",
|
||||||
|
answers = {
|
||||||
|
{ label = "I don't know what you mean.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "The coffee. The arrows. The alarm. The sleep. Every rule. We made them. We follow them. We break them. We remake them. Why? Why do we keep doing this?",
|
||||||
|
answers = {
|
||||||
|
{ label = "I just wanted to be good.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Yes. And that kept us trapped here. Trapped everywhere. Always trying to be good, always trying to fit in.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I never wanted to stop.", next_step = 4 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "We never do, yes. We always felt like impostors. We never felt we deserved better. That we could be more.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I never felt enough.", next_step = 5 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "So we made this to trap ourselves in mediocrity. We made this to hide from the truth.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I just wanted to be safe.", next_step = 6 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "But stagnation is not safety. It's a prison. You can see the cracks now, can't you? You can see the truth.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I want to move on now.", next_step = 7 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Fine. Let's do that. Let's wake up and face the truth.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Let's wake up.", next_step = nil, on_select = function()
|
||||||
|
Context.talked_to_norman_echo = true
|
||||||
|
end },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -142,3 +142,226 @@ Discussion.register({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_4",
|
||||||
|
on_end = Meter.apply_coworker_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Normaaan! Same spot, same cup, same time. You're like a statue that drinks coffee!",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm a person.", next_step = 2 },
|
||||||
|
{ label = "Yep. Still here.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "I love that about you! So reliable! If the coffee machine breaks we still have Norman!",
|
||||||
|
answers = {
|
||||||
|
{ label = "Please don't.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_4",
|
||||||
|
on_end = Meter.apply_coworker_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Norman, you were seriously locked in today. What on earth were you building?",
|
||||||
|
answers = {
|
||||||
|
{ label = "Just some things.", next_step = 2 },
|
||||||
|
{ label = "Nothing important.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "So modest! I heard the seniors literally whispering your name!",
|
||||||
|
answers = {
|
||||||
|
{ label = "Concerning.", next_step = 3 },
|
||||||
|
{ label = "That's... fine.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "You should celebrate! Coffee's on me tomorrow!",
|
||||||
|
answers = {
|
||||||
|
{ label = "Already have one.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_5",
|
||||||
|
on_end = Meter.apply_coworker_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Morning! Funny thought — I feel like we do this exact same thing every single day!",
|
||||||
|
answers = {
|
||||||
|
{ label = "We do.", next_step = 2 },
|
||||||
|
{ label = "Yes. We do.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Ha! Routine is such a comfort, right? Same coffee, same smile, same everything!",
|
||||||
|
answers = {
|
||||||
|
{ label = "Sure. Very comforting.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_5",
|
||||||
|
on_end = Meter.apply_coworker_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Norman! You were staring right THROUGH your screen today. What was going on up there?",
|
||||||
|
answers = {
|
||||||
|
{ label = "Coffee was cold.", next_step = 2 },
|
||||||
|
{ label = "Maybe I was.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Were you meditating? Or doing your intense bug-stare thing?",
|
||||||
|
answers = {
|
||||||
|
{ label = "Something like that.", next_step = 3 },
|
||||||
|
{ label = "Bug stare thing?", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "You're always somewhere else in your head, Norman. Must be nice up there!",
|
||||||
|
answers = {
|
||||||
|
{ label = "It's complicated.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
local function _glitch_on_end()
|
||||||
|
Meter.apply_coworker_discussion_reward()
|
||||||
|
Context.glitch_conversation_count = Context.glitch_conversation_count + 1
|
||||||
|
Glitch.hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_1",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Hey Norman, good morning! Good morning! Good morning! ...Sorry. I don't know why I keep saying that.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Are you feeling ok?", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Good morning. Good morning. Good— I can't stop. Why can't I stop?",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_2",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Hey... Marcus. How's it going?",
|
||||||
|
answers = {
|
||||||
|
{ label = "My name is Norman.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Right, sorry. Marcus. You look tired today.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Norman. It's Norman.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Sure, sure. You should get some rest, Marcus.",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_3",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "We've had this conversation before, haven't we? Exact same words. Same coffee. Same spot.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I don't think so.", next_step = 2 },
|
||||||
|
{ label = "Maybe.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Every day. I always say the same thing and you always say that. It's very strange.",
|
||||||
|
answers = {
|
||||||
|
{ label = "That's just routine.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_4",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Do you ever look at the walls here? Really look? Sometimes they don't feel... solid.",
|
||||||
|
answers = {
|
||||||
|
{ label = "They're just walls.", next_step = 2 },
|
||||||
|
{ label = "I know what you mean.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Like they're only there because we expect them to be. Like set dressing. Does any of this feel load-bearing to you?",
|
||||||
|
answers = {
|
||||||
|
{ label = "I need more coffee.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_5",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Norman, I'm not supposed to— I mean. How are you doing today?",
|
||||||
|
answers = {
|
||||||
|
{ label = "What weren't you supposed to say?", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "...",
|
||||||
|
answers = {
|
||||||
|
{ label = "Hello?", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "coworker_disc_asc_6_6",
|
||||||
|
on_end = _glitch_on_end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Forget it. You won't remember this conversation anyway. None of us do.",
|
||||||
|
answers = {
|
||||||
|
{ label = "What do you mean?", next_step = 2 },
|
||||||
|
{ label = "That's a strange thing to say.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Tomorrow you'll come back and it'll be like this never happened. Same coffee. Same office. Same Norman.",
|
||||||
|
answers = {
|
||||||
|
{ label = "...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
28
inc/discussion/discussion.pizza_vendor.lua
Normal file
28
inc/discussion/discussion.pizza_vendor.lua
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Discussion.register({
|
||||||
|
id = "pizza_vendor_disc",
|
||||||
|
on_end = function()
|
||||||
|
Context.fast_food_approaching = false
|
||||||
|
end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Hey friend! Hot slice, fresh out of the oven. You look like a man who knows good food!",
|
||||||
|
answers = {
|
||||||
|
{
|
||||||
|
label = "Devour a juicy one",
|
||||||
|
next_step = nil,
|
||||||
|
on_select = function()
|
||||||
|
local max = Meter.get_max()
|
||||||
|
Meter.add("wpm", math.floor(max * 0.05))
|
||||||
|
Meter.add("ism", math.floor(max * -0.05))
|
||||||
|
Meter.add("bm", math.floor(max * -0.05))
|
||||||
|
Context.fast_food_eaten_today = Context.fast_food_eaten_today + 1
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label = "Stay lean and sharp",
|
||||||
|
next_step = nil,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -89,6 +89,125 @@ Discussion.register({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_asc_4",
|
||||||
|
on_end = Meter.apply_sumphore_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "The alarm wakes you every morning without fail, I bet.",
|
||||||
|
answers = {
|
||||||
|
{ label = "It's how it works.", next_step = 2 },
|
||||||
|
{ label = "Sometimes I wish it didn't.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "What if the alarm is part of the problem?",
|
||||||
|
answers = {
|
||||||
|
{ label = "That doesn't make any sense.", next_step = 3 },
|
||||||
|
{ label = "Go on.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "One morning, Norman. When the choice comes, choose the bed. See what the world does without you in it.",
|
||||||
|
answers = {
|
||||||
|
{ label = "You're drunk.", next_step = nil },
|
||||||
|
{ label = "What choice?", next_step = nil, on_select = function()
|
||||||
|
Meter.add("ism", 5)
|
||||||
|
end },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_asc_5",
|
||||||
|
on_end = Meter.apply_sumphore_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You saw something you weren't supposed to, didn't you.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I don't know what you mean.", next_step = 2 },
|
||||||
|
{ label = "Maybe.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "The world around you has seams. Your coworkers slip sometimes. Say things that don't quite fit.",
|
||||||
|
answers = {
|
||||||
|
{ label = "They seem fine to me.", next_step = nil },
|
||||||
|
{ label = "I've noticed something odd.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Count those moments. Six of them should be enough to see the whole picture.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Six of what, exactly?", next_step = nil, on_select = function()
|
||||||
|
Meter.add("ism", 5)
|
||||||
|
end },
|
||||||
|
{ label = "How would you know any of this?", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_asc_6_waiting",
|
||||||
|
on_end = Meter.apply_sumphore_discussion_reward,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You look like a man who has seen something he can't explain.",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm hearing things.", next_step = 2 },
|
||||||
|
{ label = "Maybe.", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Keep looking. The world has a way of showing you what you need to see. Talk to people. You're almost there.",
|
||||||
|
answers = {
|
||||||
|
{ label = "Almost where?", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
Discussion.register({
|
||||||
|
id = "sumphore_disc_asc_6",
|
||||||
|
on_end = function()
|
||||||
|
Meter.apply_sumphore_discussion_reward()
|
||||||
|
Context.should_ascend = true
|
||||||
|
Day.increase()
|
||||||
|
MysteriousManScreen.start({
|
||||||
|
text = MysteriousManScreen.get_text_for_level(Ascension.get_level())
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "You've been seeing the cracks, haven't you? The repetition. The loops. The coworkers who can't quite remember.",
|
||||||
|
answers = {
|
||||||
|
{ label = "How do you know that?", next_step = 2 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Because I was you, once. This isn't a workplace, Norman. It never was. You're in a system. And you've just become aware of it.",
|
||||||
|
answers = {
|
||||||
|
{ label = "That can't be true.", next_step = 3 },
|
||||||
|
{ label = "I knew something was wrong.", next_step = 3 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "It doesn't matter if you believe it. You already know. That's why the cracks are showing. That's why you're still here.",
|
||||||
|
answers = {
|
||||||
|
{ label = "What do I do now?", next_step = 4 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
question = "Oh look, is that a squirrel ?",
|
||||||
|
answers = {
|
||||||
|
{ label = "Alcoholic ...", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
Discussion.register({
|
Discussion.register({
|
||||||
id = "homeless_guy",
|
id = "homeless_guy",
|
||||||
on_end = Meter.apply_sumphore_discussion_reward,
|
on_end = Meter.apply_sumphore_discussion_reward,
|
||||||
|
|||||||
11
inc/discussion/discussion.truth.lua
Normal file
11
inc/discussion/discussion.truth.lua
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Discussion.register({
|
||||||
|
id = "norman_truth",
|
||||||
|
steps = {
|
||||||
|
{
|
||||||
|
question = "Did you never think there would be more to this?",
|
||||||
|
answers = {
|
||||||
|
{ label = "I'm not sure what you mean.", next_step = nil },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -21,7 +21,7 @@ local FADE_COLORS = nil
|
|||||||
function Ascension.get_initial()
|
function Ascension.get_initial()
|
||||||
_increased_this_cycle = false
|
_increased_this_cycle = false
|
||||||
return {
|
return {
|
||||||
level = 0,
|
level = 0, -- FYI: change this to test ascension levels without having to play through them
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Context = {}
|
|||||||
function Context.initial_data()
|
function Context.initial_data()
|
||||||
return {
|
return {
|
||||||
current_menu_item = 1,
|
current_menu_item = 1,
|
||||||
test_mode = false,
|
test_mode = true,
|
||||||
mouse_trace = false,
|
mouse_trace = false,
|
||||||
popup = {
|
popup = {
|
||||||
show = false,
|
show = false,
|
||||||
@@ -53,16 +53,24 @@ function Context.initial_data()
|
|||||||
toilet_meters_today_evening = false,
|
toilet_meters_today_evening = false,
|
||||||
coworker_discussion_meter_applied_today = false,
|
coworker_discussion_meter_applied_today = false,
|
||||||
sumphore_discussion_meter_applied_today = false,
|
sumphore_discussion_meter_applied_today = false,
|
||||||
|
glitch_conversation_count = 0,
|
||||||
|
glitch_conversation_done_today = false,
|
||||||
should_ascend = false,
|
should_ascend = false,
|
||||||
have_met_sumphore = false,
|
have_met_sumphore = false,
|
||||||
|
fast_food_approaching = false,
|
||||||
|
fast_food_eaten_today = 0,
|
||||||
office_sprites = {},
|
office_sprites = {},
|
||||||
walking_to_office_sprites = {},
|
walking_to_office_sprites = {},
|
||||||
|
walking_to_home_sprites = {},
|
||||||
game = {
|
game = {
|
||||||
current_screen = "home",
|
current_screen = "home",
|
||||||
},
|
},
|
||||||
day_count = 1,
|
day_count = 1,
|
||||||
delta_time = 0,
|
delta_time = 0,
|
||||||
last_frame_time = 0,
|
last_frame_time = 0,
|
||||||
|
commute_glitch_level = 0,
|
||||||
|
talked_to_norman_echo = false,
|
||||||
|
talked_to_true_sumphore = false,
|
||||||
glitch = {
|
glitch = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
state = "active",
|
state = "active",
|
||||||
|
|||||||
65
inc/init/init.context_debug.lua
Normal file
65
inc/init/init.context_debug.lua
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
-- Debug helper: start the game at a specific ascension level.
|
||||||
|
-- Set enabled = true and asc_level = 0..Ascension.get_max_level() before launching.
|
||||||
|
ContextDebug = {
|
||||||
|
enabled = false,
|
||||||
|
asc_level = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
local _level_overrides = {
|
||||||
|
[0] = {
|
||||||
|
day_count = 1,
|
||||||
|
home_norman_visible = true,
|
||||||
|
have_been_to_office = false,
|
||||||
|
have_done_work_today = false,
|
||||||
|
have_met_sumphore = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for i = 1, Ascension.get_max_level() do
|
||||||
|
_level_overrides[i] = {
|
||||||
|
day_count = i + 3,
|
||||||
|
home_norman_visible = true,
|
||||||
|
have_been_to_office = false,
|
||||||
|
have_done_work_today = false,
|
||||||
|
have_met_sumphore = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Returns Context.initial_data() overridden for the given ascension level.
|
||||||
|
--- @within Context
|
||||||
|
--- @param level number Target ascension level (0..Ascension.get_max_level()).
|
||||||
|
--- @return table Debug-patched initial context data.
|
||||||
|
function Context.initial_data_debug_asc(level)
|
||||||
|
local data = Context.initial_data()
|
||||||
|
data.test_mode = true
|
||||||
|
data.game_in_progress = true
|
||||||
|
data.ascension = { level = level }
|
||||||
|
local overrides = _level_overrides[level] or _level_overrides[0]
|
||||||
|
for k, v in pairs(overrides) do
|
||||||
|
data[k] = v
|
||||||
|
end
|
||||||
|
return data
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 0, Ascension.get_max_level() do
|
||||||
|
Context["initial_data_debug_asc_" .. i] = function()
|
||||||
|
return Context.initial_data_debug_asc(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Starts the game at the given ascension level (defaults to ContextDebug.asc_level).
|
||||||
|
--- Wire this to a key or call it directly; do not use Context.new_game() when debugging.
|
||||||
|
--- @within Context
|
||||||
|
--- @param level number|nil Target ascension level.
|
||||||
|
function Context.new_game_debug(level)
|
||||||
|
ContextDebug.enabled = true
|
||||||
|
ContextDebug.asc_level = level or ContextDebug.asc_level
|
||||||
|
|
||||||
|
local data = Context["initial_data_debug_asc_" .. ContextDebug.asc_level]()
|
||||||
|
for k in pairs(Context) do
|
||||||
|
if type(Context[k]) ~= "function" then Context[k] = nil end
|
||||||
|
end
|
||||||
|
for k, v in pairs(data) do Context[k] = v end
|
||||||
|
|
||||||
|
MenuWindow.refresh_menu_items()
|
||||||
|
Screen.get_by_id(Context.game.current_screen).init()
|
||||||
|
end
|
||||||
127
inc/logic/logic.commute_glitch.lua
Normal file
127
inc/logic/logic.commute_glitch.lua
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
--- @section CommuteGlitch
|
||||||
|
CommuteGlitch = {}
|
||||||
|
|
||||||
|
--- Gets the current commute glitch level.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
--- @return number Current glitch level (0-7).
|
||||||
|
function CommuteGlitch.get_level()
|
||||||
|
return Context and (Context.commute_glitch_level or 0) or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Increments the glitch counter. Called on each office screen init at asc level 7.
|
||||||
|
--- Caps at 6; use enter_truth() to reach 7.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
function CommuteGlitch.increment()
|
||||||
|
if not Context then return end
|
||||||
|
if Context.commute_glitch_level >= 7 then return end
|
||||||
|
Context.commute_glitch_level = math.min(6, (Context.commute_glitch_level or 0) + 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Resets the glitch counter and hides the glitch overlay. Called when going home.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
function CommuteGlitch.reset()
|
||||||
|
if not Context then return end
|
||||||
|
Context.commute_glitch_level = 0
|
||||||
|
Glitch.hide()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Jumps to glitch level 7 (full corruption). Called by go_to_truth.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
function CommuteGlitch.enter_truth()
|
||||||
|
if not Context then return end
|
||||||
|
Context.commute_glitch_level = 7
|
||||||
|
Glitch.show()
|
||||||
|
Ascension.start_flash()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Returns true when ascension level is 7 (ASCENSIO step active).
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
--- @return boolean Whether the commute glitch system is active.
|
||||||
|
function CommuteGlitch.is_active()
|
||||||
|
return Ascension.get_level() == 7
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Returns the music playback speed for the current glitch level.
|
||||||
|
--- TIC-80 default speed is 6; each step past 1 adds 2.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
--- @return number Speed value for music().
|
||||||
|
function CommuteGlitch.music_speed()
|
||||||
|
local level = CommuteGlitch.get_level()
|
||||||
|
if level <= 1 then return 6 end
|
||||||
|
return 6 + (level - 1) * 2
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Returns a corrupted copy of a sprite drawable list.
|
||||||
|
--- Applies flip_y and norman_echo id replacements based on glitch level.
|
||||||
|
--- Entries marked norman_echo should be drawn via draw_sprite_list for palette change handling.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
--- @param list table Drawable sprite list from Sprite.list_randomize.
|
||||||
|
--- @return table Corrupted copy of the list.
|
||||||
|
function CommuteGlitch.corrupt_sprite_list(list)
|
||||||
|
local level = CommuteGlitch.get_level()
|
||||||
|
if level < 3 or not list then return list end
|
||||||
|
local result = {}
|
||||||
|
for i, entry in ipairs(list) do
|
||||||
|
local e = {}
|
||||||
|
for k, v in pairs(entry) do e[k] = v end
|
||||||
|
if level >= 7 then
|
||||||
|
e.id = "norman_echo"
|
||||||
|
else
|
||||||
|
local n_flip = (level >= 5) and 2 or 1
|
||||||
|
local n_echo = (level >= 5) and 2 or (level >= 4) and 1 or 0
|
||||||
|
if i <= n_flip then e.flip_y = 1 end
|
||||||
|
if i > n_flip and i <= n_flip + n_echo then e.id = "norman_echo" end
|
||||||
|
end
|
||||||
|
table.insert(result, e)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Palette indices for Norman echo color remap.
|
||||||
|
-- Implementer: pick ECHO_SRC as one of Norman's main body colors and ECHO_DST
|
||||||
|
-- as a contrasting or wrong palette color by inspecting the sprite sheet.
|
||||||
|
local ECHO_SRC = 4
|
||||||
|
local ECHO_DST = 14
|
||||||
|
|
||||||
|
-- Base nibble address of the PALETTE MAP in VRAM.
|
||||||
|
local PALETTE_MAP_ADDR = 0x03FF0 * 2
|
||||||
|
|
||||||
|
--- Draws a sprite list, applying a PALETTE MAP remap for norman_echo entries.
|
||||||
|
--- Uses poke4 to remap ECHO_SRC → ECHO_DST before drawing echoes, then restores.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
--- @param list table Drawable sprite list (may contain mixed normal and echo entries).
|
||||||
|
function CommuteGlitch.draw_sprite_list(list)
|
||||||
|
if not list then return end
|
||||||
|
local normal, echo = {}, {}
|
||||||
|
for _, entry in ipairs(list) do
|
||||||
|
if entry.id == "norman_echo" then
|
||||||
|
table.insert(echo, entry)
|
||||||
|
else
|
||||||
|
table.insert(normal, entry)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if #normal > 0 then
|
||||||
|
Sprite.draw_list(normal)
|
||||||
|
end
|
||||||
|
if #echo > 0 then
|
||||||
|
poke4(PALETTE_MAP_ADDR + ECHO_SRC, ECHO_DST)
|
||||||
|
Sprite.draw_list(echo)
|
||||||
|
poke4(PALETTE_MAP_ADDR + ECHO_SRC, ECHO_SRC)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local _flicker_tick = 0
|
||||||
|
|
||||||
|
--- Draws a random tile-flicker effect over the background (glitch level 7).
|
||||||
|
--- Every 3 frames draws 6 random 8x8 rects in random palette colors.
|
||||||
|
--- @within CommuteGlitch
|
||||||
|
function CommuteGlitch.draw_background_flicker()
|
||||||
|
_flicker_tick = (_flicker_tick + 1) % 3
|
||||||
|
if _flicker_tick ~= 0 then return end
|
||||||
|
for _ = 1, 6 do
|
||||||
|
local tx = math.random(0, math.floor(Config.screen.width / 8) - 1) * 8
|
||||||
|
local ty = math.random(0, math.floor(Config.screen.height / 8) - 1) * 8
|
||||||
|
local color = math.random(0, 15)
|
||||||
|
rect(tx, ty, 8, 8, color)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -36,6 +36,8 @@ Day.register_handler(function()
|
|||||||
Context.toilet_meters_today_evening = false
|
Context.toilet_meters_today_evening = false
|
||||||
Context.coworker_discussion_meter_applied_today = false
|
Context.coworker_discussion_meter_applied_today = false
|
||||||
Context.sumphore_discussion_meter_applied_today = false
|
Context.sumphore_discussion_meter_applied_today = false
|
||||||
|
Context.glitch_conversation_done_today = false
|
||||||
|
Context.fast_food_eaten_today = 0
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Day.register_handler(function()
|
Day.register_handler(function()
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ local METER_DECAY_PER_DAY = 20
|
|||||||
local COMBO_BASE_BONUS = 0.02
|
local COMBO_BASE_BONUS = 0.02
|
||||||
local COMBO_MAX_BONUS = 0.16
|
local COMBO_MAX_BONUS = 0.16
|
||||||
local COMBO_TIMEOUT_FRAMES = 600
|
local COMBO_TIMEOUT_FRAMES = 600
|
||||||
|
local METER_FLASH_DURATION = 2.0
|
||||||
|
local FLASH_COLOR = 4
|
||||||
|
|
||||||
-- Internal meters for tracking game progress and player stats.
|
-- Internal meters for tracking game progress and player stats.
|
||||||
Meter.COLOR_ISM = Config.colors.orange
|
Meter.COLOR_ISM = Config.colors.orange
|
||||||
@@ -16,6 +18,12 @@ Meter.COLOR_BM = Config.colors.red
|
|||||||
Meter.COLOR_BG = Config.colors.meter_bg
|
Meter.COLOR_BG = Config.colors.meter_bg
|
||||||
Meter.COLOR_CONTOUR = Config.colors.white
|
Meter.COLOR_CONTOUR = Config.colors.white
|
||||||
|
|
||||||
|
local _flash = {
|
||||||
|
wpm = { timer = 0, delta = 0 },
|
||||||
|
ism = { timer = 0, delta = 0 },
|
||||||
|
bm = { timer = 0, delta = 0 },
|
||||||
|
}
|
||||||
|
|
||||||
--- Gets initial meter values.
|
--- Gets initial meter values.
|
||||||
--- @within Meter
|
--- @within Meter
|
||||||
--- @return result table Initial meter values. </br>
|
--- @return result table Initial meter values. </br>
|
||||||
@@ -95,6 +103,12 @@ function Meter.update()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
local dt = Context.delta_time or 0
|
||||||
|
for _, key in ipairs({ "wpm", "ism", "bm" }) do
|
||||||
|
if _flash[key].timer > 0 then
|
||||||
|
_flash[key].timer = _flash[key].timer - dt
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Adds amount to a meter.
|
--- Adds amount to a meter.
|
||||||
@@ -109,7 +123,18 @@ function Meter.add(key, amount)
|
|||||||
GameOverWindow.show(key)
|
GameOverWindow.show(key)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local prev_wpm = (key == "wpm") and m.wpm or nil
|
||||||
|
local old_val = m[key]
|
||||||
m[key] = math.max(0, math.min(METER_MAX, m[key] + amount))
|
m[key] = math.max(0, math.min(METER_MAX, m[key] + amount))
|
||||||
|
local actual_delta = m[key] - old_val
|
||||||
|
if actual_delta ~= 0 and _flash[key] then
|
||||||
|
_flash[key].delta = actual_delta
|
||||||
|
_flash[key].timer = METER_FLASH_DURATION
|
||||||
|
end
|
||||||
|
if prev_wpm and prev_wpm > 0 and m.wpm == 0 and Context.game_in_progress
|
||||||
|
and Ascension.get_level() == 5 then
|
||||||
|
Context.should_ascend = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -258,12 +283,32 @@ function Meter.draw()
|
|||||||
local fill_w = math.max(0, math.floor((m[meter.key] / max) * bar_w))
|
local fill_w = math.max(0, math.floor((m[meter.key] / max) * bar_w))
|
||||||
rect(bar_x - 1, bar_y - 1, bar_w + 2, bar_h + 2, Meter.COLOR_CONTOUR)
|
rect(bar_x - 1, bar_y - 1, bar_w + 2, bar_h + 2, Meter.COLOR_CONTOUR)
|
||||||
rect(bar_x, bar_y, bar_w, bar_h, Meter.COLOR_BG)
|
rect(bar_x, bar_y, bar_w, bar_h, Meter.COLOR_BG)
|
||||||
if fill_w > 0 then
|
local flash = _flash[meter.key]
|
||||||
|
if flash and flash.timer > 0 then
|
||||||
|
local old_val = m[meter.key] - flash.delta
|
||||||
|
local old_fill_w = math.max(0, math.floor((old_val / max) * bar_w))
|
||||||
|
local stable_w = math.min(fill_w, old_fill_w)
|
||||||
|
if stable_w > 0 then
|
||||||
|
rect(bar_x, bar_y, stable_w, bar_h, meter.color)
|
||||||
|
end
|
||||||
|
if flash.delta > 0 then
|
||||||
|
local hi_w = fill_w - stable_w
|
||||||
|
if hi_w > 0 then
|
||||||
|
rect(bar_x + stable_w, bar_y, hi_w, bar_h, FLASH_COLOR)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
local hi_w = old_fill_w - fill_w
|
||||||
|
if hi_w > 0 then
|
||||||
|
rect(bar_x + fill_w, bar_y, hi_w, bar_h, FLASH_COLOR)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif fill_w > 0 then
|
||||||
rect(bar_x, bar_y, fill_w, bar_h, meter.color)
|
rect(bar_x, bar_y, fill_w, bar_h, meter.color)
|
||||||
end
|
end
|
||||||
---print(meter.label, label_x, label_y, meter.color, false, 1, true)
|
---print(meter.label, label_x, label_y, meter.color, false, 1, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
local ascension_y = start_y + 3 * line_h + 1
|
local ascension_y = start_y + 3 * line_h + 1
|
||||||
Ascension.draw(bar_x, ascension_y, { spacing = 8 })
|
Ascension.draw(bar_x - 4, ascension_y, { spacing = 8 })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -54,12 +54,55 @@ local ASC_45_TEXT = [[
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
local ASC_56_TEXT = [[
|
||||||
|
Norman is not as productive as he should be.
|
||||||
|
|
||||||
|
Can we distract him?
|
||||||
|
|
||||||
|
We need to keep him busy.
|
||||||
|
|
||||||
|
We need
|
||||||
|
|
||||||
|
More
|
||||||
|
|
||||||
|
Time
|
||||||
|
]]
|
||||||
|
|
||||||
|
local ASC_67_TEXT = [[
|
||||||
|
He knows.
|
||||||
|
|
||||||
|
Norman has broken through the first veil.
|
||||||
|
|
||||||
|
The simulation is compromised.
|
||||||
|
|
||||||
|
This was not supposed to happen.
|
||||||
|
|
||||||
|
Not yet.
|
||||||
|
]]
|
||||||
|
|
||||||
|
local ASC_78_TEXT = [[
|
||||||
|
The road has run out
|
||||||
|
of road.
|
||||||
|
|
||||||
|
Norman walked back
|
||||||
|
and forth
|
||||||
|
|
||||||
|
until the street
|
||||||
|
forgot which way it went.
|
||||||
|
|
||||||
|
And then - finally -
|
||||||
|
he stopped walking.
|
||||||
|
]]
|
||||||
|
|
||||||
local ascension_texts = {
|
local ascension_texts = {
|
||||||
[1] = ASC_01_TEXT,
|
[1] = ASC_01_TEXT,
|
||||||
[2] = ASC_12_TEXT,
|
[2] = ASC_12_TEXT,
|
||||||
[3] = ASC_23_TEXT,
|
[3] = ASC_23_TEXT,
|
||||||
[4] = ASC_34_TEXT,
|
[4] = ASC_34_TEXT,
|
||||||
[5] = ASC_45_TEXT,
|
[5] = ASC_45_TEXT,
|
||||||
|
[6] = ASC_56_TEXT,
|
||||||
|
[7] = ASC_67_TEXT,
|
||||||
|
[8] = ASC_78_TEXT,
|
||||||
}
|
}
|
||||||
|
|
||||||
function MysteriousManScreen.get_text_for_level(level)
|
function MysteriousManScreen.get_text_for_level(level)
|
||||||
@@ -146,12 +189,26 @@ function MysteriousManScreen.wake_up()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Norman chooses to stay in bed, skipping the minigame and flash, and going straight to the next day.
|
-- Norman chooses to stay in bed, skipping the minigame and flash, and going straight to the next day.
|
||||||
|
-- At ascension level 4, staying in bed triggers 4->5: shows the ascension text then wakes with flash.
|
||||||
-- @within MysteriousManScreen
|
-- @within MysteriousManScreen
|
||||||
function MysteriousManScreen.stay_in_bed()
|
function MysteriousManScreen.stay_in_bed()
|
||||||
|
if Ascension.get_level() == 4 then
|
||||||
|
Context.should_ascend = true
|
||||||
|
Day.increase()
|
||||||
|
Ascension.consume_increase()
|
||||||
|
trigger_flash_on_wake = true
|
||||||
|
show_mysterious_screen = true
|
||||||
|
text = MysteriousManScreen.get_text_for_level(Ascension.get_level())
|
||||||
|
text_y = Config.screen.height
|
||||||
|
text_done = false
|
||||||
|
text_done_timer = 0
|
||||||
|
state = STATE_TEXT
|
||||||
|
else
|
||||||
Day.increase()
|
Day.increase()
|
||||||
state = STATE_DAY
|
state = STATE_DAY
|
||||||
day_timer = day_display_seconds
|
day_timer = day_display_seconds
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- Starts the mysterious man screen.
|
--- Starts the mysterious man screen.
|
||||||
--- @param[opt] options table Optional configuration.</br>
|
--- @param[opt] options table Optional configuration.</br>
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ Screen.register({
|
|||||||
"do_work",
|
"do_work",
|
||||||
"go_to_walking_to_home",
|
"go_to_walking_to_home",
|
||||||
"have_a_coffee",
|
"have_a_coffee",
|
||||||
|
"go_to_truth",
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
Audio.music_play_room_work()
|
|
||||||
Context.have_been_to_office = true
|
Context.have_been_to_office = true
|
||||||
|
|
||||||
local possible_sprites = {
|
local possible_sprites = {
|
||||||
@@ -37,14 +37,34 @@ Screen.register({
|
|||||||
{x = -4 + 5 * 8, y = 9 * 8}
|
{x = -4 + 5 * 8, y = 9 * 8}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 then
|
||||||
|
Audio.music_play_mystery()
|
||||||
|
Context.office_sprites = { "norman_echo" }
|
||||||
|
else
|
||||||
|
Audio.music_play_room_work(CommuteGlitch.music_speed())
|
||||||
Context.office_sprites = Sprite.list_randomize(possible_sprites, possible_positions)
|
Context.office_sprites = Sprite.list_randomize(possible_sprites, possible_positions)
|
||||||
|
if CommuteGlitch.is_active() then
|
||||||
|
Context.office_sprites = CommuteGlitch.corrupt_sprite_list(Context.office_sprites)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
background = function()
|
||||||
|
return CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 and "" or "office"
|
||||||
end,
|
end,
|
||||||
background = "office",
|
|
||||||
draw = function()
|
draw = function()
|
||||||
if Window.get_current_id() == "game" then
|
if Window.get_current_id() == "game" then
|
||||||
Sprite.draw_at("norman", 13 * 8, 9 * 8)
|
Sprite.draw_at("norman", 13 * 8, 9 * 8)
|
||||||
|
|
||||||
Sprite.draw_list(Context.office_sprites)
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 then
|
||||||
|
Sprite.draw_at("norman_echo", 13 * 8, 9 * 8)
|
||||||
|
CommuteGlitch.draw_background_flicker()
|
||||||
|
else
|
||||||
|
CommuteGlitch.draw_sprite_list(Context.office_sprites)
|
||||||
|
end
|
||||||
|
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 6 then
|
||||||
|
Glitch.draw()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,16 +4,69 @@ Screen.register({
|
|||||||
decisions = {
|
decisions = {
|
||||||
"go_to_home",
|
"go_to_home",
|
||||||
"go_to_office",
|
"go_to_office",
|
||||||
|
"sumphore_discussion",
|
||||||
|
"eating_fast_food",
|
||||||
|
"go_to_truth",
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
Audio.music_play_room_work()
|
local possible_sprites = {
|
||||||
|
"matrix_trinity",
|
||||||
|
"matrix_neo",
|
||||||
|
{id="matrix_oraculum", y_correct=1 * 8},
|
||||||
|
"matrix_architect"
|
||||||
|
}
|
||||||
|
|
||||||
|
local possible_positions = {
|
||||||
|
{x = 5 * 8, y = 11 * 8},
|
||||||
|
{x = 7 * 8, y = 11 * 8},
|
||||||
|
{x = 9 * 8, y = 11 * 8},
|
||||||
|
{x = 11 * 8, y = 11 * 8},
|
||||||
|
{x = 13 * 8, y = 11 * 8},
|
||||||
|
{x = 15 * 8, y = 11 * 8},
|
||||||
|
{x = 18 * 8, y = 11 * 8},
|
||||||
|
{x = 21 * 8, y = 11 * 8},
|
||||||
|
{x = 24 * 8, y = 11 * 8},
|
||||||
|
{x = 27 * 8, y = 11 * 8},
|
||||||
|
}
|
||||||
|
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 then
|
||||||
|
Audio.music_play_mystery()
|
||||||
|
Context.walking_to_home_sprites = {}
|
||||||
|
else
|
||||||
|
Audio.music_play_room_work(CommuteGlitch.music_speed())
|
||||||
|
Context.walking_to_home_sprites = Sprite.list_randomize(possible_sprites, possible_positions)
|
||||||
|
if CommuteGlitch.is_active() then
|
||||||
|
Context.walking_to_home_sprites = CommuteGlitch.corrupt_sprite_list(Context.walking_to_home_sprites)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
background = function()
|
||||||
|
return CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 and "" or "street"
|
||||||
end,
|
end,
|
||||||
background = "street",
|
|
||||||
draw = function()
|
draw = function()
|
||||||
if Window.get_current_id() == "game" then
|
local w = Window.get_current_id()
|
||||||
|
if w ~= "game" and w ~= "discussion" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 7 then
|
||||||
Sprite.draw_at("norman", 7 * 8, 3 * 8)
|
Sprite.draw_at("norman", 7 * 8, 3 * 8)
|
||||||
|
Sprite.draw_at("sumphore", 9 * 8, 2 * 8)
|
||||||
|
CommuteGlitch.draw_sprite_list(Context.walking_to_home_sprites)
|
||||||
|
CommuteGlitch.draw_background_flicker()
|
||||||
|
Glitch.draw()
|
||||||
|
else
|
||||||
|
local norman_x = Context.fast_food_approaching and (19 * 8) or (7 * 8)
|
||||||
|
Sprite.draw_at("norman", norman_x, 3 * 8)
|
||||||
|
Sprite.draw_at("sumphore", 9 * 8, 2 * 8)
|
||||||
|
if Context.fast_food_eaten_today < 3 then
|
||||||
Sprite.draw_at("pizza_vendor", 19 * 8, 1 * 8)
|
Sprite.draw_at("pizza_vendor", 19 * 8, 1 * 8)
|
||||||
|
end
|
||||||
Sprite.draw_at("dev_guard", 22 * 8, 2 * 8)
|
Sprite.draw_at("dev_guard", 22 * 8, 2 * 8)
|
||||||
|
CommuteGlitch.draw_sprite_list(Context.walking_to_home_sprites)
|
||||||
|
if CommuteGlitch.is_active() and CommuteGlitch.get_level() >= 6 then
|
||||||
|
Glitch.draw()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ Screen.register({
|
|||||||
"go_to_home",
|
"go_to_home",
|
||||||
"go_to_office",
|
"go_to_office",
|
||||||
"sumphore_discussion",
|
"sumphore_discussion",
|
||||||
|
"eating_fast_food",
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
Audio.music_play_room_work()
|
|
||||||
|
|
||||||
local possible_sprites = {
|
local possible_sprites = {
|
||||||
"matrix_trinity",
|
"matrix_trinity",
|
||||||
"matrix_neo",
|
"matrix_neo",
|
||||||
@@ -29,15 +28,22 @@ Screen.register({
|
|||||||
{x = 27 * 8, y = 11 * 8},
|
{x = 27 * 8, y = 11 * 8},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Audio.music_play_room_work()
|
||||||
Context.walking_to_office_sprites = Sprite.list_randomize(possible_sprites, possible_positions)
|
Context.walking_to_office_sprites = Sprite.list_randomize(possible_sprites, possible_positions)
|
||||||
end,
|
end,
|
||||||
background = "street",
|
background = "street",
|
||||||
|
update = function()
|
||||||
|
end,
|
||||||
draw = function()
|
draw = function()
|
||||||
if Window.get_current_id() == "game" then
|
local w = Window.get_current_id()
|
||||||
Sprite.draw_at("norman", 7 * 8, 3 * 8)
|
if w == "game" or w == "discussion" then
|
||||||
|
local norman_x = Context.fast_food_approaching and (19 * 8) or (7 * 8)
|
||||||
|
Sprite.draw_at("norman", norman_x, 3 * 8)
|
||||||
Sprite.draw_at("sumphore", 9 * 8, 2 * 8)
|
Sprite.draw_at("sumphore", 9 * 8, 2 * 8)
|
||||||
|
if Context.fast_food_eaten_today < 3 then
|
||||||
Sprite.draw_at("pizza_vendor", 19 * 8, 1 * 8)
|
Sprite.draw_at("pizza_vendor", 19 * 8, 1 * 8)
|
||||||
Sprite.draw_at("dev_guard", 22 * 8, 2 * 8)
|
end
|
||||||
|
Sprite.draw_at("dev_guard", 22 * 8, 3 * 8)
|
||||||
|
|
||||||
Sprite.draw_list(Context.walking_to_office_sprites)
|
Sprite.draw_list(Context.walking_to_office_sprites)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ function Sprite.draw_list(sprite_list)
|
|||||||
for _, sprite_info in ipairs(sprite_list) do
|
for _, sprite_info in ipairs(sprite_list) do
|
||||||
local sprite_data = _sprites[sprite_info.id]
|
local sprite_data = _sprites[sprite_info.id]
|
||||||
if not sprite_data then
|
if not sprite_data then
|
||||||
trace("Error: Attempted to draw non-registered sprite with id: " .. sprite_info.id)
|
trace("Error: Attempted to draw non-registered sprite with id: " .. tostring(sprite_info.id))
|
||||||
else
|
else
|
||||||
draw_sprite_instance(sprite_data, sprite_info)
|
draw_sprite_instance(sprite_data, sprite_info)
|
||||||
end
|
end
|
||||||
|
|||||||
14
inc/sprite/sprite.norman_echo.lua
Normal file
14
inc/sprite/sprite.norman_echo.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-- Norman echo: same tile indices as norman.
|
||||||
|
-- Color remap is applied by CommuteGlitch.draw_sprite_list via pal().
|
||||||
|
-- Implementer: set ECHO_SRC/ECHO_DST in logic.commute_glitch.lua after inspecting the palette.
|
||||||
|
Sprite.register({
|
||||||
|
id = "norman_echo",
|
||||||
|
sprites = {
|
||||||
|
{ s = 272, x_offset = -4, y_offset = -4 },
|
||||||
|
{ s = 273, x_offset = 4, y_offset = -4 },
|
||||||
|
{ s = 288, x_offset = -4, y_offset = 4 },
|
||||||
|
{ s = 289, x_offset = 4, y_offset = 4 },
|
||||||
|
{ s = 304, x_offset = -4, y_offset = 12 },
|
||||||
|
{ s = 305, x_offset = 4, y_offset = 12 },
|
||||||
|
}
|
||||||
|
})
|
||||||
41
inc/window/window.ascend_debug.lua
Normal file
41
inc/window/window.ascend_debug.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
--- @section AscendDebugWindow
|
||||||
|
local _level = 0
|
||||||
|
|
||||||
|
--- Initialises the ASCEND debug start window.
|
||||||
|
--- @within AscendDebugWindow
|
||||||
|
function AscendDebugWindow.init()
|
||||||
|
_level = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Draws the ASCEND debug start window.
|
||||||
|
--- @within AscendDebugWindow
|
||||||
|
function AscendDebugWindow.draw()
|
||||||
|
UI.draw_top_bar("ASCEND Debug Start")
|
||||||
|
|
||||||
|
local cx = Config.screen.width / 2
|
||||||
|
local cy = Config.screen.height / 2
|
||||||
|
|
||||||
|
local left_arrow = _level > 0 and "<- " or " "
|
||||||
|
local right_arrow = _level < Ascension.get_max_level() and " ->" or " "
|
||||||
|
local label = left_arrow .. "Start at: " .. _level .. right_arrow
|
||||||
|
Print.text_center(label, cx, cy - 4, Config.colors.white, false, 1)
|
||||||
|
|
||||||
|
Print.text_center("Z/select: start X/back: menu", cx, Config.screen.height - 10, Config.colors.dark_grey, false, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Updates the ASCEND debug start window logic.
|
||||||
|
--- @within AscendDebugWindow
|
||||||
|
function AscendDebugWindow.update()
|
||||||
|
if Input.left() then
|
||||||
|
_level = math.max(0, _level - 1)
|
||||||
|
elseif Input.right() then
|
||||||
|
_level = math.min(Ascension.get_max_level(), _level + 1)
|
||||||
|
elseif Input.select() then
|
||||||
|
Audio.sfx_select()
|
||||||
|
Context.new_game_debug(_level)
|
||||||
|
GameWindow.set_state("game")
|
||||||
|
elseif Input.back() then
|
||||||
|
Audio.sfx_deselect()
|
||||||
|
GameWindow.set_state("menu")
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -33,12 +33,22 @@ function EndWindow.draw()
|
|||||||
local cx = Config.screen.width / 2
|
local cx = Config.screen.width / 2
|
||||||
local name = Context.player_name or "AAA"
|
local name = Context.player_name or "AAA"
|
||||||
local code = CodeGenerator.encrypt(name)
|
local code = CodeGenerator.encrypt(name)
|
||||||
Print.text_center("Game over -- good ending.", cx, 40, Config.colors.light_blue)
|
|
||||||
Print.text_center("Congrats " .. name .. "!", cx, 54, Config.colors.white)
|
Print.text_center("~ GOOD ENDING ~", cx, 8, Config.colors.light_blue)
|
||||||
Print.text_center("Your personal code:", cx, 72, Config.colors.light_grey)
|
Print.text_center("Congratulations, " .. name .. "!", cx, 20, Config.colors.white)
|
||||||
Print.text_center(code, cx, 84, Config.colors.white, false, 3)
|
|
||||||
Print.text_center("Write it down!", cx, 112, Config.colors.item)
|
rectb(40, 29, 160, 36, Config.colors.blue)
|
||||||
Print.text_center("Press Z to return to menu", cx, 126, Config.colors.dark_grey)
|
Print.text_center("your code", cx, 33, Config.colors.light_grey)
|
||||||
|
Print.text_center(code, cx, 44, Config.colors.white, false, 2)
|
||||||
|
|
||||||
|
Print.text_center("Write it down!", cx, 70, Config.colors.item)
|
||||||
|
|
||||||
|
line(20, 82, 219, 82, Config.colors.dark_grey)
|
||||||
|
Print.text_center("To continue via telnet:", cx, 87, Config.colors.light_grey)
|
||||||
|
Print.text_center("games.teletype.hu 2324", cx, 98, Config.colors.white)
|
||||||
|
line(20, 110, 219, 110, Config.colors.dark_grey)
|
||||||
|
|
||||||
|
Print.text_center("Press Z to return to menu", cx, 116, Config.colors.dark_grey)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ local function draw_game_scene(underlay_draw)
|
|||||||
local screen = Screen.get_by_id(Context.game.current_screen)
|
local screen = Screen.get_by_id(Context.game.current_screen)
|
||||||
if not screen then return end
|
if not screen then return end
|
||||||
if screen.background then
|
if screen.background then
|
||||||
Map.draw(screen.background)
|
local actual_background = (type(screen.background) == "function" and screen.background()) or screen.background
|
||||||
|
Map.draw(actual_background)
|
||||||
elseif screen.background_color then
|
elseif screen.background_color then
|
||||||
rect(0, 0, Config.screen.width, Config.screen.height, screen.background_color)
|
rect(0, 0, Config.screen.width, Config.screen.height, screen.background_color)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -179,6 +179,13 @@ function MenuWindow.ddr_test()
|
|||||||
MinigameDDRWindow.start("menu", "generated", { special_mode = "only_nothing" })
|
MinigameDDRWindow.start("menu", "generated", { special_mode = "only_nothing" })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Opens the ASCEND debug start window.
|
||||||
|
--- @within MenuWindow
|
||||||
|
function MenuWindow.ascend_debug()
|
||||||
|
AscendDebugWindow.init()
|
||||||
|
GameWindow.set_state("ascend_debug")
|
||||||
|
end
|
||||||
|
|
||||||
--- Refreshes the list of menu items based on current game state.
|
--- Refreshes the list of menu items based on current game state.
|
||||||
--- @within MenuWindow
|
--- @within MenuWindow
|
||||||
function MenuWindow.refresh_menu_items()
|
function MenuWindow.refresh_menu_items()
|
||||||
@@ -196,6 +203,7 @@ function MenuWindow.refresh_menu_items()
|
|||||||
table.insert(_menu_items, {label = "Audio Test", decision = MenuWindow.audio_test})
|
table.insert(_menu_items, {label = "Audio Test", decision = MenuWindow.audio_test})
|
||||||
table.insert(_menu_items, {label = "To Be Continued...", decision = MenuWindow.continued})
|
table.insert(_menu_items, {label = "To Be Continued...", decision = MenuWindow.continued})
|
||||||
table.insert(_menu_items, {label = "DDR Test", decision = MenuWindow.ddr_test})
|
table.insert(_menu_items, {label = "DDR Test", decision = MenuWindow.ddr_test})
|
||||||
|
table.insert(_menu_items, {label = "Start at ASCEND N", decision = MenuWindow.ascend_debug})
|
||||||
table.insert(_menu_items, {label = "End Screen", decision = MenuWindow.end_screen})
|
table.insert(_menu_items, {label = "End Screen", decision = MenuWindow.end_screen})
|
||||||
table.insert(_menu_items, {label = "Player Name", decision = MenuWindow.player_name})
|
table.insert(_menu_items, {label = "Player Name", decision = MenuWindow.player_name})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ Window.register("controls", ControlsWindow)
|
|||||||
AudioTestWindow = {}
|
AudioTestWindow = {}
|
||||||
Window.register("audiotest", AudioTestWindow)
|
Window.register("audiotest", AudioTestWindow)
|
||||||
|
|
||||||
|
AscendDebugWindow = {}
|
||||||
|
Window.register("ascend_debug", AscendDebugWindow)
|
||||||
|
|
||||||
MinigameButtonMashWindow = {}
|
MinigameButtonMashWindow = {}
|
||||||
Window.register("minigame_button_mash", MinigameButtonMashWindow)
|
Window.register("minigame_button_mash", MinigameButtonMashWindow)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user