// Fire Mace (Heretic)

ACTOR IDMMace : Mace
{
  Weapon.SelectionOrder 50
  Weapon.AmmoUse 1
  Weapon.AmmoGive1 150
  Weapon.YAdjust 15
  Weapon.AmmoType "IDMMaceAmmo"
  Weapon.SisterWeapon "IDMMacePowered"
  Inventory.PickupMessage "Fire Mace! (Slot 7)"
  Inventory.RespawnTics 350
  Tag "Fire Mace"
  -WEAPON.ALLOW_WITH_RESPAWN_INVUL
  +WEAPON.NOLMS
  +WEAPON.NOAUTOAIM
  +WEAPON.BFG
  States
  {
  Spawn:
    WMCE A -1 Bright
    Stop
  Deselect:
    MACE A 1 A_Lower
    Loop
  Select:
	TNT1 A 0 A_PlaySound("weapons/macepkup",CHAN_WEAPON)
  Sloop:
    MACE A 1 A_Raise
    Loop
  Fire:
    MACE B 4
  Hold:
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadHold")
	TNT1 A 0 A_FireMacePL1
    MACE C 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
	TNT1 A 0 A_FireMacePL1
    MACE D 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
	TNT1 A 0 A_FireMacePL1
    MACE E 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
	TNT1 A 0 A_FireMacePL1
    MACE F 3 Bright A_FireMacePL1
    MACE C 4 Bright A_ReFire
    MACE DEFB 4 Bright
    Goto Ready
  QuadHold:
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_5,1)
	TNT1 A 0 A_FireMacePL1
    MACE C 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_5,1)
	TNT1 A 0 A_FireMacePL1
    MACE D 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_5,1)
	TNT1 A 0 A_FireMacePL1
    MACE E 3 Bright A_FireMacePL1
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
    TNT1 A 0 A_Playsound("misc/qdmg2",CHAN_5,1)
	TNT1 A 0 A_FireMacePL1
    MACE F 3 Bright A_FireMacePL1
	Goto Hold+13
  }
}

ACTOR IDMMacePowered : MacePowered
{
  +WEAPON.POWERED_UP
  Weapon.AmmoUse 3
  Weapon.AmmoGive 0
  Weapon.AmmoType "IDMMaceAmmo"
  Weapon.SisterWeapon "IDMMace"
  Tag "Fire Mace"
  States
  {
  Select:
	TNT1 A 0 A_PlaySound("weapons/macepkup",CHAN_WEAPON)
  Sloop:
    MACE A 1 A_Raise
    Loop
  Fire:
  Hold:
    MACE BC 2 Bright
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_WEAPON)
	TNT1 A 0 A_PlaySound("weapons/macepow",CHAN_7)
	TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadHold")
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
    MACE D 2 Bright A_FireCustomMissile("IDMMaceFX4",random(-25,25),1)
    MACE EFB 2 Bright
    MACE A 8 A_ReFire
    Goto Ready
  QuadHold:
    TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
	TNT1 A 0 A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),0)
    MACE D 2 Bright A_FireCustomMissile("IDMMaceFX4",frandom(-25,25),1)
	Goto Hold+8
	
  }
}

// Fire Mace Steel Balls

ACTOR IDMMaceFX1 : MaceFX1 replaces MaceFX1
{
  Speed 40
  Damage 40
  Projectile
  ProjectileKickback 400
  Gravity 0.25
  +THRUGHOST
  +SKYEXPLODE
  -NOTELEPORT
  -BOUNCEONWALLS
  +EXTREMEDEATH
  +NOGRAVITY
  +RIPPER
  BounceType "Classic"
  BounceCount 2
  BounceSound "weapons/macebounce"
  Deathsound "weapons/macehit"
  SeeSound "weapons/maceshoot"
  DamageType "Mace"
  Obituary "%o was bounced by %k's Fire Mace."
  States
  {
  Spawn:
	FX02 BA 4
	TNT1 A 0 A_ChangeFlag(NOGRAVITY,false)
  SpawnLoop:
	FX02 BA 4
    Loop
  Death:
	TNT1 A 0
	SGRN A 0 A_ScaleVelocity(0)
	SGRN A 0 A_ChangeFlag(NOGRAVITY,true)
	MISL B 0 A_Scream
    FX02 F 4 Bright
    FX02 GHIJ 4 Bright
    Stop
  }
}

ACTOR IDMMaceFX2 : MaceFX2 replaces MaceFX2
{
  Speed 25
  Damage 120
  Gravity 0.25
  DamageType "Mace"
  ProjectileKickback 400
  -NOGRAVITY
  +SKYEXPLODE
  -NOTELEPORT
  +EXTREMEDEATH
  +RIPPER
  SeeSound ""
}

ACTOR IDMMaceFX3 : MaceFX3 replaces MaceFX3
{
  Speed 18
  Damage 80
  DamageType "Mace"
  ProjectileKickback 400
  -NOGRAVITY
  +SKYEXPLODE
  -NOTELEPORT
  +EXTREMEDEATH
  +RIPPER
  Gravity 0.25
}

ACTOR IDMMaceFX4 : MaceFX4 replaces MaceFX4
{
  Speed 14
  Damage 180
  DamageType "Mace"
  Gravity 0.6
  Projectile
  ProjectileKickback 800
  -NOGRAVITY
  +EXTREMEDEATH
  +TELESTOMP
  +THRUGHOST
  +SKYEXPLODE
  -NOTELEPORT
  SeeSound "weapons/maceshoot"
  Obituary "%o was bounced by %k's firemace."
}