actor "Intervention" : RGUWeapon
{
  obituary "%k sniped %o with the Intervention."
  inventory.pickupmessage "Intervention"  
  //attacksound "intervention/fire"
  weapon.selectionorder 17
  weapon.ammotype "InterventionClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "InterventionAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    INTA A 2 //A_PlayWeaponSound("fal/select")
    INTA BCDEFGHIJKLMNOP 2 A_WeaponReady(WRF_NOPRIMARY)
    INTA P 0 A_JumpIfNoAmmo("Reload")
    INTA P 0 A_JumpIfInventory("Aiming",1,5)
    INTA P 0 A_JumpIfInventory("Reloading",1,"Reload")
    INTA P 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    INTA P 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTA P 1 A_WeaponReady
    goto Ready+16
    INTF G 0 A_JumpIfInventory("Reloading",1,"Reload")    
    INTF G 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    INTF G 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTF G 1 A_WeaponReady
    goto Ready+22
  Deselect:
    INTA L 0 A_TakeInventory("Aiming",1)
    INTA L 0 ACS_ExecuteAlways(602,0,0,0,0)
    INTA L 0 A_TakeInventory("Reloading",1)
    INTA L 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTA L 0 A_Lower
    INTA L 1 A_Lower
    goto Deselect+3
  Select:
    INTA A 0 A_Raise
	INTA A 0 ACS_ExecuteAlways(602,0,0,0,0)
	TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    loop
  Fire:	
    INTA N 0 A_JumpIfInventory("Aiming",1,"FireAim")
    INTA P 1 A_JumpIfNoAmmo("ReloadStart")
    INTA A 0 A_JumpIfInventory("Perk3_SteadyAim",1,"Fire_SteadyAim")
    INTB A 0 A_PlayWeaponSound("intervention/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    INTB AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,3)
    INTB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,3)	
    INTB A 2 BRIGHT A_FireBullets (15.0, 15.0, -1, 280, "SniperPuff", 1, 0)
    INTB B 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    INTB A 0 A_JumpIfNoAmmo("FireEmpty")
    INTB B 2 BRIGHT A_GunFlash
    INTB CDEF 3 
    INTB G 3 //A_PlaySound("intervention/open")
    INTB HIJK 3 
    INTB L 3 //A_PlaySound("intervention/close")
    INTB MN 3
    INTA P 2 A_JumpIfInventory("InterventionAmmo",1,2)
    INTA A 0 A_ReFire
    goto Ready+16
    INTA A 0 A_JumpIfNoAmmo("ReloadStart")
    INTA A 0 A_ReFire
    goto Ready+16
  FireEmpty:
    INTB B 2 BRIGHT A_GunFlash
    INTB C 3 
    INTA P 2 A_JumpIfInventory("InterventionAmmo",1,2)
    INTA A 0 A_ReFire
    goto Ready+16
    INTA A 0 A_JumpIfNoAmmo("ReloadStart")
    INTA A 0 A_ReFire
    goto Ready+16
  Hold:
    INTA P 3 A_JumpIfInventory("Aiming",1,"HoldAim")
    INTA P 1 A_ReFire
    goto Ready+16
  HoldAim:
    INTF G 3
    INTF G 1 A_ReFire
    goto Ready+22
  FireAim:
    INTF G 1 A_JumpIfNoAmmo("ReloadStart")
    INTF A 0 A_PlayWeaponSound("intervention/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    INTF AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,0,3)
    INTF A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,0,3)
    INTF G 0 A_JumpIfInventory("Perk3_SteadyAim_Pro",1,2)
	INTA N 0 A_JumpIfInventory("Moving",1,"FireAimMoving")
    INTF G 0 A_JumpIfInventory("Perk2_StoppingPower_Pro",1,3)	
	INTF G 2 BRIGHT A_FireBullets (0.1, 0.1, 1, 280, "SniperPuff", 1, 0)
	INTF G 0 A_Jump(255, "FinishFireAim")	
	INTF G 0 BRIGHT A_FireBullets (0.1, 0.1, 1, 0, "SniperPuff", 0, 0)
	INTF A 0 BRIGHT A_RailAttack(280,0,1,"none","none",1,0,"SniperPuff")
  FinishFireAim:
    INTF A 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    INTF A 0 A_JumpIfNoAmmo("FireAimEmpty")
    INTF G 2 BRIGHT A_GunFlash
    INTF GGGG 3 
    INTF G 3 //A_PlaySound("intervention/open")
    INTF GGGG 3 
    INTF G 3 //A_PlaySound("intervention/close")
    INTF GG 3
    INTF G 2 A_JumpIfInventory("InterventionAmmo",1,2)
    INTF A 0 A_ReFire
    goto Ready+22
    INTF A 0 A_JumpIfNoAmmo("ReloadStart")
    INTF A 0 A_ReFire
    goto Ready+22
  FireAimMoving:
    INTF G 2 BRIGHT A_FireBullets (6.0, 6.0, -1, 280, "SniperPuff", 1, 0)
    goto FinishFireAim
  FireAimEmpty:
    INTF G 2 BRIGHT A_GunFlash
    INTF G 3 
    INTF G 2 A_JumpIfInventory("InterventionAmmo",1,2)
    INTF A 0 A_ReFire
    goto Ready+22
    INTF A 0 A_JumpIfNoAmmo("ReloadStart")
    INTF A 0 A_ReFire
    goto Ready+22
  Reload: //AltFire:
    INTF A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadStart")
    INTF A 0 A_TakeInventory("Reloading",1)
    goto Ready+19
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    INTC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    INTC A 3 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    INTC BCDE 3 A_WeaponReady(WRF_NOFIRE)
    INTC F 3 A_PlaySoundEx("intervention/open","SoundSlot5")
    INTC GHIJKLMNOPQRST 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTC U 3 A_PlaySoundEx("intervention/clipout","SoundSlot5")
    INTC WXYZ 3 //A_TakeInventory("InterventionClip",1)
    INTD ABCDEF 3 A_WeaponReady(WRF_NOFIRE)
    INTD G 3 A_PlaySoundEx("intervention/clipin","SoundSlot5")
    INTC G 0 A_TakeInventory("Reloading",1)
    goto ReloadAmmo
  ReloadAmmo:
    INTD A 0 A_GiveInventory("InterventionClip",1)
    INTD A 0 A_TakeInventory("InterventionAmmo",1)
    INTD A 0 A_JumpIfInventory("InterventionClip",5,"ReloadEnd")
    INTD A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    INTD HIJKLM 3 A_WeaponReady(WRF_NOFIRE)
    INTD N 3 A_PlaySoundEx("intervention/close","SoundSlot5")
    INTD OPQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTD D 0 A_ReFire
    goto Ready+16
  AltFire:
    INTF A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    INTF ABCDEF 1
    INTF F 0 ACS_ExecuteAlways(642,0,0,0,0)
    INTF G 1 A_ZoomFactor(3.0,ZOOM_INSTANT)
    INTF F 0 A_GiveInventory("Aiming",1)
    INTF F 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+22
  AltFire2:
    INTF F 1 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTF EDCBA 1
    INTF A 0 A_TakeInventory("Aiming",1)
    INTF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+16
  ReloadStartAim:
    INTF F 1 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTF EDCBA 1
    INTF A 0 A_TakeInventory("Aiming",1)
    INTF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  Flash:
    TNT1 A 2 bright A_Light1
    TNT1 A 0 bright A_Light0
    stop
  Spawn:
    WEAP H 15
    WEAP A 0 A_SpawnItem("InterventionPickup")
    stop
  Fire_SteadyAim:
    INTB A 0 A_PlayWeaponSound("intervention/fire")
    TNT1 F 0 A_GiveInventory("InCombatCrosshair", 35)
    TNT1 F 0 A_GiveInventory("InCombat", 5)
    INTB AA 0 A_FireCustomMissile("WeaponSmokePuffShotgun",0,0,6,3)
    INTB A 0 A_FireCustomMissile("WeaponSmokePuff_BigMuzzle",0,0,6,3)
    INTB A 2 BRIGHT A_FireBullets (10.0, 10.0, -1, 280, "SniperPuff", 1, 0)
    INTB B 0 BRIGHT ACS_ExecuteAlways(600,0,0,0,0)
    INTB A 0 A_JumpIfNoAmmo("FireEmpty")
    INTB B 2 BRIGHT A_GunFlash
    INTB CDEF 3 
    INTB G 3 //A_PlaySound("intervention/open")
    INTB HIJK 3 
    INTB L 3 //A_PlaySound("intervention/close")
    INTB MN 3
    INTA P 2 A_JumpIfInventory("InterventionAmmo",1,2)
    INTA A 0 A_ReFire
    goto Ready+16
    INTA A 0 A_JumpIfNoAmmo("ReloadStart")
    INTA A 0 A_ReFire
    goto Ready+16
  ReloadStart_SOH:  
    INTC A 2  
    INTC BCDE 2 A_WeaponReady(WRF_NOFIRE)
    INTC F 2 A_PlaySoundEx("intervention/open","SoundSlot5")
    INTC GHIJKLMNOPQRST 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTC U 2 A_PlaySoundEx("intervention/clipout","SoundSlot5")
    INTC WXYZ 2 //A_TakeInventory("InterventionClip",1)
    INTD ABCDEF 2 A_WeaponReady(WRF_NOFIRE)
    INTD G 2 A_PlaySoundEx("intervention/clipin","SoundSlot5")
    INTC G 0 A_TakeInventory("Reloading",1)
    goto ReloadAmmo
  ReloadAmmo_SOH:
    INTD A 0 A_GiveInventory("InterventionClip",1)
    INTD A 0 A_TakeInventory("InterventionAmmo",1)
    INTD A 0 A_JumpIfInventory("InterventionClip",5,"ReloadEnd")
    INTD A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd_SOH:
    INTD HIJKLM 2 A_WeaponReady(WRF_NOFIRE)
    INTD N 2 A_PlaySoundEx("intervention/close","SoundSlot5")
    INTD OPQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTD D 0 A_ReFire
    goto Ready+16
  FragGrenade:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"FragGrenade_SOH")
    GRNA A 2 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 2
    TNT1 A 15 
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 2
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 2 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 2 
    goto Ready+1
  FragGrenade_SOH:
    GRNA A 1 A_PlaySound("grenade/pinpull")
    GRNA BCDEFGH 1
    TNT1 A 10
    TNT1 A 0 A_PlaySound("grenade/throw")
    GRNA A 0 A_PlaySoundEx("us/grenades","Voice")
    GRNA IJK 1
    GRNA L 0 A_TakeInventory("FragGrenadeAmmo",1)
    GRNA L 0 A_TakeInventory("ThrowingGrenade",1)
    U45A L 0 A_TakeInventory("Aiming",1)
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    GRNA L 1 A_FireCustomMissile("FragGrenade",0,0,0,16)
    GRNA MN 1 
    goto Ready+1
  KnifeAttack:
    U45F A 0 A_ZoomFactor(1.0)
    U45A L 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    U45A L 0 A_TakeInventory("Aiming",1)
    U45A L 0 A_TakeInventory("Reloading",1)
    U45F A 0 ACS_ExecuteAlways(602,0,0,0,0)
    U45A L 0 A_JumpIfInventory("Perk1_SOH_Pro",1,"KnifeAttack_SOH")
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 20
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH:
    U45C A 0 A_JumpIfInventory("Perk3_Commando",1,"KnifeAttack_SOH_Commando")
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",96)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  KnifeAttack_SOH_Commando:
    KNFA A 0 ACS_ExecuteAlways(599,0,0,0,0)
    KNFA AB 1
    KNFA B 0 A_PlaySound("knife/swing")
    KNFA CDE 1 A_CustomPunch(34,1,0,"KnifePuff",160)
    KNFA FGHIJKL 1 
    TNT1 A 10
    GRNA L 0 A_TakeInventory("KnifeAttack",1)
    goto Ready+1
  }
}

