#Include Actors/Puffs

#Include Actors/Shoulderlamp
//#Include Actors/powerloader
#Include Actors/Pistol
#Include Actors/Shotgun
#Include Actors/PulseRifle
#Include Actors/SmartGun
#Include Actors/flamethrower
#Include Actors/Spawners
#Include Actors/Blood
#Include Actors/Security
#Include Actors/Handler
#Include Actors/AlienWarior
#Include Actors/FaceHugger
#Include Actors/Synth
#Include Actors/Chestburster
#Include Actors/Smuggler
#Include Actors/LiveEgg
#Include Actors/Egg
#Include Actors/AdultRunner
#Include Actors/AlienWariorCeiling
#Include Actors/AdultRunnerCeiling
#Include Actors/Queen
#Include Actors/SeismicCharge
#Include Actors/FuelBarrel
#Include Actors/Particles
#Include Actors/Projectiles
#Include Actors/Flares
#Include Actors/Ammospawners
#Include Actors/HumanoidSpawner
#Include Actors/RunnerSpawner
#Include Actors/YoungRunner
#Include Actors/WariorSpawner
#Include Actors/AlienCeilingSpawner
#Include Actors/Turret
#Include Actors/Victim
#Include Actors/Flashlight

ACTOR HealthGood : Inventory {}
ACTOR HealthWarning : Inventory {}
ACTOR HealthCritical : Inventory {}

Actor LowAmmo : Inventory {}

ACTOR Vest : Inventory {}
ACTOR Charges : Inventory {}
ACTOR ATGrenade : Inventory {}
ACTOR Hyper : Inventory {}
ACTOR ATBoots : Inventory {}
 
actor Detector : Inventory
{
    Inventory.MaxAmount 1
}

actor Beeper : Inventory
{
    Inventory.MaxAmount 1
}

actor CMShot : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 6
}

ACTOR AdrenalineBurstPack : Soulsphere replaces Soulsphere
{
  scale 0.2
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Amount 100
  Inventory.MaxAmount 200
  Inventory.PickupMessage "Picked up the Adrenaline Burst Pack!"
  Inventory.PickupSound "misc/hbonus_PickUp"
  States
  {
  Spawn:
    ADRE A 6
    Loop
  }
}

ACTOR HypoPack : CustomInventory replaces InvulnerabilitySphere 
{
  scale 0.2
  +COUNTITEM
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.FANCYPICKUPSOUND
  +INVENTORY.BIGPOWERUP
  Inventory.PickupMessage "Picked up the Hypo Pack!"
  Inventory.PickupSound "misc/hbonus_PickUp"
  States
  {
  Spawn:
    HYPO A -1
    loop
  Use:
  Pickup:
  TNT1 A 0 A_GiveInventory("FullHealth")
  TNT1 A 0 A_GiveInventory("PowerInvulnerable")
  }
}

ACTOR AcidBoots : RadSuit replaces Radsuit
{
  scale 0.2
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  Inventory.MaxAmount 0
  Inventory.PickupMessage "Picked up the Acid Boots!"
  Powerup.Type "IronFeet"
  Powerup.Color None
  Powerup.Duration -60
  States
  {
  Spawn:
    BOOT A -1 
    Stop
  }
}

ACTOR AcidVest : greenarmor replaces greenarmor
{
  scale 0.2
  Radius 20
  Height 16
  Inventory.PickupMessage "Picked up the Acid Vest!"
  Armor.SavePercent 100
  Armor.SaveAmount 100
  states
  {
  Spawn:
    ARM2 AB 6
    loop
  }
}

ACTOR BODYARMOR : BlueArmor replaces BlueArmor
{
  scale 0.2
  Radius 20
  Height 16
  Inventory.PickupMessage "Picked up the Body Armor!"
  Armor.SavePercent 100
  Armor.SaveAmount 200
  States
  {
  Spawn:
    ARM1 AB 6
    Loop
  }
}

Actor helmet : armorbonus replaces armorbonus
{
	Inventory.Pickupmessage "picked up a helmet."
	Armor.SavePercent 100
	States
	{
	Spawn:
		BON2 A 6
		loop
	}
}

Actor DermPatch : healthbonus replaces healthbonus
{
        scale 0.3
	Inventory.Amount 2
	Inventory.MaxAmount 649
	Inventory.Pickupmessage "picked up a Derm Patch."
        Inventory.PickupSound "misc/hbonus_PickUp"
	States
	{
	Spawn:
		BON1 A 6
		loop
	}
}
ACTOR ATMedikit : Medikit replaces Medikit
{
  scale 0.2
  Inventory.Amount 20
  Inventory.PickupMessage "$GOTMEDIKIT" // "Picked up a medikit."
  Health.LowMessage 25, "$GOTMEDINEED" // "Picked up a medikit that you REALLY need!"
  States
  {
  Spawn:
    MKIT A -1
    Stop
  }
}

