
// Loremaster (aka Priest) --------------------------------------------------

ACTOR Loremaster 12
{	
	Game Strife
	ConversationID 66, 63, 64
	Health 800	
	Speed 10
	Radius 15	
	Height 56
	FloatSpeed 5
	Monster
	+FLOAT
	+NOBLOOD
	+NOGRAVITY
	+NOTDMATCH
	+FLOORCLIP
	+NOBLOCKMONST
	+INCOMBAT
	+LOOKALLAROUND
	+NOICEDEATH
	DamageFactor "Fire", 0.5
	MinMissileChance 150
	Tag "PRIEST"
	SeeSound "loremaster/sight"
	AttackSound "loremaster/attack"
	PainSound "loremaster/pain"
	DeathSound "loremaster/death"
	ActiveSound "loremaster/active"
	Obituary "$OB_LOREMASTER"
	DropItem "Junk"
	states
	{
	Spawn:
		PRST A 10 A_Look
		PRST B 10 A_SentinelBob
		Loop
	See:
		PRST A 4 A_Chase
		PRST A 4 A_SentinelBob
		PRST B 4 A_Chase
		PRST B 4 A_SentinelBob
		PRST C 4 A_Chase
		PRST C 4 A_SentinelBob
		PRST D 4 A_Chase
		PRST D 4 A_SentinelBob
		Loop
	Melee:
		PRST E 4 A_FaceTarget
		PRST F 4 A_CustomMeleeAttack((random[SpectreMelee](0,255)&9)*5)
		PRST E 4 A_SentinelBob
		Goto See
	Missile:
		PRST E 4 A_FaceTarget
		PRST F 4 A_CustomMissile("LoreShot", 32, 0)
		PRST E 4 A_SentinelBob
		Goto See
	Death:
		PDED A 6
		PDED B 6 A_Scream
		PDED C 6
		PDED D 6 A_Fall
		PDED E 6
		PDED FGHIJIJIJKL 5
		PDED MNOP 4
		PDED Q 4 A_SpawnItemEx("AlienSpectre5", 0, 0, 0, 0, 0, random[spectrespawn](0,255)*0.0078125, 0, SXF_NOCHECKPOSITION)
		PDED RS 4
		PDED T -1
		Stop
	}
}


// Loremaster Projectile ----------------------------------------------------

ACTOR LoreShot native
{
	ConversationID 97,-1,-1
	Speed 20
	Height 14
	Radius 10
	Projectile
	+STRIFEDAMAGE
	Damage 2
	MaxStepHeight 4
	SeeSound "loremaster/chain"
	ActiveSound "loremaster/swish"

	action native A_LoremasterChain ();

	States
	{
	Spawn:
		OCLW A 2 A_LoremasterChain
		Loop
	Death:
		OCLW A 6
		Stop
	}
}

// Loremaster Subprojectile -------------------------------------------------

ACTOR LoreShot2
{
	ConversationID 98,-1,-1
	+NOBLOCKMAP
	+NOGRAVITY
	States
	{
	Spawn:
		TEND A 20
		Stop
	}
}

