IF
	Global("RedWizardsDenak","GLOBAL",0)
	See(NearestEnemyOf(Myself(Myself)))
THEN
	RESPONSE #100
		SetGlobal("RedWizardsDenak","GLOBAL",1)
		SetGlobal("RedWizardsDiana","GLOBAL",1)
		SetGlobal("RedWizardsLasala","GLOBAL",1)
END

IF
	Global("RedWizardsDenak","GLOBAL",1)
	See(NearestEnemyOf(Myself(Myself)))
THEN
	RESPONSE #100
		ForceSpell(Myself,WIZARD_AURA_CLEANSING)
		SmallWait(5)
		ForceSpell(Myself,WIZARD_GLOBE_OF_INVULNERABILITY)
		SmallWait(5)
		ForceSpell(Myself,WIZARD_HASTE)
		SetGlobal("RedWizardsDenak","GLOBAL",2)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",2)
THEN
	RESPONSE #100
		ForceSpell(NearestEnemyOf(Myself(Myself)),WIZARD_FLAME_ARROW)
	RESPONSE #100
		Wait(1)
		ForceSpell(SecondNearestEnemyOf(Myself(Myself)),WIZARD_FLAME_ARROW)
		SetGlobal("RedWizardsDenak","GLOBAL",3)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",3)
THEN
	RESPONSE #100
		ForceSpell(NearestEnemyOf(Myself(Myself)),WIZARD_SPIDER_SPAWN)
		SetGlobal("RedWizardsDenak","GLOBAL",4)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",4)
THEN
	RESPONSE #100
		ForceSpell(StrongestOf(GroupOf(Myself)),WIZARD_MORDENKAINENS_SWORD)
		SetGlobal("RedWizardsDenak","GLOBAL",5)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",5)
THEN
	RESPONSE #100
		ForceSpell(StrongestOf(GroupOf(Myself)),WIZARD_GREATER_MALISON)
		SetGlobal("RedWizardsDenak","GLOBAL",6)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",6)
THEN
	RESPONSE #100
		ForceSpell(MostDamagedOf(GroupOf(Myself)),WIZARD_PRISMATIC_SPRAY)
		SetGlobal("RedWizardsDenak","GLOBAL",7)
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	HPPercentLT(Myself(Myself),75)
THEN
	RESPONSE #100
		ForceSpell(Myself(Myself),CLERIC_CURE_CRITICAL_WOUNDS)
		Continue()
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	Global("RedWizardsDenak","GLOBAL",7)
THEN
	RESPONSE #75
		EquipMostDamagingMelee()
		AttackOneRound(NearestEnemyOf(Myself(Myself)))
		AttackOneRound(NearestEnemyOf(Myself(Myself)))
		Continue()
	RESPONSE #25
		ForceSpell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARROW)
		Continue()
END

IF
	See(NearestEnemyOf(Myself(Myself)))
	NumCreatureGT(NearestEnemyOf(Myself),6)
THEN
	RESPONSE #100
		ForceSpell(NearestEnemyOf(Myself),WIZARD_INFERNAL_COMBUSTION_ENIGMA)
		Continue()
END