actor InterventionClip : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 5
    ammo.backpackamount 0
    ammo.backpackmaxamount 5
    +IGNORESKILL
}
actor "Intervention Thermal" : "Intervention"
{
  obituary "%k sniped %o with the Intervention."
  inventory.pickupmessage "Intervention"  
  //attacksound "intervention/fire"
  weapon.selectionorder 17
  weapon.ammotype "InterventionClip"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "InterventionAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Ready:
    INTA A 2 //A_PlayWeaponSound("fal/select")
    INTA BCDEFGHIJKLMNOP 2 A_WeaponReady(WRF_NOPRIMARY)
    INTA P 0 A_JumpIfNoAmmo("Reload")
    INTA P 0 A_JumpIfInventory("Aiming",1,5)
    INTA P 0 A_JumpIfInventory("Reloading",1,"Reload")
    INTA P 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    INTA P 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTA P 1 A_WeaponReady
    goto Ready+16
    INTF G 0 A_JumpIfInventory("Reloading",1,"Reload")    
    INTF G 0 A_JumpIfInventory("ThrowingGrenade",1,"FragGrenade")
    INTF G 0 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTF G 0 A_GiveInventory("SniperInfrared",1)
    INTF G 1 A_WeaponReady
    goto Ready+22
  Deselect:
    INTF G 0 A_TakeInventory("PowerLightAmp",500)
    INTA L 0 A_TakeInventory("Aiming",1)
    INTA L 0 ACS_ExecuteAlways(602,0,0,0,0)
    INTA L 0 A_TakeInventory("Reloading",1)
    INTA L 0 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTA L 0 A_Lower
    INTA L 1 A_Lower
    goto Deselect+3
  AltFire:
    INTF A 0 A_JumpIfInventory("Aiming",1,"AltFire2")
    INTF ABCDEF 1
    INTF F 0 ACS_ExecuteAlways(642,0,0,0,0)
    INTF G 1 A_ZoomFactor(3.0,ZOOM_INSTANT)
    INTF F 0 A_GiveInventory("Aiming",1)
    INTF F 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+22
  AltFire2:
    INTF G 0 A_TakeInventory("PowerLightAmp",500)
    INTF F 1 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTF EDCBA 1
    INTF A 0 A_TakeInventory("Aiming",1)
    INTF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto Ready+16
  ReloadStartAim:
    INTF G 0 A_TakeInventory("PowerLightAmp",500)
    INTF F 1 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTF EDCBA 1
    INTF A 0 A_TakeInventory("Aiming",1)
    INTF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  }
}

