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

rtCastle1Flag6=0

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


def fightThem(e):
   combatRet = combat(e, [("Greenguard", 1, 0, 30), ("Redguard", 1, 0, 10), ("Blackguard", 1, 0, 10)])
   if (combatRet == 1):
      wonFight(e)

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