// Wraithverge (Hexen)

ACTOR IDMWraithverge : CWeapWraithVerge
{
  Health 100
  Weapon.SelectionOrder 50
  Weapon.Sisterweapon "WraithvergeLevel2"
  Weapon.KickBack 150
  Weapon.AmmoGive 100
  Weapon.AmmoUse 25
  Weapon.AmmoType "IDMMana"
  Weapon.Kickback 100
  Obituary "%o was cleansed by %k's Wraithverge."
  Inventory.PickupMessage "Wraithverge! (Slot 7)"
  Inventory.PickupSound "misc/w_pkup"
  Inventory.RespawnTics 350
  Tag "Wraithverge"
  DamageType "Holy"
  +WEAPON.BFG
  +WEAPON.NOAUTOAIM
  -WEAPON.ALLOW_WITH_RESPAWN_INVUL
  +WEAPON.NOLMS
  -INVENTORY.NOATTENPICKUPSOUND
  States
  {
  Spawn:
    WCHS A -1 Bright
    Stop
  Ready:
    CHLY A 1 A_WeaponReady
    Loop
  Select:
	TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
  Sloop:
    CHLY A 1 A_Raise
    Loop
  Deselect:
    CHLY A 1 A_Lower
    Loop
  Fire:
	CHLY AB 1 Bright Offset (0, 40)
	CHLY CD 2 Bright Offset (0, 43)
	CHLY E 2 Bright Offset (0, 45)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	CHLY F 6 Bright Offset (0, 48) A_CHolyAttack
	CHLY GG 2 Bright Offset (0, 40) A_CHolyPalette
	CHLY G 2 Offset (0, 36) A_CHolyPalette
	TNT1 A 0 A_Refire
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	Goto Fire+6
  }
}

ACTOR WraithvergeLevel2 : IDMWraithverge
{
  Weapon.Sisterweapon "IDMWraithverge"
  +POWERED_UP
  States
  {
  Fire:
	CHLY AB 2 Bright Offset (0, 40)
	CHLY CD 2 Bright Offset (0, 43)
	CHLY E 2 Bright Offset (0, 45)
	TNT1 A 0 A_FireCustomMissile("IDMHolyMissile",-30,0)
	TNT1 A 0 A_FireCustomMissile("IDMHolyMissile",30,0)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	CHLY F 3 Bright Offset (0, 48) A_CHolyAttack
	CHLY GG 2 Bright Offset (0, 48) A_CHolyPalette
	CHLY G 3 Offset (0, 52) A_CHolyPalette
	CHLY A 25 Offset (0, 52)
	CHLY A 2 Offset (0, 51)
	CHLY A 2 Offset (0, 49)
	CHLY A 2 Offset (0, 48)
	CHLY A 2 Offset (0, 46)
	CHLY A 2 Offset (0, 45)
	CHLY A 2 Offset (0, 43)
	CHLY A 2 Offset (0, 42)
	CHLY A 2 Offset (0, 40)
	CHLY A 2 Offset (0, 39)
	CHLY A 2 Offset (0, 37)
	CHLY A 2 Offset (0, 36)
	CHLY A 2 Offset (0, 35)
	CHLY A 2 Offset (0, 35)
	TNT1 A 0 A_Refire
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	Goto Fire+8
  }
}

// Wraithverge Missile & Holy Spirits

ACTOR IDMHolyMissile : Holymissile replaces Holymissile
{
	Game Doom
	DamageType "Holy"
	Obituary "%o was cleansed by %k's Wraithverge."
	+SKYEXPLODE
	-NOTELEPORT
	States
	{
	Spawn:
		SPIR P 3 Bright
		SPIR P 6 Bright A_SpawnItemEx("IDMHolyMissilePuff")
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,-67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		SPIR P 6 Bright A_SpawnItemEx("IDMHolyMissilePuff")
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,-67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		SPIR P 6 Bright A_SpawnItemEx("IDMHolyMissilePuff")
	Death:
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,-67.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 1 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		Stop
	XDeath:
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,67.5,CMF_TRACKOWNER)
		SPIR P 1 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 1 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 1 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		SPIR P 0 Bright A_CustomMissile("IDMHolySpirit",0,0,112.5,CMF_TRACKOWNER)
		SPIR P 1 Bright A_CustomMissile("IDMHolySpirit",0,0,-112.5,CMF_TRACKOWNER)
		Stop
	}
}

ACTOR IDMHolyMissilePuff : HolyMissilePuff
{
	+CLIENTSIDEONLY
}

ACTOR IDMHolySpirit : Holyspirit replaces Holyspirit
{
  Health 105
  Speed 18
  Radius 10
  Height 6
  Damage 3
  Projectile
  +RIPPER
  +SEEKERMISSILE
  +SKYEXPLODE
  -NOTELEPORT
  +NOEXPLODEFLOOR
  +CANBLAST
  +EXTREMEDEATH
  RenderStyle Translucent
  Alpha 0.4
  DeathSound "SpiritDie"
  Obituary "%o was cleansed by %k's Wraithverge."
  DamageType "Holy"
  States
  {
  Spawn:
    SPIR A 1 A_CHolyCheckScream
	SPIR A 1 A_CHolyCheckScream
	SPIR A 1 A_CHolyCheckScream
	SPIR B 1 A_CHolyCheckScream
	SPIR B 1 A_CHolyCheckScream
	SPIR B 1 A_CHolyCheckScream
    Loop
  Death:
    SPIR D 4
    SPIR E 4 A_Scream
    SPIR FGHI 4
    Stop
  }
}

DamageType Holy
{
	NoArmor
	Factor 1.0
}