//Impact Hammer DECORATE

actor TKRWUTImpactHammer : Weapon
{
  obituary "%o was smeared by %k's piston."
  //attacksound "hammer/fire"
  weapon.selectionorder 11
  weapon.kickback 300
  Tag "Impact Hammer"
  inventory.Icon "TK68V0"
  +CHEATNOTWEAPON
  Weapon.BobStyle Alpha
  Weapon.BobSpeed 2.0
  Weapon.BobRangeX 0.0
  Weapon.BobRangeY 0.3   
  states
  {
  Ready:
    201F A 1 A_WeaponReady
    loop
  Deselect:
    201F A 0 A_StopSoundEx("Weapon")
    201F A 0 A_Lower
    201F A 1 A_Lower
    loop
  Select:
    201F A 0 A_PlayWeaponSound("UT/Weapons/hammer/select")
    201F A 0 A_Raise
    201F A 1 A_Raise
    goto Select+1
  Fire:
    201A A 0 A_GunFlash
    201A A 3 A_PlayWeaponSound("UT/Weapons/hammer/start")
    201A BCDEE 3
    201B B 4
    201A E 0 A_Refire
    201A DCBA 2
    goto Ready
  Hold:
    201B A 2 A_PlaySoundEx("UT/Weapons/hammer/loop", "Weapon", 1)
    201B B 2 A_GiveInventory("ImpactPowerCheck")
    201B CDE 2
    201B E 0 A_Refire
    201B E 0 A_StopSoundEx("Weapon")
    201B A 1 A_PlayWeaponSound("UT/Weapons/hammer/fire")
    201C A 0 A_JumpIfInventory("ImpactPowerCheck",12,"FirePower3")
    201C A 0 A_JumpIfInventory("ImpactPowerCheck",8,"FirePower2")
    201C A 0 A_JumpIfInventory("ImpactPowerCheck",4,"FirePower1")
    201C A 2 A_FireBullets (0.0, 0.0, 1, 30, "BulletPuff", 0, 64)
    201C B 2 A_TakeInventory("ImpactPowerCheck",15)
    201C CDEFGH 2
    goto Ready
  FirePower1:
    201C A 2 A_FireBullets (0.0, 0.0, 1, 40, "BulletPuff", 0, 64)
    201C B 2 A_TakeInventory("ImpactPowerCheck",15)
    201C CDEFGH 2
    goto Ready
  FirePower2:
    201C A 2 A_FireBullets (0.0, 0.0, 1, 50, "BulletPuff", 0, 64)
    201C B 2 A_TakeInventory("ImpactPowerCheck",15)
    201C CDEFGH 2
    goto Ready
  FirePower3:
    201C A 2 A_FireBullets (0.0, 0.0, 1, 60, "BulletPuff", 0, 64)
    201C B 2 A_TakeInventory("ImpactPowerCheck",15)
    201C CDEFGH 2
    goto Ready
  AltFire:
    201B A 1 A_PlayWeaponSound("UT/Weapons/hammer/alt")
    201C A 0 A_FireBullets (0.0, 0.0, 1, 5, "BulletPuff", 0, 64)
    201C A 2 A_FireCustomMissile("ImpactReflect",0,0,0,0)
    201C BCDEFGH 2
    201F A 5
    201F A 0 A_ReFire
    goto Ready
Spawn:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("TKRWWarHammer",0,0,0,random(1,2),0,5,random(0,360),SXF_NOCHECKPOSITION,0)
    Stop
  }
}

ACTOR ImpactReflect
{
   Health 5
   Height 35
   Radius 16
   Speed  2
   RENDERSTYLE NONE
   +NOBLOOD
   +SHOOTABLE
   +NOGRAVITY
   +REFLECTIVE
   +NOCLIP
   States
   {
   Spawn: 
      TNT1 A 16
      Stop
   Death: 
      TNT1 A 0
      Stop
   }
}

actor ImpactPowerCheck : Inventory
{
    inventory.amount 0
    inventory.maxamount 15
}
