#Alethor'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, "Blue_Crystal")
        if (optionInput(e,
            ["You see a glowing blue crystal, with a plaque that reads:",
             "\"Herein lies the Challenge of Wisdom, where the great hero Alethor fell.  All who touch the crystal gain entrance, only those of deep thought may succeed.\"",
             "Do you touch the crystal?"],
            ["(Y)es", "(N)o"],
            [SDLK_y, SDLK_n]) == SDLK_y):
            tickGame(e, 60)
            setExit(e, "maps/ringAlethor.cfg", 4, 13, 0)
            return 0
        else:
            return 1
