#Orin's 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, "Red_Crystal")
        if (optionInput(e,
            ["You see a glowing red crystal, with a plaque that reads:",
             "\"Herein lies the Challenge of Valor, where the great hero Orin fell.  All who touch the crystal gain entrance, only those with the Valor of a True Hero may succeed.\"",
             "Do you touch the crystal?"],
            ["(Y)es", "(N)o"],
            [SDLK_y, SDLK_n]) == SDLK_y):
            tickGame(e, 60)
            setExit(e, "maps/ringOrin.cfg", 12, 2, 0)
            return 0
        else:
            return 1
