#plane of fire Flame encounter
from eventAPI import *
from APIUtils import *

rtPOFFlame1 = 0

def fireEvent(e):
   global rtPOFFlame1
   rtPOFFlame1 = getTag(e, "rtPOFFlame1")
   if (rtPOFFlame1 > 0):
      return 1
   else:
      firstVisit(e)
   return 0

def firstVisit(e):
   showMessage(e, ["The heat within this place burns your skin.  You are careful to stay away from the sea of lava that surrounds you."])
   showPicture(e, "Fire_Elemental")
   showMessage(e, ["With a roar, a great pillar of flame appears and twists itself into a giant being of living fire."])
   showMessage(e, ["#4\"You stand before Flame!\"", "", "It's voice comes as a roar and as it speaks you feel an addtional rush of heat wash over your entire body.", "", "The heat is both tiring and exhilarating."])
   showMessage(e, ["#4\"Speak your desire and I shall see it done.\""])
   showMessage(e, ["You mention that you seek an item of elemental power, but you keep your knowledge of the being who sent you a secret."])
   showMessage(e, ["#4\"I know of this treasure.  If that is your desire then you shall have it.  Follow me.\""])
   if (poseYesNo(e, ["Do you follow Flame?"])):
      followFlame(e)
   else:
      showMessage(e, ["#4\"Then be gone!\"  #0roars Flame."])

def followFlame(e):
   rtPOFFlame1 = 1
   setTag(e, "rtPOFFlame1", rtPOFFlame1)
   setExit(e, "maps/rtplaneoffire.cfg", 25, 11, 180)
   return 0