Actor Engineer : PlayerPawn
{
	+NOSKIN
	+NOICEDEATH
	+NODAMAGETHRUST
	+GHOST
	+QUICKTORETALIATE
	scale 0.90
	limitedtoteam 0
	Player.Maxhealth 100
	player.soundclass "engineer"
	player.displayname "Engineer"
	player.startitem "NailGun", 1
	player.startitem "SawLauncher", 1
	player.startitem "SteamCannon", 1
	player.startitem "MechConstructorX", 1
	player.startitem "MechConstructAmmo2",50
	player.startitem "SteamAmmo", 5
	player.startitem "SawAmmo", 30
	player.startitem "IsHuman", 1
	Player.StartItem "Screamer", 0
	Player.ColorRange 112, 127
	player.scoreicon "ENGINST"
	Damagefactor "normal", 1.0
	damagefactor "Grenade", 0.3
	DamageFactor "GhostTrap", 0.0
	Damagefactor "Sentinel", 0.0
	Damagefactor "MechPewPews", 0.0
	Damagefactor "MacheteSlicerino", 0.0
    Damagefactor "GasterSmokeHurt", 0.0
	Damagefactor "StrifeSuit", 0.0
	PainChance 256
	mass 700
	States
	{
	Spawn:
		TNT1 A 0 ACS_NamedExecute("PlayerSpawn")
		GO99 A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 A 1 Setplayerproperty(0,0,0)
		Loop
	See:
		GO99 A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 A 0 A_JumpIfHealthLower(50,"INeedHealingSee")
		GO99 AB 5
		GO99 A 0 A_SpawnItemEx ("EngineerStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		GO99 CD 5
		GO99 A 0 A_SpawnItemEx ("EngineerStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Goto Spawn
	INeedHealingSee:
		GO99 A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 A 0 A_SpawnItemEx("INeedHealingTrail",random(-20,20),random(-20,20),0,0,0,10)
		GO99 AB 5
		GO99 A 0 A_SpawnItemEx ("EngineerStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		GO99 CD 5
		GO99 A 0 A_SpawnItemEx ("EngineerStomp", 0, 0, 0, 0, 0, -20, 0,0, 0) 
		Goto Spawn
	Missile:
		GO99 E 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 E 12 
		Goto Spawn
	Melee:
		GO99 F 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 F 6 BRIGHT
		Goto Missile
	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)
	GO99 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)
	GO99 G 1 A_PlaySound("Gibbage/XSplat")
	NULL A 0 A_SpawnItemEx("Custom_EngineerBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
	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)
	GO99 G 1 A_PlaySound("Gibbage/XSplat")
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_6,1)
	NULL A 0 A_SpawnItemEx("Custom_EngineerBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
	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:
		GO99 A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")	
		GO99 G 4 A_Pain
		GO99 G 4 
		Goto Spawn	
	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.LoonaClawing:
	TNT1 A 0 A_GiveToTarget("Health",6)
	GO99 G 20 Setplayerproperty(0,1,0)
	GO99 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)
	GO99 G 20 Setplayerproperty(0,1,0)
	GO99 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)
	GO99 G 20 Setplayerproperty(0,1,0)
	GO99 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.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.Creepstun:
    GO99 G 0 A_Pain
	GO99 G 0 A_GiveToTarget("health",5)
	GO99 G 40 Setplayerproperty(0,1,0)
	GO99 G 2 Setplayerproperty(0,0,0)
		Goto Spawn
	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
	Death.Creeper:
		GO99 A 0 A_PlaySoundEx("creeperattack", "Body")
		GO99 A 0 A_SpawnItemEx("CreeperPopUp",0,0,10)
		TNT1 A 0 A_GiveToTarget("GhoulAmmo",1)
		GO99 A 0 A_GiveToTarget("Creeperheal",1)
		GO99 A 0 ACS_ExecuteAlways(997,0,1)
		Goto DeathAnimAlt
	Death.Creepstun:
		GO99 A 0 A_GiveToTarget("Unlock13",1)
		GO99 A 0 A_GiveToTarget("CreepGotya",1)
		Goto DeathAnimAlt
	Death.SjasScream:
	Death.FrostbiteWind:
	Death.EmtalicSaw:
	Death.LichFire:
		GO99 A 0 A_GiveToTarget("KilledJ",1)
		Goto DeathAnim
	Death:
	DeathAnim:
		GO99 A 0 A_GiveToTarget("KillBeep",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_TakeInventory("KilledCount",999)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledEngineer",1)
		GO99 A 0 A_GiveInventory("RocketAmmo",1)
		GO99 H 5
		GO99 I 5 A_PlayerScream
		GO99 J 5 A_NoBlocking
		GO99 KLM 5
		GO99 N -1
		Stop
	DeathAnimAlt:
		GO99 A 0 A_GiveToTarget("KillIndicator",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_TakeInventory("KilledCount",999)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledEngineer",1)
		GO99 A 0 A_GiveInventory("RocketAmmo",1)
		GO99 H 5
		GO99 I 5 A_PlayerScream
		GO99 J 5 A_NoBlocking
		GO99 KLM 5
		GO99 N -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:
		GO99 A 0 A_GiveToTarget("KillBeep",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledEngineer",1)
		GO99 A 0 A_GiveToTarget("Crunched",1)
		GO99 A 0 A_GiveInventory("RocketAmmo",1)
		GO99 G 1 A_PlaySound("gibbage/xsplat")
		NULL A 0 A_SpawnItemEx("Custom_EngineerBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
		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:
		GO99 A 0 A_GiveToTarget("KillIndicator",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledEngineer",1)
		GO99 A 0 A_GiveToTarget("Crunched",1)
		GO99 A 0 A_GiveInventory("RocketAmmo",1)
		GO99 G 1 A_PlaySound("gibbage/xsplat")
		NULL A 0 A_SpawnItemEx("Custom_EngineerBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
		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:
		GO99 A 0 A_GiveToTarget("KilledR",1)
		GO99 A 0 A_GiveToTarget("Health",100)
		GO99 A 0 ACS_ExecuteAlways(997,0,2)
		GO99 A 0 A_PlaySoundEx("RavagerAttack","Body")
		GO99 A 0 A_SpawnItemEx("RavagerHit",0,0,32)
		Goto DeathAnimAlt
	Death.RavagerBall:
		GO99 A 0 A_GiveToTarget("RavagerGotYa",1)
		GO99 A 0 A_GiveToTarget("KilledJ",1)
		Goto DeathAnimAlt
	Death.Yurei:
		GO99 A 0 A_GiveToTarget("KilledY",1)
		GO99 A 0 A_PlaySoundEx("YureiKill1","Body",0,1)
		GO99 A 0 ACS_ExecuteAlways(997,0,3)
		Goto DeathAnimAlt
	Death.YureiBall:
		GO99 A 0 A_GiveToTarget("Health",10)
		GO99 A 0 A_SpawnItemEx("BallFire")
		Goto Death.SjasScream
	Death.UboaRawrScream:
		Goto DeathAnimAlt
	Death.Misty:
	Death.Whiteface:
		GO99 A 0 A_GiveToTarget("KillBeep",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledM",1)
		GO99 HHHHH 1 A_FadeOut(0.05)
		GO99 A 0 A_PlayerScream
		GO99 IIIIIJJJJJKKKKK 1 A_FadeOut(0.05)
		GO99 A 0 A_NoBlocking
		NULL A -1
		Stop
	Death.Clowny:
		GO99 A 0 ACS_ExecuteAlways(997,0,4)
		GO99 A 0 A_GiveToTarget("KilledC",1)
		G099 A 0 A_GiveToTarget("ClownyAmmo",5)
		Goto DeathAnim
	Death.Mohoph:
		GO99 A 0 A_GiveToTarget("TransEngineer",1)
		TNT1 A 0 A_GiveToTarget("MorphAmmo", 1)
		GO99 A 0 A_PlaySoundEx("MohophKill","Body")
		GO99 A 0 ACS_ExecuteAlways(997,0,5)
		Goto DeathAnim
	Death.EmtalicWeak:
		GO99 A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto DeathAnim
	Death.Emtalic:
		GO99 A 0  A_PlaySoundEx("RamSuccess","Body")
		Goto Death.Jitter
	Death.I1:
		GO99 A 0 A_SpawnItemEx("Heart",0,0,32,random(2,3),momy,random(8,12),random(-180,180))
		GO99 A 0 A_GiveToTarget("KilledI1",1)
		Goto DeathAnim
	Death.I2:
		GO99 A 0 A_GiveToTarget("KillBeep",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledI2",1)
		GO99 A 0 A_GiveToTarget("Clip",1)
		GO99 G 0 SetPlayerProperty(0,1,4)
		GO99 G 0 A_Stop
		GO99 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:
		GO99 A 0 A_GiveToTarget("KillBeep",1)
		GO99 A 0 A_GiveInventory("ItemDeath",1)
		GO99 A 0 A_GiveToTarget("KilledMe",1)
		GO99 A 0 A_GiveToTarget("KilledI3",1)
		GO99 HHHHH 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		GO99 I 0 A_PlayerScream
		GO99 IIIII 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		GO99 J 0 A_NoBlocking
		GO99 JJJJJKKKKKLLLLLMMMMM 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		GO99 NNNNNNN 3 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		GO99 N -1
		Stop
	Death.I4:
		GO99 A 0 A_GiveToTarget("KilledI4",1)
		Goto DeathAnim
	Death.I5:
		GO99 A 0 A_GiveToTarget("KilledI5",1)
		Goto DeathAnim
	Pain.RavagerBall:
		GO99 A 0 ACS_ExecuteAlways(920,0)
		Goto Pain
	Pain.YureiBall:
		GO99 A 0 A_GiveToTarget("Health",10)
		GO99 A 0 A_SpawnItemEx("BallFire")
		Goto Pain
	Pain.Emtalic:
		GO99 A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto Pain
	Pain.EmtalicWeak:
		GO99 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 EngineerStomp : CyborgStomp
{
	DeathSound "EngineerStep"
}

actor NailGun : Weapon
{
  obituary "%o was pummeled by %k's Nail Gun."
  radius 20
  height 16
  Weapon.SlotNumber 1
  decal "BulletChip"
  inventory.pickupmessage "You got the Nail Gun!"
  weapon.selectionorder 100
  weapon.kickback 100
  +INVENTORY.UNDROPPABLE
  inventory.icon "NAILGG"
  +WEAPON.NOAUTOAIM
  +WEAPON.DONTBOB
  states
  {
  Spawn:
    LIBG X 400
    stop
  Ready:
    LIBG A 1 A_WeaponReady
    loop
  Deselect: 
    LIBG A 1 A_Lower
    loop
  Select:
    LIBG A 1 A_Raise
    loop
  Fire:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 0 A_JumpIfHealthLower(20, "Dfire5")
	LIBG D 0 A_JumpIfHealthLower(30, "Dfire4")
	LIBG D 0 A_JumpIfHealthLower(40, "Dfire3")
	LIBG D 0 A_JumpIfHealthLower(60, "Dfire2")
	LIBG D 0 A_JumpIfHealthLower(80, "Dfire1")
    LIBG A 1 A_FireCustomMissile("Nail", random(-1,1), 0, 10, 2)
	LIBG E 1//2
	LIBG D 1//2
	LIBG C 1//2
	LIBG B 2//2
    LIBG A 2//1
	LIBG A 0 A_ReFire
    goto Ready
  DFire1:
    LIBG A 1 A_FireCustomMissile("Nail3", random(-1,1), 0, 10, 2)
	Goto Fire+7
  DFire2:
    LIBG A 1 A_FireCustomMissile("Nail4", random(-1,1), 0, 10, 2)
	Goto Fire+7
  DFire3:
    LIBG A 1 A_FireCustomMissile("Nail5", random(-1,1), 0, 10, 2)
	Goto Fire+7
  DFire4:
    LIBG A 1 A_FireCustomMissile("Nail6", random(-1,1), 0, 10, 2)
	Goto Fire+7
  DFire5:
    LIBG A 1 A_FireCustomMissile("Nail7", random(-1,1), 0, 10, 2)
	Goto Fire+7
  Altfire:
	LIBG D 0 A_JumpIfHealthLower(20, "DAltfire5")
	LIBG D 0 A_JumpIfHealthLower(30, "DAltfire4")
	LIBG D 0 A_JumpIfHealthLower(40, "DAltfire3")
	LIBG D 0 A_JumpIfHealthLower(60, "DAltfire2")
	LIBG D 0 A_JumpIfHealthLower(80, "DAltfire1")
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("Nail2", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("Nail2", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("Nail2", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("Nail2", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32) A_ReFire
    goto Ready
  DAltfire1:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("NailB1", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("NailB1", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("NailB1", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("NailB1", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32)
	Goto Ready
  DAltfire2:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("NailB2", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("NailB2", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("NailB2", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("NailB2", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32)
	Goto Ready
  DAltfire3:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("NailB3", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("NailB3", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("NailB3", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("NailB3", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32)
	Goto Ready
  DAltfire4:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("NailB4", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("NailB4", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("NailB4", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("NailB4", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32)
	Goto Ready
  DAltfire5:
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
    LIBG D 1 offset(12,-16) A_FireCustomMissile("NailB5", 0, 0, 10, 2, 1, 8)
	LIBG E 1 offset(8,-6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,-4) A_FireCustomMissile("NailB5", 0, 0, 10, 2, 1, 3)
	LIBG E 1 offset(0,6)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(4,16) A_FireCustomMissile("NailB5", 0, 0, 10, 2, 1, -3)
	LIBG E 1 offset(8,36)
	LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 1 offset(12,56) A_FireCustomMissile("NailB5", 0, 0, 10, 2, 1, -8)
	LIBG E 14 offset(12,56)//18
	LIBG D 2 offset(10,50)
	LIBG C 2 offset(8,44)
	LIBG B 2 offset(6,38)
    LIBG B 2 offset(4,32)
	Goto Ready
  }
}

actor Nail : FastProjectile
{
translation "168:191=80:95"
PROJECTILE
Speed 100
scale 0.8
decal "BulletChip"
damagetype "EngiNails"
Radius 8
Height 4
Damage (10)//26
States
{
Spawn:
TNT1 A 0
NAIL A 1 A_SpawnItemEx("BlazeSpawnFiringTrail")
loop
XDeath:
TNT1 A 0 A_GiveToTarget("HitBeep",1)
Goto Death
Death:
TNT1 A 1
stop
}
}

actor Nail2 : Nail
{
Damage (10)//26
Speed 80
}

actor Nail3 : Nail {Damage (12)}
actor Nail4 : Nail {Damage (16)}
actor Nail5 : Nail {Damage (18)}
actor Nail6 : Nail {Damage (20)}
actor Nail7 : Nail {Damage (22)}

actor NailB1 : Nail {Damage (12)}
actor NailB2 : Nail {Damage (16)}
actor NailB3 : Nail {Damage (18)}
actor NailB4 : Nail {Damage (20)}
actor NailB5 : Nail {Damage (22)}

actor SawLauncher : Weapon
{
  obituary "%o was ripped to shreds by %k's Buzz Saws."
  radius 20
  height 16
  //decal "BulletChip"
  inventory.pickupmessage "You got the Buzz Saw Launcher!"
  weapon.selectionorder 1500
  weapon.kickback 100
  weapon.ammotype "SawAmmo"
  weapon.ammouse1 1
  weapon.ammotype2 "SawAmmo"
  weapon.ammouse2 1
  weapon.ammogive 8
  Weapon.SlotNumber 2
  +INVENTORY.UNDROPPABLE
  //Weapon.AmmoUse2 1
  //Weapon.AmmoType2 "HollyAmmo"
  inventory.icon "BLADL"
  +WEAPON.NOAUTOAIM
  +WEAPON.DONTBOB
  states
  {
  Spawn:
    METB M 400
    stop
  Ready:
    METB A 1 A_WeaponReady
    loop
  Deselect: 
	METB A 1 A_Lower
	Goto Deselect
  Deselect2:
    METB A 1 A_Lower
    loop
  Select:
    METB A 1  A_Raise 
    loop
  Fire:
   METB ABC 3
   METB D 3 A_PlayWeaponSound("SawClick")
   Goto Hold
Altfire:
    METB A 0 A_JumpIfInventory("SawLimit", 15, "TooManySaws")
    METB ABC 3
	METB D 3 A_PlayWeaponSound("SawClick")
	METB A 0 A_GiveInventory("SawLimit",1)
	METB A 10  A_FireCustomMissile("BuzzSaw", random(-3,3), 1, 6, 0)
    goto Ready
  TooManySaws:
    METB A 0 A_Print("Cant place more than 15 saws at once!")
	Goto Ready
  Hold:
   METB D 1
   METB D 0 A_Refire
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 10 A_FireCustomMissile("BuzzSawThrownX", 0, 1, 6, 0)
   goto Ready
  }
}


Actor SawSpike
{
	Speed 0
	Radius 5
	Height 5
	Scale 0.5
	ReactionTime 3600
	Damage 4
	DamageType "EngineerSaw"
	DamageFactor "Jitterskull", 0.0
	DamageFactor "SjasScream", 0.0
	Obituary "%o fell over %k's Buzz Saw."
	PROJECTILE
	+NOCLIP
	+DONTBLAST
	+THRUGHOST
	-NOGRAVITY
	States
	{
	Spawn:
		METB H 20
		METB H 0 A_ChangeFlag("NOCLIP",0)
		METB H 1 A_CountDown
		METB H 0 A_JumpIfInTargetInventory("RocketAmmo",1,"FadeOut")
		Goto Spawn+2
	XDeath:
		TNT1 A 0 A_GiveToTarget("HitBeep",1)
		Goto Death
	Death:
		METB H 1
		Stop
	FadeOut:
		METB H 1 A_FadeOut(0.1)
		Loop
	}
}

actor BuzzSawThrownX
{
PROJECTILE
obituary "%o was ripped to shreds by %k's Buzz Saws."
+SKYEXPLODE
Damage (22)//8
Height 5
Radius 5
Speed 80
damagetype "EngineerSaw"
scale 0.5
bouncecount 8
bouncefactor 1.0
reactiontime 40
wallbouncefactor 1.0
+BLOODLESSIMPACT
+RIPPER
+DOOMBOUNCE
+PIERCEARMOR
States
{
Spawn:
METB E 0
//METB E 0 A_PlaySoundEx("SawAir","voice")
METB E 0 A_PlaySound ("SawAir", 2, 1.0, 0, ATTN_NORM)
METB EFGHIJKL 2
loop
Death:
METB L 0 A_SpawnItemEx("SawAmmoDrop",0,0,0,0,0,-1)//BuzzSaw
stop
}
}

ACTOR SawAmmoDrop : CustomInventory
{ 
   Inventory.Amount 1
   Inventory.MaxAmount 55
   +INVENTORY.IGNORESKILL
   scale 0.6
   States 
   { 
   Spawn: 
      METB L 700
      Stop
   Pickup:
	  TNT1 A 1 A_JumpIfInventory("SawLauncher",1,"GimmeSaw")
	  fail
	GimmeSaw:
	  TNT1 A 0 A_GiveInventory("SawAmmo",1)
	  Stop
   } 
}

ACTOR MechConstructorX : Weapon
{
    Weapon.AmmoType "MechConstructAmmo"
	Weapon.AmmoType2 "MechConstructAmmo2"
	Inventory.icon "TNT1A0"
	Weapon.SlotNumber 4
	Weapon.selectionorder 2000
	Weapon.BobStyle Alpha
	Weapon.BobSpeed 1.5
	Weapon.BobRangeY 0.4
	Weapon.BobRangeX 0.6
    States
    {
    Spawn:
       POLW A -1
       Loop
    Ready: 
       ZOLF AAAAABBBBCCCCCCBB 1 A_WeaponReady
	   ZOLF A 0 A_Playsound("QUIET",Chan_Weapon)
       Loop
    Deselect: 
       ZOLF A 1 A_Lower
	   ZOLF A 0 A_Playsound("QUIET",Chan_Weapon)
       Loop
    Select: 
       ZOLF A 1 A_Raise
	   ZOLF A 0 A_Playsound("QUIET",Chan_Weapon)
       Loop
    Fire: 
		TNT1 A 0 A_SpawnItemEx("EngiGuardianIndicator",90)
		TNT1 A 0 A_JumpIfInventory("MechConstructAmmo", 100, "SummonEngiGuardian")
		ZOLF A 0 A_Playsound("Stiglitz/Powercharge",Chan_Weapon,1,1)
		ZOLF A 15 A_GiveInventory("MechConstructAmmo", 1)
		TNT1 A 0 A_ReFire
	   Goto Ready
	   SummonEngiGuardian:
	   ZOLF A 0 A_PlayWeaponSound("weapons/polyshoot")
	   ZOLF A 0 A_GunFlash
       ZOLF A 0 A_TakeInventory("MechConstructAmmo",200)
	   ZOLF B 2
	   ZOLF C 2
	   ZOLF D 1 A_FireCustomMissile("MechsummonShot2",0,0,9,4)
	   ZOLF E 2
	   ZOLF F 2
	   ZOLF A 2
	   ZOLF A 34
	Goto Ready
	   AltFire: 
		TNT1 A 0 A_SpawnItemEx("EngibotIndicator",90)
		TNT1 A 0 A_JumpIfInventory("MechConstructAmmo2", 100, "SummonEngiBot")
		ZOLF A 0 A_Playsound("Stiglitz/Powercharge",Chan_Weapon,1,1)
		ZOLF A 8 A_GiveInventory("MechConstructAmmo2", 1)
		TNT1 A 0 A_ReFire
	   Goto Ready
	   SummonEngiBot:
	   ZOLF A 0 A_PlayWeaponSound("weapons/polyshoot")
	   ZOLF A 0 A_GunFlash
       ZOLF A 0 A_TakeInventory("MechConstructAmmo2",200)
	   ZOLF B 2
	   ZOLF C 2
	   ZOLF D 1 A_FireCustomMissile("MechsummonShotX",0,0,9,4)
	   ZOLF E 2
	   ZOLF F 2
	   ZOLF A 2
	   ZOLF A 36
	Goto Ready
    Flash:
       TNT1 BCDBCD 3 A_Light(Random(0,2))
       Stop
    }
}


Actor EngibotIndicator
{
	RenderStyle Translucent
	+NoGravity
	+NOINTERACTION
	+CLIENTSIDEONLY
	visibletoteam 0
	Alpha 0.75
	Scale 0.6
	States
	{
	Spawn:
		UACB A 1
	Fade:
		UACB A 1 A_FadeOut(0.1)
		Wait
	}
}

Actor EngiGuardianIndicator
{
	RenderStyle Translucent
	+NoGravity
	+NOINTERACTION
	+CLIENTSIDEONLY
	visibletoteam 0
	Alpha 0.75
	Scale 0.9
	States
	{
	Spawn:
		REAP A 1
	Fade:
		REAP A 1 A_FadeOut(0.1)
		Wait
	}
}



ACTOR MechSummonShot2
{
    Radius 10
    Height 10
    Speed 25
    Damage 0
    Scale 0.5
	DeathSound "Weapons/PlasmaX"
    PROJECTILE
    RENDERSTYLE ADD
	
    ALPHA 0.67
    States
    {
    Spawn:
       POLP ABCD 2 Bright A_Gravity
       Loop
    Death:
	    POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",60,0,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
        POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",40,40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",0,60,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-40,40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-60,0,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-40,-40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",0,-60,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",40,-40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 1 A_SpawnItemEx("EngineerGuardian")
		POLI A 0 A_Playsound("Engineer/RoboReady",CHAN_ITEM,1,0,ATTN_NONE) 
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",60,0,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
        POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",40,40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",0,60,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-40,40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-60,0,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-40,-40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",0,-60,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",40,-40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_Gravity
		Stop
	}
}

ACTOR MechSummonShotX
{
    Radius 10
    Height 10
    Speed 25
    Damage 0
    Scale 0.5
	DeathSound "Weapons/PlasmaX"
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.67
	
    States
    {
    Spawn:
       POLP ABCD 2 Bright A_Gravity
       Loop
    Death:
	    POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",60,0,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
        POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",40,40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",0,60,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-40,40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-60,0,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",-40,-40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",0,-60,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned",40,-40,0,0,0,0,0,0)
		TNT1 A 20
		POLI A 1 A_SpawnItemEx("Engibot")
		POLI A 0 A_Playsound("Engineer/RoboReady",CHAN_ITEM,1,0,ATTN_NONE) 
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",60,0,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
        POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",40,40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",0,60,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-40,40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-60,0,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",-40,-40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",0,-60,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_PlayWeaponSound("GuardianSummonedReady")
		POLI ABCD 1 A_SpawnItemEx("GuardianIsSummoned2",40,-40,0,0,0,0,0,0)
		TNT1 A 5
		POLI A 0 A_Gravity
		Stop
	}
}

actor EngiBot
{
  obituary "%o's day didn't look good anyway."
  health 300
  radius 40
  height 110
  SpawnID 250
  mass 3000
  speed 20
  scale 0.6
  painchance 20
  Attacksound "Engibot/Fire"
  seesound "uacbsee"
  activesound "uacbact"
  deathsound "uacbdth"
  MONSTER
	+FRIENDLY
    +NOBLOOD
	+ALWAYSFAST
+QUICKTORETALIATE
+FRIENDLY
+DONTHURTSPECIES
+NOBLOOD
+NOBLOCKMONST
+INCOMBAT
+MISSILEMORE
+MISSILEEVENMORE
+LOOKALLAROUND
+NEVERRESPAWN
+DONTDRAIN
	Damagefactor "Mirabelplasma", 0.0
	Damagefactor "MacheteSlicerino", 0.0
	Damagefactor "Shotgun", 0.0
	Damagefactor "Machinegun", 0.0
	Damagefactor "I5", 1.2
	Damagefactor "I1", 0.2
	Damagefactor "I2", 0.9
	Damagefactor "Divine", 0.0
	Damagefactor "BlueFire", 1.8
	Damagefactor "Hellzone", 1.2
	Damagefactor "Lamiafire", 1.9
	Damagefactor "ThrottlePews", 0.0
	Damagefactor "MacheteSlicerino", 0.0
	Damagefactor "MacheteRangAttackSlice", 0.0
	damagefactor "Ghosttrap", 0.0
	Damagefactor "ZombieSlaps", 0.2
    Damagefactor "ZombiePoison", 1.0
	Damagefactor "ZombieIce", 1.0
	Damagefactor "minion2", 2.0
	Damagefactor "minion", 2.0
	Damagefactor "MorphRipper", 2.0
	Damagefactor "FleshlingMissile", 2.0
	Damagefactor "Ice2", 0.0
	Damagefactor "Ice", 0.0
	Damagefactor "fire", 0.0
	Damagefactor "fire2", 0.0
	Damagefactor "Altice", 0.0
	Damagefactor "Altfire", 0.0
	Damagefactor "Altice2", 0.0
	Damagefactor "altfire2", 0.0
	Damagefactor "plasma", 0.0
	damagefactor "CrapPlasma", 0.0
	Damagefactor "sentinel", 0.0
	Damagefactor "Inariplasma", 0.0
	Damagefactor "PistolBullets", 0.0
	Damagefactor "grenade", 0.0
	Damagefactor "grenade2", 0.0
	Damagefactor "proton", 0.0
	Damagefactor "arrow", 0.0
	Damagefactor "railgun", 0.0
	Damagefactor "SamDeagle", 0.0
	Damagefactor "Bulletpuff2", 0.0
	Damagefactor "KnightSword", 0.0
	Damagefactor "wind", 0.0
	Damagefactor "AxeFly", 0.0
	Damagefactor "CryoXBow", 0.0
	Damagefactor "ChaosExpl1", 0.0
	Damagefactor "ChaosExpl2", 0.0
	Damagefactor "ChaosExpl12", 0.0
	Damagefactor "RevyRifleBullet", 0.0
	Damagefactor "FlameProtect", 0.0
	Damagefactor "IlluPewPewRifle", 0.0
	Damagefactor "IlluNukeKABUUM", 0.0
	Damagefactor "BlackHoleDamages", 0.0
	Damagefactor "Melee", 0.0
	Damagefactor "Uppercut", 0.0
	Damagefactor "AntiAirBolt", 0.0
	Damagefactor "MechPewPews", 0.0
	Damagefactor "Creeper", 0.1
	Damagefactor "UboaRawrScream", 0.1
	Damagefactor "Creepstun", 5.0
	Damagefactor "SjasScream", 2.0
	Damagefactor "FrostbiteWind", 2.0
	Damagefactor "EmtalicSaw", 2.0
	Damagefactor "LichFire", 2.0
	Damagefactor "EyesoreballX", 5.0
	Damagefactor "Ravager", 0.1
	Damagefactor "Yurei", 2.0
	Damagefactor "YureiBall", 2.0
	Damagefactor "KarenExplo", 0.0
    Damagefactor "GasterSmokeHurt", 0.0
	Damagefactor "ChexWarrior", 0.0
	Damagefactor "ChexWarriorChainsaw", 0.0
	Damagefactor "UnmakerLaser", 0.0
  states
  {
  Spawn:
    UACB G 10 A_Look
    Goto See
  See:
    UACB A 3 A_SpawnItemEx("TemplarStomp",0,0,0,0,0,-20,0,0,0)
    UACB A 3 A_Chase
    UACB B 3 
    UACB BCC 3 
    UACB D 3 A_SpawnItemEx("TemplarStomp",0,0,0,0,0,-20,0,0,0)
    UACB D 3 
    UACB E 3 A_Chase
    UACB EFF 3
    loop
  Missile:
    UACB G 8 A_facetarget
	UACB H 0 A_CustomMissile("LongRifleCaseSpawn",40,0,5)
    UACB H 1 bright A_CustomBulletAttack(4,4,1,4,"MechBullets")
    UACB G 1  A_facetarget
	UACB G 0 A_CustomMissile("LongRifleCaseSpawn",40,0,5)
	UACB H 1 bright A_CustomBulletAttack(4,4,1,4,"MechBullets")
    UACB G 1  A_facetarget
	UACB G 0 A_CustomMissile("LongRifleCaseSpawn",40,0,5)
	UACB H 1 bright A_CustomBulletAttack(4,4,1,4,"MechBullets")
    UACB G 2  A_facetarget
    Goto See
  Death:
	TNT1 A 0 A_GiveToTarget("HitBeep",1)
    UACD K 0 bright
	UACD K 4 bright A_Scream
    UACD L 4 bright 
    UACD MN 4 bright
    UACD O 4 A_NoBlocking
    UACD PQR 4
    UACD S 30
	UACD T 4 bright A_Scream 
	UACD UVW 4 bright
	UACD XYZAB 2
    UACD C -1
  }
}


actor GuardianIsSummoned
{
-SOLID
+NOGRAVITY
+NOINTERACTION

renderstyle add
alpha 0.8
scale 1.5
States
{
Spawn:
POLI ABCD 1 bright 
stop
}
}

actor GuardianIsSummoned2
{
-SOLID
+NOGRAVITY
+NOINTERACTION

renderstyle add
alpha 0.8
scale 1.5
States
{
Spawn:
POLI ABCD 1 bright 
stop
}
}

ACTOR EngineerGuardian 32070
{
    Health 1500
    Radius 34 //42
    Height 74 //42
    Speed 20
	SpawnID 251
    Mass 10000
	scale 1.0
    PainChance 0
    MONSTER 
	+FRIENDLY
    +NOBLOOD
	+ALWAYSFAST
+QUICKTORETALIATE
+FRIENDLY
+DONTHURTSPECIES
+NOBLOOD
+NOBLOCKMONST
+INCOMBAT
+MISSILEMORE
+MISSILEEVENMORE
+LOOKALLAROUND
+NEVERRESPAWN
+DONTDRAIN
    SeeSound "reaper/sight"
    PainSound "reaper/pain"
    DeathSound "reaper/death"
    ActiveSound "EngiGuardian/active"
    Attacksound "reaper/gun"
    Obituary "%o has been terminated."
	Damagefactor "Mirabelplasma", 0.0
	Damagefactor "MacheteSlicerino", 0.0
	Damagefactor "Shotgun", 0.0
	Damagefactor "Machinegun", 0.0
	Damagefactor "I5", 1.2
	Damagefactor "I1", 0.2
	Damagefactor "I2", 0.9
	Damagefactor "Divine", 0.0
	Damagefactor "BlueFire", 1.8
	Damagefactor "Hellzone", 1.2
	Damagefactor "Lamiafire", 1.9
	Damagefactor "ThrottlePews", 0.0
	Damagefactor "MacheteSlicerino", 0.0
	Damagefactor "MacheteRangAttackSlice", 0.0
	damagefactor "Ghosttrap", 0.0
	Damagefactor "ZombieSlaps", 0.2
    Damagefactor "ZombiePoison", 1.0
	Damagefactor "ZombieIce", 1.0
	Damagefactor "minion2", 2.0
	Damagefactor "minion", 2.0
	Damagefactor "MorphRipper", 2.0
	Damagefactor "FleshlingMissile", 2.0
	Damagefactor "Ice2", 0.0
	Damagefactor "Ice", 0.0
	Damagefactor "fire", 0.0
	Damagefactor "fire2", 0.0
	Damagefactor "Altice", 0.0
	Damagefactor "Altfire", 0.0
	Damagefactor "Altice2", 0.0
	Damagefactor "altfire2", 0.0
	Damagefactor "plasma", 0.0
	damagefactor "CrapPlasma", 0.0
	Damagefactor "sentinel", 0.0
	Damagefactor "Inariplasma", 0.0
	Damagefactor "PistolBullets", 0.0
	Damagefactor "grenade", 0.0
	Damagefactor "grenade2", 0.0
	Damagefactor "proton", 0.0
	Damagefactor "arrow", 0.0
	Damagefactor "railgun", 0.0
	Damagefactor "SamDeagle", 0.0
	Damagefactor "Bulletpuff2", 0.0
	Damagefactor "KnightSword", 0.0
	Damagefactor "wind", 0.0
	Damagefactor "AxeFly", 0.0
	Damagefactor "CryoXBow", 0.0
	Damagefactor "ChaosExpl1", 0.0
	Damagefactor "ChaosExpl2", 0.0
	Damagefactor "ChaosExpl12", 0.0
	Damagefactor "RevyRifleBullet", 0.0
	Damagefactor "FlameProtect", 0.0
	Damagefactor "IlluPewPewRifle", 0.0
	Damagefactor "IlluNukeKABUUM", 0.0
	Damagefactor "BlackHoleDamages", 0.0
	Damagefactor "Melee", 0.0
	Damagefactor "Uppercut", 0.0
	Damagefactor "AntiAirBolt", 0.0
	Damagefactor "MechPewPews", 0.0
	Damagefactor "Creeper", 0.1
	Damagefactor "UboaRawrScream", 0.1
	Damagefactor "Creepstun", 5.0
	Damagefactor "SjasScream", 2.0
	Damagefactor "FrostbiteWind", 2.0
	Damagefactor "EmtalicSaw", 2.0
	Damagefactor "LichFire", 2.0
	Damagefactor "EyesoreballX", 5.0
	Damagefactor "Ravager", 0.1
	Damagefactor "Yurei", 2.0
	Damagefactor "YureiBall", 2.0
	Damagefactor "KarenExplo", 0.0
    Damagefactor "GasterSmokeHurt", 0.0
	Damagefactor "ChexWarrior", 0.0
	Damagefactor "ChexWarriorChainsaw", 0.0
	Damagefactor "UnmakerLaser", 0.0
    States
    {
    Spawn:
        REAP A 10 A_Look
        Goto See
    See:
        REAP A 0 A_playsound("reaper/walk") 
		REAP A 9
        REAP AA 7       
        REAP BB 7 A_CHASE
        REAP C 0 A_playsound("reaper/walk")   
		REAP C 9
        REAP CC 7        
        REAP DD 7 A_CHASE
        loop
    Missile:
	REAP E 0 A_Playsound("EngiGuardian/active",CHAN_ITEM)
	REAP E 0 A_jump(72,"MissilesAway")
    REAP E 10 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	REAP F 2 BRIGHT A_CustomBulletAttack(4,4,1,4,"MechBullets")
	REAP F 0 A_CustomMissile("LongRifleCaseSpawn",60,0,5)
	REAP E 2 A_facetarget
	Goto See
	    MissilesAway:
        REAP G 20 A_facetarget
        REAP H 0 A_playsound("reaper/missile")        
        REAP H 0 A_playsound("reaper/missile")
        REAP H 0 A_custommissile("reapmissile",74,14,0)
        REAP H 1 A_custommissile("reapmissile2",78,14,0)          
        REAP H 0 A_custommissile("reapmissile",74,20,0)                     
        REAP H 0 A_custommissile("reapmissile2",78,20,0)
        REAP H 0 A_custommissile("reapmissile2",74,-14,0)
        REAP H 1 A_custommissile("reapmissile",78,-14,0)          
        REAP H 0 A_custommissile("reapmissile2",74,-20,0)                     
        REAP H 1 A_custommissile("reapmissile",78,-20,0)        
        REAP H 20 bright A_facetarget
        REAP G 20 A_facetarget       
	  Goto See
    Pain:
        REAP I 3
        REAP I 3 A_Pain
        Goto See
    Death:
		TNT1 A 0 A_GiveToTarget("HitBeep",1)
        REAP J 7 A_Scream
        REAP KLM 6
        REAP N 6 A_Fall
        REAP O 7
        REAP P 5
		REAP P 1 A_SpawnItemEx("GuardianMGGiver",0,0,32,random(2,3),momy,random(8,12),random(-180,180))
		REAP Q -1 A_BossDeath
        Stop
	Pain.FrostbiteWind:
	Pain.Ravager:
	Pain.Juglava:
	Pain.HarvesterRock:
	Pain.EmtalicSaw:
	Pain.MorphRipper:
	Pain.MorphRipperGib:
	Pain.I1:
	Pain.I3:
	Pain.ZombiePoison:
	Pain.JusticarSpike:
	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 A_GiveToTarget("HitBeep",1)
		Goto Pain
    }
}

Actor Mechbullets : BulletPuff2
{
	DamageType "MechPewPews"
}

actor reapmissile
{
  //spawnid 127
  radius 11
  height 8
  speed 50
  damage (10)
  Damagetype "MechPewPews"
  scale 0.35
  deathsound "reaper/explode"
  PROJECTILE
  +ROCKETTRAIL
  +DONTHURTSPECIES
  DONTHURTSHOOTER
  states
  {
  Spawn:
    MIS2 A 1 bright A_BISHOPMISSILEWEAVE
    loop
  Death:
    MIS2 B 3 bright A_explode(15,128)
    MIS2 CDEFGHIJK 3 bright 
    stop
  }
}

actor reapmissile2 : reapmissile
{
 states
 {
 spawn:
    MIS2 A 1 bright A_CStaffMissileSlither     
      loop
      }
}


ACTOR MechSummonProgress : Inventory
{ 
   Inventory.Amount 0
   Inventory.MaxAmount 29
   +INVBAR
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

ACTOR MechSummonProgress2 : Inventory
{ 
   Inventory.Amount 0
   Inventory.MaxAmount 9
   +INVBAR
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

ACTOR MechConstructAmmo : Ammo
{ 
   Inventory.Amount 200
   Inventory.MaxAmount 200
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

ACTOR MechConstructAmmo2 : Ammo
{ 
   Inventory.Amount 100
   Inventory.MaxAmount 100
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

Actor GuardianMGGiver : CustomInventory
{
	Inventory.PickupMessage "You picked up the Guardian's MG."
	Inventory.PickupSound "misc/w_pkup"
	Inventory.Amount 1
	Inventory.MaxAmount 1
	Scale 0.9
	States
	{
	Spawn:
		HVMG W 525
		HVMG W 1 A_FadeOut(0.1)
		Goto Spawn+1
	Pickup:
		TNT1 A 1 A_JumpIfInventory("SawLauncher",1,"Health")
		Fail
	Health:
		TNT1 A 0 A_GiveInventory("GuardianMG",1)
		Stop
	}
}
	
ACTOR GuardianMG : Weapon
{ 
	Weapon.Kickback 5
	Weapon.AmmoType "EngineerGuardianClip" 
	Weapon.AmmoGive 100
	Weapon.AmmoUse 1
	Weapon.SlotNumber 4
	Inventory.PickupSound "misc/w_pkup" 
	Inventory.PickupMessage ""
	Obituary "%o was Ripped a new one by %k and their Guardian MG."
	AttackSound "reaper/gun"
 	Decal BulletChip
	States 
	{  
	Ready: 
		HVMG A 1 A_WeaponReady 
		Loop 
	Deselect: 
		HVMG A 1 A_Lower 
		Loop 
	Select: 
		HVMG A 1 A_Raise 
		Loop 
	Fire: 
		HVMG B 0 A_GunFlash
		HVMG B 1 Bright 
		HVMG B 0 A_FireCustomMissile("LongRifleCaseSpawn",5,0,0,-3)
		HVMG C 1 Bright A_FireBullets(4, 4, 1, 8, "BulletPuff2", 1)  
		HVMG A 2
        TNT1 A 0 A_refire
		goto Ready 
	Spawn:
		HVMG W -1
		Stop
		}
	} 
	
ACTOR EngineerGuardianClip : Ammo
{ 
   Inventory.Amount 100
   Inventory.MaxAmount 100
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

actor BotNailGun : NailGun
{
  states
  {
  Spawn:
    LIBG X 400
    stop
  Ready:
    LIBG D 0 A_TakeInventory("BotAttack",255)
    LIBG A 1 A_WeaponReady
    loop
  Deselect: 
    LIBG A 1 A_Lower
    loop
  Select:
    LIBG A 1 A_Raise
    loop
  Fire:
    LIBG D 0 A_GiveInventory("BotAttack",1)
    LIBG D 0 A_PlayWeaponSound("EngineerNail")
	LIBG D 0 A_JumpIfInventory("Desperation", 5, "DFire5")
	LIBG D 0 A_JumpIfInventory("Desperation", 4, "DFire4")
	LIBG D 0 A_JumpIfInventory("Desperation", 3, "DFire3")
	LIBG D 0 A_JumpIfInventory("Desperation", 2, "DFire2")
	LIBG D 0 A_JumpIfInventory("Desperation", 1, "DFire1")
    LIBG A 1 A_FireCustomMissile("Nail", random(-1,1), 0, 10, 2)
	LIBG E 1//2
	LIBG D 1//2
	LIBG C 1//2
	LIBG B 2//2
    LIBG A 2//1
	//LIBG A 0 A_ReFire
    goto Ready
  DFire1:
    LIBG A 1 A_FireCustomMissile("Nail3", random(-1,1), 0, 10, 2)
	Goto Fire+8
  DFire2:
    LIBG A 1 A_FireCustomMissile("Nail4", random(-1,1), 0, 10, 2)
	Goto Fire+8
  DFire3:
    LIBG A 1 A_FireCustomMissile("Nail5", random(-1,1), 0, 10, 2)
	Goto Fire+8
  DFire4:
    LIBG A 1 A_FireCustomMissile("Nail6", random(-1,1), 0, 10, 2)
	Goto Fire+8
  DFire5:
    LIBG A 1 A_FireCustomMissile("Nail7", random(-1,1), 0, 10, 2)
	Goto Fire+8
    }
}

actor BotSawLauncher : Weapon//For more variation, i guess.
{
  obituary "%o was ripped to shreds by %k's Buzz Saws."
  radius 20
  height 16
  //decal "BulletChip"
  inventory.pickupmessage "You got the Buzz Saw Launcher!"
  weapon.selectionorder 1500
  weapon.kickback 100
  weapon.ammotype "SawAmmo"
  weapon.ammouse1 0//1
  weapon.ammotype2 "SawAmmo"
  weapon.ammouse2 0//1
  weapon.ammogive 8
  Weapon.SlotNumber 2
  +INVENTORY.UNDROPPABLE
  //Weapon.AmmoUse2 1
  //Weapon.AmmoType2 "HollyAmmo"
  inventory.icon "BLADL"
  +WEAPON.NOAUTOAIM
  +WEAPON.DONTBOB
  states
  {
  Spawn:
    METB M 400
    stop
  Ready:
    METB D 0 A_TakeInventory("BotAttack",255)
    METB A 1 A_WeaponReady
    loop
  Deselect: 
	METB A 1 A_Lower
	Goto Deselect
  Deselect2:
    METB A 1 A_Lower
    loop
  Select:
    METB A 1  A_Raise 
    loop
  Fire:
   METB D 0 A_GiveInventory("BotAttack",1)
   METB ABC 3
   METB D 3 A_PlayWeaponSound("SawClick")
   //Goto Hold
   METB D 4//1
   METB D 0 //A_Refire
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 10 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   goto Ready
  Altfire:
    METB ABC 3
	METB D 3 A_PlayWeaponSound("SawClick")
	METB A 10  A_FireCustomMissile("BuzzSaw", random(-3,3), 1, 6, 0)
    goto Ready
  /*Hold:
   METB D 1 
   METB D 0 A_Refire
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 10 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   goto Ready
  }*/
  }
}

actor BotSuperSawLauncher : BotSawLauncher
{
  states
  {
  Fire:
   METB D 0 A_GiveInventory("BotAttack",1)
   METB A 0 A_Jump(32, "SawBurst", "Steam")
   METB ABC 3
   METB D 3 A_PlayWeaponSound("SawClick")
   //Goto Hold
   METB D 4//1
   METB D 0 //A_Refire
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 10 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   goto Ready
  SawBurst:
   METB A 0 A_JumpIfInventory("SawCooldown", 1, "Ready")
   METB ABC 2
   METB D 2 A_PlayWeaponSound("SawClick")
   METB D 1
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 5 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 5 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   METB D 0 A_PlayWeaponSound("SawThrow")
   METB A 5 A_FireCustomMissile("BuzzSawThrown", 0, 1, 6, 0)
   METB A 0 A_GiveInventory("SawCooldown", 1)
   Goto Ready
  Steam:
   METB A 0 A_JumpIfInventory("SteamCooldown", 1, "Ready")
   METB A 1 offset (0, 40)
   METB A 1 offset (0, 50)
   METB A 1 offset (0, 60)
   METB A 1 offset (0, 70)
   METB A 1 offset (0, 80)
   METB A 1 offset (0, 90)
   METB A 1 offset (0, 100)
   METB A 1 offset (0, 110)
   METB A 1 offset (0, 120)
   EMBR A 1 offset (0, 120)
   EMBR A 1 offset (0, 110)
   EMBR A 1 offset (0, 100)
   EMBR A 1 offset (0, 90)
   EMBR A 1 offset (0, 80)
   EMBR A 1 offset (0, 70)
   EMBR A 1 offset (0, 60)
   EMBR A 1 offset (0, 50)
   EMBR A 1 offset (0, 40)
   EMBR A 0 A_PlaySoundEx("SteamLaunch","Voice")
   EMBR A 0 A_FireCustomMissile("SteamProjectile", 0, 1, 0, 2)
   EMBR K 3
   EMBR L 3
   EMBR A 7
   EMBR A 0 A_PlayWeaponSound("SteamWhistle")
   EMBR FGHIJA 2
   EMBR A 0
   EMBR A 1 offset (0, 40)
   EMBR A 1 offset (0, 50)
   EMBR A 1 offset (0, 60)
   EMBR A 1 offset (0, 70)
   EMBR A 1 offset (0, 80)
   EMBR A 1 offset (0, 90)
   EMBR A 1 offset (0, 100)
   EMBR A 1 offset (0, 110)
   EMBR A 1 offset (0, 120)
   METB A 1 offset (0, 120)
   METB A 1 offset (0, 110)
   METB A 1 offset (0, 100)
   METB A 1 offset (0, 90)
   METB A 1 offset (0, 80)
   METB A 1 offset (0, 70)
   METB A 1 offset (0, 60)
   METB A 1 offset (0, 50)
   METB A 1 offset (0, 40)
   METB A 0 A_GiveInventory("SteamCooldown", 1)
   Goto Ready
  }
}

actor KilledEngineer : KilledSjas
{
}

actor BuzzSawThrown
{
PROJECTILE
obituary "%o was ripped to shreds by %k's Buzz Saws."
+RIPPER
+SKYEXPLODE
Damage (random(17,18))//8
Height 5
Radius 5
Speed 50
damagetype "ice2"
scale 0.5
+BLOODLESSIMPACT
+RIPPER
+PIERCEARMOR
States
{
Spawn:
METB E 0
//METB E 0 A_PlaySoundEx("SawAir","voice")
METB E 0 A_PlaySound ("SawAir", 2, 1.0, 0, ATTN_NORM)
METB EFGHIJKL 2
loop
Death:
METB L 0 A_SpawnItemEx("SawAmmo",0,0,0,0,0,-1)//BuzzSaw
stop
}
}

actor BuzzSaw
{
PROJECTILE
-NOGRAVITY
+SKYEXPLODE
obituary "%o fell over %k's Buzz Saw."
Speed 10
Height 5
radius 5
scale 0.5
damage (15)
damagetype "EngineerSaw"
+BLOODLESSIMPACT
+RIPPER
+PIERCEARMOR
States
{
Spawn:
METB IJKLEFGH 1
METB H 1 A_JumpIf(waterlevel == 2, "Death2")
METB H 0 A_GiveInventory("Clip",1)
METB H 0 A_JumpIfInventory("Clip", 100, "Death2")
Goto Spawn+8
Death:
//METB H 0 A_PlaySound("SawHit","body")
METB H 0 A_PlaySound ("SawHit", 4, 1.0, 0, ATTN_NORM)
METB H 0 A_CustomMissile("SawSpike", 0, 0, 0, 0)
stop
Death2:
METB H 1
stop
}
}

actor SteamCannon : Weapon
{
  obituary "%o choked on %k's Steam Cannon."
  radius 20
  height 16
  Weapon.SlotNumber 3
  inventory.pickupmessage "You got the Steam Cannon!"
  weapon.selectionorder 300
  weapon.kickback 100
  weapon.ammotype1 "SteamAmmo"
  weapon.ammouse1 1
  weapon.ammotype2 "SteamAmmo"
  weapon.ammouse2 1
  weapon.ammogive 8
  inventory.icon "LAVAG"
  +INVENTORY.UNDROPPABLE
  //Weapon.AmmoUse2 4
  //Weapon.AmmoType2 "StarAmmo"
  +WEAPON.NOAUTOAIM
  +WEAPON.DONTBOB
  states
  {
  Spawn:
    BPAK A 400
    stop
  Ready:
    EMBR AAAABBBBCCCCDDDDCCCCBBBB 1 A_WeaponReady
    loop
  Deselect: 
    EMBR A 1 A_Lower
    loop
  Select:
    EMBR A 1 A_Raise
    loop
  Fire:
    EMBR A 0 A_PlaySoundEx("SteamLaunch","Voice")
	EMBR A 0 A_FireCustomMissile("SteamProjectile", 0, 1, 0, 2)
	EMBR K 3
	EMBR L 4
	EMBR A 10
	EMBR A 0 A_PlayWeaponSound("SteamWhistle")
	EMBR FGHIJA 3
    EMBR A 0 A_ReFire
    goto Ready
  Altfire:
    EMBR A 0 A_PlaySoundEx("SteamLaunch","Voice")
	EMBR A 0 A_FireCustomMissile("SteamProjectile2", 0, 1, 0, 2)
	EMBR K 3
	EMBR L 4
	EMBR A 10
	EMBR A 0 A_PlayWeaponSound("SteamWhistle")
	EMBR FGHIJA 3
    EMBR A 0 A_ReFire
    goto Ready
  }
}

actor SteamProjectile
{
PROJECTILE
+SKYEXPLODE
+SEEKERMISSILE
Damage 0
Speed 30
Height 8
damagetype "Grenade"
Radius 8
scale 0.5
renderstyle translucent
deathsound "SteamHit"
scale 1.6
alpha 1.0
States
{
Spawn:
//EBMP ABCDE
EMBP A 2 bright A_SpawnItemEx("FallingSteamDamage", 0, 0, 0, 0, 0, -30, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner", 0, 0, 0, 0, 0, 0, 0)
EMBP B 2 bright A_SpawnItemEx("FallingSteamDamage", 0, 0, 0, 0, 0, -30, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner", 0, 0, 0, 0, 0, 0, 0)
EMBP C 2 bright A_SpawnItemEx("FallingSteamDamage", 0, 0, 0, 0, 0, -30, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner", 0, 0, 0, 0, 0, 0, 0)
EMBP D 2 bright A_SpawnItemEx("FallingSteamDamage", 0, 0, 0, 0, 0, -30, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner", 0, 0, 0, 0, 0, 0, 0)
EMBP E 2 bright A_SpawnItemEx("FallingSteamDamage", 0, 0, 0, 0, 0, -30, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner", 0, 0, 0, 0, 0, 0, 0)
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,180)
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:
TNT1 A 0 A_SpawnItem("SteamExplode")
TNT1 A 0 A_Explode(30, 128, 1)
stop
}
}

actor SteamProjectile2
{
PROJECTILE
+SKYEXPLODE
-NOGRAVITY
gravity 2.0
+HEXENBOUNCE
+CANBOUNCEWATER
+SKYEXPLODE
bouncefactor 0.0
wallbouncefactor 0.0
Damage 0
Speed 18
Height 8
damagetype "Grenade"
Radius 8
scale 0.5
renderstyle translucent
deathsound "SteamHit"
scale 1.6
alpha 1.0
reactiontime 4
States
{
Spawn:
//EBMP ABCDE
EMBP A 2 bright A_SpawnItemEx("GroundSteamDamage", 0, 0, 8, 0, 0, 0, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner2", 0, 0, 0, 0, 0, 0, 0)
EMBP B 2 bright A_SpawnItemEx("GroundSteamDamage", 0, 0, 8, 0, 0, 0, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner2", 0, 0, 0, 0, 0, 0, 0)
EMBP C 2 bright A_SpawnItemEx("GroundSteamDamage", 0, 0, 8, 0, 0, 0, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner2", 0, 0, 0, 0, 0, 0, 0)
EMBP D 2 bright A_SpawnItemEx("GroundSteamDamage", 0, 0, 8, 0, 0, 0, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner2", 0, 0, 0, 0, 0, 0, 0)
EMBP E 2 bright A_SpawnItemEx("GroundSteamDamage", 0, 0, 8, 0, 0, 0, 0)
EMBP A 0 bright A_SpawnItemEx("AshSpawner2", 0, 0, 0, 0, 0, 0, 0)
EMBP A 0 A_CountDown
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,180)
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:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItem("SteamExplode")
TNT1 A 0 A_Explode(30, 128, 1)
stop
}
}

actor GroundSteamDamage
{
damagetype "Grenade"
-SOLID
+NOGRAVITY
-NOBLOCKMAP
radius 20
height 20
damage 0
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(5,158,0)
stop
}
}

actor AshSpawner
{
-SOLID
+CLIENTSIDEONLY
+NOGRAVITY
States
{
Spawn:
TNT1 A 0
TNT1 AA 1 A_SpawnItemEx("BurningAsh",0,0,0,random(-10,10),random(10,-10),-5)
stop
}
}

actor AshSpawner2 : AshSpawner
{
States
{
Spawn:
TNT1 A 0
TNT1 AA 1 A_SpawnItemEx("BurningAsh",0,0,0,random(-10,10),random(10,-10),random(8,15))
stop
}
}

actor BurningAsh
{
+CLIENTSIDEONLY
PROJECTILE
Damage 0
+RIPPER
+BRIGHT
+DOOMBOUNCE
bouncefactor 0.5
bouncecount 3
gravity 1.8
-NOGRAVITY
renderstyle add
alpha 0.8
scale 0.2
+BLOODLESSIMPACT
States
{
Spawn:
EMBP A 0 A_PlaySoundEx("STEAM","Voice")
GLO6 A 4
GLO6 A 0 A_SpawnItemEx("SmokeSmall")
GLO6 A 0 A_SpawnItemEx("FireySmall")
loop
}
}

actor SmokeSmall : SmokeLarge
{
scale 0.1
}

ACTOR FireySmall : Firey
{
scale 0.1
	States
	{
	Spawn:
		NULL A 0
		NULL A 0 //A_PlaySound("weapons/cyborgjetpack")
		Goto See
		}
}

actor FallingSteamDamage
{
damagetype "Grenade"
PROJECTILE
-NOBLOCKMAP
radius 20
height 20
damage 0
States
{
Spawn:
TNT1 A 2 A_Explode(3,200,0)
loop
Death:
TNT1 A 2 A_Explode(11,200,0)
stop
}
}


actor SteamExplode
{
+CLIENTSIDEONLY
damagetype "Grenade"
+NOINTERACTION
radius 1
height 1
- SOLID
//translation "176:191=160:167"
+NOGRAVITY
alpha 0.9
renderstyle translucent
States
{
Spawn:
MISL B 0
MISL B 0 A_PlaySound("SteamExplode")
MISL BCDE 10 bright
stop
}
}

actor SteamAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 10
Inventory.PickupMessage ""
+INVENTORY.IGNORESKILL
}

/*actor SawAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 35
}*/

ACTOR SawAmmo : Ammo
{ 
   Inventory.Amount 1
   Inventory.MaxAmount 55//40//35
   Ammo.BackpackAmount 1
   Ammo.BackpackMaxAmount 40
   Inventory.PickupMessage "You found a Saw." 
   //Inventory.Icon METBL0
   +INVENTORY.IGNORESKILL
   Scale 0.5//0.5?
   Radius 14//5
   Height 20//14//5
   States 
   { 
   Spawn: 
      METB L 700
      Stop
   } 
}

ACTOR SawLimit : Inventory
{ 
   Inventory.Amount 1
   Inventory.MaxAmount 15
   Inventory.Icon METBH0
   +INVBAR
   +INVENTORY.UNDROPPABLE
   +INVENTORY.IGNORESKILL
   States 
   { 
   Spawn: 
   TNT1 A 0
   Stop
   } 
}

ACTOR SawAmmo2 : SawAmmo
{ 
   Inventory.Amount 1
   Inventory.MaxAmount 5
   Ammo.BackpackAmount 1
   Ammo.BackpackMaxAmount 5
   Inventory.PickupMessage "You found a Saw." 
   States 
   { 
   Spawn: 
      METB L 0
      Stop
   } 
}

actor SawCooldown : PowerDamage
{
damagefactor "nothing", 1.0
powerup.duration 55
}

actor SteamCooldown : PowerDamage
{
damagefactor "nothing", 1.0
powerup.duration 60
}