#Cellars stairs (down)
from eventAPI import showPicture, tickGame, setExit
from APIUtils import poseYesNo, firstHasItem, optionInput
from SDLKeys import SDLK_ESCAPE

def fireEvent(e):
    showPicture(e, "Cellars")
    if (firstHasItem(e,"Cellar Key")<0):
        optionInput(e,
        ["There is a locked door on the floor.",
         "It seems that it won't budge"],
        ["(ESCAPE) to Exit"], [SDLK_ESCAPE])
    elif (poseYesNo(e,
        ["You see dark and mysterious stairs leading down into dank cellars.",
         "Do you go down?"])):
        tickGame(e, 60)
        setExit(e, "maps/cellar1.cfg", 1, 1, 90)
    return 0
