#Marias' Ring entrance (through crystal)
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, "Green_Crystal")
        if (optionInput(e,
            ["You see a glowing green crystal, with a plaque that reads:",
             "\"Herein lies the Challenge of Bravery, where the great hero Marias fell.  All who touch the crystal gain entrance, only those with courage to spare may succeed.\"",
             "Do you touch the crystal?"],
            ["(Y)es", "(N)o"],
            [SDLK_y, SDLK_n]) == SDLK_y):
            tickGame(e, 60)
            setExit(e, "maps/ringMarias.cfg", 8, 8, 90)
            return 0
        else:
            return 1