ACTOR aliensplayer : Doomplayer
{
  Speed 1
  Health 100
  Radius 16
  Height 56
  Mass 100
  Player.DamageScreenColor "none"
  Player.DisplayName "Marine"
  Player.CrouchSprite "PLYC"
  Player.StartItem "Pistol1"
  Player.StartItem "pulserifle"
  Player.StartItem "PistolClip", 50
  Player.StartItem "PulseRifleClip", 180
  Player.StartItem "Pistolloaded", 12
  Player.StartItem "Pulseloaded", 95
  Player.StartItem "GrenadeAmmo", 8
  Player.StartItem "flare", 10
  Player.WeaponSlot 1, Pistol1
  Player.WeaponSlot 2, Shotgun1
  Player.WeaponSlot 3, pulserifle
  Player.WeaponSlot 4, flamethrower1
  Player.WeaponSlot 5, smartgun
  	BloodType "ATRedBlood"	
	BloodColor "Red"
	DamageFactor "FaceHugger", 1.0
	PainChance "FaceHugger", 255
	
	States
	{
	Spawn:
	    TNT1 A 0 A_JumpIfInventory("FaceHugged", 1, "FaceHugged")
		PLAY A 1
		Loop
	FaceHugged:
	    PLAY A 1 ACS_Execute(504)
		Goto Spawn
	See:
		PLAY A 6 A_SpawnItemEx("PlayerStep", 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, SXF_NoCheckPosition | 128)
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(503,0,0,0) == 0, "Spawn")
		PLAY B 6 
		PLAY C 6 A_SpawnItemEx("PlayerStep", 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, SXF_NoCheckPosition | 128)
		PLAY D 6 
		Goto Spawn
	Missile:
		PLAY EF 6
		Goto Spawn
	Melee:
		PLAY EF 6
		Goto Spawn

	Pain:
        NULL A 0 A_Pain
        NULL A 0 ACS_Execute(530, 0, 0, 0, 0)
        NULL A 0 A_PlaySound("RED", 2)
		PLAY G 5
		Goto See

	Pain.FaceHugger:
	    TNT1 A 0 A_GiveInventory("FaceHugged", 1)
		PLAY G 4 A_Pain
		PLAY G 4 
		TNT1 A 0 ACS_Execute(504)
		Goto Spawn
	}
}

Actor FaceHugged : Inventory { Inventory.MaxAmount 1 }

ACTOR PlayerStep
{
   Radius  6
   Height  6
   //Mass 0
     +CORPSE
     +NOCLIP
     -DONTSPLASH
   States
   {
   Spawn:
      TNT1 A 8
      Stop
   Crash:
      TNT1 A 1
      Stop
   }
}


//-------------Standart--------------//
Actor ATShotgunShell //: FastProjectile
{
	Radius 2
	Height 2
	-NOGRAVITY
	+FORCEPAIN
	States
	{
	Spawn:  
		ATSG G -1 Bright 
		Stop
	}
}
//----------------------------------------//

Actor ShotgunCasing
{
	Height 1
	Radius 2
	Speed 6
	YScale 0.25
	XScale -0.25
	Projectile
	-NOGRAVITY
	+WINDTHRUST
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
	+FORCEXYBILLBOARD
	BounceType Doom
	Gravity 0.66
	BounceFactor 0.5
	BounceSound "Weapons/ShellCasing"
	DeathSound "Weapons/ShellCasing"
	
	States
	{
	Spawn:
		CAS2 BAHGFEDC 3
		Loop
	Death:
		CAS2 IJKLM 0 A_Jump(64,"Rest")
		Loop
	Rest:
		"----" A 250
		"----" A 0 A_CheckSight("Null")
		Loop
	}
}

ACTOR PistolCasing : ShotgunCasing
{
	XScale 0.25
	BounceSound "Weapons/Casing"
	DeathSound "Weapons/Casing"
	States
	{
	Spawn:
		CSNG DCBANMLKJIHGFE 2
		Loop
	Death:
		CSNG KC 0 A_Jump(128,"Rest")
		Loop
	}
}

ACTOR EmptyClip
{
   Height 2
   Radius 2
   Speed 4
   Scale 0.1
   +DOOMBOUNCE
   - NOGRAVITY
   +WINDTHRUST
   +CLIENTSIDEONLY
   +MOVEWITHSECTOR
   +MISSILE
   +NOBLOCKMAP
   -DROPOFF
   +NOTELEPORT
   +FORCEXYBILLBOARD
   +NOTDMATCH
   +GHOST
   Mass 1
   SeeSound "weapons/largemagdrop"
   States
   {
   Spawn:
      TNT1 A 7 A_PlaySound("NULL")
      ECLI ABCDEFGHABCDEFGHABCDEFGHABCDEFGHABCDEFGH 4
      Stop
   Death:
	  TNT1 A 0

      ECLI G 400

      Loop
	Stoping:
		TNT1 A 0
		Stop
   }
}

ACTOR EmptyClipSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_CustomMissile("EmptyClip",1,0,random(85,95),2,1)
		Stop
	}
}

ACTOR FullHealth : Health
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.Amount 100
	Inventory.MaxAmount 100
}

ACTOR ATinvulnerability : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Powerup.Color none
	Powerup.type "PowerInvulnerable"
	powerup.duration 30
}

actor Deadalien replaces deaddemon
{
    -SOLID
	-SHOOTABLE
	+ACTIVATEMCROSS
	+DONTGIB
	+NOICEDEATH
	+OLDRADIUSDMG
	+NODAMAGETHRUST
    +BLOODLESSIMPACT
	+DONTSPLASH
	-NOGRAVITY
	radius 0
    height 0
	Scale 0.7
	mass 500
	DamageType "XenoPosioin"
	States
	{
		Spawn:
		WART P 55 A_Explode(1,4)
		Loop
		}
}

actor Deadalien2 replaces deaddoomimp
{
    -SOLID
	-SHOOTABLE
	+ACTIVATEMCROSS
	+DONTGIB
	+NOICEDEATH
	+OLDRADIUSDMG
	+NODAMAGETHRUST
    +BLOODLESSIMPACT
	+DONTSPLASH
	-NOGRAVITY
	radius 0
    height 0
	Scale 0.7
	mass 500
	DamageType "XenoPosioin"
	States
	{
		Spawn:
		BAM2 V 55 A_Explode(1,4)
		Loop
		}
}
