#Entrance to the Temple of the Elements
from eventAPI import *
from APIUtils import *

def fireEvent(e):
    if ((getTag(e, "lFlagS") & 0x100) == 0):
        return 1
    k = getTag(e, "TotEplot")
    if (k == 0):
        return 1
    elif (k == 10):
        clearPicture(e)
        showMessage(e, ["Rubble fills the stairway that previously led to the underground temple. Nothing more can be done here."])
        return 1
    showPicture(e, "Catacombs")
    if (poseYesNo(e, ["There is a very old trapdoor on the ground, which looks like it has been unearthed recently.", "", "Do you enter?"])):
        tickGame(e, 60)
        setExit(e, "maps/DK_TOTE.cfg", 12, 3, 0)
        return 0
    return 1
