#Lair - level 5 entrance
from eventAPI import *
from APIUtils import *

lair5Gate = 0

def fireEvent(e):
    global lair5Gate
    lair5Gate = getTag(e, "lair5Gate")
    if(not lair5Gate):
        showMessage(e,
            ["From out of the ether, a disembodied voice poses a riddle.."])
        answer = stringInput(e,
            ["Thought and spirit, ego and soul",
             "Enlightenment is the monks goal",
             "Psi-knights exercise this special strength",
             "To access powers beyond arms length",
             "This wondrous gift gods gave mankind",
             "Sentience, knowledge, the power of the ..."])
        if(answer.lower() != "mind"):
            return 0
        else:
            lair5Gate = 1
            setTag(e, "lair5Gate", lair5Gate)
    showPicture(e, "Cave")
    if (poseYesNo(e,
        ["You see before you stairs leading up into the Lair.",
         "Do you enter?"])):
        tickGame(e, 60)
        setExit(e, "maps/lair5.cfg", 4, 4, 180)
    return 0
