//==============================================================================
// Kriegsland Weapon Base (inherited from FlakesDoom)
//==============================================================================

ACTOR FlakeWeapon : Weapon replaces Weapon
{
	+WEAPON.NOALERT
	+WEAPON.NOAUTOAIM
	+WEAPON.AMMO_OPTIONAL
}

ACTOR KriegslandLightWeapon : FlakeWeapon
{
	Weapon.BobStyle 		"Alpha"
	Weapon.BobSpeed 		2.55
	Weapon.BobRangeX 		0.30
	Weapon.BobRangeY 		0.40
	Weapon.Kickback			100
}

ACTOR KriegslandMediumWeapon : FlakeWeapon
{
	Weapon.BobStyle 		"InverseSmooth"
	Weapon.BobSpeed 		2.15
	Weapon.BobRangeX 		0.20
	Weapon.BobRangeY 		0.30
	Weapon.Kickback			150
}

ACTOR KriegslandHeavyWeapon : FlakeWeapon
{
	Weapon.BobStyle 		"Inverse"
	Weapon.BobSpeed 		1.95
	Weapon.BobRangeX 		0.10
	Weapon.BobRangeY 		0.20
	Weapon.Kickback			200
}

//==============================================================================
// Weapon Spawners
//==============================================================================

ACTOR NumberOne : RandomSpawner replaces Chainsaw
{
	DropItem "HDChainsaw" 255 128
	DropItem "DualSpawner9" 255 128
}

ACTOR NumberTwo : RandomSpawner replaces Pistol
{
	DropItem "DualSpawner3" 255 255
	DropItem "HDHandgun" 255 128
}

ACTOR NumberThreeAgain : RandomSpawner replaces Shotgun
{
	DropItem "DualSpawner7" 255 255
	DropItem "HDGewehr" 255 128
}

ACTOR NumberThree : RandomSpawner replaces SuperShotgun
{
	DropItem "DualSpawner8" 255 255
	DropItem "HDRifle" 255 128
}

ACTOR NumberFour : RandomSpawner replaces Chaingun
{
	DropItem "DualSpawner1" 255 255
	DropItem "DualSpawner2" 255 128
}

ACTOR NumberFive : RandomSpawner replaces RocketLauncher
{
	DropItem "HDCarbine" 255 255
	DropItem "DualSpawner6" 255 128
}

ACTOR NumberSix : RandomSpawner replaces PlasmaRifle
{
	DropItem "DualSpawnerA" 255 255
	DropItem "HDLightningGun" 255 128
}

ACTOR NumberSeven : RandomSpawner replaces BFG9000
{
	DropItem "HDBFG9000" 255 86
	DropItem "HDLurdinha" 255 128
	DropItem "DualSpawner5" 255 255
}

ACTOR Specialweapons : RandomSpawner replaces Blursphere
{
	DropItem "HDPlasmaRifle" 255 255
	DropItem "HDPanzerfaust" 255 128
}

//==============================================================================
// Akimbo Spawners
//==============================================================================

ACTOR DualSpawner1 : CustomInventory
{
	Scale 0.65
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound "weapons/generic/pickup2"
	Inventory.PickupMessage "You got the STG-60!"
	States
	{
	Spawn:
		WP5P A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDMachinegun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDMachinegun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDMachinegunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another StG-60!",1)
		TNT1 A 0 A_GiveInventory("HDMachinegunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDMachinegunX2")
		Stop

	}
}

//==============================================================================
// Weapon 2
//==============================================================================

ACTOR DualSpawner2 : CustomInventory
{
	Scale 0.5
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound "weapons/generic/pickup2"
	Inventory.PickupMessage "You got the MP-86s!"
	States
	{
	Spawn:
		WPCP A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDChaingun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDChaingun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDChaingunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another MP-86s!",1)
		TNT1 A 0 A_GiveInventory("HDChaingunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDChaingunX2")
		Stop
	}
}

//==============================================================================
// Weapon 3
//==============================================================================

ACTOR DualSpawner3 : CustomInventory
{
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound "weapons/generic/pickup1"
	Inventory.PickupMessage "You got the Luger P-58!"
	Scale 0.27
	States
	{
	Spawn:
		WP2P A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDPistol", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDPistol")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDPistolX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another P-58!",1)
		TNT1 A 0 A_GiveInventory("HDPistolX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDPistolX2")
		Stop
	}
}

