// I DID NOT MAKE THIS
// Changed Scouter pistol damage to 25.

ACTOR ScouterClass : PlayerPawn
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 75
  PainChance 0
  Player.ColorRange 112, 127
  Player.DisplayName "Scouter"
  Player.CrouchSprite "PLYC"
  player.startitem "ScoutPistol", 1
  player.startitem "ScoutKnife", 1
  player.startitem "RailClip", 25
  player.startitem "JetFuel", 100
  player.startitem "GreenArmor", 1
  Player.ForwardMove 0.85, 0.85
  Player.SideMove 0.85, 0.85
  damagefactor "rocket", 0
  limitedtoteam 1
  States
  {
  Spawn:
    SCP1 A 0
	
    SCP1 A 0
	SCP1 A 35
	SCP1 A 0 A_JumpIf (health>=50, 2)
	SCP1 A 0 ACS_Execute(110,0)
	SCP1 A 0 A_JumpIfInventory("JetFuel", 100, 2)
	SCP1 A 0 ACS_Execute(113,0)
	Loop
	SCP1 A 0 A_JumpIfInventory("RailClip", 25, "Spawn")
	SCP1 A 0 ACS_Execute(113,0)
    Loop
  See:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("Step",1,4)
	SCP1 A 6 A_SpawnItemEx ("FootStep", 0, 0, 0, 0, 0, -1, 0,0, 0)
	SCP1 B 6
	TNT1 A 0 A_GiveInventory("Step",1)
	SCP1 C 6 A_SpawnItemEx ("FootStep", 0, 0, 0, 0, 0, -1, 0,0, 0)
	SCP1 D 6
	TNT1 A 0 A_TakeInventory("Step",1)
	Goto Spawn
  Missile:
    SCP1 E 12
    Goto Spawn
  Melee:
    SCP1 F 6 BRIGHT
    Goto Missile
  Pain:
    SCP1 G 4 
    SCP1 G 4 A_Pain
    Goto Spawn
  Death:
	SCP1 O 0 A_SpawnItemEx("Boom", 0, 0, 32, 0, 0, 0, 0, 0, 0)
	SCP1 O 0 A_Stop
    SCP1 O 5 A_SpawnItemEx ("HumanGibs",0,0,0,0,0,0,0,128)
	SCP1 O 0 A_SkullPop("HeadGib")
    SCP1 P 5 A_XScream
    SCP1 Q 5 A_NoBlocking
    SCP1 RSTUV 5
    SCP1 W -1
    Stop
  XDeath:
	SCP1 O 0 A_SpawnItemEx("Boom", 0, 0, 32, 0, 0, 0, 0, 0, 0)
	SCP1 O 0 A_Stop
    SCP1 O 5 A_SpawnItemEx ("HumanGibs",0,0,0,0,0,0,0,128)
	SCP1 O 0 A_SkullPop("HeadGib")
    SCP1 P 5 A_XScream
    SCP1 Q 5 A_NoBlocking
    SCP1 RSTUV 5
    SCP1 W -1
    Stop
  JetpackHasFired:
	SCP1 A 0 A_JumpIfInventory("JetFuel", 1, 2)
	SCP1 A 0 A_Jump (256, "NoJetpack")
	SCP1 A 0 A_SpawnItemEx("JetpackFire", -24, 0, 24, -2, 0, -1, 0, 128, 0)
	SCP1 A 0 A_SpawnItemEx("JetpackSmoke", -24, 0, 24, -2, 0, 1, 0, 128, 0)
	SCP1 EE 1 BRIGHT
    Goto Jetpack+6
  Jetpack:
	SCP1 A 0 A_JumpIfInventory("JetFuel", 1, 2)
	SCP1 A 0 A_Jump (256, "NoFuel")
	SCP1 A 0 A_GiveInventory("JetpackCheck", 1)
	SCP1 A 0 SetPlayerProperty(0, 1, 3)
	SCP1 A 0 ACS_ExecuteAlways(119,0)
    SCP1 A 0 A_PlaySoundEx("JetpackGo", "Item")
	SCP1 A 0 A_JumpIfInventory("JetFuel", 1, 2)
	SCP1 A 0 A_Jump (256, "NoJetpack")
	SCP1 A 0 A_SpawnItemEx("JetpackFire", -24, 0, 24, -2, 0, -1, 0, 128, 0)
	SCP1 A 0 A_SpawnItemEx("JetpackSmoke", -24, 0, 24, -2, 0, 1, 0, 128, 0)
	SCP1 A 0 A_TakeInventory("JetFuel",1)
	SCP1 EE 1 BRIGHT
    Goto Jetpack+6
  NoJetpack:
	SCP1 A 0 A_TakeInventory("JetpackCheck", 1)
	SCP1 A 0 SetPlayerProperty(0, 0, 3)
	SCP1 A 0 ACS_ExecuteAlways(120,0)
    SCP1 A 1 A_PlaySoundEx("JetpackDie", "SoundSlot7")
	SCP1 A 0 A_SpawnItemEx("JetpackSmoke", -24, 0, 24, -2, 0, 1, 0, 128, 0)
    Goto Spawn
   NoFuel:
	SCP1 A 0 A_PlayWeaponSound("TeleporterNo")
	goto Spawn
  }
}

