ACTOR UnmakerSpawner : CustomInventory  9901
{
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupMessage "What the Fuck is this!?!?!?!?"
  Inventory.PickupSound "WPICK"
  Scale 0.9
  States
  {
  Spawn:
    LGUN A 1
	LGUN A -1
    Stop
  Pickup:
    TNT1 A 1
    TNT1 A 0 A_GiveInventory("Unmaker")
    Stop
  }
}

actor Unmaker : DoomWeapon
{
  //$Category Weapons
  spawnid 84
  game Doom
  scale 0.82
  Weapon.SelectionOrder 2900
  Inventory.PickupMessage "What the Fuck is this?!"
  AttackSound "weapons/unmaker"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "SoulAmmo"
  Weapon.BobStyle "Smooth"
  Inventory.Icon LGUNA0
  States
  {
  Spawn:
		LGUN A -1
		loop
  Ready:
		UNMA A 1 A_WeaponReady
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		PLSG A 0 A_PlaySoundEx ("UNMKLP","WEAPON",1)
		loop
	
  Select:
		TNT1 AAAAA 1 A_Raise
		TNT1 AAAAAAAAAA 0 A_Raise
		Goto SelectAnimation

	SelectAnimation:
		UNMS ABCD 1
		
		Goto Ready
	
	Deselect:
		UNMS DCBA 1
		PLSG A 0 A_StopSoundEx ("WEAPON")
		TNT1 AAAAAAAAAA 0 A_Lower
		TNT1 A 1 A_Lower
		Wait
		
   Fire:
	  UNMA A 1
	  TNT1 A 0 A_ZoomFactor(0.9)
	  TNT1 A 0 A_PlaySound("UNMAKER", 4)
	  UNMA A 0 A_JumpIfInventory ("WeaponPower", 3, "Fire3")
	  UNMA A 0 A_JumpIfInventory ("WeaponPower", 2, "Fire2")
      UNMA A 0 A_JumpIfInventory ("WeaponPower", 1, "Fire1")
      UNMA A 0 A_GunFlash
	 
  Fire0:
	  UNMA A 1
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaser", 0, 1)
	  Goto FireAnimation
  
  Fire1:
	  UNMA A 1
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce", 0, 1)
	  Goto FireAnimation

 Fire2:
	  UNMA A 1
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce",3, 1)
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce", -3, 0, 0)
	  Goto FireAnimation
 
 Fire3:
	  UNMA A 1
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce", 0, 1)
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce", 4, 0, 0)
	  TNT1 A 0 A_FireCustomMissile("UnmakerLaserPierce", -4, 0, 0)
	  Goto FireAnimation
  
  FireAnimation:
	  tnt1 A 0
	  TNT1 A 0 A_ZoomFactor(1.0)
      UNMA B 1 BRIGHT
      UNMA JKLDE 1
	  UNMA A 20
	  Goto Ready
	  
   DoKick:
	    TNT1 A 0
		KICK A 0 A_Takeinventory("Kicking",1)
		TNT1 A 0 A_jumpifinventory("Stamina",20,4)
		TNT1 A 0 A_Print("Not enough stamina!", 1)
		TNT1 A 0 A_PlaySound("Tired", 2)
		Goto Ready
		TNT1 AAA 0
		TNT1 A 0 A_TakeInventory("Stamina", 20)
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		NULL A 0 A_JumpIf (pitch > 32, "LowKickChecker1")
		Goto InitializeNormalKick
		
		LowKickChecker1:
		TNT1 A 0
	    NULL A 0 A_JumpIf (pitch > 90, "InitializeNormalKick")
		RIFF A 0 A_FireCustomMissile("KickAttackDetectDowned", 0, 0, 0, 0)
		
		InitializeNOrmalKick:
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        KICK H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto SelectAnimation
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 5
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK I 1
		KICK GFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto SelectAnimation
	
	AirKick:
	    TNT1 A 0
		TNT1 A 0 A_TakeInventory("Stamina", 20)
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		Goto SelectAnimation
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		Goto SelectAnimation	  
  }
}


ACTOR SoulAmmo : Ammo
{
	Game Doom
	SpawnID 11
	Inventory.PickupMessage "$GOTCLIP"
	Inventory.Amount 3
	Inventory.MaxAmount 30
	Ammo.BackpackAmount 3
	Ammo.BackpackMaxAmount 30
	Inventory.Icon "CLIPA0"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}











actor UnmakerLaser : FastProjectile 9904
{
  game Doom
  radius 2
  height 2
  speed 120
  scale 0.6
  damage 10
  PROJECTILE
  +RANDOMIZE
  +EXTREMEDEATH
  +FORCERADIUSDMG
  DAmagetype "BFG"
  Renderstyle Add
  Alpha 1
  SeeSound "weapons/unmaker"
  DeathSound "Null"
  Obituary "%o was unmade by %k."
  States
  {
  Spawn:
    LAZR A 1 bright
	    TNT1 A 0 A_SpawnItem("SuperGore")
	    TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (3 *momx)/-35.0, -(3 *momy)/-35.0, 2+(3 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (6 *momx)/-35.0, -(6 *momy)/-35.0, 2+(6 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (9*momx)/-35.0, -(9*momy)/-35.0, 2+(9*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (12*momx)/-35.0, -(12*momy)/-35.0, 2+(12*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (15*momx)/-35.0, -(15*momy)/-35.0, 2+(15*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (18*momx)/-35.0, -(18*momy)/-35.0, 2+(18*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (21*momx)/-35.0, -(21*momy)/-35.0, 2+(21*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (24*momx)/-35.0, -(24*momy)/-35.0, 2+(24*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (27*momx)/-35.0, -(27*momy)/-35.0, 2+(27*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (30*momx)/-35.0, -(30*momy)/-35.0, 2+(30*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (33*momx)/-35.0, -(33*momy)/-35.0, 2+(33*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (36*momx)/-35.0, -(36*momy)/-35.0, 2+(36*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		TNT1 A 0 A_SpawnItemEx("UnmakerLaserTrail", (39*momx)/-35.0, -(39*momy)/-35.0, 2+(39*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		lOOP
  Death:
     TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 5, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 5, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleVeryFast", 5, 0, random (0, 360), 2, random (0, 360))
       
    TNT1 A 0 A_Explode(100, 15, 1)
	TNT1 AAAAA 1 A_SpawnItem("RocketFlare")
	 EXPL AAAAA 0 A_CustomMissile ("ExplosionSmokeFast22", 5, 0, random (0, 360), 2, random (0, 360))
    Stop
  }
}

actor UnmakerLaserTrail 9903
{
  game Doom
  height 4
  radius 2
  scale 0.6
  speed 0
  damage 0
  Renderstyle Add
  Alpha 1
  seesound "null"
  deathsound "null"
  PROJECTILE
  +RANDOMIZE
  states
  {
  Spawn:
    LAZR abab 1 bright
    stop
  Death:
    LPUF A 1 bright
    stop
  }
}


Actor UnmakerLaserPierce: UnmakerLaser
{
+RIPPER
Damage 8
}