// Decorate code for Karen
Actor Echo : PlayerPawn
{
     
+NOSKIN
+NOICEDEATH
+QUICKTORETALIATE
+GHOST     
    Health 100
	Player.Maxhealth 100
    Radius 16
    Height 56
    Mass 700
	scale 1.0
    PainChance 256
    Player.ColorRange 112, 127
	Player.Weaponslot 1, FalTec20
	Player.Weaponslot 2, LegionRifle
	Player.Weaponslot 3, RemoteMine
	Player.StartItem "SpecialAbility", 1
	Player.StartItem "FalTec20"
	Player.StartItem "LegionRifle"
	Player.StartItem "RemoteMine"
	Player.StartItem "RifleXAmmo", 30
	Player.StartItem "XRifleXAmmo", 20
	Player.StartItem "RifleXAmmoPickup", 1
	Player.StartItem "Satch", 3
    Player.DisplayName "Echo"
	Player.ScoreIcon "ECHOST"
    Player.StartItem "IsHuman", 1
    Player.StartItem "Screamer", 0
    Player.ForwardMove 1.1, 1.1
    Player.SideMove 1.1, 1.1
	Damagefactor "AntiAirbolt", 0.0
	Damagefactor "Fleshbent", 1.0
	Damagefactor "Normal", 1.0
	Damagefactor "Yureiball", 0.6
	Damagefactor "Sentinel", 0.0
	Damagefactor "MechPewPews", 0.0
	Damagefactor "KarenExplo", 0.1
    Damagefactor "GasterSmokeHurt", 0.0
	Damagefactor "StrifeSuit", 0.0
    Player.SoundClass "Raimi"
    LimitedToTeam 0
    States
    {
 Spawn:
		ZHRT A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
        ZHRT A 120 Setplayerproperty(0,0,0)
		ZHRT A 10 A_settranslucent(0.7)	
		ZHRT A 10 A_settranslucent(0.5)	
		ZHRT A 10 A_settranslucent(0.3)	
		ZHRT A 10 A_settranslucent(0.1)	
		ZHRT A 1
		wait
 See:
   ZHRT A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
   ZHRT A 0 A_JumpIfHealthlower(50,"INeedHealingSee")
   ZHRT A 0 A_Settranslucent(1.0)
   ZHRT A 4
   ZHRT B 4 A_SpawnItemEx ("EchoStomp", 0, 0, 0, 0, 0, -20, 0,0, 0)
   ZHRT C 4
   ZHRT D 4 A_SpawnItemEx ("EchoStomp", 0, 0, 0, 0, 0, -20, 0,0, 0)
   Goto Spawn
 INeedHealingSee:
   ZHRT A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
   ZHRT A 0 A_SpawnItemEx("INeedHealingTrail",random(-20,20),random(-20,20),0,0,0,10)
   ZHRT A 0 A_Settranslucent(1.0)
   ZHRT A 4
   ZHRT B 4 A_SpawnItemEx ("EchoStomp", 0, 0, 0, 0, 0, -20, 0,0, 0)
   ZHRT C 4
   ZHRT D 4 A_SpawnItemEx ("EchoStomp", 0, 0, 0, 0, 0, -20, 0,0, 0)
   Goto Spawn
 Missile:
   ZHRT F 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
   ZHRT F 0 A_Settranslucent(1.0)
   ZHRT F 6 Bright
   Goto Spawn
 Melee:
   ZHRT F 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
   ZHRT F 6 Bright
   Goto Spawn
	Pain.TeleOtherPlant:
	TNT1 A 0 A_GiveInventory("TeleOtherPlanted",1)
	Goto Pain
	Pain.TeleOtherActivateDamage:
	TNT1 A 0 A_JumpIfInventory("TeleOtherPlanted",1,"TeleOtherSend")
	Goto Pain
	TeleOtherSend:
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 ACS_ExecuteAlways(466,0,2)
	ZHRT G 1 A_PlaySound("TeleOther/activate",CHAN_6,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	Goto Pain
	Death.TeleOtherActivateDamage:
	TNT1 A 0 A_JumpIfInventory("TeleOtherPlanted",1,"TeleOtherSplode")
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 A_GiveToTarget("KilledMe",1)
	ZHRT G 1 A_PlaySound("Gibbage/XSplat")
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
	TeleOtherSplode:
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 ACS_ExecuteAlways(466,0,2)
	TNT1 A 0 A_GiveToTarget("KilledMe",1)
	ZHRT G 1 A_PlaySound("Gibbage/XSplat")
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_6,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
  Pain.Choke:
	TNT1 A 0 A_GiveToTarget("Health",2)
	TNT1 A 0 A_GiveToTarget("ChokeCharging",1)
	Goto Pain
  Pain.JusticarSpike:
	TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
	TNT1 A 0 A_GiveToTarget("Health",2)
  Pain:
	ZHRT G 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
    ZHRT G 0 A_Settranslucent(1.0)
    ZHRT G 4
    ZHRT G 4 A_Pain
    Goto Spawn
	Pain.LoonaClawing:
	TNT1 A 0 A_GiveToTarget("Health",6)
	ZHRT G 20 Setplayerproperty(0,1,0)
	ZHRT G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Pain.LoonaClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",5)
	ZHRT G 20 Setplayerproperty(0,1,0)
	ZHRT G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Pain.LoonaClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",8)
	ZHRT G 20 Setplayerproperty(0,1,0)
	ZHRT G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Death.LoonaClawing:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Death.LoonaClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Death.LoonaClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Pain.GloomWatcherLure:
	TNT1 A 0 ACS_ExecuteAlways(134)
	TNT1 A 0 A_Playsound("GloomWatcher/FeintAttack",CHAN_7)
	Goto pain
	Death.GloomWatcherlure:
	TNT1 A 0 ACS_ExecuteAlways(134)
	TNT1 A 0 A_Playsound("GloomWatcher/FeintAttack",CHAN_7)
	Goto Death.Jitter
	GloomDeath:
	TNT1 A 1 Damagething(99999,18)
	Goto Death
	Death.Fleshbent:
	TNT1 A 0 A_GiveToTarget("TentacleAmmo",2)
	TNT1 A 0 A_GiveToTarget("Soulscepter1",15)
	TNT1 A 0 A_GiveToTarget("Soulscepter2",50)
	Goto Death.Jitter
	Pain.BastetClawing:
		TNT1 A 0 A_GiveToTarget("Health",4)
		Goto Pain
	Pain.BastetClawingLightSFX:
		TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_5)
		TNT1 A 0 A_GiveToTarget("Health",3)
		Goto Pain
	Pain.BastetClawingHeavySFX:
		TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_5)
		TNT1 A 0 A_GiveToTarget("Health",6)
		Goto Pain
	Pain.Sickle:
		TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
	Pain.Wendigo:
		TNT1 A 0 A_PlaySound("RAVEN1",CHAN_5)
		TNT1 A 0 A_SpawnItemEx ("GIB4", 0, 0, random(0,42), 0, 0, random(2,4), random(0,360), 128)
		TNT1 A 0 A_SpawnItemEx ("GIB4", 0, 0, random(0,42), 0, 0, random(2,4), random(0,360), 128)
		Goto Pain
	Pain.Justicar:
	TNT1 A 0 A_custommissile("Justicarattack",14,0,random(0,360))
	TNT1 A 0 A_GiveToTarget("Health",1)
	TNT1 A 0 A_GiveToTarget("JusticarSecondaryAmmo",1)
	Goto pain
  Pain.Creepstun:
    ZHRT G 0 A_Pain
	ZHRT G 0 A_GiveToTarget("health",5)
	ZHRT G 40 Setplayerproperty(0,1,0)
	ZHRT G 2 Setplayerproperty(0,0,0)
	Goto Spawn
  Death.Creeper:
	ZHRT A 0 A_PlaySoundEx("creeperattack", "Body")
	ZHRT A 0 A_SpawnItemEx("CreeperPopUp",0,0,10)
	TNT1 A 0 A_GiveToTarget("GhoulAmmo",1)
	ZHRT A 0 A_GiveToTarget("Creeperheal",1)
    ZHRT A 0 ACS_ExecuteAlways(997,0,1)
	goto DeathAnimAlt
  Death.Creepstun:
	ZHRT A 0 A_GiveToTarget("Unlock13",1)
	ZHRT A 0 A_GiveToTarget("CreepGotya",1)
	goto DeathAnimAlt
  Death.SjasScream:
  Death.FrostbiteWind:
  Death.EmtalicSaw:
  Death.LichFire:
    ZHRT A 0 A_GiveToTarget("KilledJ",1)
    Goto DeathAnim
  Death:
  DeathAnim:
	ZHRT A 0 A_GiveToTarget("KillBeep",1)
	ZHRT A 0 A_GiveInventory("ItemDeath",1)
    ZHRT A 0 A_Settranslucent(1.0)
	ZHRT A 0 A_TakeInventory("KilledCount",999)
    ZHRT A 0 A_GiveToTarget("KilledMe",1)
    ZHRT A 0 A_GiveToTarget("KilledKaren",1)
    ZHRT H 8
    ZHRT I 8 A_PlayerScream
    ZHRT J 8 A_NoBlocking
    ZHRT KL 8
    ZHRT L -1
    Stop
  DeathAnimAlt:
	ZHRT A 0 A_GiveToTarget("KillIndicator",1)
	ZHRT A 0 A_GiveInventory("ItemDeath",1)
    ZHRT A 0 A_Settranslucent(1.0)
	ZHRT A 0 A_TakeInventory("KilledCount",999)
    ZHRT A 0 A_GiveToTarget("KilledMe",1)
    ZHRT A 0 A_GiveToTarget("KilledKaren",1)
    ZHRT H 8
    ZHRT I 8 A_PlayerScream
    ZHRT J 8 A_NoBlocking
    ZHRT KL 8
    ZHRT L -1
    Stop
	Death.GhoulChainSaw:
	TNT1 A 0 A_GiveToTarget("Health",50)
	TNT1 A 0 A_GiveToTarget("BearTarpsAmmo",1)
	TNT1 A 0 A_GiveToTarget("SawyerRageammo",10)
	TNT1 A 0 A_GiveToTarget("DUMMY_SawyerBloodyChainsaw", 1)
	Goto Death.Jitter
	Death.BastetClawing:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.BastetClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.BastetClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.Choke:
		TNT1 A 0 A_GiveToTarget("Health",25)
		TNT1 A 0 A_GiveToTarget("ChokeCharging",40)
	Goto Death.Jitter
	Death.JusticarSpike:
		TNT1 A 0 A_GiveToTarget("Health",15)
	Goto Death.Jitter
	Death.Sinistar:
		TNT1 A 0 A_GiveToTarget("SiniPrimary",1)
	Goto Death.Jitter
	Death.MapGibber:
		TNT1 A 0 A_PlaySound("car/hit",chan_auto)
	Death.MapGibber2:
  Death.Jitter:
	ZHRT A 0 A_GiveToTarget("KillBeep",1)
	ZHRT A 0 A_GiveInventory("ItemDeath",1)
    ZHRT A 0 A_Settranslucent(1.0)
    ZHRT A 0 A_GiveToTarget("Crunched",1)
	ZHRT A 0 A_GiveToTarget("KilledMe",1)
	ZHRT A 0 A_GiveToTarget("KilledKaren",1)
	ZHRT G 1 A_PlaySound("gibbage/xsplat")
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
  Death.JitterAlt:
	ZHRT A 0 A_GiveToTarget("KillIndicator",1)
	ZHRT A 0 A_GiveInventory("ItemDeath",1)
    ZHRT A 0 A_Settranslucent(1.0)
    ZHRT A 0 A_GiveToTarget("Crunched",1)
	ZHRT A 0 A_GiveToTarget("KilledMe",1)
	ZHRT A 0 A_GiveToTarget("KilledKaren",1)
	ZHRT G 1 A_PlaySound("gibbage/xsplat")
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
	Death.Harvester:
		TNT1 A 0 A_GiveToTarget("SoulHarvesterFragment",1)
		TNT1 A 0 A_GiveToTarget("KilledJ",1)
		Goto Death.Jitter
	Death.HarvesterRock:
		TNT1 A 0 ACS_NamedExecute("SilverFieldsBell",55)
		Goto DeathAnim
	Death.HarvesterAlt:
		TNT1 A 0 A_GiveToTarget("Crunched2",1)
		TNT1 A 0 ACS_NamedExecute("SilverFieldsBell",55)
		Goto Death.Jitter
  Death.Ravager:
		ZHRT A 0 A_GiveToTarget("KilledR",1)
		ZHRT A 0 A_GiveToTarget("Health",100)
		ZHRT A 0 ACS_ExecuteAlways(997,0,2)
		ZHRT A 0 A_PlaySoundEx("RavagerAttack","Body")
		ZHRT A 0 A_SpawnItemEx("RavagerHit",0,0,32)
		Goto DeathAnimAlt
	Death.RavagerBall:
		ZHRT A 0 A_GiveToTarget("RavagerGotYa",1)
		ZHRT A 0 A_GiveToTarget("KilledJ",1)
		Goto DeathAnimAlt
	Death.Yurei:
		ZHRT A 0 A_GiveToTarget("KilledY",1)
		ZHRT A 0 A_PlaySoundEx("YureiKill1","Body",0,1)
		ZHRT A 0 ACS_ExecuteAlways(997,0,3)
		Goto DeathAnimAlt
	Death.YureiBall:
		ZHRT A 0 A_GiveToTarget("Health",10)
		ZHRT A 0 A_SpawnItemEx("BallFire")
		Goto Death.SjasScream
	Death.UboaRawrScream:
		Goto DeathAnimAlt
	Death.Misty:
	Death.Whiteface:
		ZHRT A 0 A_GiveToTarget("KillBeep",1)
		ZHRT A 0 A_GiveInventory("ItemDeath",1)
	    ZHRT A 0 A_Settranslucent(1.0)
		ZHRT A 0 A_GiveToTarget("KilledMe",1)
		ZHRT A 0 A_GiveToTarget("KilledM",1)
		ZHRT HHHH 2 A_FadeOut(0.1)
		ZHRT A 0 A_PlayerScream
		ZHRT IIIIJJ 2 A_FadeOut(0.1)
		ZHRT A 0 A_NoBlocking
		NULL A -1
		Stop
	Death.Clowny:
		ZHRT A 0 ACS_ExecuteAlways(997,0,4)
		ZHRT A 0 A_GiveToTarget("KilledC",1)
		ZHRT A 0 A_GiveToTarget("ClownyAmmo",5)
		Goto DeathAnim
	Death.Mohoph:
		TNT1 A 0 A_GiveToTarget("MorphAmmo", 1)
		ZHRT A 0 A_GiveToTarget("TransKaren",1)
		ZHRT A 0 A_PlaySoundEx("MohophKill","Body")
		ZHRT A 0 ACS_ExecuteAlways(997,0,5)
		Goto DeathAnim
	Death.EmtalicWeak:
		ZHRT A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto DeathAnim
	Death.Emtalic:
		ZHRT A 0  A_PlaySoundEx("RamSuccess","Body")
		Goto Death.Jitter
	Death.I1:
		ZHRT A 0 A_SpawnItemEx("Heart",0,0,32,random(2,3),momy,random(8,12),random(-180,180))
		ZHRT A 0 A_GiveToTarget("KilledI1",1)
		Goto DeathAnim
	Death.I2:
		ZHRT A 0 A_GiveToTarget("KillBeep",1)
		ZHRT A 0 A_GiveInventory("ItemDeath",1)
	    ZHRT A 0 A_Settranslucent(1.0)
		ZHRT A 0 A_GiveToTarget("KilledMe",1)
		ZHRT A 0 A_GiveToTarget("KilledI2",1)
		ZHRT A 0 A_GiveToTarget("Clip",1)
		ZHRT G 0 SetPlayerProperty(0,1,4)
		ZHRT G 0 A_Stop
		ZHRT GGGGGGGGGGGGGG 5 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		NULL A 0 A_PlayerScream
		NULL A 0 ACS_ExecuteAlways(997,0,6)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
		NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		NULL A 1 A_SpawnItemEx("SkullGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A 1 A_SpawnItemEx("ChestGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("ArmGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("HandGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A 1 A_SpawnItemEx("CoccyxGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("LegGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AAAAAA 1 A_SpawnItemEx("BoneGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A -1 A_NoBlocking
		Stop
	Death.I3:
		ZHRT A 0 A_GiveToTarget("KillBeep",1)
		ZHRT A 0 A_GiveInventory("ItemDeath",1)
		ZHRT A 0 A_GiveToTarget("KilledMe",1)
		ZHRT A 0 A_GiveToTarget("KilledI3",1)
		ZHRT HHHHHHHH 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		ZHRT I 0 A_PlayerScream
		ZHRT IIIIIIII 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		ZHRT J 0 A_NoBlocking
		ZHRT JJJJJJJJKKKKKKKKLLLLLLLLLLLLLL 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		ZHRT LLLLLLLL 3 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		ZHRT L -1
		Stop
	Death.I4:
		ZHRT A 0 A_GiveToTarget("KilledI4",1)
		Goto DeathAnim
	Death.I5:
		ZHRT A 0 A_GiveToTarget("KilledI5",1)
		Goto DeathAnim
	Pain.RavagerBall:
		ZHRT A 0 ACS_ExecuteAlways(920,0)
		Goto Pain
	Pain.YureiBall:
		ZHRT A 0 A_GiveToTarget("Health",10)
		ZHRT A 0 A_SpawnItemEx("BallFire")
		Goto Pain
	Pain.Emtalic:
		ZHRT A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto Pain
	Pain.EmtalicWeak:
		ZHRT A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto Pain
	Death.Tenebra:
		TNT1 A 0 A_GiveToTarget("Health",20)
		Goto DeathAnim
	Death.TenebraRail:
	Death.Telefrag:
	Death.Grenade:
	Death.Termissiles:
	Death.ChaosExpl12:
	Death.KarenExplo:
	Death.IlluNukeKABUUM:
	Death.CalebDynamite:
	Death.Wendigo:
	Death.MorphRipperGib:
	Death.DarkVortex:
	Death.ImpostorJitter:
	Death.PuppetStrings:
	Death.LichIce:
	Death.LichLightning:
	Death.AsylumCannonBall:
		Goto Death.Jitter
	Death.TrueDivine:
		TNT1 A 0 A_PlaySoundEx("SoulSnatchStinger",CHAN_AUTO,0,1)
		TNT1 A 0 A_SpawnItemEx("SoulSnatch")
		Goto Death.JitterAlt
	Death.Judgement:
		TNT1 A 0 A_SpawnItemEx("StellarisThunderFX")
		Goto Death.JitterAlt
	Death.VoltMelee:
	Death.AmperRail:
		TNT1 A 0 A_GiveToTarget("VoltRingAmmo",2)
		TNT1 A 0 A_GiveToTarget("AmperSpeedTokenCheck",1)
		Goto Death.Jitter
	Pain.FrostbiteWind:
	Pain.Ravager:
	Pain.Juglava:
	Pain.HarvesterRock:
	Pain.EmtalicSaw:
	Pain.MorphRipper:
	Pain.MorphRipperGib:
	Pain.I1:
	Pain.I3:
	Pain.ZombiePoison:
	Pain.Asylum:
	Pain.AsylumCannonBall:
	Pain.FleshlingMissile:
	Pain.DarkVortex:
	Pain.ImpostorJitter:
	Pain.BlueFire:
	Pain.PuppetStrings:
	Pain.LichFire:
	Pain.LichIce:
	Pain.LichLightning:
	Pain.Whiteface:
		TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
		Goto Pain
	}
}

Actor EchoStomp : CyborgStomp
{
	DeathSound "EchoStep"
}

ACTOR FalTec20 : weapon
{
	Weapon.SelectionOrder 1003
	Weapon.AmmoType1 "RifleXAmmo"
	Weapon.AmmoUse1 1
	Weapon.AmmoGive1 0
	Weapon.AmmoType2 "RifleXAmmoPickup"
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 2
	Inventory.icon "TNT1A0"
	Weapon.SlotNumber 4
	attacksound "Weapons/Rifle/Fire"
	Inventory.PickupSound "Weapons/Rifle/Click"
	Inventory.PickupMessage "You picked up an Assault Rifle!"
	Obituary "%o became an entity of lead."
	+Weapon.Ammo_Optional
	+Weapon.Alt_Ammo_Optional
	+Weapon.NoAlert
	+Weapon.NoAutoFire	
	Damagetype "AR"
	Scale 0.75
	States
	{
	Spawn:
		4IFL A -1
		Stop
	Select:
		TNT1 A 0 A_TakeInventory("CyborgDashCheck")
		4IFR H 1 Offset(200,50) A_PlaySound("Weapons/Select2")
		4IFR I 1 Offset(175,49)
		4IFR J 1 Offset(140,47)
		4IFR K 1 Offset(110,45)
		4IFR L 1 Offset(65,43)
		4IFR M 1 Offset(50,41)
		4IFR N 1 Offset(40,39)
		4IFR O 1 Offset(32,38) 
		4IFR P 1 Offset(28,37)
		4IFR Q 1 Offset(20,36)
		4IFR R 1 Offset(10,35)
		4IFR S 1 Offset(5,34)
		4IFG A 1 Offset(3,33)
		4IFG A 1 A_Raise
		Loop
	Deselect:
		4I2G A 0 A_JumpIfInventory("RifleXSighting", 1, "DeselectZoom")
		4IFG A 1 Offset(15,40)
		4IFG A 1 Offset(30,55)
		4IFG A 1 Offset(45,75)
		4IFG A 1 Offset(60,100)
		4IFG A 1 Offset(75,130)
		TNT1 A 10 A_TakeInventory("ARRefire", 12)
	DeselectLoop:
		TNT1 A 1 A_Lower
		Loop
	DeselectZoom:
		4IFZ D 1 A_ZoomFactor(1.0)
		4IFZ C 1 Offset(0,35) A_TakeInventory("RifleXSighting", 1)
		4IFZ B 1 Offset(0,32)
		4IFZ A 1 Offset(0,35) A_TakeInventory("SightingAfterReload", 1)
		4IFG A 1 Offset(0,32)
		Goto Deselect
	Ready:
		4IFG A 0 A_JumpIfInventory("RifleXSighting", 1, "ReadyZoom")
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4IFG A 1 A_WeaponReady
		4NT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("ARRefire", 1)
		Loop
	ReadyZoom:
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4I2G A 1 A_WeaponReady
		4NT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("ARRefire", 1)
		Goto Ready
	Fire:
		4IFG A 0 A_JumpIfInventory("RifleXSighting", 1, "FireZoom")
		4IFG A 0 A_JumpIfNoAmmo("Dryfire")
		4IFF A 1 BRIGHT A_FireBullets(5, 5, 1, 5, "BulletPuff2")
		TNT1 A 0 A_Giveinventory("ARRefire",1)
		4IFF A 0 A_SpawnItemEx("RifleCaseSpawn", 4,-20,32, 8,random(-2,2),random(0,4), random(-55,-80), SXF_NOCHECKPOSITION)
		4IFF A 0 A_AlertMonsters
		4IFF B 1 A_SetPitch(pitch - 0.5)
		4IFF C 0 A_JumpIfInventory("RifleXSeq", 1, 4)
		4IFF C 0 A_GiveInventory("RifleXSeq", 1)
		4IFF C 1 A_SetPitch(pitch - 0.25)
		4XRF C 0 A_Jump(256, 2)
		4I2G A 0 A_TakeInventory("RifleXSeq", 1)
		4I2G A 0 A_Recoil(0.1)
		4IFG A 1 A_SetPitch(pitch + 0.25)
		4IFG A 0 A_Refire
		Goto Ready
	FireZoom:
		4IFF A 0 A_JumpIfNoAmmo("DryfireZoom")
		4I2F A 1 BRIGHT A_FireBullets(0.25, 0.25, 1, 6, "BulletPuff2")
		TNT1 A 0 A_Giveinventory("ARRefire",1)
		4IFF A 0 A_SpawnItemEx("RifleCaseSpawn", 4,-20,32, 8,random(-2,2),random(0,4), random(-55,-80), SXF_NOCHECKPOSITION)
		4I2F A 0 A_AlertMonsters
		4I2F B 1 A_SetPitch(pitch - 1.0)
		4I2G A 0 A_JumpIfInventory("RifleXSeq", 1, 4)
		4I2G A 0 A_GiveInventory("RifleXSeq", 1)
		4I2G A 1 A_SetPitch(pitch - 0.5)
		4XRF C 0 A_Jump(256, 2)
		4I2G A 0 A_TakeInventory("RifleXSeq", 1)
		4I2G A 0 A_Recoil(0.1)
		4I2G A 1 A_SetPitch(pitch + 0.5)
		//4I2G A 1
		4I2G A 0 A_Refire
		Goto Ready
	Unzoom:
		TNT1 A 0 A_TakeInventory("M81TriggerPull", 1)
		4IFZ D 1 A_ZoomFactor(1.0)
		4IFZ C 1 Offset(0,35) A_TakeInventory("RifleXSighting", 1)
		4IFZ B 1 Offset(0,32)
		4IFZ A 1 Offset(0,35) A_TakeInventory("SightingAfterReload", 999)
		4IFG A 1 Offset(0,32)
		TNT1 A 0 A_TakeInventory("ARRefire", 3)
		Goto Ready
		Altfire:
		TNT1 A 0 A_TakeInventory("M81TriggerPull", 1)
		4IFG A 0 A_JumpIfInventory("RifleXSighting", 1, "Unzoom")
		4IFZ A 1 Offset(0,35) A_ZoomFactor(2.0)
		4IFZ B 1 Offset(0,32) A_GiveInventory("RifleXSighting", 1)
		4IFZ C 1 
		4IFZ D 1 Offset(0,35)
		4I2G A 1 Offset(0,33)
		TNT1 A 0 A_TakeInventory("ARRefire", 3)
		Goto Ready
	DryfireZoom:
		4I2F B 1 A_PlaySound("Weapons/Dryfire", 5)
		4I2G A 5
	ReloadZoom:
		4IFG A 0 A_JumpIfInventory("RifleXAmmo", 30, "ReadyZoom")
		4IFZ D 1 A_ZoomFactor(1.0)
		4IFZ C 1 Offset(0,35) A_TakeInventory("RifleXSighting", 999)
		4IFZ B 1 Offset(0,32)
		4IFZ A 1 Offset(0,35) A_TakeInventory("PressingXZoom", 999)
		4IFG A 1 Offset(0,32) A_GiveInventory("SightingAfterReload", 1)
		TNT1 A 0 A_TakeInventory("ARRefire", 3)
		Goto Reload
	Dryfire:
		4IFG A 0 A_JumpIfInventory("RifleXSighting", 1, "DryfireZoom")
		4IFF B 1 A_PlaySound("Weapons/Dryfire", 5)
		4IFF C 1
		4IFG A 1
	Reload:
		TNT1 A 0 A_TakeInventory("CyborgDashCheck")
		4IFG A 0 A_ClearRefire
		4IFG A 0 A_JumpIfInventory("RifleXSighting", 1, "ReloadZoom")
		4IFG A 0 A_JumpIfInventory("RifleXAmmo", 30, 2)
		4IFG A 0 A_JumpIfInventory("RifleXAmmoPickup", 1, "ProperReload")
		4IFG A 1 A_WeaponReady(WRF_NOFIRE)
		Goto Ready
	ProperReload:
		TNT1 A 0 A_TakeInventory("ARRefire", 12)
		4IFR ABCDEF 1
		4IFR G 1 Offset(2,32) A_PlaySound("Weapons/Rifle/Out", 6)
		4IFR G 6 Offset(4,32)
		4IFR G 6 Offset(5,32)
		4IFR G 6 Offset(3,32)
		4IFR H 3 Offset(1,32)
		4IFR IJK 3 Offset(0,32)
		TNT1 A 0 A_GiveInventory("RifleXAmmo", 30)
		4IFR L 2 A_PlaySound("Weapons/Rifle/In", 5)
		4IFR MNOPQ 2
		4IFR R 3 A_PlaySound("Weapons/Rifle/Click", 6)
		4IFR S 3
		4IFR A 0 A_JumpIfInventory("SightingAfterReload", 1, "Altfire")
		Goto Ready
	}
}

ACTOR LegionRifle : Weapon
{
	Weapon.SelectionOrder 3002
	Weapon.AmmoType1 "XRifleXAmmo"
	Weapon.AmmoUse1 1
	Weapon.AmmoGive1 0
	Weapon.AmmoType2 "RifleXAmmoPickup"
	Weapon.AmmoUse2 0
	Weapon.AmmoGive2 2
	Weapon.SlotNumber 4
	Inventory.icon "TNT1A0"
	Inventory.PickupSound "Weapons/Rifle/Click"
	Inventory.PickupMessage "You picked up the Legion Light Rifle!"
	AttackSound "Weapons/Rifle/LFireAdd"  //"Weapons/Rifle/LFireAdd"
	Obituary "%o couldn't escape from %k's aim."
	+Weapon.Ammo_Optional
	+Weapon.Alt_Ammo_Optional
	+Weapon.NoAlert
	+Weapon.NoAutoFire
	+Weapon.Dontbob
	+Weapon.NoAutoAim
	Damagetype "AR"
	Scale 0.75
	States
	{
	Spawn:
		4XFP A -1
		Stop
	Select:
		TNT1 A 0 A_TakeInventory("CyborgDashCheck")
		4XFR H 1 Offset(200,50) A_PlaySound("Weapons/Select2")
		4XFR I 1 Offset(175,49)
		4XFR J 1 Offset(140,47)
		4XFR K 1 Offset(110,45)
		4XFR L 1 Offset(65,43)
		4XFR M 1 Offset(50,41)
		4XFR N 1 Offset(40,39)
		4XFR O 1 Offset(32,38) 
		4XFR P 1 Offset(28,37)
		4XFR Q 1 Offset(20,36)
		4XFR R 1 Offset(10,35)
		4XFR S 1 Offset(5,34)
		4XFG A 1 Offset(3,33)
	SelectLoop:
		4XFG A 1 A_Raise
		Loop
	Deselect:
		4I2G A 0 A_JumpIfInventory("XRifleXSighting", 1, "DeselectZoom")
		4XFG A 1 Offset(15,40)
		4XFG A 1 Offset(30,55)
		4XFG A 1 Offset(45,75)
		4XFG A 1 Offset(60,100)
		4XFG A 1 Offset(75,130)
		TNT1 A 10 A_TakeInventory("XARRefire", 12)
	DeselectLoop:
		TNT1 A 1 A_Lower
		Loop
	DeselectZoom:
		4X2G A 1 A_ZoomFactor(1.0)
		4XFZ D 1 Offset(0,35) A_TakeInventory("XRifleXSighting", 1)
		4XFZ C 1 Offset(0,40)
		4XFZ B 1 Offset(0,35) A_TakeInventory("SightingAfterReload", 999)
		4XFZ A 1 Offset(0,32)
		TNT1 A 0 A_TakeInventory("XARRefire", 3)
		Goto Deselect
	Ready:
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4XFG A 0 A_JumpIfInventory("XRifleXSighting", 1, "ReadyZoom")
		4ARG A 0 A_JumpIfInventory("XARRefireReadyCooldown", 5, "ReadyCooldown")
		4XFG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		TNT1 A 0 A_GiveInventory("XARRefireReadyCooldown", 1)
		Loop
	ReadyZoom:
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4XZG A 1 A_WeaponReady
		4ARG A 0 A_JumpIfInventory("XARRefireReadyCooldown", 5, "ReadyCooldownZoom")
		TNT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		TNT1 A 0 A_GiveInventory("XARRefireReadyCooldown", 1)
		Goto Ready
	ReadyCooldown:
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4XFG A 0 A_JumpIfInventory("XRifleXSighting", 1, "ReadyZoom")
		4XFG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		TNT1 A 0 A_TakeInventory("XARRefireReadyCooldown", 1)
		TNT1 A 0 A_TakeInventory("XARRefire", 1)
		Loop
	ReadyCooldownZoom:
		TNT1 A 0 A_JumpIfinventory("CyborgDashCheck", 1, "Reload")
		4XZG A 1 A_WeaponReady
		TNT1 A 0 A_TakeInventory("PressingXZoom",999)
		TNT1 A 0 A_TakeInventory("XARRefireReadyCooldown", 1)
		TNT1 A 0 A_TakeInventory("XARRefire", 1)
		Goto Ready
	Fire:
		4XFG A 0 A_JumpIfInventory("XRifleXSighting", 1, "FireZoom")
		4XFG A 0 A_JumpIfNoAmmo("Dryfire")		
		4ARG A 0 A_JumpIfInventory("LLRTriggerPull", 1, 2)
		4XFG A 3 A_GiveInventory("LLRTriggerPull")
	FireContinue:
		TRLF A 0 A_PlayWeaponSound("Weapons/Rifle/Fire2")
		//TRLF A 0 A_PlaySound("Weapons/Rifle/Fire",6,0.5)
		//TRLF A 0 A_PlaySound("Weapons/Rifle/SFire",7,0.7)
		4XFF A 1 BRIGHT A_FireBullets(0.125, 0.125, 1, 8, "BulletPuff2")
		TNT1 A 0 A_Giveinventory("XARRefire",1)
		4IFF A 0 A_SpawnItemEx("LongRifleCaseSpawn", 6,-20,32, 9,random(-2,2),random(0,4), random(-55,-80), SXF_NOCHECKPOSITION)
		4IFF A 0 A_AlertMonsters
		4XFF B 1 A_SetPitch(pitch - 0.5)
		//4XFF C 0 A_JumpIfInventory("XRifleXSeq", 1, 4)
		//4XFF C 0 A_GiveInventory("XRifleXSeq", 1)
		4XFF C 1 A_SetPitch(pitch + 0.25)
		//4XFF C 0 A_Jump(256, 2)
		//4XFF C 0 A_TakeInventory("XRifleXSeq", 1)
		4XFF C 0 A_Recoil(0.2)
		4XZG A 0 A_TakeInventory("LLRTriggerPull", 1)
		TNT1 A 0 A_WeaponReady
		4XFF D 1 A_SetPitch(pitch + 0.25)
		4XFG A 1 A_WeaponReady
		4XFG A 1 A_ReFire
		Goto Ready
	FireZoom:
		4IFF A 0 A_JumpIfNoAmmo("DryfireZoom")		
		4ARG A 0 A_JumpIfInventory("LLRTriggerPull", 1, 2)
		4XZG A 3 A_GiveInventory("LLRTriggerPull")
	FireZoomContinue:
		TRLF A 0 A_PlayWeaponSound("Weapons/Rifle/Fire2")
		//TRLF A 0 A_PlaySound("Weapons/Rifle/Fire",6,0.5)
		//TRLF A 0 A_PlaySound("Weapons/Rifle/SFire",7,0.7)
		4XZF A 1 BRIGHT A_FireBullets(0.0625, 0.0625, 1, 11, "BulletPuff2")
		TNT1 A 0 A_Giveinventory("XARRefire",1)
		4IFF A 0 A_SpawnItemEx("LongRifleCaseSpawn", 6,-20,32, 8,random(-2,2),random(0,4), random(-55,-80), SXF_NOCHECKPOSITION)
		4I2F A 0 A_AlertMonsters
		4XZF B 1 A_SetPitch(pitch - 1.0)
		//4XZG A 0 A_JumpIfInventory("XRifleXSeq", 1, 4)
		//4XZG A 0 A_GiveInventory("XRifleXSeq", 1)
		4XZF C 1 A_SetPitch(pitch + 0.5)
		//4XZG A 0 A_Jump(256, 2)
		//4XZG A 0 A_TakeInventory("XRifleXSeq", 1)
		4XZG A 0 A_Recoil(0.15)
		4XZG A 0 A_TakeInventory("LLRTriggerPull", 1)
		TNT1 A 0 A_WeaponReady
		4XZG A 1 A_SetPitch(pitch + 0.5)
		4XZG A 1 A_WeaponReady
		4XZG A 1 A_ReFire
		Goto Ready
	Unzoom:
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		4XFZ D 1 A_ZoomFactor(1.0)
		4XFZ C 1 Offset(0,35) A_TakeInventory("XRifleXSighting", 1)
		4XFZ B 1 Offset(0,32)
		4XFZ A 1 Offset(0,35) A_TakeInventory("SightingAfterReload", 1)
		TNT1 A 0 A_TakeInventory("XARRefire", 3)
		Goto Ready
       altfire:
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		4ARG A 0 A_JumpIfInventory("XRifleXSighting", 1, "Unzoom")
		4XFZ A 1 Offset(0,35) A_ZoomFactor(2.5)
		4XFZ B 1 Offset(0,32) A_GiveInventory("XRifleXSighting", 1)
		4XFZ C 1 Offset(0,35)
		4XFZ D 1 Offset(0,33)
		TNT1 A 0 A_TakeInventory("XARRefire", 3)
		Goto Ready
	DryfireZoom:
		4XZF B 1 A_PlaySound("Weapons/Dryfire", 5)
		4XZG A 5
	ReloadZoom:
		4XFG A 0 A_JumpIfInventory("XRifleXAmmo", 20, "ReadyZoom")
		4XFZ D 1 A_ZoomFactor(1.0)
		4XFZ C 1 Offset(0,35) A_TakeInventory("XRifleXSighting", 1)
		4XFZ B 1 Offset(0,32)
		4XFZ A 1 Offset(0,35) A_TakeInventory("SightingAfterReload", 1)
		4XFZ A 0 A_GiveInventory("SightingAfterReload", 1)
		TNT1 A 0 A_TakeInventory("XARRefire", 3)
		Goto Reload
	Dryfire:
		4XFG A 0 A_JumpIfInventory("XRifleXSighting", 1, "DryfireZoom")
		4XFF C 1 A_PlaySound("Weapons/Dryfire", 5)
		4XFF D 1
		4XFG A 1
	Reload:
		TNT1 A 0 A_TakeInventory("CyborgDashCheck")
		TNT1 A 0 A_TakeInventory("LLRTriggerPull", 1)
		4XFG A 0 A_ClearRefire
		4XFG A 0 A_JumpIfInventory("XRifleXSighting", 1, "ReloadZoom")
		4XFG A 0 A_JumpIfInventory("XRifleXAmmo", 20, 2)
		4XFG A 0 A_JumpIfInventory("RifleXAmmoPickup", 1, "ProperReload")
		4XFG A 1 A_WeaponReady(WRF_NOFIRE)
		Goto Ready
	ProperReload:
		TNT1 A 0 A_TakeInventory("XARRefire", 12)
		4XFR ABCDEF 1
		4XFR G 2 Offset(2,32) A_PlaySound("Weapons/Rifle/Out", 6)
		4XFR G 10 Offset(4,32)
		4XFR G 10 Offset(5,32)
		4XFR G 10 Offset(3,32)
		4XFR H 4 Offset(1,32)
		4XFR IJK 3 Offset(0,32)
		TNT1 A 0 A_GiveInventory("XRifleXAmmo", 20)
		4XFR L 2 A_PlaySound("Weapons/Rifle/In", 5)
		4XFR MNOPQ 3
		4XFR R 2 A_PlaySound("Weapons/Rifle/Click", 6)
		4XFR S 2
		4IFR A 0 A_JumpIfInventory("SightingAfterReload", 1, "altfire")
		Goto Ready
	}
}

//=====================================\\
//=======Special Inventory Items=======\\
//=====================================\\

ACTOR PressingXZoom : Inventory
{
	Inventory.MaxAmount 1
}


//Assault Rifle Inventory Items

ACTOR M81TriggerPull : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR M81A3TriggerPull : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR LLRTriggerPull : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR RifleXSeq : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR SRifleXSeq : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XRifleXSeq : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XRifleXSeqAlt : Inventory
{
	Inventory.MaxAmount 2
}

ACTOR LRifleXSeq : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR LMGSeq : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR RifleXSighting : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR SRifleXSighting : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XRifleXSighting : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XLMGXSighting : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR ARSemiEnabled : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR ARRefire : Inventory
{
	Inventory.MaxAmount 10
}

ACTOR SARRefire : Inventory
{
	Inventory.MaxAmount 10
}

ACTOR XARRefire : Inventory
{
	Inventory.MaxAmount 16
}

ACTOR SARSemiEnabled : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XARSemiEnabled : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR XARFireSelector : Inventory
{
	Inventory.MaxAmount 2
}

ACTOR SightingAfterReload : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR LMGCounter : Inventory
{
	Inventory.MaxAmount 16
}

ACTOR XARRefireReadyCooldown : Inventory
{
	Inventory.MaxAmount 5
}

ACTOR RifleXAmmo : Ammo
{
	Inventory.Icon "4IFLA0"
	Inventory.MaxAmount 30
	+IGNORESKILL
}

ACTOR RifleXAmmoPickup : Ammo
{
	Inventory.Icon "4PCKA0"
	Inventory.MaxAmount 20
	+IGNORESKILL
}

ACTOR SRifleXAmmo : Ammo
{
	Inventory.Icon "4AFLA0"
	Inventory.MaxAmount 40
	+IGNORESKILL
}

ACTOR XRifleXAmmo : Ammo
{
	Inventory.Icon "4XFLA0"
	Inventory.MaxAmount 20
	+IGNORESKILL
}

ACTOR RemoteMine : Weapon
{
   Weapon.SelectionOrder 4000
   Inventory.PickupSound "misc/ammo_pkup"
   Inventory.PickupMessage "Picked up a remote mine. (slot 8)"
   Obituary "%o didn't want to be left out alone."
   Weapon.AmmoType1 "Satch"
   Weapon.AmmoGive1 0
   Weapon.AmmoUse1 0
   Weapon.AmmoType2 "Satch"
   Weapon.AmmoGive2 2
   Weapon.AmmoUse2 1
   Weapon.Kickback 1000
   Inventory.icon "TNT1A0"
   + NOALERT
   States
   {
   Ready:
      DETO A 1 A_WeaponReady
      Loop
   Deselect:
      DETO A 0 A_Lower
      DETO A 1 A_Lower
      Loop
   Select:
        DETO A 1 Offset(175,49)
		DETO A 1 Offset(140,47)
		DETO A 1 Offset(110,45)
		DETO A 1 Offset(65,43)
		DETO A 1 Offset(50,41)
		DETO A 1 Offset(40,39)
		DETO A 1 Offset(32,38) 
		DETO A 1 Offset(28,37)
		DETO A 1 Offset(20,36)
		DETO A 1 Offset(10,35)
		DETO A 1 Offset(5,34)
		DETO A 1 Offset(3,33)
		DETO A 1 Offset(1,33)
     Goto Ready
   Fire:
      DETO B 2
      DETO B 0 A_AlertMonsters
      DETO B 0 A_GiveInventory("DetonateCheck",1)
	  DETO B 0
      DETO C 2 
      DETO B 2
      DETO A 8 A_TakeInventory("DetonateCheck",1)
      goto Ready
   AltFire:
      DETO DEFGHIJKLMNO 1
      DETO Z 8
      DETO Z 0 A_FireCustomMissile("KarenPipebomb",0,1,0,0)
      DETO ONMLKJIHGFED 1
	  DETO A 10
      goto Ready
	  Spawn:
   DETO A -1
	  stop
   }
}

ACTOR KarenPipebomb
{ 
    - NOGRAVITY
	+SEEKERMISSILE
    // + LOWGRAVITY
    Damage 0
    ExplosionDamage 250
    ExplosionRadius 192
    SeeSound "weapons/MineReady"
    Renderstyle Normal
	DamageFactor "Jitterskull", 0.0
	DamageFactor "SjasScream", 0.0
	Damagetype "KarenExplo"
	Obituary "%o didn't want to be left out alone."
	reactiontime 100
    Alpha 255
    States
    {
    Spawn:
	  CHRG A 1 A_JumpIfInTargetInventory("DetonateCheck", 1, "Death") 
	  GTRP E 0 A_GiveInventory("Trapcount",1)
	  GTRP E 0 A_JumpIfInventory("Trapcount",2275,"Death")
	  loop
	XDeath:
	  TNT1 A 0 A_GiveToTarget("HitBeep",1)
	  TNT1 A 0 A_Jump(256,"DeathCont")
	  Goto DeathCont
	Death:
	  TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
	  TNT1 A 0 A_Stop
	  TNT1 A 0 A_SeekerMissile(0,0,SMF_LOOK|SMF_CURSPEED,256)
	  TNT1 A 0 A_JumpIfTargetInLOS("SplashBeep",360,JLOSF_PROJECTILE,270)
	  TNT1 A 0 A_Jump(256,"DeathCont")
	  Goto DeathCont
	SplashBeep:
	  TNT1 A 0 A_GiveToTarget("HitBeep",1)
	  TNT1 A 0 A_Jump(256,"DeathCont")
	  Goto DeathCont
    DeathCont:
	  NKXP A 0 
      NKXP A 0 BRIGHT A_SpawnItemEx("GrenadeExplosionKaren",0,0,0,0,0,0,0,128,0)
      COOM A 2 BRIGHT A_Explode
	  COOM A 1 bright A_FadeOut(0.04)
      Stop
    }
}

actor GrenadeExplosionKaren
{
renderstyle translucent
alpha 1.0
+NOGRAVITY
-SOLID
+NOBLOCKMAP
+CLIENTSIDEONLY
radius 1
height 1
scale 1.5
States
{
Spawn:
COOM A 0
COOM A 0 A_PlaySound("Weapons/MineExplosionX")
COOM ABCDEFGHIJJKKLLMNNNOOOPPPQQRRSSTTTUUUVVVXXX 2 bright A_FadeOut(0.04)
Stop
}
}

ACTOR Satch : AMMO
{
Inventory.MaxAmount 3
Ammo.BackpackAmount 3
Ammo.BackpackMaxAmount 3
Inventory.Icon CHRGA0
}