//Everything that can explode and hurt people goes here.

ACTOR Rocket2
{
	Health 10
	Radius 2
	Height 4
	Speed 50
    Damage (random (300, 300))
	DamageType Explosive
    MeleeDamage 0
	Scale 0.5
    Decal "Scorch"
	+MISSILE
    +NOGRAVITY
    +EXTREMEDEATH
	+THRUSPECIES
	+NOTELEPORT
	SeeSound "Rocket/Launch"
	DeathSound "Explosion"
	Obituary "$OB_MPROCKET"
	Species "Marines"
	States
	{
	Spawn:
		MISL A 0
		TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast2", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast3", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames1", 0, 0, 0, 20, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames2", 0, 0, 0, 25, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames3", 0, 0, 0, 30, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames4", 0, 0, 0, 35, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")

	Live:
	    MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop

	SpawnUnderwater:
		MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
	    TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
	    Goto Live

	Death:
        EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)//(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_CustomMissile("ExplosionSplashSpawner")
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 AAAAAA 0 A_CustomMissile ("BDExplosionparticles", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx ("RocketExplosion",0,0,13,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 2
		TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 15
		TNT1 A 0 A_PlaySound("distantexp", 5)
		Stop
	}
}

Actor RocketBackblast: FastProjectile
{
	speed 80
	damage (random(12,12))
	Decal "Scorch"
	Radius 22
	Height 12
	Alpha 0.9
	Scale 1.0
	Renderstyle ADD
	+GHOST
	+THRUGHOST
	+THRUSPECIES
	Species "Marines"
	DamageType "ExplosiveImpact"
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 2
			Stop

		Death:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteAlways("CheckRocketBackblast")
			TNT1 A 3
			TNT1 A 0 A_Explode(4, 1, 0)
			TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_CustomMissile("ExplosionSmokeHD", 2, 0, random(0, 360), 2, random(0, 90))
			Stop
		Disappear:
			TNT1 A 0
			Stop
	}
}

Actor RocketBackblast2: RocketBackblast
{
	Decal "None"
	Radius 4
	Height 4
	DamageType "Shrapnel"
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 2
			TNT1 A 0 A_CustomMissile("ExplosionSmokeHD", 2, 0, random(0, 360), 2, random(0, 90))
			Stop

		Death:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteAlways("CheckRocketBackblast")
			TNT1 A 3
			TNT1 A 0 A_Explode(22, 2)
			TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_CustomMissile("ExplosionSmokeHD", 2, 0, random(0, 360), 2, random(0, 90))
			Stop
	}
}

Actor RocketBackblast3: RocketBackblast2
{
	Radius 32
	Height 12
	Damagetype "Shrapnel"
	States
	{
		Death:
			TNT1 A 3
			TNT1 A 0 A_Explode(32, 64, 0, 0, 64)
			TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			Stop
	}
}

Actor RocketBackblastRealism: RocketBackblast
{
	damage (random(60,60))
	damagetype ExplosiveImpact
	States
	{
		Death:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteAlways("CheckRocketBackblast")
			TNT1 A 3
			TNT1 A 0 A_Explode(128, 32)
			TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_CustomMissile("ExplosionSmokeHD", 2, 0, random(0, 360), 2, random(0, 90))
			Stop
	}
}

actor JuggernautRocket: Rocket2
{
	Speed 20
	Damage (random (52, 52))
	Species "SpiderMastermind"
	DamageType ExplosiveImpact
	Radius 4
	Height 8
	States
	{
	Spawn:
	MISL A 0
	TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast2", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("RocketBackblast3", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames1", 0, 0, 0, 20, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames2", 0, 0, 0, 25, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames3", 0, 0, 0, 30, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames4", 0, 0, 0, 35, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
	TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")

	Live:
	MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
	TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
	Loop
	}
}

actor RocketExplosion
{
	Radius 2
	Height 2
	Damagetype Explosive
	Obituary "%o was exploded by %k rocket."
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("WhiteShockwave")
		TNT1 A 3
		TNT1 A 0 A_Explode
		Stop
	}
}

actor LiquidExplosionEffectSpawner
{
	+NOBLOCKMAP
	Radius 2
	Height 2
	Damagetype CauseWaterSplash
	States
	{
	Spawn:
	TNT1 A 1
	TNT1 A 0 A_Explode(2,8)
	Stop
	}
}

