// Rocket Launcher (Doom)

ACTOR IDMRocketLauncher : IDMWeapon
{
    Weapon.SelectionOrder 400
    //Weapon.PreferredSkin "RocketMarine"
    Weapon.AmmoUse 1
	Weapon.AmmoGive 6
	Weapon.AmmoType "IDMRocketAmmo"
	Inventory.PickupMessage "Rocket Launcher! (Slot 5)"
	+WEAPON.EXPLOSIVE
	+WEAPON.NOLMS
	Tag "Rocket Launcher"
	States
	{
	Ready:
      MISG A 1 A_WeaponReady
      Loop
	Deselect:
      TNT1 A 0 A_Lower
      TNT1 A 0 A_Lower
      MISG A 1 A_Lower
      Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
      TNT1 A 0 A_Raise
      TNT1 A 0 A_Raise
      MISG A 1 A_Raise
	  Loop
	Fire:
      TNT1 A 0 A_GunFlash
	Normal:
	  TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2",1,"Level2")
	  TNT1 A 0 A_PlaySound("weapons/rlfire")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
      MISG A 2 Bright Offset(0,36) A_FireCustomMissile("IDMRocket",0,1)
      MISG B 2 Bright Offset(0,42)
      MISG B 2 Bright Offset(0,41)
      MISG B 2 Bright Offset(0,40)
      MISG B 2 Bright Offset(0,39)
      MISG B 2 Bright Offset(0,38)
      MISG B 2 Bright Offset(0,36)
      MISG A 2 Bright Offset(0,35)
      MISG A 2 Bright Offset(0,34)
      MISG A 2 Bright Offset(0,33)
      TNT1 A 0 A_Refire
	  Goto Ready
	Level2:
	  TNT1 A 0 A_PlaySound("weapons/brgfire")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadLevel2")
      MISG A 2 Bright Offset(0,36) A_FireCustomMissile("IDMRocket2",0,1)
      MISG B 8 Bright Offset(0,45)
      MISG B 2 Bright Offset(0,43)
      MISG B 2 Bright Offset(0,41)
      MISG B 2 Bright Offset(0,39)
      MISG B 2 Bright Offset(0,38)
      MISG B 2 Bright Offset(0,37)
      MISG B 2 Bright Offset(0,36)
      MISG A 2 Bright Offset(0,35)
      MISG A 2 Bright Offset(0,34)
      MISG A 2 Bright Offset(0,33)
      TNT1 A 0 A_Refire
	  Goto Ready
	Quad:
	  TNT1 A 0 A_PlaySound("weapons/rlfire")
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
      MISG A 2 Bright Offset(0,36) A_FireCustomMissile("ExtremeRocket",0,1)
      MISG B 2 Bright Offset(0,42)
      MISG B 2 Bright Offset(0,41)
      MISG B 2 Bright Offset(0,40)
      MISG B 2 Bright Offset(0,39)
      MISG B 2 Bright Offset(0,38)
      MISG B 2 Bright Offset(0,36)
      MISG A 2 Bright Offset(0,35)
      MISG A 2 Bright Offset(0,34)
      MISG A 2 Bright Offset(0,33)
      TNT1 A 0 A_Refire
	  Goto Ready
	QuadLevel2:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
      MISG A 2 Bright Offset(0,36) A_FireCustomMissile("ExtremeRocket2",0,1)
      MISG B 8 Bright Offset(0,45)
      MISG B 2 Bright Offset(0,43)
      MISG B 2 Bright Offset(0,41)
      MISG B 2 Bright Offset(0,39)
      MISG B 2 Bright Offset(0,38)
      MISG B 2 Bright Offset(0,37)
      MISG B 2 Bright Offset(0,36)
      MISG A 2 Bright Offset(0,35)
      MISG A 2 Bright Offset(0,34)
      MISG A 2 Bright Offset(0,33)
      TNT1 A 0 A_Refire
	  Goto Ready
	Flash:
      MISF A 2 Bright A_Light1
      MISF B 3 Bright
      MISF CD 3 Bright A_Light2
	  Goto LightDone
	Spawn:
      LAUN A -1 Bright
      Stop
	}
}

