IF
	HPLT(Myself, 150)
	GlobalLT("psBaatSummonedCounter", "LOCALS", 3)
	See(NearestEnemyOf(Myself))
Then
	Response #100
		IncrementGlobal("psBaatSummonedCounter", "LOCALS", 1)
		CreateCreatureObject("psBaat01", NearestEnemyOf(Myself), 0, 0, 0)
		CreateCreatureObject("psBaat02", NearestEnemyOf(Myself), 0, 0, 0)
		CreateCreatureObject("psBaat03", NearestEnemyOf(Myself), 0, 0, 0)
		CreateCreatureObject("psBaat04", NearestEnemyOf(Myself), 0, 0, 0)
END

IF
	GlobalLT("psBaatTensers", "LOCALS", 4)
	GlobalTimerExpired("psNoCast", "LOCALS")
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		IncrementGlobal("psBaatTensers", "LOCALS", 1)
		ForceSpell(Myself, WIZARD_TENSERS_TRANSFORMATION)
		SetGlobalTimer("psNoCast", "LOCALS", 90)
END


IF
	GlobalTimerExpired("psNoCast", "LOCALS")
	Global("psBaatComet", "LOCALS", 0)
	See(NearestEnemyOf(Myself))
THEN
	RESPONSE #100
		SetGlobal("psBaatComet", "LOCALS", 1)
		ForceSpell(NearestEnemyOf(Myself), WIZARD_COMET)
END
