just(line_response("Hint for this room: Try using the `help` command."))
},
PlayerAction::Nonsense=>{
vec![
line_response("I couldn't understand that. Try `help` or `hint`."),
line_response("`hint` may contain spoilers. `help` will not."),
]
},
PlayerAction::Wait=>{
just(line_response("You wait around a bit. You can hear humming from the electrical lights, and the distant rumble of the building's HVAC system. The room smells faintly of fresh paint. Nothing has changed."))
},
PlayerAction::LookAround=>{
just(line_response("You are in a small room. In one corner is a TABLE. Obvious exits are a locked DOOR, and an EMERGENCY EXIT."))
just(line_response("You examine the DOOR. It is firmly locked, and you don't have any lock-picking tools. On the DOOR is an electronic KEYPAD."))
},
ItemName::EmergencyExit=>{
just(line_response("The EMERGENCY EXIT reads, \"Emergency exit. Push bar to open. Alarm will sound. Door will unlock in 10 seconds.\". The EMERGENCY EXIT is period-accurate for an American Wal-Mart c. 2020 C.E."))
},
ItemName::Keypad=>{
if!self.room_1.detected_keypad{
returnOk(just(undetected_item()));
}
just(line_response("The DOOR is locked by an electronic KEYPAD. A soft amber power light indicates that the KEYPAD is likely functional. The KEYPAD buttons are the digits 0-9, Enter, and Clear. Experience tells you that the key code is likely 4 or 5 digits long."))
},
ItemName::Note=>{
if!self.room_1.detected_note{
returnOk(vec![
undetected_item(),
]);
}
just(Response::PrintMany(vec![
"You pick up the NOTE and read it.",
"",
"Welcome to SEROTONIN DEPOSITORY.",
"As you play, keep in mind:",
"- LOOKing at ITEMS is not always safe",
"- TAKEing an item may be bad long-term",
"- WAITing counts as an action",
"- LOOKing AROUND is always safe",
"- Other NOTEs may contain non-truths",
"The code for this first KEYPAD is 1234.",
"",
" -- Phayle Sayf",
"",
"You notice that the NOTE is _not_ period-accurate.",
]))
},
ItemName::Table=>{
self.room_1.detected_note=true;
vec![
Response::Print("You look at the TABLE. Your instincts tell you that it is period-accurate. Upon the TABLE sits a NOTE.".into()),
]
},
_=>{
vec![
undetected_item(),
]
},
}
},
PlayerAction::Use(item_name)=>{
matchitem_name{
ItemName::Door=>{
letmutoutput=vec![
line_response("You can't USE the DOOR, it is locked."),
];
if!self.room_1.detected_keypad{
self.room_1.detected_keypad=true;
output.push(Response::Print("You notice an electronic KEYPAD on the DOOR.".into()));
}
output
},
ItemName::EmergencyExit=>{
vec![
Response::Print("You push on the emergency exit. An alarm starts sounding. Your ADVENTURE GAME ENTHUSIAST friend is going to be very mad at you.".into()),
Response::Sleep(5000),
Response::Print("The alarm is still sounding. You are getting embarrassed, but you have committed to this path of action.".into()),
Response::Sleep(5000),
Response::Print("The emergency exit unlocks, and you walk out of the game. Bye.".into()),
"Welcome to SEROTONIN DEPOSITORY, the only adventure game ever made.",
"",
"You have been consensually kidnapped by a diabolical ADVENTURE GAME ENTHUSIAST and encouraged to solve PUZZLES for their sick PLEASURE. The only winning move is to solve all the PUZZLES.",