Initial commit

This commit is contained in:
2025-08-28 04:57:24 +00:00
commit a5a7d92249
14 changed files with 314 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
# chest.py
# --------
# By MWC Contributors
#
# This is a Python program. You should run it by typing `python chest.py`.
import os
from pathlib import Path
import sys
sys.path.append('../../..')
from fancy_printing import print_fancy
SECRET = "318"
APPROACH_CHEST = [
"You approach the chest and see that the lock is surprisingly free of rust. In fact, the code dials turn smoothly. Try entering a code."
]
CHEST_OPENS = [
"The chest snaps open, releasing several huge air bubbles. You look into the chest and see something shining brightly from within, so bright you can't quite make out what it is."
]
INSTRUCTIONS = [
"You grab the treasure from the chest...it's so shiny! Make a bag and store your treasure inside, using the following commands:",
"mkdir bag",
"mv treasure.jpg bag",
"Then get back to the surface. Don't forget to take your treasure bag with you. Remember, `..` means 'the parent directory,' so these commands will move the bag to the parent directory and then move yourself:",
"mv bag ../bag",
"cd .."
]
WRONG_CODE = [
"nothing happens. Maybe next time."
]
print_fancy(APPROACH_CHEST)
guess = input(" > ")
if guess.strip() == SECRET:
print_fancy(CHEST_OPENS)
print_fancy(INSTRUCTIONS)
os.system('cp ./../../../.assets/fork.jpg treasure.jpg')
else:
print_fancy(WRONG_CODE)

View File

@@ -0,0 +1,23 @@
You are standing at the edge of a beautiful coral reef. Schools of fish are
swirling around you in every direction. In front of you is a deep chasm
where you see larger fish sliding through the shadows. There is a chest
half-buried in the seafloor.
____...------------...____
_.-"` /o/__ ____ __ __ __ \o\_`"-._
.' / / \ \ '.
|=====/o/======================\o\=====|
|____/_/________..____..________\_\____|
/ _/ \_ <_o#\__/#o_> _/ \_ \
\________________\####/________________/
|===\!/========================\!/===|
| |=| .---. |=| |
|===|o|=========/ \========|o|===|
| | | \() ()/ | | |
|===|o|======{'-.) A (.-'}=====|o|===|
| __/ \__ '-.\uuu/.-' __/ \__ |
|============= .'.'^'.'.=============|
| _\o/ __ {.' __ '.} _ _\o/ _|