actor BarrelExplosion: RocketExplosion
{
	+FORCERADIUSDMG
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
		TNT1 A 3
		TNT1 A 0 A_Explode
		Stop
}
}

actor TankMissileExplosion: RocketExplosion
{
	+FORCERADIUSDMG
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
		TNT1 A 3
		TNT1 A 0 A_Explode(128,256)
		Stop
	}
}

actor GrenadeExplosion: RocketExplosion
{
	+FORCERADIUSDMG
	States
	{
	Spawn:
	TNT1 A 0
	TNT1 A 3
	TNT1 A 0 A_Explode
	TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
	Stop
	}
}

ACTOR GrenadeMissile
{
	Radius 2
	Height 4
	Speed 50
	Damage (random(40, 40))
    +MISSILE
    Gravity 0.7
	+SKYEXPLODE
	+BOUNCEONFLOORS
	+BOUNCEONWALLS
	+BOUNCEONCEILINGS
	+EXPLODEONWATER
	+THRUSPECIES
	-NOTELEPORT
	-NOGRAVITY
	Species "Marines"
	DamageType Kick
	BounceType Doom
    BounceFactor 0.5
	WallBounceFactor 0.55
	SeeSound "Weapons/GrenadeBounce"
	DeathSound "none"
	Decal "Scorch"
	Obituary "$OB_MPROCKET"
	Scale 0.5
	States
	{
	Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
		TNT1 A 0 A_CheckFloor("Death")
		GBPJ AAABBBCCCDDD 1 A_CustomMissile ("RocketSmokeTrail52", 2, 0, random (70, 110), 2, random (0, 360))
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ EEEFFFGGGHHH 1 A_CustomMissile ("RocketSmokeTrail52", 2, 0, random (70, 110), 2, random (0, 360))
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
		Loop

	SpawnUnderwater:
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ ABCD 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ EFGH 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
	    Goto Spawn

	Death:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 6, "Explode")
		GBPJ AAAA 3 A_CustomMissile ("RocketSmokeTrail52", 2, 0, random (70, 110), 2, random (0, 360))
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		Loop

	XDeath:
		TNT1 A 0 A_Recoil(1)
		TNT1 A 0 A_SetAngle(random (90,-90) + angle)
		GBPJ C 1 ThrustThingZ(0,20,0,1)
		Goto Spawn

	Explode:
	Death.Slime:
	Death.Fire:
	Death.Bullet:
	Death.Shotgun:
	Death.SSG:
	Death.Cutless:
	Death.Shrapnel:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("GrenadeExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("Explosion", 1)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 1
		EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)//(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_CustomMissile("ExplosionSplashSpawner")
		TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)

		TNT1 AAAAAAAAAA 0 A_CustomMissile ("BDExplosionparticlesBig", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

ACTOR ShortGrenade: GrenadeMissile
{
	-BOUNCEONFLOORS
	-BOUNCEONWALLS
	-BOUNCEONCEILINGS
	+SLIDESONWALLS
	Damage (random(150, 150))
	SeeSound "None"
	Damagetype Explosive
	BounceType "None"
	States
	{
	Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		GBPJ AAAAAAAAABBBBBBBCCCCCDDDDDEEEEEFFFFFGGGGGHHHHH 1 A_CustomMissile ("RocketSmokeTrail52", 2, 0, random (70, 110), 2, random (0, 360))
		Loop

	SpawnUnderwater:
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ ABCD 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 1, "Explode")
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ EFGH 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 1, "Explode")
	    Goto Spawn

	Death:
	XDeath:
	Explode:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("GrenadeExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("Explosion", 1)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 1
		EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)//(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_CustomMissile("ExplosionSplashSpawner")
		TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)

		TNT1 AAAAAAAAAA 0 A_CustomMissile ("BDExplosionparticlesBig", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

ACTOR FriendlyGrenadeExplosion
{
	+MISSILE
	Radius 2
	Height 2
	Damagetype FriendBullet
	Obituary "%o was exploded by %k rocket."
	Species "Marines"
	+THRUSPECIES
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 3
		TNT1 A 0 A_Explode(100,300)
		TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
		Stop
	}
}

