#Marias' Ring exit
from eventAPI import getTag, showPicture, optionInput, tickGame, setExit
from SDLKeys import SDLK_y, SDLK_n

def fireEvent(e):
    lFlagS = getTag(e, "lFlagS")
    if (lFlagS & 0x100):
        showPicture(e, "White_Crystal")
        if (optionInput(e,
            ["You see a white glowing crystal before you.",
             "Do you touch it?"],
            ["(Y)es", "(N)o"],
            [SDLK_y, SDLK_n]) == SDLK_y):
            tickGame(e, 60)
            setExit(e, "maps/ringQuest.cfg", 2, 17, 270)
            return 0
        else:
            return 1
