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

lairNeg4 = 0

def fireEvent(e):
    global lairNeg4
    lairNeg4 = getTag(e, "lairNeg4")
    if(not lairNeg4):
        showMessage(e, ["You hear a voice whisper into your mind", "\"What am I?\""])
        answer = stringInput(e,
            ["All day I will follow", "No matter how fast you run", "Yet I nearly perish", "In the midday sun"])
        if(answer.lower() != "shadow"):
            return 0
        else:
            lairNeg4 = 1
            setTag(e, "lairNeg4", lairNeg4)

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