ACTOR SpacePirate : DoomPlayer
{
	Player.ViewHeight 47
	Player.AttackZOffset 20
	Player.StartItem "IsMel", 1
    Player.StartItem "StartMelee", 1
	Player.StartItem "StopMelee", 1
    Player.StartItem "StartReload", 1
	Player.StartItem "StopReload", 1
	Player.StartItem "DropCurrentShells", 1
	Player.StartItem "MeleeButtonActor", 1
	Player.StartItem "Mel919MPistol"
	Player.StartItem "MelMelee"
	Player.StartItem "AutoPistolMag", 15
	Player.StartItem "TSPPistolAmmo", 60
	Player.StartItem "BuckshotShellSelected", 1
	Player.StartItem "ShotgunMag", 8
	Player.StartItem "BuckshotShellSelected", 1
	Player.StartItem "BuckshotLoaded", 1
	Player.StartItem "AmmoboxMag", 50
	Player.StartItem "MP40Mag", 30
	Player.StartItem "ToolboxMag", 5
	Player.SoundClass "Melody"
	Player.DisplayName "Mel"
	Player.Face MCW
	//Player.Portrait "Mel_Port"
	Player.WeaponSlot 1, MelCustomCrossbow, MelMelee
	Player.WeaponSlot 2, Mel919mPistol
	Player.WeaponSlot 3, MelDahliaCrossbow, MelZekeShotgun, MelZekeShotgunNoPool
	Player.WeaponSlot 4, MelAmmoBox50, MelMipFowty
	Player.WeaponSlot 5, MelToolbox
    Species "Player"
	//+THRUSPECIES
	DamageFactor "Poison", 2.0
	DamageFactor "Player", 0.0
	PainChance "Sling", 255
	DamageFactor "GasShellDamagePlayer", 0
	//DamageFactor "GasShellDamage", 1.5
	//DamageFactor "Shrapnel", 0.5
    States
    {
    Pain.Sling:
      PLAY G 0 HealThing(1)
	  PLAY G 4 
      PLAY G 4 A_Pain
      Goto Spawn
    }
}

ACTOR IsMel : Inventory
{
	Inventory.MaxAmount 1
}

//actor MelReady : Boolean {}
//actor MelWaiting: Boolean { Inventory.MaxAmount 15 }
//actor MelTaunted : Boolean {}
//actor MelTauntCooldown: Boolean { Inventory.MaxAmount 5 }
//actor MelBossSee : Boolean {}
//actor MelBallgag : Boolean {}

//actor MelTaunt : CustomInventory
//{
//    Inventory.MaxAmount 0
//    +AUTOACTIVATE
//    States
//    {
//       Spawn:
//         TNT1 A 0
//         stop
//       UseStop:
//         TNT1 A 0
//         stop
//    }
//}

//actor MelTauntMelee : MelTaunt
//{
//    States
//    {
//      Pickup:
//        TNT1 A 0 A_JumpIfInventory("MelTauntCooldown", 1, "UseStop")
//        TNT1 A 0 A_JumpIfInventory("MelBallgag", 1, "UseStop")
//		TNT1 A 9
//        TNT1 A 0 A_PlaySound("mel/meleetaunt", 2)
//        TNT1 A 0 A_GiveInventory("MelTauntCooldown", 5)
//        stop
//    }
//}