actor Colts : Weapon
{
  Game Doom
  Weapon.AmmoUse 0
  Weapon.AmmoUse2 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 0
  Weapon.AmmoType "CradleClip"
  Weapon.AmmoType2 "GraveClip"
  Weapon.SlotNumber 2
  Weapon.SelectionOrder 2
  Weapon.UpSound "Sidekick/Up"
  Weapon.Kickback 125
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "Obtained ''Cradle & Grave'' TMAR-armed break-action six shooters! Fastest hands on this side of the hell! (2)"
  Obituary "%o was shot in %p face's face by %k's ''Cradle & Grave'' pistols."  //Le reference to A. Call of Juarez, B. stupid youtube video. You name it.
  Weapon.BobStyle InverseSmooth
  Weapon.BobSpeed 2.2
  Weapon.BobRangeY 0.6
  Weapon.BobRangeX 0.8
  +NOALERT
  +WEAPON.AMMO_CHECKBOTH
  //+NOAUTOAIM
  States
  {
  Ready:
	CLTU ABC 1
  ReadyMain:
	TNT1 A 0 A_Gunflash("Dualwelding",GFF_NOEXTCHANGE)
	TNT1 A 0 A_GiveInventory("SynthFireActive",1)
	TNT1 A 0 ACS_NamedExecuteAlways("SynthLeft")
	TNT1 A 0 ACS_NamedExecuteAlways("SynthRight")
	Goto LIdle
  LIdle:
	TNT1 A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
    TNT1 A 0 A_JumpIfInventory("IsReloading",1,"LReload")
	TNT1 A 0 A_JumpIfInventory("SynthFireZoom",1,"Punch")
    LCLG A 1 A_WeaponReady(12|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Loop
  Deselect:
    TNT1 A 0 SetPlayerProperty(0, 0, PROP_INSTANTWEAPONSWITCH)
	TNT1 A 0 A_GunFlash("NullFlash",GFF_NOEXTCHANGE)
	TNT1 A 0 A_TakeInventory("SynthFireActive",1)
	TNT1 A 0 A_TakeInventory("SynthFireLeft",1)
	TNT1 A 0 A_TakeInventory("SynthFireRight",1)
	CLTU CBA 1
    TNT1 AA 0 A_Lower	
    TNT1 A 1 A_Lower
	Goto Deselect+8
  Select:
    TNT1 A 0 SetPlayerProperty(0, 1, PROP_INSTANTWEAPONSWITCH)
  HonkaCzongka:
    TNT1 A 0 A_Raise
	TNT1 A 1 A_Raise
    Loop
  Reload:
	LCLG A 0 A_GiveInventory("IsReloading",1)
	Goto LIdle
  LFire:
    LCLG A 0 A_JumpIfInventory("GraveClip",1,1)
	Goto LReload
	LCLF A 0 A_PlaySound("Colt/Fire",6,0.4)
	LCLF A 0 A_PlaySound("Colt/Add",5,0.8)
	LCLF A 0 A_FireCustomMissile("GunsmokeSpawner_Small_Dark",0,0,-12,2)
	LCLF A 0 A_TakeInventory("GraveClip",1,TIF_NOTAKEINFINITE)
    LCLF A 0 A_FireBullets(1.50, 1.00, -1, 6, "BulletPuff")
	LCLF A 0 A_AlertMonsters
	LCLF A 0 A_Light2
    LCLF A 1 Bright A_SetPitch(pitch-0.75)
	LCLF B 1 Bright A_SetPitch(pitch-0.25)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	LCLF C 1 A_JumpIf(Health<75,1)
	LCLF DE 1
	LCLF A 0 A_Light1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	LCLF F 1 A_JumpIf(Health<50,1)
	LCLF GH 1
	LCLF A 0 A_Light0
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	LCLG A 1 A_JumpIf(Health<25,1)
	LCLG A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	Goto LIdle
  LNope:
	LCLN A 0 A_PlaySound("Sidekick/Dry",4,0.7)
	LCLN A 0 A_TakeInventory("IsReloading",1)
	LCLN ABC 1
	LCLG A 8
    Goto LIdle
  LReload:
	LCLG A 0 A_JumpIfInventory("GraveClip",0,"LBack")
	//LCLG A 0 A_JumpIfInventory("Clip",1,1)
	//Goto LNope
	LCLR A 0 A_PlaySound("Colt/Open",4,0.8)
	LCLR AB 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR C 1 A_JumpIf(Health<75,2)
	LCLR DE 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR F 1 A_JumpIf(Health<50,2)
	LCLR GG 1 //A_FireCustomMissile("ColtCasingSpawnerLeft",0,0,-2,0)
  LCasings:
	LCLR G 0 A_JumpIfInventory("GraveClip",0,"LEnd")
	LCLR G 0 A_GiveInventory("GraveClip",1)
	LCLR G 0 A_FireCustomMissile("ColtCasingSpawnerLeft",0,0,-2,0)
	Goto LCasings
	//LCLR G 2
  //LStart:
	//TNT1 A 0 A_JumpIfInventory("GraveClip",0,"LEnd")
	//TNT1 A 0 A_JumpIfInventory("Clip",1,1)
	//Goto LEnd
	//TNT1 A 0 A_TakeInventory("Clip",1,1)
	//TNT1 A 0 A_GiveInventory("GraveClip",6)
	//goto LStart
   LEnd:
	LCLR HI 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR J 1 A_JumpIf(Health<25,2)
	LCLR KL 1
	LCLR M 0 A_PlaySound("Colt/Close",4,0.8)
	LCLR MN 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR O 1 A_JumpIf(Health<75,2)
	LCLR PQ 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR R 1 A_JumpIf(Health<50,2)
	LCLR SS 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	LCLR R 1 A_JumpIf(Health<25,2)
	LCLR QPON 1
	LCLG A 2 A_TakeInventory("IsReloading",1)
	Goto LIdle
  LBack:
	LCLG A 2
	LCLG A 0 A_TakeInventory("IsReloading",1)
	Goto LIdle
  Zoom:
    MSTG A 0 A_GiveInventory("SynthFireZoom",1)
    Goto LIdle
  Punch:
    FMGU F 0 A_PlaySound("Punch/Swing",6,1.0)
    FMGU F 0 A_JumpIfInventory("ZoomReFire",1,"PunchOutlaws")
	CLT2 CBA 1
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
  PunchOutlaws:
	QML1 A 0 A_JumpIfInventory("PowerStrength2",1,2)
    QML1 A 0 A_Jump(256,3)
  	FML1 A 0 A_SetBlend("Orange",0.05,10)
	FML1 A 0 A_PlaySound("Melee/Firepunch",0)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" A 1 A_SetPitch(pitch-0.3)
	"####" B 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" C 1 A_SetPitch(pitch-0.3)
	"####" D 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerStrength2",1,3)
	"####" A 0 A_CustomPunch(30, 1, 0, "PunchCracker", 100)
	"####" A 0 A_Jump(256,2)
	"####" A 0 A_CustomPunch(90, 1, 0, "FlamePunchCracker", 150)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" E 1 A_SetPitch(pitch+0.3)
	"####" F 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" G 1 A_SetPitch(pitch+0.3)
	"####" H 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" I 1
	"####" J 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" K 1
	TNT1 A 5
	TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWZOOM)
	CLT2 ABC 1
	FMGU A 0 A_TakeInventory("ZoomReFire",1)
    MSTG A 0 A_TakeInventory("SynthFireZoom",1)
	Goto LIdle
  NullFlash:
	TNT1 A 0
	Stop
  Dualwelding:
	TNT1 A 0 A_Light0 //I guess you put here the equal amount of time to the tics of select animation
  RIdle:
	TNT1 A 0 A_JumpIfInventory("MacheteGoesFast",1,"CaberToss")
	RCLG A 0 A_JumpIfInventory("SynthFireRight",1,"Fire")
    RCLG A 0 A_JumpIfInventory("IsReloading",1,"RReload")
	RCLG A 1
    Loop
  Fire:
    RCLG A 0 A_JumpIfInventory("CradleClip",1,1)
	Goto RReload
	RCLF A 0 A_PlaySound("Colt/Fire",1,0.4)
	RCLF A 0 A_PlaySound("Colt/Add",5,0.8)
	RCLF A 0 A_FireCustomMissile("GunsmokeSpawner_Small_Dark",0,0,12,2)
	RCLF A 0 A_TakeInventory("CradleClip",1,TIF_NOTAKEINFINITE)
    RCLF A 0 A_FireBullets(1.50, 1.00, -1, 6, "BulletPuff")
	RCLF A 0 A_AlertMonsters
	RCLF A 0 A_Light2
    RCLF A 1 Bright A_SetPitch(pitch-0.75)
	RCLF B 1 Bright A_SetPitch(pitch-0.25)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	RCLF C 1 A_JumpIf(Health<75,1)
	RCLF DE 1
	LCLF A 0 A_Light1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	RCLF F 1 A_JumpIf(Health<50,1)
	RCLF GH 1
	LCLF A 0 A_Light0
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	RCLG A 1 A_JumpIf(Health<25,1)
	RCLG A 0 A_JumpIfInventory("SynthFireRight",1,"Fire")
	Goto RIdle
  RNope:
	RCLN A 0 A_PlaySound("Sidekick/Dry",4,0.7)
	RCLN A 0 A_TakeInventory("IsReloading",1)
	RCLN ABC 1
	RCLG A 8
    Goto RIdle
  RReload:
	LCLG A 0 A_JumpIfInventory("CradleClip",0,"RBack")
	//RCLG A 0 A_JumpIfInventory("Clip",1,1)
	//Goto RNope
	RCLR A 0 A_PlaySound("Colt/Open",4,0.8)
	RCLR AB 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR C 1 A_JumpIf(Health<75,2)
	RCLR DE 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR F 1 A_JumpIf(Health<50,2)
	RCLR GG 1 //A_FireCustomMissile("ColtCasingSpawnerRight",0,0,-2,0)
  RCasings:
	RCLR G 0 A_JumpIfInventory("CradleClip",0,"REnd")
	RCLR G 0 A_GiveInventory("CradleClip",1)
	RCLR G 0 A_FireCustomMissile("ColtCasingSpawnerRight",0,0,0,0)
	Goto RCasings
	//RCLR G 2
  //RStart:
	//TNT1 A 0 A_JumpIfInventory("CradleClip",0,"REnd")
	//TNT1 A 0 A_JumpIfInventory("Clip",1,1)
	//Goto REnd
	//TNT1 A 0 A_TakeInventory("Clip",1,1)
	//TNT1 A 0 A_GiveInventory("CradleClip",6)
	//goto RStart
   REnd:
	RCLR HI 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR J 1 A_JumpIf(Health<25,2)
	RCLR KL 1
	RCLR M 0 A_PlaySound("Colt/Close",4,0.8)
	RCLR MN 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR O 1 A_JumpIf(Health<75,2)
	RCLR PQ 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR R 1 A_JumpIf(Health<50,2)
	RCLR SS 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	RCLR R 1 A_JumpIf(Health<25,2)
	RCLR QPON 1
	RCLG A 2 A_TakeInventory("IsReloading",1)
	Goto RIdle
  RBack:
	RCLG A 0 A_TakeInventory("IsReloading",1)
	Goto RIdle
  AltFire:
	Stop
  CaberToss:
	RCLG A 1 A_JumpIfInventory("MacheteAmmo",1,1)
	Goto RIdle
	MCHT A 0 A_TakeInventory("MacheteAmmo",1)
    CLT1 CBA 1

    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<75,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<50,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<25,1)
	TNT1 A 1
    MC4S A 0 A_PlaySound("Machete1/Slash",1,0.9)
    MC4S A 0 A_PlaySound("Machete2/Slash",5,0.2)
	MCHT ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerStrength2",1,3)
	MCHT A 0 A_SpawnItemEX("MacheterangProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*35,0,sin(-pitch)*35,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	TNT1 A 0 A_Jump(256,2)
	MCHT A 0 A_SpawnItemEX("MacheterangBerserkProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*25,0,sin(-pitch)*25,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	// This solution is ten times better. Just let it bouncecount out.
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT D 1 A_JumpIf(Health<75,1)
	MCHT E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT F 1 A_JumpIf(Health<50,1)
	MCHT G 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT H 1 A_JumpIf(Health<25,1)
	MCHT I 1
	TNT1 A 3

   CLT1 ABC 1
	Goto RIdle
  Spawn:
    COLT X -1
    Stop
  }
}

ACTOR CradleClip : Ammo
{
   Inventory.MaxAmount 6
   Inventory.Icon COLTX0 //COLTA0
   +IGNORESKILL
}

ACTOR GraveClip : Ammo
{
   Inventory.MaxAmount 6
   Inventory.Icon COLTB0
   +IGNORESKILL
}