//==============================================================================
// Weapon 4
//==============================================================================

ACTOR DualSpawner4 : CustomInventory
{
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound "weapons/generic/pickup1"
	Inventory.PickupMessage "You got the Mauser M972-S2!"
	Scale 0.45
	States
	{
	Spawn:
		WPDP A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDHandgun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDHandgun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDHandgunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another M972-S2!",1)
		TNT1 A 0 A_GiveInventory("HDHandgunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDHandgunX2")
		Stop
	}
}

//==============================================================================
// Weapon 5
//==============================================================================

ACTOR DualSpawner5 : CustomInventory
{
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound "weapons/generic/pickup3"
	Inventory.PickupMessage "You got the Ekelhaftwaffe!"
	Scale 0.85
	States
	{
	Spawn:
		WPBP A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDLasergun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDLasergun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDLasergunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another Ekelhaftwaffe!",1)
		TNT1 A 0 A_GiveInventory("HDLasergunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDLasergunX2")
		Stop
	}
}

//==============================================================================
// Weapon 6
//==============================================================================

ACTOR DualSpawner6 : CustomInventory
{
	Inventory.Icon "TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup2"
	Inventory.PickupMessage "You got the Lawine-6!"
	Scale 0.7
	States
	{
	Spawn:
		WP6P A 1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDRocketLauncher",1,"Dual")
		TNT1 A 0 A_GiveInventory("HDRocketLauncher")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDRocketLauncherX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another Lawine-6!",1)
		TNT1 A 0 A_GiveInventory("HDRocketLauncherX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDRocketLauncherX2")
		Stop
	}
}

//==============================================================================
// Weapon 7
//==============================================================================

ACTOR DualSpawner7 : CustomInventory
{
	Inventory.Icon 			"TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup1"
	Inventory.PickupMessage "You got the Luftwaffe DP-65!"
	States
	{
	Spawn:
		WP3P A -1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDShotgun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDShotgun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDShotgunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another DP-65!",1)
		TNT1 A 0 A_GiveInventory("HDShotgunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDShotgunX2")
		Stop
	}
}

//==============================================================================
// Weapon 8
//==============================================================================

ACTOR DualSpawner8 : CustomInventory
{
	Inventory.Icon 			"TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup2"
	Inventory.PickupMessage "You got the Jadtfaust Wunderfilnte-8!"
	Scale 0.95
	States
	{
	Spawn:
		WP4P A -1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDSuperShotgun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDSuperShotgun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDSuperShotgunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("Got another Jadtfaust Wunderfilnte-8!",1)
		TNT1 A 0 A_GiveInventory("HDSuperShotgunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDSuperShotgunX2")
		Stop
	}
}

//==============================================================================
// Weapon 9
//==============================================================================

ACTOR DualSpawner9 : CustomInventory
{
	Inventory.Icon 			"TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup2"
	Inventory.PickupMessage "You got the Kampfpistole!"
	Scale 0.3
	States
	{
	Spawn:
		WPMP A -1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDFlareGun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDFlareGun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDFlareGunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("You got another Kampfpistole!",1)
		TNT1 A 0 A_GiveInventory("HDFlareGunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDFlareGunX2")
		Stop
	}
}

//==============================================================================
// Weapon 0
//==============================================================================

ACTOR DualSpawner0 : CustomInventory
{
	Inventory.Icon 			"TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup2"
	Inventory.PickupMessage "You got the DL-44 Blaster!"
	Scale 0.7
	States
	{
	Spawn:
		WPNP A -1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDBlaster", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDBlaster")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDBlasterX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("You got another DL-44!",1)
		TNT1 A 0 A_GiveInventory("HDBlasterX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDBlasterX2")
		Stop
	}
}

//==============================================================================
// Weapon A
//==============================================================================

ACTOR DualSpawnerA : CustomInventory
{
	Inventory.Icon 			"TNT1A0"
	Inventory.PickupSound 	"weapons/generic/pickup2"
	Inventory.PickupMessage "You got the Schallkraftwerk!"
	Scale 0.95
	States
	{
	Spawn:
		WPJP A -1
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("HDSonicGun", 1, "Dual")
		TNT1 A 0 A_GiveInventory("HDSonicGun")
		Stop
	Dual:
		TNT1 A 0 A_JumpIfInventory("HDSonicGunX2", 1, "StillDualButAmmoInstead")
		TNT1 A 0 A_Print("You got another Schallkraftwerk!",1)
		TNT1 A 0 A_GiveInventory("HDSonicGunX2")
		Stop
	StillDualButAmmoInstead:
		TNT1 A 0 A_GiveInventory("HDSonicGunX2")
		Stop
	}
}

