IF
      Die()
THEN
      RESPONSE #100
	  ReallyForceSpellDeadRES("ru_stnb2",Myself)
END

IF
        Global("RU_STAGE_OVER","GLOBAL",1)
THEN
	RESPONSE #100
                ReallyForceSpellRES("ru_disap",Myself)
                Wait(2)
                DestroySelf()
END

IF
        See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
                Continue()
END

IF
        Global("WOLF","LOCALS",0)
THEN
	RESPONSE #100
                SetGlobal("WOLF","LOCALS",1)
                SetGlobalTimer("WOLFT","LOCALS",300)
END

IF
        !GlobalTimerNotExpired("WOLFT","LOCALS")
THEN
	RESPONSE #100
                ReallyForceSpellRES("ru_c400b",Myself)
END

IF
        Detect(NearestEnemyOf(Myself))
        Global("LowerSequence","LOCALS",0)
THEN
	RESPONSE #100
                SetGlobal("LowerSequence","LOCALS",1)
                DisplayString(Myself,@286)
                ReallyForceSpell(Myself,CLERIC_DRAW_UPON_HOLY_MIGHT)
                ReallyForceSpellRES("ru_elmel",Myself) // 아케인 범위 전기손
END

IF
        Detect(NearestEnemyOf(Myself))
        Global("SpellTrigger","LOCALS",0)
THEN
	RESPONSE #100
                SetGlobal("SpellTrigger","LOCALS",1)
                DisplayString(Myself,@287)
                ApplySpell(Myself,WIZARD_IMPROVED_HASTE)
                ApplySpell(Myself,WIZARD_IMPROVED_INVISIBILITY)
                ApplySpell(Myself,WIZARD_SPELL_IMMUNITY_DIVINATION)
                SetGlobalTimer("TT","LOCALS",24)
END

IF
        Detect(NearestEnemyOf(Myself))
        Global("Mantle","LOCALS",0)
        GlobalTimerExpired("TT","LOCALS")
THEN
	RESPONSE #100
                SetGlobal("Mantle","LOCALS",1)
                DisplayString(Myself,@288)
                ApplySpell(Myself,WIZARD_MANTLE)
END

IF
        Global("RM","LOCALS",0)
        GlobalTimerExpired("TT","LOCALS")
        OR(21)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_IMMUNITY)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_SHIELD)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TRAP)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_IMPROVED_ALACRITY)
	  CheckStatGT(LastSeenBy(Myself),0,TRUE_SIGHT)
	  CheckStatGT(LastSeenBy(Myself),0,CLERIC_CHAOTIC_COMMANDS)
	  CheckStatGT(LastSeenBy(Myself),0,CLERIC_BLADE_BARRIER)
	  CheckStatGT(LastSeenBy(Myself),0,CLERIC_PHYSICAL_MIRROR)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_NORMAL_MISSILES)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_NORMAL_WEAPONS)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_TENSERS_TRANSFORMATION)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_ENERGY)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_MISLEAD)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_THE_ELEMENTS)
          CheckStatGT(LastSeenBy(Myself),0,STONESKINS)
          StateCheck(LastSeenBy(Myself),STATE_MIRRORIMAGE)
          StateCheck(LastSeenBy(Myself),STATE_DRAWUPONHOLYMIGHT)
          StateCheck(LastSeenBy(Myself),STATE_BLUR)
        !InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                SetGlobal("RM","LOCALS",1)
                DisplayString(Myself,@289)
                ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_TRUE_DISPEL_MAGIC)
END

IF
        Detect(NearestEnemyOf(Myself))
        Global("HOWL","LOCALS",0)
THEN
	RESPONSE #20
                SetGlobal("HOWL","LOCALS",1)
                DisplayStringHead(Myself,@290)
                PlaySound("WEREW03")
                Continue()          
END

IF
        HitBy([ENEMY],0)
        Range(LastAttackerOf(Myself),2)
THEN
	RESPONSE #100
                AttackReevaluate(LastAttackerOf(Myself),30)
END

IF
        ActionListEmpty()
        Detect(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
                AttackReevaluate(NearestEnemyOf(Myself),30)
END