#Hedgemaze fountain event
from eventAPI import *
from APIUtils import *

rtHedgeFountainFlag=0

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

def firstVisit(e):
   showMessage(e, ["The fountain waters begin to churn at your approach.", "", "A ghostly face appears before you and begins to speak."])
   showPicture(e, "Stone_Cleric")
   showMessage(e, ["\"You must come to the western castle!\" the apparition implores.  \"You can find me within the chapel.\"", "", "\"I will explain when you arrive.\""])
   showMessage(e, ["The ghost then disappears."])
   rtHedgeFountainFlag=1
   setTag(e, "rtHedgeFountainFlag", rtHedgeFountainFlag)
   clearPicture(e)
   if (poseYesNo(e, ["There is a plaque here at the base of the fountain", "", "Do you wish to read it?"])):
      readPlaque(e)

def readAgain(e):
   if (poseYesNo(e, ["Do you wish to read the plaque here again?"])):
      readPlaque(e)

def readPlaque(e):
   showMessage(e, ["On this ground is promise made between a father and his sons.", "", "To each of them a grand castle and this garden so that each may have the other nearby.", "", "Honor thy brother as you have honored me.", "", "May your friendship and love continue.", "", "", "   - Lord Harold Mercer"])