actor InterventionThermal : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor "Intervention Ex Mags" : "Intervention"
{
  obituary "%k sniped %o with the Intervention."
  inventory.pickupmessage "Intervention"  
  //attacksound "intervention/fire"
  weapon.selectionorder 17
  weapon.ammotype "InterventionClip2"
  weapon.ammouse 1
  weapon.ammogive 0
  weapon.ammotype2 "InterventionAmmo"
  weapon.ammouse2 0
  weapon.ammogive2 0
  states
  {
  Reload: //AltFire:
    INTF A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadStart")
    INTF A 0 A_TakeInventory("Reloading",1)
    goto Ready+19
  ReloadStart:
  	TNT1 A 0 ACS_ExecuteAlways(652,0,0,0,0) // Shout "Reloading" 
    INTC A 0 A_JumpIfInventory("Aiming",1,"ReloadStartAim")
    INTC A 3 A_JumpIfInventory("Perk1_SOH",1,"ReloadStart_SOH")
    INTC BCDE 3 A_WeaponReady(WRF_NOFIRE)
    INTC F 3 A_PlaySoundEx("intervention/open","SoundSlot5")
    INTC GHIJKLMNOPQRST 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTC U 3 A_PlaySoundEx("intervention/clipout","SoundSlot5")
    INTC WXYZ 3 //A_TakeInventory("InterventionClip",1)
    INTD ABCDEF 3 A_WeaponReady(WRF_NOFIRE)
    INTD G 3 A_PlaySoundEx("intervention/clipin","SoundSlot5")
    INTC G 0 A_TakeInventory("Reloading",1)
    goto ReloadAmmo
  ReloadAmmo:
    INTD A 0 A_GiveInventory("InterventionClip2",1)
    INTD A 0 A_TakeInventory("InterventionAmmo",1)
    INTD A 0 A_JumpIfInventory("InterventionClip2",10,"ReloadEnd")
    INTD A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd:
    INTD HIJKLM 3 A_WeaponReady(WRF_NOFIRE)
    INTD N 3 A_PlaySoundEx("intervention/close","SoundSlot5")
    INTD OPQRS 3 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTD D 0 A_ReFire
    goto Ready+16
  ReloadStart_SOH:  
    INTC A 2  
    INTC BCDE 2 A_WeaponReady(WRF_NOFIRE)
    INTC F 2 A_PlaySoundEx("intervention/open","SoundSlot5")
    INTC GHIJKLMNOPQRST 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTC U 2 A_PlaySoundEx("intervention/clipout","SoundSlot5")
    INTC WXYZ 2 //A_TakeInventory("InterventionClip",1)
    INTD ABCDEF 2 A_WeaponReady(WRF_NOFIRE)
    INTD G 2 A_PlaySoundEx("intervention/clipin","SoundSlot5")
    INTC G 0 A_TakeInventory("Reloading",1)
    goto ReloadAmmo
  ReloadAmmo_SOH:
    INTD A 0 A_GiveInventory("InterventionClip2",1)
    INTD A 0 A_TakeInventory("InterventionAmmo",1)
    INTD A 0 A_JumpIfInventory("InterventionClip2",10,"ReloadEnd")
    INTD A 0 A_JumpIfInventory("InterventionAmmo",1,"ReloadAmmo")
    goto ReloadEnd
  ReloadEnd_SOH:
    INTD HIJKLM 2 A_WeaponReady(WRF_NOFIRE)
    INTD N 2 A_PlaySoundEx("intervention/close","SoundSlot5")
    INTD OPQRS 2 A_JumpIfInventory("KnifeAttack",1,"KnifeAttack")
    INTD D 0 A_ReFire
    goto Ready+16
  ReloadStartAim:
    INTF F 1 A_ZoomFactor(1.0,ZOOM_INSTANT)
    INTF EDCBA 1
    INTF A 0 A_TakeInventory("Aiming",1)
    INTF A 0 ACS_ExecuteAlways(602,0,0,0,0)
    goto ReloadStart+1
  }
}

