actor NecromancerColt45 : Weapon
{
	Weapon.SelectionOrder 1900
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "NecroticBullets"
	AttackSound "Weapon/COLTFIRE"
	Obituary "%o was killed by %k's Colt45."
	+WEAPON.WIMPY_WEAPON
	Inventory.Pickupmessage "Picked up a Colt45."
	Decal "BulletChip"
    Inventory.RestrictedTo "NecromancerClass"
	Tag "Necrotic Colt .45"	
	States
	{
	Deselect:
		COLT A 1 A_Lower
		TNT1 A 0 A_Lower
		TNT1 A 0 A_Lower
		Loop
	Select:
		COLT A 1 A_Raise
		TNT1 A 0 A_Raise
		TNT1 A 0 A_Raise
		Loop
	Ready:
		COLT A 1 A_WeaponReady
		Loop
    AltReady:
        COLT A 1 A_WeaponReady
        Loop
	Fire:
		COLT F 1 A_FireBullets(0.7,0.7,1,10,"NecromancerPuff",FBF_NORANDOM|FBF_USEAMMO)
		COLT F 1 A_Light2
		COLT F 1 A_Light1
		COLT B 3 A_Light0
		COLT CDE 3
		COLT B 3 A_ReFire
		Goto Ready
    AltFire:
        // Alt fire: more spread, faster fire rate (shorter wait))
        // Fire faster, so reduce frame wait after shot
		COLT A 0 A_JumpIfInventory("NecroticBullets", 1, 1)
		Goto Ready
		COLT A 0 A_TakeInventory("NecroticBullets", 1)
        COLT F 1 A_FireBullets(5.6,1,1,10,"NecromancerPuff",FBF_NORANDOM|FBF_USEAMMO)
        COLT F 1 A_Light2
        COLT F 1 A_Light1
        COLT B 2 A_Light0           // shorter delay for faster fire
        COLT CDE 2                 // shorter animation to speed up
        COLT B 2 A_ReFire
        Goto AltReady
	Spawn:
		COLT P -1
		Stop
	}
}

Actor NecromancerPuff : Bulletpuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+ALWAYSPUFF
	+PUFFGETSOWNER
	+POISONALWAYS
	+ADDITIVEPOISONDAMAGE
	+ADDITIVEPOISONDURATION
	+NoExtremeDeath
	DamageType "Necrosis"
	PoisonDamageType "Necrosis"
	PoisonDamage 10,15,10
}

actor NecroticBullets : Ammo
{
	Inventory.Amount 10
	Inventory.Maxamount 100
	Ammo.Backpackamount 10
	Ammo.Backpackmaxamount 200
}