#eastern keep floor 1 fire elemental
from eventAPI import *
from APIUtils import *

rtkeep1Fire = 0

def fireEvent(e):
   global rtkeep1Fire
   rtkeep1Fire = getTag(e, "rtkeep1Fire")
   if (rtkeep1Fire == 2):
      return 1
   elif (rtkeep1Fire == 1):
      removeBarrier(e)
   else:
      noMark(e)


def removeBarrier(e):
   global rtkeep1Fire
   showMessage(e, ["A column of flame appears and the heat causes you to jump back.", "",  "The flame coaleses into an elemental being.", "", "The elemental briefly examines you, then begins to speak."], optionInput)
   showPicture(e, "Fire_Elemental")
   showMessage(e, ["\"You bear the Mark of Flame.\"", "", "\"The way is now open to you.\""])
   rtkeep1Fire = 2
   setTag(e, "rtkeep1Fire", rtkeep1Fire)
   return 0

def noMark(e):
   showMessage(e, ["A column of flame appears and the heat causes you to jump back.", "",  "The flame coaleses into an elemental being.","", "The elemental briefly examines you, then begins to speak."])
   showPicture(e, "Fire_Elemental")
   showMessage(e, ["\"You do not bear the Mark of Flame.\"", "", "\"Begone and do not return.\""])
   partyIdx = 0
   while (partyIdx < getPartyCount(e)):
      modifyHP(e, partyIdx, -30)
      partyIdx += 1
   return 0
