ACTOR CyborgCyberNanoedge : doomWeapon
{
  Weapon.SelectionOrder 3700
  Weapon.KickBack 100
  Obituary "Combat Initiated"
  Tag "IMC Experimental-Nanoedge Chainsaw"
  	Weapon.BobRangeX 0.2
	Weapon.BobRangeY 0.2
	Weapon.slotnumber 1
	Weapon.AmmoUse 0
    Weapon.AmmoType "Cyborgcells"
	Weapon.Ammotype2 "HEALINGTOKEN"
  +WEAPON.MELEEWEAPON
  Inventory.RestrictedTo "CyborgClass"
  States
  {
  Ready:
    KSAW A 1 A_WeaponReady(WRF_ALLOWRELOAD)
    Loop
  Deselect:
   KSAW AA 1 A_Lower
	KSAW A 0 A_Lower
    Loop
  Select:
   KSAW AA 1 A_Raise
	KSAW A 0 A_Raise
    Loop
  Fire:
  TNT1 A 0 A_PLAYWEAPONSOUND("CYBSAWON")
   KSAW A 1 OFFSET(0,32)
   KSAW A 1 OFFSET(0,35)
   KSAW A 1 OFFSET(0,37)
   KSAW A 1 OFFSET(0,39)
   KSAW A 1 OFFSET(0,42)
   KSAW A 1 OFFSET(0,48)
   TNT1 A 0 A_PLAYWEAPONSOUND("CYBLOOP")
   KSAW B 4 OFFSET(18,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
   KSAW C 4 OFFSET(10,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
   KSAW B 4 OFFSET(4,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
   KSAW C 4 OFFSET(2,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
   KSAW B 4 OFFSET(0,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
   KSAW C 4 OFFSET(-2,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
    KSAW B 4 OFFSET(-4,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
	KSAW C 4 OFFSET(-10,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
	KSAW B 4 OFFSET(-18,32) A_FIRECUSTOMMISSILE("FISTProjectile_PIO1")
	KSAW A 1 OFFSET(0,48) A_PLAYWEAPONSOUND("CYBSTOP")
	KSAW A 1 OFFSET(0,39)
	KSAW A 1 OFFSET(0,35)
	KSAW A 10 OFFSET(0,32)
    Goto Ready
	  ALTFire:
	  TNT1 A 0 A_JUMPIFINVENTORY("HEALINGTOKEN",5,"ALTFIRE2")
	  KSAW A 1
    goto Ready
	ALTFIRE2:
      CFST A 1 OFFSET(0,32) A_PLAYWEAPONSOUND("fistswng")
   CFST B 2 OFFSET(2,38)
   CFST B 2 OFFSET(0,32)
   CFST C 2 OFFSET(2,34)
   CFST C 2 OFFSET(0,32)
   CFST D 2 OFFSET(1,34) A_FIRECUSTOMMISSILE("cybermedproj")
   CFST D 2 OFFSET(0,32)
   CFST D 1 OFFSET(1,34)
   CFST C 1 OFFSET(2,34)
   CFST B 1 OFFSET(0,32)
   CFST B 1 OFFSET(2,38)
   CFST A 1 OFFSET(0,32)
	TNT1 A 0 A_TAKEINVENTORY("HEALINGTOKEN", 5)
   GOTO READY
   	  Reload:
	  TNT1 A 0 A_JUMPIFINVENTORY("HEALINGTOKEN",10,"Reload2")
	  KSAW A 1
    goto Ready
	Reload2:
      CFST A 1 OFFSET(0,32) A_PLAYWEAPONSOUND("fistswng")
   CFST B 2 OFFSET(2,38)
   CFST B 2 OFFSET(0,32)
   CFST C 2 OFFSET(2,34)
   CFST C 2 OFFSET(0,32)
   CFST D 2 OFFSET(1,34) A_FIRECUSTOMMISSILE("cybermedsuperproj")
   CFST D 2 OFFSET(0,32)
   CFST D 1 OFFSET(1,34)
   CFST C 1 OFFSET(2,34)
   CFST B 1 OFFSET(0,32)
   CFST B 1 OFFSET(2,38)
   CFST A 1 OFFSET(0,32)
	TNT1 A 0 A_TAKEINVENTORY("HEALINGTOKEN", 10)
   GOTO READY
  }
}


Actor CYBERMEDPROJ
{
  Radius 8
  Height 8
  Speed 25
  Damage 1
  Gravity 1
  Projectile
  -NoGravity
  DamageType Fire
  Obituary  "%o somehow died from %k's health kit."
  States
  {
  Spawn:
    HLPS A 3 Bright
    Goto death
  Death:
   tnt1 a 1 a_spawnitemex("CyborgStim")
    stop
  }
}

Actor CYBERMEDSUPERPROJ
{
  Radius 8
  Height 8
  Speed 25
  Damage 5
  Gravity 1
  Projectile
  -NoGravity
  DamageType Fire
  Obituary  "%o recieved too much health from %k's health kit."
  States
  {
  Spawn:
    HLPS A 3 Bright
    Goto death
  Death:
   tnt1 a 1 a_spawnitemex("CyborgSuperStim")
    stop
  }
}

actor CyborgStim : CustomInventory
{
	+ALWAYSPICKUP
	-COUNTITEM
	Inventory.PickupSound "characters/DevilMarine/BloodItemsPickUp"
	Inventory.Pickupmessage "Picked up the Cyborg Enhancement Stim! +15 HP, Damage Boost, Resistance Boost, and Speed Boost!"
	Scale 0.75
	States
	{
	Spawn:
		HLPS A 8 
		TNT1 A 0 A_SpawnItemEX("BYOCGlobalHealthParticleSmall", random(-7, 7), random(-7, 7), random(2, 10))
		Loop
	Pickup:
		TNT1 A 0 ACS_NamedExecuteWithResult("GiveHealthWithItem",15,0)
		TNT1 A 0 A_GiveInventory("CyborgStimDamageBoost",1)
		TNT1 A 0 A_GiveInventory("CyborgStimDefenseBoost",1)
		TNT1 A 0 A_GiveInventory("CyborgStimSpeedBoost",1)
		TNT1 A 0 A_Print("Supercharged!", 2)
		Goto CheckPickup
	CheckPickup:
		TNT1 A 0 A_JumpIfInventory("PickedUp", 0, "PickedUp")
		Fail
	PickedUp:
		TNT1 A 0 A_GiveInventory("PickupBlend", 1)
		TNT1 A 0 
		stop
	}
}

actor CyborgSuperStim : CustomInventory
{
	+INVENTORY.ALWAYSPICKUP
	-COUNTITEM
	Inventory.PickupSound "characters/DevilMarine/BloodItemsPickUp"
	Inventory.Pickupmessage "Picked up the Cyborg Enhancement Super Stim! +35 HP, Enhanced Damage Boost, Enhanced Resistance Boost, and Enhanced Speed Boost!"
	Scale 1
	States
	{
	Spawn:
		HLPS A 8 
		TNT1 A 0 A_SpawnItemEX("BYOCGlobalHealthParticleSmall", random(-7, 7), random(-7, 7), random(2, 10))
		Loop
	Pickup:
		TNT1 A 0 ACS_NamedExecuteWithResult("GiveHealthWithItem",35,0)
		TNT1 A 0 A_GiveInventory("CyborgDamageBoost",1)
		TNT1 A 0 A_GiveInventory("CyborgDefenseBoost",1)
		TNT1 A 0 A_GiveInventory("CyborgSpeedBoost",1)
		TNT1 A 0 A_Print("You're powered up!", 2)
		Goto CheckPickup
	CheckPickup:
		TNT1 A 0 A_JumpIfInventory("PickedUp", 0, "PickedUp")
		Fail
	PickedUp:
		TNT1 A 0 A_GiveInventory("PickupBlend", 1)
		TNT1 A 0 
		stop
	}
}


// --- Stim Tier ---
actor CyborgStimDamageBoost : PowerupGiver
{
	Inventory.MaxAmount 1
	Inventory.InterHubAmount 0
	Inventory.Icon ""
	+Inventory.AUTOACTIVATE
	+Inventory.ALWAYSPICKUP
	+Inventory.UNTOSSABLE
	Powerup.Type "CyborgStimDamagePower"
	DamageFactor "Normal", 2
	Powerup.Color Cyan 0.1
	Powerup.Duration 1050
}

actor CyborgStimDefenseBoost : PowerupGiver
{
	Inventory.MaxAmount 1
	Inventory.InterHubAmount 0
	Inventory.Icon ""
	+Inventory.AUTOACTIVATE
	+Inventory.ALWAYSPICKUP
	+Inventory.UNTOSSABLE
	Powerup.Type "CyborgStimDefensePower"
	DamageFactor "Normal", 0.75
	Powerup.Duration 1050
}

actor CyborgStimSpeedBoost : PowerupGiver
{
	Inventory.MaxAmount 1
	Inventory.InterHubAmount 0
	Inventory.Icon ""
	+Inventory.AUTOACTIVATE
	+Inventory.ALWAYSPICKUP
	+Inventory.UNTOSSABLE
	Powerup.Type "CyborgStimSpeedPower"
	Powerup.Duration 1050
	Speed 1.25
}