#!/usr/bin/env bash
#
# If you are reading this, you have wandered out of bounds
# and are reading the code that drives the game.
#
#                    Congratulations!
#
# Learning Linux is all about curiosity, so read this code and see
# if you can figure out what it does.
#
# When you're ready to continue playing the game, though, stick to
# the scrolls. If you're stuck, go to Gitlab and create an issue.
# We're happy to provide hints.
#

if ! [ -L portal ]; then
    cat << EOF
Runes, the language of the ancient mystics that once ruled
this land, are inscribed upon the western wall.

EOF
    printf "Do you want to read them? y/n  "
    read RESP

    if [ "$RESP" = "y" -o "$RESP" = "Y" ]; then
        cat << EOF
You recall the lessons of Caitlyn the Green, who taught you
these ancient letters.

The runes are instructions on how to summon a portal that
will allow you to walk through an invisible door contained
in the wall.

In Bash, a symbolic link (symlink) is a *shortcut* to
another file or directory.  Create one from this room to the
adjacent one:

ln -fs ../../../chapel/courtyard/aviary/hall portal

EOF
    else
        cat << EOF
You decide it is probably best to leave magickal
inscriptions as they are.

EOF
    fi
else
    cat << EOF
The invoked portal is still there, wide open as it has been
since its first appearance.

You can go through it just like any other door :

cd portal

EOF
fi


























































































































































































































































































































# Hmm, that didn't work.
# Remember, when files end in a *
# it means they are applications.
# Try this:
#
# ./spell

