Actor IsCrashClass  : ClassToken {}

Actor CrashClass : Playerpawn
{
 Speed 1
  Radius 16
  Height 56
  Mass 100
  PainChance 255
  Health 100
  Player.MaxHealth 100
	Player.DisplayName "Crash"
	Player.StartItem "CrashPistol"
	Player.StartItem "CrashKick"
	Player.StartItem "Clip", 50
	Player.StartItem "IsCrashClass", 1
    Player.StartItem "IsPlayer", 1
	Player.StartItem "DefaultHud", 1
	Player.StartItem "DefaultAmmo", 1
	Player.StartItem "DefaultMisc", 1
	Player.SoundClass "Selene"
	Player.WeaponSlot 1, CrashKick, CrashRepairTool
	Player.WeaponSlot 2, CrashPistol
	Player.WeaponSlot 3, CrashShotgun, CrashSuperShotgun
	Player.WeaponSlot 4, CrashGatlingGun
	Player.WeaponSlot 5, CrashRLauncher
	Player.WeaponSlot 6, CrashPlasmaRifle
	Player.WeaponSlot 7, CrashBFG9000
	  Player.ColorRange 112, 127
	  Species "Player"
	    Player.ScoreIcon "CrshIcon"
	States
	{
	Spawn:
		SELN A 0
		Goto RealSpawn
	RealSpawn:
		CRS1 A 1
		Loop
	See:
		CRS1 ABCD 4
		Loop
	Missile:
		CRS1 E 12
		Goto Spawn
	Melee:
		CRS1 F 6 Bright
		Goto Missile
	Pain:
		CRS1 G 4
		CRS1 G 4 A_Pain
		Goto Spawn
	Death:
		CRS1 H 10 
		CRS1 I 10 A_PlayerScream
		CRS1 J 10 A_NoBlocking
		CRS1 KLM 10
		CRS1 N -1
		Stop
	XDeath:
        CRS1 O 5
		CRS1 P 5 A_XScream
		CRS1 Q 5 A_NoBlocking
		CRS1 RSTUV 5
		CRS1 W -1
		Stop
	}
}

actor ShieldPart
{
  Radius 8
  Height 8
  Scale 0.5
  RenderStyle None
  Alpha 0.25
  Bloodtype "ShieldHit"
  Species "Player"
  +Friendly
  +SHOOTABLE
  +NOGRAVITY
  +NOTELEPORT
  +NODAMAGE
  +DONTRIP
  +NOBLOODDECALS
  +FLOORCLIP
  //+REFLECTIVE
  +GHOST	//Give projectiles that you wish to pass through the shield THRUGHOST flag
  States
  {
  Spawn:
    HEXA A 2 bright
    stop
  Death:
    TNT1 A 2
    stop
  }
}

actor ShieldPartVisual
{
  Radius 8
  Height 8
  Scale 0.5
  RenderStyle Add	//Fuzzy looks great in software mode
  Alpha 0.25
  +NOINTERACTION
  +CLIENTSIDEONLY
  +FLOORCLIP
  States
  {
  Spawn:
    HEXA A 2 bright
    stop
  Death:
    TNT1 A 2
    stop
  }
}

actor ShieldSpawner
{
  Radius 1
  Height 1
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner4up", 0, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner5up", 24, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner5up", -24, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner4up", 48, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner4up", -48, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner3up", 72, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner3up", -72, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner2up", 96, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldSpawner2up", -96, 0, 0, 0, 0, 0, 0, 32)
    stop
  }
}

actor ShieldSpawner5up
{
  Radius 1
  Height 1
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 16, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 32, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 48, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 64, 0, 0, 0, 0, 32)
    //TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 0, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 16, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 32, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 48, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 64, 0, 0, 0, 0, 32)
    stop
  }
}

actor ShieldSpawner4up
{
  Radius 1
  Height 1
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 8, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 24, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 40, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 56, 0, 0, 0, 0, 32)
    //TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 8, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 24, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 40, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 56, 0, 0, 0, 0, 32)
    stop
  }
}

actor ShieldSpawner3up
{
  Radius 1
  Height 1
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 16, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 32, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 48, 0, 0, 0, 0, 32)
    //TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 16, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 32, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 48, 0, 0, 0, 0, 32)
    stop
  }
}


actor ShieldSpawner2up
{
  Radius 1
  Height 1
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 24, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPart", 0, 0, 40, 0, 0, 0, 0, 32)
    //TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 24, 0, 0, 0, 0, 32)
    TNT1 A 0 A_SpawnItemEx ("ShieldPartVisual", 0, 0, 40, 0, 0, 0, 0, 32)
    stop
  }
}

actor ShieldHit
{
  Radius 1
  Height 1
  Scale 0.05
  Renderstyle Add
  +NOGRAVITY
  +NOINTERACTION
  States
  {
  Spawn:
    RHIT A 0 bright
    RHIT A 1 bright A_Stop
    RHIT A 0 bright A_PlaySound ("ForceBarrier/Hit")
  Grow:
    RHIT A 1 bright A_SetScale (0.1, 0.1)
	RHIT A 0 bright A_FadeOut (0.2)
	RHIT A 1 bright A_SetScale (0.15, 0.15)
	RHIT A 0 bright A_FadeOut (0.2)
	RHIT A 1 bright A_SetScale (0.2, 0.2)
	RHIT A 0 bright A_FadeOut (0.2)
	RHIT A 1 bright A_SetScale (0.25, 0.25)
	RHIT A 0 bright A_FadeOut (0.2)
	RHIT A 1 bright A_SetScale (0.3, 0.3)
    stop
  }
}