//Player definitions
actor msx_player:DoomPlayer{
	PainChance 256
	mass 700
	gravity 0.75
	health 200
	Player.MaxHealth 200
	Player.ForwardMove 2.0,1.0
	Player.SideMove 2.0,1.0
	Player.ViewHeight 43
	Player.AttackZOffset 10
	Player.JumpZ 0
	Player.FallingScreamSpeed 25.0,50.0
	Player.SoundClass "MSXPlayer"
	Player.WeaponSlot 1,"RegularFists"
	Player.WeaponSlot 2,"GolamPistol"
	Player.WeaponSlot 3,"HydraShotgun"
	Player.WeaponSlot 4,"BarracudaRifle"
	Player.WeaponSlot 5,"RaptorShotgun"
	Player.WeaponSlot 6,"TaurusCannon"
	Player.WeaponSlot 7,"ChimeraRifle"
	Player.WeaponSlot 8,"OrionSniper"
	Player.StartItem "InDoom"
	Player.StartItem "GolamPistol"
	Player.StartItem "RegularFists"
	Player.StartItem "Grenade_Toss"
	Player.StartItem "Grenade_Type",1
	Player.StartItem "fullshield"
	Player.StartItem "Action_Cooldown"
	Player.StartItem "Action_CooldownCancel"
	Player.StartItem "ArmorRechargeSound"
	Player.StartItem "ARechargeSound_Cancel"
	Player.StartItem "pistol_ammo",36
	Player.StartItem "golamclip",18
	Player.StartItem "hydraclip",16
	Player.StartItem "raptorchamber",4
	Player.StartItem "barraclip",60
	Player.StartItem "cannonmag",30
	Player.StartItem "criflecell",80
	Player.StartItem "sgaussmag",5 
	Player.StartItem "grenades",3
	Player.StartItem "PlayerStamina",100
	Player.StartItem "MSXPlayerViewHeight",43
	player.maxhealth 100
	Player.DamageScreenColor "00 00 00",0.0
	damagefactor "frag_explosion",0.3
	damagefactor "TAURUS_Slug",0.75
	damagefactor "CHIMERA_Bolt",0.6
	DamageFactor "Falling",0.5
	+NOBLOOD
	+SLIDESONWALLS
	var int user_rdmH;
	var int user_rdmV;
	states{
	spawn: 
		TNT1 A 0
		TNT1 A 0 
		TNT1 A 0 //ACS_NamedExecute("pmsx_Player-Respawn",0,0,0,0)
		PLAY A -1 
		stop
	see:	
		PLAY ABCD 3 
		loop
	shield_on:
		TNT1 A 0	
		TNT1 A 0 A_ChangeFlag(NOBLOOD,1)
		goto see
	shield_off:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag(NOBLOOD,0)
		goto see
	pain:
		/*TNT1 A 0 A_JumpIfInventory("defense_powerupinf",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 {A_TakeInventory("defense_powerupinf");
			A_GiveInventory("defense_powerup");}*/
		TNT1 A 0 A_Pain
		TNT1 A 0 ACS_NamedExecute("pmsx_PlayerPainFlash",0,0,0,0)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,-20,0,0)//A_SetPitch(-1)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,20,0,0)//A_Setpitch(1)
		goto see
	pain.StrongMelee:
		/*TNT1 A 0 A_JumpIfInventory("defense_powerupinf",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 {A_TakeInventory("defense_powerupinf");
			A_GiveInventory("defense_powerup");}*/
		TNT1 A 0 A_Pain
		TNT1 A 0 ACS_NamedExecute("pmsx_PlayerPainFlash",0,1,0,0)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,-60,0,0)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,60,0,0)
		goto see
	pain.LightMelee:
		/*TNT1 A 0 A_JumpIfInventory("defense_powerupinf",1,2)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 {A_TakeInventory("defense_powerupinf");
			A_GiveInventory("defense_powerup");}*/
		TNT1 A 0 A_Pain
		TNT1 A 0 ACS_NamedExecute("pmsx_PlayerPainFlash",0,2,0,0)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,-40,0,0)//A_SetPitch(-1)
		TNT1 A 1 ACS_NamedExecute("Weapon-Recoil",0,40,0,0)//A_Setpitch(1)
		goto see
	Death:
		PLAY H 10 //ACS_NamedExecute("pmsx_Player-Death",0,0,0,0)
		PLAY I 10 A_PlayerScream
		PLAY J 10 A_NoBlocking
		PLAY KLM 10
		PLAY N -1
		Stop
	XDeath:
		PLAY O 7 //ACS_NamedExecute("pmsx_Player-Death",0,0,0,0)
		PLAY P 7 A_XScream
		PLAY Q 7 A_NoBlocking
		PLAY RSTUV 7
		PLAY W -1
		Stop}}