ACTOR JetpackSmoke : BulletPuff
{
	+CLIENTSIDEONLY 
	Health 1
	RenderStyle Translucent
	Alpha 0
	Scale 0.20
	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 JetpackFire : BulletPuff
{
	+CLIENTSIDEONLY
	Health 1
	RenderStyle Add
	Alpha 0
	Scale 0.10
	Obituary "%o burned to death"
	States
	{
	Spawn:
		NULL A 0
		NULL A 0
		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
		BFIR A 5 Bright A_SetTranslucent(.3,1)
		BFIR A 5 Bright A_SetTranslucent(.6,1)
		BFIR A 1 Bright A_Fadeout(.12)
		Wait
		BFIR B 5 Bright
		BFIR B 5 Bright A_SetTranslucent(.3,1)
		BFIR B 5 Bright A_SetTranslucent(.6,1)
		BFIR B 1 Bright A_Fadeout(.16)
		Wait
		BFIR B 5 Bright
		BFIR C 5 Bright A_SetTranslucent(.3,1)
		BFIR C 5 Bright A_SetTranslucent(.6,1)
		BFIR C 1 Bright A_Fadeout(.20)
		Wait
	}
}

ACTOR JetFuel : Ammo
{
  Game Doom
  Inventory.PickupMessage "FUELZ"
  Inventory.Amount 1
  Inventory.MaxAmount 100
  Ammo.BackpackAmount 1
  Ammo.BackpackMaxAmount 100
  Inventory.Icon "JETPA0"
  States
  {
  Spawn:
    JETP A -1
    Stop
  }
}

ACTOR JetpackCheck : CustomInventory
{
  Game Doom
  +INVENTORY.ALWAYSPICKUP
  Inventory.PickupMessage "You shouldn't see this at all."
  Inventory.PickupSound "misc/p_pkup"
  States
  {
  Spawn:
    TNT1 A 6 BRIGHT
    Loop
  Pickup:
    TNT1 A 0
    Stop
  }
}

ACTOR RailClip : Ammo
{
  Game Doom
  Inventory.PickupMessage "Yes."
  Inventory.Amount 1
  Inventory.MaxAmount 25
  Ammo.BackpackAmount 1
  Ammo.BackpackMaxAmount 25
  Inventory.Icon "CLIPA0"
  States
  {
  Spawn:
    CLIP A -1
    Stop
  }
}


actor ScoutPistol : Weapon
{
  Weapon.SelectionOrder 500
  Weapon.AmmoUse 1
  Weapon.AmmoGive 25
  Weapon.AmmoType "RailClip"
  Weapon.AmmoUse2 0
  Weapon.AmmoGive2 0
  Weapon.AmmoType2 "JetFuel"
  Obituary "%o was railed by %k's pistol."
  Inventory.Pickupmessage "Picked up a Scout's rail-pistol."
  States
  {
  Ready:
    PISG A 1 A_WeaponReady
    Loop
  Deselect:
    PISG A 1 A_Lower
    Loop
  Select:
    PISG A 1 A_Raise
    Loop
  Fire:
    PISG A 4
	PISG B 0 A_PlayWeaponSound("PistolFire")
	TNT1 A 0 A_GunFlash
	PISG B 2 A_RailAttack (25, 0, 1, none, "ff ff a0", 2)
    PISG CEDB 2
	PISG A 20
    PISG A 5 A_ReFire
    Goto Ready
  Flash:
    PISF A 3 Bright A_Light1
    TNT1 A 2 Bright A_Light0
	Stop
  Spawn:
    PIST A -1
    Stop
  }
}


actor ScoutKnife : Weapon
{
  Weapon.SelectionOrder 600
  Weapon.Kickback 100
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  Weapon.AmmoType "JetFuel"
  +WEAPON.MELEEWEAPON
  +WEAPON.NOALERT
  Obituary "%o was cut up by %k's knife."
  Attacksound "KnifeHitThing"
  States
  {
  Ready:
    KNFG A 1 A_WeaponReady
    loop
  Deselect:
    KNFG A 1 A_Lower
    loop
  Select: 
    KNFG A 1 A_Raise
    loop
  Fire:   
	KNFG C 1
	KNFG D 1
	KNFG D 0 A_Playsound ("KnifeMiss")
	KNFG E 1 A_Custompunch(random(25,35),5,5,"KnifePuff",40)
	KNFG F 1 
	KNFG G 1 A_Custompunch(random(25,35),5,5,"KnifePuff",40)
	KNFG H 1
	TNT1 A 1
	KNFG I 0 A_Playsound ("KnifeMiss")
	KNFG I 1 A_Custompunch(random(25,35),5,2,"KnifePuff",40)
	KNFG J 1 
	KNFG K 1 A_Custompunch(random(25,35),5,1,"KnifePuff",40)
	KNFG L 1
	KNFG M 1 A_Custompunch(random(25,35),5,1,"KnifePuff",40)
	KNFG N 1
	TNT1 A 1
	TNT1 A 0 A_Refire
	Goto Ready
  Spawn:
    KNFE A -1
    stop
  }
}

ACTOR KnifePuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  +EXTREMEDEATH
  RenderStyle Translucent
  Alpha 0.6
  AttackSound "KnifeHitWall"
  VSpeed 1
  States
  {
  Spawn:
    PUFF ABCD 4
    Stop
  }
}

ACTOR KnifePuffSilent
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.6
  VSpeed 1
  States
  {
  Spawn:
    PUFF ABCD 4
    Stop
  }
}