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

lairNeg2 = 0

def fireEvent(e):
    global lairNeg2
    lairNeg2 = getTag(e, "lairNeg2")
    if(not lairNeg2):
        showMessage(e,
            ["You hear a voice whisper into your mind", "\"What am I?\""])
        answer = stringInput(e,
            ["Drive mankind mad","For love of me,","Easily beaten","But never free"])
        if(answer.lower() != "gold"):
            return 0
        else:
            lairNeg2 = 1
            setTag(e, "lairNeg2", lairNeg2)

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