IF
 Global("WBRupertKicksAss","GLOBAL",1)
THEN
 RESPONSE #100
 SetGlobal("WBRupertKicksAss","GLOBAL",2)
 Enemy()
END



IF
  Detect(NearestEnemyOf(Myself))
  CheckStatLT(Myself,1,STONESKINS)
  GlobalLT("WBStoneskins","LOCALS",3)
THEN
  RESPONSE #100
    IncrementGlobal("WBStoneskins","LOCALS",1)
    ForceSpell(Myself,WIZARD_STONE_SKIN)
END

IF
  Detect(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),7)
  Global("WBCastSpell","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",1)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
END

IF
  Detect(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",1)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",2)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_SPHERE_OF_CHAOS)
END


IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",2)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",3)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_CHAIN_LIGHTNING)
END

IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",3)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",4)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARROW)
END

IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",4)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",5)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
END

IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",5)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",6)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
END

IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",6)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",7)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_CHAOS)
END

IF
  See(NearestEnemyOf(Myself))
  Global("WBCastSpell","LOCALS",7)
THEN
  RESPONSE #100
    SetGlobal("WBCastSpell","LOCALS",8)
    ForceSpell(NearestEnemyOf(Myself),WIZARD_VAMPIRIC_TOUCH)
END

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