actor Cyborg : PlayerPawn
{
Health 100
Radius 16
Height 56
+NOICEDEATH
limitedtoteam 0
mass 500
bloodtype "BulletPuff"
scale 0.92
PainChance 256
player.forwardmove 0.8
player.sidemove 0.8
player.soundclass "cyborg"
player.viewheight 48
Player.ColorRange 80, 111
damagefactor "Creepstun", 3.2
+NOSKIN
Player.DisplayName "cyborg"
Player.StartItem "CyborgPlasma"
Player.StartItem "CyborgCharge", 100
States
{
Spawn:
ROB1 D 0 SetPlayerProperty(0, 0, 3)
ROB1 D 0 ACS_Execute(984,0)
ROB1 D 15
ROB1 D 0 A_JumpIf (z-floorz>0, "Spawn")
ROB1 D 0 A_JumpIfInventory("CyborgCharge", 100, "Spawn")
ROB1 D 0 ACS_ExecuteAlways(996,0)
ROB1 D 0 //A_PlaySoundEx("weapons/cyborgcharge", "Body")
ROB1 D 0 A_GiveInventory("CyborgCharge",5)
Loop
ROB1 D 1
Loop
See:
ROB1 A 0 SetPlayerProperty(0, 0, 3)
ROB1 A 0 ACS_Execute(984,0)
ROB1 EEBB 3
ROB1 B 0 A_SpawnItemEx ("CyborgStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
ROB1 CCDD 3
ROB1 B 0 A_SpawnItemEx ("CyborgStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
Goto Spawn+8
Missile:
ROB1 G 8
Goto Spawn
Pain:
ROB1 H 4 A_Pain
Goto Spawn
Pain.Creepstun:
ROB1 H 0 A_Pain
ROB1 H 18 ACS_ExecuteAlways(986,0)
Goto Spawn
Death:
ROB1 A 0 SetPlayerProperty(0, 0, 3)
ROB1 J 6
ROB1 K 6 A_PlayerScream
ROB1 L 5
ROB1 M 5 A_NoBlocking
ROB1 NOP 5
ROB1 Q 6
ROB1 R -1
Stop
Death.Creeper:
ROB1 A 0 SetPlayerProperty(0, 0, 3)
ROB1 A 0 A_PlaySoundEx("creeperattack", "Body")
ROB1 A 0 ACS_ExecuteAlways(997,0)
ROB1 A 0 A_GiveToTarget("Creeperheal",1)
ROB1 J 6
ROB1 K 6 A_PlayerScream
ROB1 L 5
ROB1 M 5 A_NoBlocking
ROB1 NOP 5
ROB1 Q 6
ROB1 R -1
Stop
Death.Jitter:
ROB1 H 1 A_PlaySound("weapons/grenadeexplode")
NULL A 0 A_NoBlocking 
// Unleash The Gibs!
NULL A 0 A_SkullPop("Custom_BloodySkull3")
NULL A 0 A_SpawnItemEx("CYBGIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
NULL A 1 A_SpawnItemEx("GrenadeExplosion", 0, 0, 0, 0, 0, 0, 0, 160, 0)
NULL A -1
Stop
}
}

actor CyborgPlasma : Weapon
{
Weapon.SelectionOrder 100
Weapon.AmmoUse 1
Weapon.AmmoUse2 2
Weapon.AmmoGive 50
Weapon.AmmoType "Cyborgcharge"
Inventory.PickupMessage "You got the cyborg's arm!.. somehow?"
Obituary "%o was devastated by %k's plasma." 
+INVENTORY.UNDROPPABLE
+AMMO_OPTIONAL
+WEAPON.NOAUTOAIM
+WEAPON.ALT_AMMO_OPTIONAL
+DONTBLAST
scale 0.6
States
{
Spawn:
TNT1 A 1
stop
Ready:
SABS A 1 A_WeaponReady
Loop
Select:
SABS A 1 A_Raise
Loop
Deselect:
SABS A 1 A_Lower
Loop
Fire:
SABS A 0 A_JumpIfInventory("CyborgCharge", 1, 2)
SABS A 18 A_PlaySound("weapons/cyborgfail")
Goto Ready
SABA A 2 
SABA B 2 A_FireCustomMissile("CyborgPlasmaBall", 0, 1, 11 ,3 )
SABA C 1
SABA D 1 A_Refire
SABS A 1 
Goto Ready
Altfire:
SABS A 1 A_JumpIfInventory("CyborgCharge", 2, 2)
SABS A 18 A_PlaySound("weapons/cyborgfail")
Goto Ready
SABS A 0 SetPlayerProperty(0, 1, 3)
SABS A 0 A_SpawnItemEx("Firey", -32, 0, 28, 0, 0, -1, 0, 128, 0) 
SABS A 0 A_SpawnItemEx("SmokeLarge", -32, 28, 0, 0, 0, 0, 0, 128, 0) 
SABS A 3 A_TakeInventory("CyborgCharge",2)
SABS A 0 A_JumpIfNoAmmo(2) 
SABS A 0 A_Refire
SABS A 0 SetPlayerProperty(0, 0, 3)
Goto Ready
}
}

ACTOR CyborgCharge : Ammo
{
+INVENTORY.IGNORESKILL
  Inventory.PickupMessage "Cell charge!"
  Inventory.Amount 100
  Inventory.MaxAmount 100
  Ammo.BackpackAmount 100
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "CELLA0"
  States
  {
  Spawn:
    CELL A -1
    Stop
  }
}


actor CyborgPlasmaBall
{
scale 0.8
renderstyle add
alpha 0.95
PROJECTILE
decal "plasmadecal"
speed 36
radius 10
height 5
Damage 6
seesound "weapons/cyborgplasmafire"
deathsound "weapons/cyborgplasmahit"
States
{
Spawn:
SBLL ABCDEFGHIJ 1 bright
Loop
Death:
SBLL KLMNOPQRSTU 1 bright A_FadeOut(0.04)
Stop
}
}

ACTOR SmokeLarge : BulletPuff
{
+CLIENTSIDEONLY 
	Health		1
	RenderStyle Translucent
	Alpha		0
	Scale		.3
	States
	{
	Spawn:
		NULL A 0
		Goto See
	See:
		NULL A 0 A_Jump(192,1)
		Goto See+7
		NULL A 0
		NULL A 0 A_Jump(128,1)
		Goto See+11
		NULL A 0
		NULL A 0 A_Jump(64,1)
		Goto See+15
		NULL A 0
		NULL A 0
		Goto See+19
		//-----------------------
		SMOK A 12 A_SetTranslucent(.15,0)
		SMOK A 12 A_SetTranslucent(.35,0)
		SMOK A 12 A_SetTranslucent(.5,0)
		SMOK A 1 A_Fadeout(.02)
		Wait
		SMOK B 12 A_SetTranslucent(.15,0)
		SMOK B 12 A_SetTranslucent(.35,0)
		SMOK B 12 A_SetTranslucent(.5,0)
		SMOK B 1 A_Fadeout(.025)
		Wait
		SMOK C 12 A_SetTranslucent(.15,0)
		SMOK C 12 A_SetTranslucent(.35,0)
		SMOK C 12 A_SetTranslucent(.5,0)
		SMOK C 1 A_Fadeout(.03)
		Wait
		SMOK D 12 A_SetTranslucent(.15,0)
		SMOK D 12 A_SetTranslucent(.35,0)
		SMOK D 12 A_SetTranslucent(.5,0)
		SMOK D 1 A_Fadeout(.035)
		Wait
	}
}

ACTOR Firey : BulletPuff
{
+CLIENTSIDEONLY
	Health		1
	RenderStyle Add
	Alpha		0
	Scale		.17
	Obituary "%o burned to death"
	States
	{
	Spawn:
		NULL A 0
		NULL A 0 A_PlaySound("weapons/cyborgjetpack")
		Goto See
	See:
		NULL A 0 A_Jump(170,1)
		Goto See+7
		NULL A 0
		NULL A 0 A_Jump(85,1)
		Goto See+11
		NULL A 0
		NULL A 0
		Goto See+15
		//-----------------------
		BFIR B 5 Bright //A_PlaySound("Barrel/Fire")
		BFIR A 5 Bright A_SetTranslucent(.4,1)
		BFIR A 5 Bright A_SetTranslucent(.8,1)
		BFIR A 1 Bright A_Fadeout(.06)
		Wait
		BFIR B 5 Bright //A_PlaySound("Barrel/Fire")
		BFIR B 5 Bright A_SetTranslucent(.4,1)
		BFIR B 5 Bright A_SetTranslucent(.8,1)
		BFIR B 1 Bright A_Fadeout(.08)
		Wait
		BFIR B 5 Bright //A_PlaySound("Barrel/Fire")
		BFIR C 5 Bright A_SetTranslucent(.4,1)
		BFIR C 5 Bright A_SetTranslucent(.8,1)
		BFIR C 1 Bright A_Fadeout(.10)
		Wait
	}
}
