
from eventAPI import *
from APIUtils import *

def fireEvent(e):
    if (getTag(e, "lFlagU") != 0):
        return 1   
    k = getTag(e, "kssBDE")
    if (k == 0):
        showMessage(e, ["The tunnel ends abruptly here."])
    elif (k == 1):
        showMessage(e, ["You come to a dead end."])
    elif (k == 2):
        showMessage(e, ["Another dead end. Boring."])
    elif (k == 3):
        showMessage(e, ["Yo man, you can't go no further."])
    elif (k == 4):
        showMessage(e, ["Oh well, guess what?"])
    elif (k == 5):
        showMessage(e, ["Saperlipopette, a cul-de-sac."])
    elif (k == 6):
        showMessage(e, ["This extremity is deceased."])
    elif (k == 7):
        showMessage(e, ["Will these dead ends ever end?"])
    k += 1
    setTag(e, "kssBDE", k)
    setTag(e, "lFlagU", 1)
    return 1
