from eventAPI import *
from APIUtils import *

def fireEvent(e):
    k = getTag(e, "kssCrypt")
    if (k == 66):
        return 1
    elif (k == 60):
        setTag(e, "kssCrypt", 61)
        showMessage(e, ["The second ward seals the corridor behind you."])
    elif (k == 61):
        setTag(e, "kssCrypt", 62)
        showMessage(e, ["The third ward prevents you from going back."])
    elif (k == 62):
        setTag(e, "kssCrypt", 63)
        showMessage(e, ["The fourth ward sets behind you."])
    elif (k == 63):
        setTag(e, "kssCrypt", 64)
        showMessage(e, ["There is no going back (now that's a big change) !"])
    elif (k == 64):
        setTag(e, "kssCrypt", 65)
        showMessage(e, ["Guess what ? The sixth ward."])
    elif (k == 65):
        setTag(e, "kssCrypt", 66)
        showMessage(e, ["The final ward slams shut. You are deep within..."])
    return 0