ACTOR HotRocketsRocketLauncher : IDMRocketLauncher // Rocket Launcher for the Hot Rockets modifier
{
	Weapon.AmmoUse 0
	Weapon.AmmoType None
	Tag "Rocket Launcher (Hot Rockets)"
	+WEAPON.NOLMS
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	States
	{
	Fire:
      TNT1 A 0 A_GunFlash
	  TNT1 A 0 A_PlaySound("weapons/rlfire")
      MISG A 2 Bright Offset(0,36) A_FireCustomMissile("HotRocket",0,1)
      MISG B 2 Bright Offset(0,42)
      MISG B 2 Bright Offset(0,41)
      MISG B 2 Bright Offset(0,40)
      MISG B 2 Bright Offset(0,39)
      MISG B 2 Bright Offset(0,38)
      MISG B 2 Bright Offset(0,36)
      MISG A 2 Bright Offset(0,35)
      MISG A 2 Bright Offset(0,34)
      MISG A 2 Bright Offset(0,33)
      TNT1 A 0 A_Refire
	  Goto Ready
	}
}

// Rocket Launcher's Rocket

ACTOR IDMRocket : Rocket replaces Rocket
{
	Radius 9
	Height 6
	Speed 35
	Damage (100 + (20 * random(1,5)))
	ProjectileKickback 300
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	+ROCKETTRAIL
	-NOTELEPORT
	+SKYEXPLODE
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	Obituary "%o caught %k's rocket."
	SelfObituary "%o got too close to %p own rocket."
	DamageType "Rocket"
	Decal Scorch
	Decal BigScorch
	States
	{
	Spawn:
	  MISL A 1 Bright
      Loop
	Death:
      MISL B 6 Bright A_Explode(128,128)
      MISL C 5 Bright
	  MISL D 4 Bright
      Stop
	}
}

ACTOR ExtremeRocket : IDMRocket
{
	ProjectileKickBack 600
	+EXTREMEDEATH
	States
	{
	XDeath:
	  TNT1 A 0 A_Playsound("misc/crit",CHAN_AUTO)
	  Goto Death
	}
}

ACTOR IDMMushroom
{
	Damage 30
	DeathSound "weapons/mushlx"
	SeeSound "fatso/attack"
	Obituary "%o caught %k's rocket."
	DamageType "Rocket"
	Radius 6
	Height 8
	Speed 20
	Projectile 
	+RANDOMIZE
	-NOGRAVITY
    +SKYEXPLODE
    -NOTELEPORT
	RenderStyle Add
	Alpha 0.9
	Gravity 0.3
	States
	{
	Spawn:
      MANF AB 4 Bright
      Loop
	XDeath:
	Death:
      MISL B 0 A_Scream
      MISL B 6 Bright A_Explode(128,128,0)
      MISL C 5 Bright
	  MISL D 4 Bright
	  Stop
	}
}

ACTOR ExtremeMushroom : IDMMushroom
{
	+EXTREMEDEATH
	States
	{
	XDeath:
	  TNT1 A 0 A_Playsound("misc/crit",CHAN_AUTO)
	  Goto Death
	}
}

ACTOR IDMRocket2 : IDMRocket
{
	Radius 13
	Height 9
	Speed 35
	Scale 1.5
	Damage (100 + (30 * random(1,10)))
	ProjectileKickBack 600
	SeeSound "weapons/rocklf2"
	States
	{
	Spawn:
      SHKM A 1 Bright
	  Loop
	Death:
	  TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("IDMMushroom",8,0,random(-180,180),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(0,75))
      MISL B 6 Bright A_Explode(192,192)
      MISL C 5 Bright
	  MISL D 4 Bright
      Stop
	}
}

ACTOR ExtremeRocket2 : IDMRocket2
{
	+EXTREMEDEATH
	ProjectileKickBack 1200
	States
	{
	XDeath:
	  TNT1 A 0 A_Playsound("misc/crit",CHAN_AUTO)
	  Goto Death
	}
}

ACTOR HotRocket : IDMRocket
{
	Damage (200 + (40*random(1,5)))
	ProjectileKickBack 300
	+EXTREMEDEATH
	States
	{
	Death:
      MISL B 6 Bright A_Explode(128,128)
      MISL C 5 Bright
	  MISL D 4 Bright
      Stop
	}
}