#castle level 1 fight #4
from eventAPI import *
from APIUtils import *

rtCastle1Flag4=0

def fireEvent(e):
   global rtCastle1Flag4
   rtCastle1Flag4 = getTag(e, "rtCastle1Flag4")
   if (rtCastle1Flag4 == 1):
      return 1
   else:
      fightThem(e)
   if (rtCastle1Flag4 == 1):
      return 1
   else:
      return 0

def fightThem(e):
   combatRet = combat(e, [("Greenguard", 5, 5, 30)])
   if (combatRet == 1):
      wonFight(e)

def wonFight(e):
   global rtCastle1Flag4
   rtCastle1Flag4 = 1
   setTag(e, "rtCastle1Flag4", rtCastle1Flag4)