actor InterventionClip2 : Ammo
{
    inventory.icon "CLIPA0"
    inventory.amount 0
    inventory.maxamount 10
    ammo.backpackamount 0
    ammo.backpackmaxamount 10
    +IGNORESKILL
}

actor InterventionExMags : Inventory
{
    inventory.amount 0
    inventory.maxamount 1
}
actor InterventionPickup : CustomInventory
{
  inventory.pickupmessage "Intervention"  
  inventory.pickupsound "misc/w_pkup"
  +INVENTORY.AUTOACTIVATE
  inventory.respawntics 35
  scale 0.15
  States
  {
  Spawn:
    WEAP H -1
    stop
  Pickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("Intervention",1,"FailPickup") // If the player already has this weapon, they get more ammo for it
    JDGP A 0 A_JumpIfInventory("Intervention Ex Mags",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("Intervention Thermal",1,"FailPickup")
    JDGP A 0 A_JumpIfInventory("MaxWeaponsFilled",0,"FailPickup2")
    BKPK A 0 ACS_ExecuteWithResult(618,1,0,0)
    stop
  AmmoPickup:
    JDGP A 0
    JDGP A 0 A_JumpIfInventory("InterventionAmmo",0,"FailPickup")
    JDGP A 0 A_GiveInventory("InterventionAmmo",5)
    stop
  FailPickup:
    WEAP H 1
    fail
  FailPickup2:
    WEAP H 1 
    BKPK A 0 ACS_ExecuteAlways(620,0,3,0,0)
    fail
  }
}
