// Quietus (Hexen)

ACTOR IDMQuietus : FWeapQuietus
{
  Weapon.SelectionOrder 50
  Weapon.Sisterweapon "QuietusLevel2"
  Weapon.AmmoType1 "IDMMana"
  Weapon.AmmoType2 "IDMMana"
  Weapon.AmmoUse1 5
  Weapon.AmmoUse2 0
  Weapon.AmmoGive1 50
  Weapon.AmmoGive2 50
  Weapon.Kickback 100
  Weapon.YAdjust 0
  DamageType "Poison"
  Inventory.PickupMessage "Quietus! (Slot 7)"
  Inventory.PickupSound "misc/w_pkup"
  Inventory.RespawnTics 350
  Obituary "%o was silenced by %k's mighty Quietus."
  Tag "Quietus"
  +WEAPON.BFG
  +WEAPON.NOAUTOAIM
  -WEAPON.ALLOW_WITH_RESPAWN_INVUL
  +WEAPON.NOLMS
  -INVENTORY.NOATTENPICKUPSOUND
  States
  {
  Spawn:
    WFRQ A -1 Bright
    Stop
  Select:
	TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
  Sloop:
    FSRD A 1 Bright A_Raise
    Loop
  Deselect:
    FSRD A 1 Bright A_Lower
    Loop
  Ready:
    FSRD AAABBBCCC 1 Bright A_WeaponReady
    Loop
  Fire:
    FSRD DE 3 Bright Offset(5, 36)
    FSRD F 2 Bright Offset(5, 36)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",20,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",15,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",5,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",0,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-5,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-15,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-20,1)
	TNT1 A 0 A_PlaySound("FighterSwordFire",CHAN_WEAPON)
    FSRD G 3 Bright Offset(5, 36) A_CustomPunch(random(600,1000),true,0,"BulletPuff",128,1) //A_FSwordAttack
    FSRD H 2 Bright Offset(5, 36)
    FSRD I 2 Bright Offset(5, 36)
    FSRD I 10 Bright Offset(5, 150)
    FSRD A 2 Bright Offset(5, 60)
    FSRD B 2 Bright Offset(5, 55)
    FSRD C 1 Bright Offset(5, 50)
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	Goto Fire+4
  }
}

ACTOR QuietusLevel2 : IDMQuietus
{
  Weapon.Sisterweapon "IDMQuietus"
  +POWERED_UP
  States
  {
  Fire:
    FSRD DE 2 Bright Offset(5, 36)
    FSRD F 2 Bright Offset(5, 36)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",20,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",18,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",16,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",14,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",12,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",8,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",6,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",4,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",2,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",0,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-2,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-4,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-6,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-8,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-12,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-14,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-16,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-18,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-20,1)
	TNT1 A 0 A_PlaySound("FighterSwordFire",CHAN_WEAPON)
    FSRD G 2 Bright Offset(5, 36) A_CustomPunch(random(600,1200),true,0,"BulletPuff",128,1) //A_FSwordAttack
    FSRD H 2 Bright Offset(5, 36)
    FSRD I 2 Bright Offset(5, 36)
    FSRD I 4 Bright Offset(5, 150)
    FSRD JK 2 Bright Offset(5, 36)
    FSRD L 2 Bright Offset(5, 36)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad2")
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",20,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",18,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",16,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",14,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",12,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",8,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",6,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",4,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",2,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",0,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-2,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-4,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-6,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-8,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-10,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-12,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-14,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-16,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-18,0)
	TNT1 A 0 A_FireCustomMissile("IDMFSwordMissile",-20,1)
	TNT1 A 0 A_PlaySound("FighterSwordFire",CHAN_WEAPON)
    FSRD M 2 Bright Offset(5, 36) A_CustomPunch(random(600,1200),true,0,"BulletPuff",128,1) //A_FSwordAttack
    FSRD N 2 Bright Offset(5, 36)
    FSRD O 2 Bright Offset(5, 36)
    FSRD O 4 Bright Offset(5, 150)
    FSRD A 1 Bright Offset(5, 60) A_ReFire
    FSRD B 1 Bright Offset(5, 55)
    FSRD C 1 Bright Offset(5, 50)
    FSRD A 1 Bright Offset(5, 45)
    FSRD B 1 Bright Offset(5, 40)
    Goto Ready
  Quad:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	Goto Fire+4
  Quad2:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	Goto Fire+34
  }
}

ACTOR IDMFSwordMissile : FSwordMissile replaces FSwordMissile
{
  Speed 50
  Damage (100 + 25*random(1,8))
  DamageType "Poison"
  +EXTREMEDEATH
  -NOTELEPORT
  DeathSound "FighterSwordExplode"
  Obituary "%o was silenced by %k's mighty Quietus."
  States
  {
  Spawn:
    FSFX ABC 3 Bright
    Loop
  Death:
    TNT1 A 0
    FSFX D 2 Bright A_Explode(128,32,0)
    FSFX D 2 Bright A_Explode(48,32,0)
	TNT1 A 0 A_FSwordFlames
    FSFX E 2 Bright A_Explode(64,64,0)
    FSFX E 2 Bright A_Explode(64,64,0)
    FSFX F 2 Bright A_Explode(80,64,0)
    FSFX F 2 Bright A_Explode(80,64,0)
    FSFX G 2 Bright A_Explode(96,64,0)
    FSFX G 2 Bright A_Explode(96,64,0)
    FSFX H 2 Bright A_Explode(64,48,0)
    FSFX H 2 Bright A_Explode(64,48,0)
    FSFX I 2 Bright A_Explode(48,32,0)
    FSFX I 2 Bright A_Explode(48,32,0)
    FSFX J 4 Bright
    FSFX KLM 3 Bright
    Stop
  }
}

ACTOR IDMFSwordFlame : FSwordFlame replaces FSwordFlame
{
  +CLIENTSIDEONLY
}