IF
	See(NearestEnemyOf(Myself))
        Global("ResistDelay","LOCALS",0)
THEN
	RESPONSE #100
                SetGlobal("ResistDelay","LOCALS",1)
                SetGlobalTimer("ResistDelayTimer","LOCALS",60)
                ReallyForceSpellRES("SPCL907",Myself)
END

IF
        Global("ResistDelay","LOCALS",1)
        GlobalTimerExpired("ResistDelayTimer","LOCALS")
THEN
	RESPONSE #100
                SetGlobal("ResistDelay","LOCALS",0)
END

IF
	See(NearestEnemyOf(Myself))
        !InMyGroup(LastSeenBy(Myself))
        GlobalLT("WIND_NUMBER","LOCALS",6)
THEN
	RESPONSE #100
                IncrementGlobal("WIND_NUMBER","LOCALS",1)
                ReallyForceSpellRES("SPCL901",Myself)
                AttackReevaluate(LastSeenBy(Myself),30)
END

IF
	See(NearestEnemyOf(Myself))
        !InMyGroup(LastSeenBy(Myself))
        GlobalGT("WIND_NUMBER","LOCALS",5)
THEN
	RESPONSE #100
                AttackReevaluate(LastSeenBy(Myself),30)
END

IF
	AttackedBy([ANYONE],DEFAULT)
	ActionListEmpty()
        !InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
		AttackOneRound(LastAttackerOf(Myself))
END

IF
	!See(NearestEnemyOf(Myself))
        GlobalGT("WIND_NUMBER","LOCALS",0)
THEN
	RESPONSE #100
                SetGlobal("WIND_NUMBER","LOCALS",0)
END