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

rtkeep1Air = 0

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


def removeBarrier(e):
   global rtkeep1Air
   showMessage(e, ["A sudden wind knocks you off of your feet.", "",  "The wind gathers before you to form an elemental being.","", "In a whispery voice, the elemental begins to speak to you."], optionInput)
   showPicture(e, "Air_Elemental")
   showMessage(e, ["\"You bear the Mark of Air.\"", "", "\"Your passage is no longer blocked.\""])
   rtkeep1Air = 2
   setTag(e, "rtkeep1Air", rtkeep1Air)
   return 0

def noMark(e):
   showMessage(e, ["A sudden wind knocks you off of your feet.", "",  "The wind gathers before you to form an elemental being.","", "In a whispery voice, the elemental begins to speak to you."])
   showPicture(e, "Air_Elemental")
   showMessage(e, ["\"I cannot see the Mark of Air upon you.\"", "", "\"I cannot help you.\""])
   partyIdx = 0
   while (partyIdx < getPartyCount(e)):
      modifyHP(e, partyIdx, -30)
      partyIdx += 1
   return 0