#include "weapons"
#include "ammo"
#include "items"
#include "keys"
#include "props"

ACTOR Player64 : DoomPlayer
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 100
  PainChance 255
  Player.DisplayName "Marine"
  Player.StartItem "Pistol64"
  Player.StartItem "Fist64"
  Player.StartItem "Clip64", 50
  Player.ColorRange 112, 127
  Player.CrouchSprite ""
  -NOSKIN
  States
  {
  Spawn:
    PLAY A -1
    Loop
  See:
    PLAY ABCD 4 
    Loop
  Missile:
    PLAY E 12 
    Goto Spawn
  Melee:
    PLAY F 6 BRIGHT
    Goto Missile
  Pain:
    PLAY G 4 
    PLAY G 4 A_Pain
    Goto Spawn
  Death:
    PLAY H 0 A_PlayerSkinCheck("AltSkinDeath")
  Death1:
    PLAY H 10
    PLAY I 10 A_PlayerScream
    PLAY J 10 A_NoBlocking
    PLAY KLM 10
    PLAY N -1
    Stop
  XDeath:
    PLAY O 0 A_PlayerSkinCheck("AltSkinXDeath")
  XDeath1:
    PLAY O 5
    PLAY P 5 A_XScream
    PLAY Q 5 A_NoBlocking
    PLAY RSTUV 5
    PLAY W -1
    Stop
  AltSkinDeath:
    PLAY H 6
    PLAY I 6 A_PlayerScream
    PLAY JK 6
    PLAY L 6 A_NoBlocking
    PLAY MNO 6
    PLAY P -1
    Stop
  AltSkinXDeath:
    PLAY Q 5 A_PlayerScream
    PLAY R 0 A_NoBlocking
    PLAY R 5 A_SkullPop
    PLAY STUVWX 5
    PLAY Y -1
    Stop
  Crush:
	POL5 A 1 A_PlaySound("gibbed64")
	POL5 A -1
    stop
  }
}

ACTOR TeleportFog64 : TeleportFog Replaces TeleportFog
{
  +NOBLOCKMAP
  +NOTELEPORT
  +NOGRAVITY
  RenderStyle Add
  XScale .8
  YScale .7
  States
  {
  Spawn:
    TFOG HGFEDCBABCDEFGH 3 Bright
    Stop
  }
}

ACTOR ExplosiveBarrel64 Replaces ExplosiveBarrel
{
  Health 20
  Radius 10
  Height 42
  +SOLID
  +SHOOTABLE
  +NOBLOOD
  +ACTIVATEMCROSS
  +DONTGIB
  +NOICEDEATH
  +OLDRADIUSDMG
  DeathSound " "
  Obituary "%o went boom."
  XScale .8
  YScale .7
  States
  {
  Spawn:
    BARL A -1
    stop
  Death: 
    BARL B 5 
    BARL C 5
	BARL D 5
    BARL E 0 A_Explode
    BARL E 5 BRIGHT A_SpawnItemEx("Explosion64",0,0,32)
	TNT1 A 10
    TNT1 A 1050 Bright A_BarrelDestroy
    TNT1 A 5 A_Respawn
    Wait
  }
}

ACTOR Explosion64
{
	Radius 11
	Height 8
	+NOGRAVITY
	+NOCLIP
	+CLIENTSIDEONLY
	+NOINTERACTION
    XScale .8
    YScale .7
	States
	{
	Spawn:
	    CRCK B 0 Bright
		CRCK B 0 Bright A_PlaySound("cyber64/missilehit")
		CRCK B 8 Bright A_SetTranslucent(0.7,0)
		CRCK C 6 Bright A_SetTranslucent(0.5,0)
		CRCK D 4 Bright A_SetTranslucent(0.4,0)
		CRCK E 4 Bright A_SetTranslucent(0.3,0)
		CRCK F 4 Bright
		Stop
	}
}

ACTOR BossExplosion64
{
	Radius 11
	Height 8
	+NOGRAVITY
	+NOCLIP
	+CLIENTSIDEONLY
	+NOINTERACTION
    XScale .8
    YScale .7
	States
	{
	Spawn:
	    CRCK B 0 Bright
		CRCK B 0 Bright A_PlaySound("resurrector64/missilehit",4,1.0,0,ATTN_NONE)
		CRCK B 4 Bright A_SetTranslucent(0.7,0)
		CRCK C 4 Bright A_SetTranslucent(0.6,0)
		CRCK D 4 Bright A_SetTranslucent(0.5,0)
		CRCK E 4 Bright A_SetTranslucent(0.4,0)
		CRCK F 4 Bright
		Stop
	}
}

ACTOR ArtifactSpawner
{
  +NOBLOCKMAP
  +NOSECTOR
  +NOGRAVITY
  +DONTSPLASH
  RenderStyle None
  Radius 2
  Height 2
  -SOLID
  +NOCLIP
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 Thing_ChangeTID(0,9999)
    goto Spawn2
  Spawn2:
    TNT1 A 0
    TNT1 A 3 ACS_ExecuteAlways(952,0,0,0,0)
    stop
  }
}