ACTOR MarineShortGrenade : GrenadeMissile
{
	-BOUNCEONFLOORS
	-BOUNCEONWALLS
	-BOUNCEONCEILINGS
	+SLIDESONWALLS
	Damage (random(150, 150))
	SeeSound "None"
	Damagetype FriendBullet
	BounceType "None"
	States
	{
	Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		GBPJ AAAAAAAAABBBBBBBCCCCCDDDDDEEEEEFFFFFGGGGGHHHHH 1 A_CustomMissile ("RocketSmokeTrail52", 2, 0, random (70, 110), 2, random (0, 360))
		Loop

	SpawnUnderwater:
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ ABCD 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 1, "Explode")
		TNT1 A 0 A_GiveInventory("STGrenadeTimer", 1)
		GBPJ EFGH 3
		TNT1 A 0 A_JumpIfInventory("STGrenadeTimer", 1, "Explode")
	    Goto Spawn

	Death:
	XDeath:
	Explode:
	    TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("FriendlyGrenadeExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("Explosion", 1)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 1
        EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)//(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_CustomMissile("ExplosionSplashSpawner")
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)

        TNT1 AAAAAAAAAA 0 A_CustomMissile ("BDExplosionparticlesBig", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

ACTOR GrenadeMissileBreaksGlass: ShortGrenade
{
    -BLOODSPLATTER
	Damagetype Explosive
	+NOPAIN
	Decal "None"
	Damage (random (1,2))
	States
	{
	Spawn:
	    TNT1 A 1
		TNT1 A -1
		Stop

	Death:
	XDeath:
	Melee:
	    TNT1 A 0
		Stop

	}
}

ACTOR MarineRocket2: Rocket2
{
	DamageType FriendBullet
	States
	{
	Spawn:
		MISL A 0
		TNT1 A 0 A_PlaySound("DSRLAUN")
		TNT1 A 0 BRIGHT A_SpawnItemEx("MarineBackblast", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("MarineBackblast2", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("MarineBackblast3", 0, 0, 0, 80, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames1", 0, 0, 0, 20, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames2", 0, 0, 0, 25, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames3", 0, 0, 0, 30, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 BRIGHT A_SpawnItemEx("BackblastFlames4", 0, 0, 0, 35, 0, 0, angle-180, SXF_ABSOLUTEANGLE | SXF_TRANSFERPITCH)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")

	Live:
	    MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop

	Death:
        EXPL A 0 Radius_Quake (2, 35, 0, 5, 0)//(intensity, duration, damrad, tremrad, tid)
		TNT1 A 0 A_CustomMissile("ExplosionSplashSpawner")
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 AAAAAA 0 A_CustomMissile ("BDExplosionparticles", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx ("MarineRocketExplosion",0,0,13,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0
		TNT1 A 2
		TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 15
		TNT1 A 0 A_PlaySound("distantexp", 5)
		Stop
	}
}

ACTOR MarineBackBlast : RocketBackBlast
{
	DamageType FriendBullet
}

ACTOR MarineBackBlast2 : RocketBackBlast2
{
	DamageType FriendBullet
}

ACTOR MarineBackBlast3 : RocketBackBlast3
{
	DamageType FriendBullet
}

ACTOR MarineRocketExplosion : RocketExplosion
{
	DamageType FriendBullet
}

ACTOR CyberBalls: Rocket2
{
	Radius 6
	Height 12
	Speed 25
    Damage (random (106, 106))
	DamageType Extreme
    Decal "Scorch"
	Renderstyle Add
	Species "Cyberdemon"
	Scale 1.7
    SeeSound "DSCANFIR"
	DeathSound "Explosion"
	Obituary "%o was exploded to pieces by a Cyberdemon."
	States
	{
	Spawn:
	    TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("BDCheckJanitor", 0, 0, 0, 0)//Check Effects
		WYVB A 4 BRIGHT
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "SpawnCheap")
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")

	Spawn1:
	    WYVB AA 1 Bright A_SpawnItem("RedFlareSmall2",0,0)
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop

	SpawnCheap:
	    WYVB A 4 Bright
		Loop

SpawnUnderwater:
	    WYVB AA 1 Bright A_SpawnItem("RedFlareSmall2",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		Goto Spawn1
	}
}

Actor FastCyberballs: Cyberballs
{
Speed 30
Scale 3.4
Radius 12
Height 24
}

ACTOR NuclearRocket: Rocket2
{
	Radius 4
	Height 8
	+FORCERADIUSDMG
	-NOGRAVITY
	+SKYEXPLODE
	+NODAMAGETHRUST
	Gravity 0.2
	Damage (random (20000, 20000))
	Scale 1.0
	Damagetype "Extreme"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("DSRLAUN")
		TNT1 A 0 BRIGHT A_CustomMissile("RocketBackblast", 0, 0, 180, 2, 0+pitch)
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")

	Live:
	    MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop

	SpawnUnderwater:
	    MISL AA 1 Bright A_SpawnItem("RocketFlare",-20,0)
	    TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
	    Goto Live

	Death:
        TNT1 A 0
		TNT1 A 0 A_CustomMissile ("SpawnedExplosionNuke2", 30, 0, 0, 2, 90)//rising explosion
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 150)
		TNT1 A 0 A_PlaySound("NUKEEXP", 1)
		TNT1 A 0 A_Explode(5120, 1024)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-128, 128), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		EXPL A 0 Radius_Quake (8, 70, 0, 5, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 300)
		TNT1 A 0 A_Explode(2560, 2048)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-256, 256), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		EXPL A 0 Radius_Quake (4, 140, 0, 10, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 450)
		TNT1 A 0 A_Explode(1280, 4096)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-384, 384), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		EXPL A 0 Radius_Quake (2, 210, 0, 20, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 600)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-512, 512), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 750)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-640, 640), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 900)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-768, 768), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 1050)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-896, 896), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 1200)
		TNT1 AAAA 0 A_CustomMissile("SpawnedExplosionNuke", random (0, 64), random (-1024, 1024), random (0, 360), 0, 0)//base explosions
		TNT1 AAAA 0 A_CustomMissile("NuclearFlamesImpact", random (0, 64), 0, random (0, 360), 2, 0)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 1350)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 1500)
		TNT1 A 4 A_SpawnItemEx("NukeFlare", 0, 0, 1650)
		TNT1 A 70
		Stop
	}
}