ACTOR MSXHereticPlayer:msx_player{
	Player.StartItem "InHeretic"
	Player.StartItem "GolamPistol"
	Player.StartItem "RegularFists"
	Player.StartItem "Grenade_Toss"
	Player.StartItem "Grenade_Type",1
	Player.StartItem "pistol_ammo",36
	Player.StartItem "golamclip",18
	Player.StartItem "fullshield"
	Player.StartItem "Action_Cooldown"
	Player.StartItem "Action_CooldownCancel"
	Player.StartItem "ArmorRechargeSound"
	Player.StartItem "ARechargeSound_Cancel"
	Player.StartItem "hydraclip",16
	Player.StartItem "raptorchamber",4
	Player.StartItem "barraclip",60
	Player.StartItem "cannonmag",30
	Player.StartItem "criflecell",80
	Player.StartItem "sgaussmag",5 
	Player.StartItem "grenades",3
	Player.StartItem "PlayerStamina",100
	Player.StartItem "MSXPlayerViewHeight",43}
ACTOR MSXHexenPlayer:msx_player{
	Player.ViewHeight 50
	Player.StartItem "InHexen"
	Player.StartItem "GolamPistol"
	Player.StartItem "RegularFists"
	Player.StartItem "Grenade_Toss"
	Player.StartItem "Grenade_Type",1
	Player.StartItem "pistol_ammo",50 // A bit more, but not by much
	Player.StartItem "golamclip",18
	Player.StartItem "fullshield"
	Player.StartItem "Action_Cooldown"
	Player.StartItem "Action_CooldownCancel"
	Player.StartItem "ArmorRechargeSound"
	Player.StartItem "ARechargeSound_Cancel"
	Player.StartItem "hydraclip",16
	Player.StartItem "raptorchamber",4
	Player.StartItem "barraclip",60
	Player.StartItem "cannonmag",30
	Player.StartItem "criflecell",80
	Player.StartItem "sgaussmag",5 
	Player.StartItem "grenades",3
	Player.StartItem "PlayerStamina",100
	Player.StartItem "MSXPlayerViewHeight",50}
ACTOR MSXStrifePlayer:msx_player{
	MaxStepHeight 16
	Player.StartItem "InStrife"
	Player.StartItem "GolamPistol"
	Player.StartItem "RegularFists"
	Player.StartItem "Grenade_Toss"
	Player.StartItem "Grenade_Type",1
	Player.StartItem "pistol_ammo",36
	Player.StartItem "golamclip",18
	Player.StartItem "fullshield"
	Player.StartItem "Action_Cooldown"
	Player.StartItem "Action_CooldownCancel"
	Player.StartItem "ArmorRechargeSound"
	Player.StartItem "ARechargeSound_Cancel"
	Player.StartItem "hydraclip",16
	Player.StartItem "raptorchamber",4
	Player.StartItem "barraclip",60
	Player.StartItem "cannonmag",30
	Player.StartItem "criflecell",80
	Player.StartItem "sgaussmag",5 
	Player.StartItem "grenades",3
	Player.StartItem "PlayerStamina",100
	Player.StartItem "MSXPlayerViewHeight",43
	DamageFactor "SpectralLightning",0.1}
ACTOR MSXPlayerViewHeight:Inventory{Inventory.Amount 1 Inventory.MaxAmount 100}
ACTOR InDoom:Inventory{}
ACTOR InHeretic:Inventory{}
ACTOR InHexen:Inventory{}
ACTOR InStrife:Inventory{}
ACTOR Grenade_Type:Inventory{Inventory.Amount 1 Inventory.MaxAmount 4}
actor PlayerShieldDamage:Inventory{
	Inventory.PickupSound ""
	Inventory.UseSound ""
	Inventory.Amount 1
	Inventory.MaxAmount 350}
actor PlayerStamina:Inventory{
	Inventory.PickupSound ""
	Inventory.UseSound ""
	Inventory.Amount 1
	Inventory.MaxAmount 100}
actor ArmorRechargeSound:CustomInventory{
	Inventory.PickupSound ""
	Inventory.UseSound ""
	Inventory.Amount 1
   	Inventory.MaxAmount 1
    -INVBAR
	states{
	Use:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("sfx/shieldrecharge",5)
		fail}}
actor ARechargeSound_Cancel:CustomInventory{
	Inventory.PickupSound ""
	Inventory.UseSound ""
	Inventory.Amount 1
   	Inventory.MaxAmount 1
    -INVBAR
	states{
	Use:
		TNT1 A 0 A_StopSound(5)
		stop}}
actor SuitPowerDefense:PowerupGiver{
	inventory.maxamount 0
	powerup.color "0 0 0",0.0
	powerup.type SuitPowDefense
	powerup.duration 0x7FFFFFFF
	+AUTOACTIVATE
	states{
	spawn:
		TNT1 AA 0
		stop}}
actor PowerSuitPowDefense:PowerProtection{damagefactor "normal",0.5}