Starter Game Code
Passage: Start
You wake up in a dimly lit laboratory. Your head throbs. The last thing you remember is answering an ad for "paid research volunteers."
A red emergency light blinks overhead. The facility seems abandoned, but the main door is locked with an electronic keypad.
You need to escape.
(set: $keycard to false)
(set: $password to false)
(set: $batteryPower to 100)
(set: $suspicion to 0)
(set: $inventory to (a:))
[[Examine the room->Lab Room]]
[[Check your pockets->Check Inventory]]
Passage: Lab Room
(set: $batteryPower to it - 5)
Battery Power: $batteryPower%
Suspicion Level: $suspicion
The lab contains overturned equipment and scattered papers. Three doors lead to different areas.
(if: $batteryPower <= 0)[[[Your phone dies. You're trapped forever.->Bad Ending]]]
[[Go to the Security Office->Security]]
[[Enter the Break Room->Break Room]]
[[Try the Computer Lab->Computer Lab]]
(if: $keycard and $password)[[[Attempt to unlock the main exit->Final Door]]]
Passage: Security
(set: $batteryPower to it - 5)
The security office monitors show static.
(if: ($keycard) is true)[
You've already searched here thoroughly.
](else:)[
Behind the desk, you find a KEYCARD with "Level 3 Access" printed on it!
(set: $keycard to true)
(set: $inventory to it + (a: "keycard"))
But the security camera suddenly swivels toward you...
(set: $suspicion to it + 20)
Suspicion increased!
]
[[Go back->Lab Room]]
Passage: Break Room
(set: $batteryPower to it - 5)
An abandoned break room with mouldy coffee and yesterday's newspaper.
(if: ($inventory contains "charger") is false)[
You find a PORTABLE CHARGER in someone's locker!
(set: $inventory to it + (a: "charger"))
[[Use charger->Charge Phone]]
[[Save it for later->Lab Room]]
](else:)[
Nothing else useful here.
[[Go back->Lab Room]]
]
Passage: Charge Phone
(set: $batteryPower to 100)
Your phone is fully charged! Battery: $batteryPower%
This should buy you more time.
[[Continue->Lab Room]]
Passage: Computer Lab
(set: $batteryPower to it - 5)
Rows of computers hum quietly. One screen is still logged in.
(if: $suspicion > 50)[
A security alarm triggers!
"UNAUTHORIZED ACCESS DETECTED"
(set: $suspicion to it + 30)
](else:)[
You quickly search the emails...
]
(if: ($password) is false)[
You find an email with the exit code: 7539
(set: $password to true)
(set: $inventory to it + (a: "password: 7539"))
Quick! Someone's coming!
(set: $suspicion to it + 10)
]
[[Run back->Lab Room]]
Passage: Final Door
You approach the main exit.
(if: $suspicion >= 80)[
Security robots suddenly activate!
"LOCKDOWN INITIATED"
[[You're captured->Bad Ending]]
](else:)[
You swipe the keycard... *BEEP*
You enter the code: 7539... *CLICK*
The door opens! Fresh air rushes in.
Freedom at last! You escaped the abandoned lab!
Your escape stats:
- Battery remaining: $batteryPower%
- Suspicion level: $suspicion
- Items collected: (print: $inventory's length)
[[Play Again->Start]]
]
Passage: Check Inventory
Current Battery: $batteryPower%
Suspicion Level: $suspicion
Your inventory:
(if: $inventory's length is 0)[Empty pockets.](else:)[(print: $inventory.join(", "))]
[[Back->Lab Room]]
Passage: Bad Ending
GAME OVER
You've been captured and returned to the lab.
Maybe you'll escape tomorrow...
What went wrong?
(if: $batteryPower <= 0)[Your phone died - you needed to manage battery better!]
(if: $suspicion >= 80)[You attracted too much attention - stealth is key!]
[[Try Again->Start]]