ACTOR TankShell
{
	Radius 4
	Height 8
	Speed 120
	Damage (random (1000, 1000))
	+RANDOMIZE
	+DEHEXPLOSION
	+MISSILE
	-NOGRAVITY
	+THRUSPECIES
	damagetype "TankShell"
	Gravity 0.2
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "$OB_MPROCKET"
	Decal "BigScorch"
	Damagetype Explosive
	Species "Marines"
	States
	{
	Spawn:
		MISL A 1 Bright
		TNT1 A 0 A_SpawnItemEx("HeavyMachinegunProjectileTracerTrail2", (6 *momx)/-35.0, -(6 *momy)/-35.0, 2+(6 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("HeavyMachinegunProjectileTracerTrail3", (12 *momx)/-35.0, -(12 *momy)/-35.0, 2+(12 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("HeavyMachinegunProjectileTracerTrail4", (18 *momx)/-35.0, -(18 *momy)/-35.0, 2+(18 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("HeavyMachinegunProjectileTracerTrail5", (24 *momx)/-35.0, -(24 *momy)/-35.0, 2+(24 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("HeavyMachinegunProjectileTracerTrail6", (30*momx)/-35.0, -(30*momy)/-35.0, 2+(30*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		Loop

	Death:
		MISL B 0 Bright A_Explode
		TNT1 A 0 A_SpawnItem("RocketExplosion")
		TNT1 A 0 A_PlaySound("Explosion", 1)
		TNT1 A 0 A_SpawnItemEx ("ExplosionSplashSpawner", 0, 0, -20)
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)

		TNT1 AAAAAAAAAA 0 A_CustomMissile ("BDExplosionparticlesBig", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAAA 0 A_CustomMissile ("TankExplosionFlames", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AA 0 A_CustomMissile ("TankExplosionFlames", 0, 0, random (0, 360), 2, random (0, 90))
		TNT1 AAA 0 A_CustomMissile ("BDExplosionparticles2", 0, 0, random (0, 360), 2, random (40, 90))
        TNT1 AAA 0 A_CustomMissile ("BDExplosionparticles3", 0, 0, random (0, 360), 2, random (40, 90))
		TNT1 AAA 0 A_CustomMissile ("BDExplosionparticles4", 0, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 6
		TNT1 A 0 A_PlaySound("FAREXPL", 1)
		TNT1 A 12
		Stop
	}
}

Actor EnemyTankShell: TankShell
{
Speed 60
Damage (random (500, 500))
Gravity 0.2
Species "EnemyTank"
DamageType ExplosiveImpact
}

ACTOR TankFireEffect : PlayerMuzzle1
{
	States
	{
	Spawn:
		TKFL A 2 BRIGHT
		TNT1 A 0 Radius_Quake(2, 35, 0, 5, 0)
		TNT1 A 0 A_CustomMissile ("ExplosionSmokeHD", 0, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}