//==============================================================================
// Kicking Commands by WildWeasel to avoid using ACS scripts.
//==============================================================================

ACTOR Action_Kick : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("IsKicking",1)
       Fail
   }
}

ACTOR Action_KickCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("IsKicking",1)
       Fail
   }
}

ACTOR IsKicking : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}

//==============================================================================
// Grenade Commands
//==============================================================================

ACTOR Action_Grenade : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("IsBombing",1)
       Fail
   }
}

ACTOR Action_GrenadeCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("IsBombing",1)
       Fail
   }
}

ACTOR IsBombing : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}

//==============================================================================
// Knife Commands
//==============================================================================

ACTOR Action_Knife : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("IsKnifing",1)
       Fail
   }
}

ACTOR Action_KnifeCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("IsKnifing",1)
       Fail
   }
}

ACTOR IsKnifing : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}

//==============================================================================
// Cross Akimbo Commands
//==============================================================================

ACTOR Action_Cross : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("IsCrossing",1)
       Fail
   }
}

ACTOR Action_CrossCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("IsCrossing",1)
       Fail
   }
}

ACTOR IsCrossing : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}

//==============================================================================
// Important weapon items
//==============================================================================

ACTOR StartToken 		: Inventory { Inventory.MaxAmount 1 } //fade-in stuff
ACTOR FiredSecondary 	: Inventory { Inventory.MaxAmount 1 } //akimbo stuff
ACTOR FiredPrimary 		: Inventory { Inventory.MaxAmount 1 } //akimbo stuff
ACTOR StopDualWield 	: Inventory { Inventory.MaxAmount 1 } //akimbo stuff
ACTOR IsFiringSecondary : Inventory { Inventory.MaxAmount 1 } //akimbo stuff


ACTOR CrouchPlayer : Inventory { Inventory.Maxamount 1 }	// slide stuff
ACTOR SlidePlayer  : Inventory { Inventory.Maxamount 1 }	// slide stuff
ACTOR Kicking 	   : Inventory { Inventory.Maxamount 1 }	// slide stuff

ACTOR IAmZooming   : Inventory { Inventory.Maxamount 3 }	// zoom stuff
ACTOR IAmUnzooming : Inventory { Inventory.Maxamount 6 }	// zoom stuff

ACTOR KickAttack: FastProjectile
{
	Radius 6
	Height 6
	DamageType Melee
	Projectile 
	+FORCEXYBILLBOARD
	+NOEXTREMEDEATH
	+NODAMAGETHRUST
	+NORADIUSDMG
	RenderStyle Add
	Alpha 0.6
    Damage (random(1,2) * 10)
    Speed 32
	SeeSound "none"
	DeathSound "none"
	Decal "none"
	States
	{
		Spawn:
			TNT1 A 1
			TNT1 A 1 BRIGHT
			Stop
		Death:
			PUFF A 3 A_PlaySound("smash")
			PUFF BCD 3
			Stop
		Crash:
			PUFF A 3 A_PlaySound("smash")
			PUFF BCD 3
			Stop
	}
}

ACTOR BeserkKickAttack: FastProjectile
{
	Radius 6
	Height 6
	DamageType Melee
	Projectile 
	+FORCEXYBILLBOARD
	+NOEXTREMEDEATH
	+NODAMAGETHRUST
	+NORADIUSDMG
	RenderStyle Add
	Alpha 0.6
    Damage (random(1,2) * 30)
    Speed 32
	SeeSound "none"
	DeathSound "none"
	Decal "none"
	States
	{
		Spawn:
			TNT1 A 1
			TNT1 A 1 BRIGHT
			Stop
		Death:
			PUFF A 3 A_PlaySound("smash")
			PUFF BCD 3
			Stop
		Crash:
			PUFF A 3 A_PlaySound("smash")
			PUFF BCD 3
			Stop
	}
}

// END OF FILE