#Mage Tower (entrance)
from eventAPI import *
from APIUtils import *

lairNeg3 = 0

def fireEvent(e):
    global lairNeg3
    lairNeg3 = getTag(e, "lairNeg3")
    if(not lairNeg3):
        showMessage(e, ["You hear a voice whipser into your mind", "\"What am I?\""])
        answer = stringInput(e,
            ["Until I am measured","I am not known","Yet how you miss me","When I have flown"])
        if(answer.lower() != "time"):
            return 0
        else:
            lairNeg3 = 1
            setTag(e, "lairNeg3", lairNeg3)

    showPicture(e, "Cave")
    if (poseYesNo(e,
        ["You see before you stairs leading downward.",
         "Do you enter?"])):
        tickGame(e, 60)
        setExit(e, "maps/lair-3.cfg", 16, 18, 180)
    return 0
