/*
CREDITS:
Sprite - Inferno Interactive, rip by Zero X. Diamond

Sounds:
Up - LucasArts, Raven (Jedi Knight 2: Jedi Outcast)
Throw - Running with Scissors (Postal)
Holster - ID (RTCW)
Bounce - Ubisoft (WillRock)
Activate, Jump, Tick - ?
Thud - ID (Quake 3 Team Arena)
*/

ACTOR JumpingStickyBomb : Weapon 24542
{
	//$Category Weapons
	//$Title Sticky Bomb
	//$Sprite SBMBA0
	Tag "Sticky Bomb"
    Inventory.PickupSound "misc/i_pkup"
    Inventory.PickupMessage "Grabbed a nifty, jumping sticky bomb! (Q)"
    Weapon.SelectionOrder 99
    Weapon.AmmoType "StickyAmmo"
    Weapon.AmmoGive 5
    Weapon.AmmoUse 1
    Weapon.AmmoType2 "StickyThrowPower"
    Weapon.AmmoGive2 0
    Weapon.AmmoUse2 0
    Weapon.UpSound "Weapons/StickyBombUp"
	/*Weapon.BobStyle InverseSmooth
	Weapon.BobSpeed 1.6
	Weapon.BobRangeY 0.8
	Weapon.BobRangeX 1.0*/
    Scale 0.4
    +NOALERT
    States
    {
    Spawn:
	SBMB A -1
	Stop
    Deselect: 
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	TNT1 A 0 A_JumpIfNoAmmo("SpecDeselect")
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"DeselectSpiked")
	SBMG A 1 A_Lower
	TNT1 A 0 A_Lower
	Loop
    DeselectSpiked:
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MG A 1 A_Lower
	TNT1 A 0 A_Lower
	Loop
    SpecDeselect: 
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	TNT1 AAAAAAAAAAAAAAAAAAA 0 A_Lower
	Loop
    Select:
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"SelectSpiked")
	SBMG A 1 A_Raise
	TNT1 A 0 A_Raise
	Loop
    SelectSpiked:
	S2MG A 1 A_Raise
	TNT1 A 0 A_Raise
	Loop

    Ready:
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"ReadySpiked")
	SBMG A 1 A_WeaponReady
	Loop
    ReadySpiked:
	S2MG A 1 A_WeaponReady
	Goto Ready
////
    Hold:
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"HoldSpiked")

	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",9,"ThrowBomb9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",8,"ThrowBomb9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",7,"ThrowBomb8")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",6,"ThrowBomb7")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",5,"ThrowBomb6")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",4,"ThrowBomb5")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",3,"ThrowBomb4")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",2,"ThrowBomb3")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",1,"ThrowBomb2")
	TNT1 A 0 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 8
	TNT1 A 0 A_ReFire
	Goto Ready
    Fire:
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"FireSpiked")

	SBMT ABCDEFGH 1

	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",9,"ThrowBomb9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",8,"ThrowBomb9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",7,"ThrowBomb8")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",6,"ThrowBomb7")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",5,"ThrowBomb6")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",4,"ThrowBomb5")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",3,"ThrowBomb4")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",2,"ThrowBomb3")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",1,"ThrowBomb2")
	TNT1 A 0 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 8
	TNT1 A 0 A_ReFire
    ThrowBomb1:
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb1",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb2:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb2",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb3:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb3",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb4:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb4",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb5:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb5",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb6:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb6",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb7:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb7",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb8:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb8",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn
    ThrowBomb9:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	SBMT HGF 1
	SBME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownBomb9",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorIn

    RetractorIn:
	SBME DEFG 1
	TNT1 A 3 A_JumpIfNoAmmo("InstaDeselect")
	TNT1 A 0 A_PlaySound("Weapons/StickyBombHolster")
	TNT1 A 2
	SBMD FEDCBA 1
	SBMG A 2
	Goto Ready
////
    HoldSpiked:
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",9,"ThrowSticky9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",8,"ThrowSticky9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",7,"ThrowSticky8")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",6,"ThrowSticky7")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",5,"ThrowSticky6")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",4,"ThrowSticky5")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",3,"ThrowSticky4")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",2,"ThrowSticky3")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",1,"ThrowSticky2")
	TNT1 A 0 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 8
	TNT1 A 0 A_ReFire
	Goto Ready
    FireSpiked:
	S2MT ABCDEFGH 1

	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",9,"ThrowSticky9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",8,"ThrowSticky9")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",7,"ThrowSticky8")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",6,"ThrowSticky7")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",5,"ThrowSticky6")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",4,"ThrowSticky5")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",3,"ThrowSticky4")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",2,"ThrowSticky3")
	TNT1 A 0 A_JumpIfInventory("StickyThrowPower",1,"ThrowSticky2")
	TNT1 A 0 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 8
	TNT1 A 0 A_ReFire
    ThrowSticky1:
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky1",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky2:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky2",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky3:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky3",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky4:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky4",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky5:
	TNT1 A 10 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky5",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky6:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky6",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky7:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky7",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky8:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky8",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut
    ThrowSticky9:
	TNT1 A 8 A_GiveInventory("StickyThrowPower",1)
	TNT1 A 0 A_Refire
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombThrow")
	TNT1 A 0 A_TakeInventory("StickyThrowPower",9)
	S2MT HGF 1
	S2ME ABC 1
	TNT1 A 0 A_FireCustomMissile("ThrownSticky9",frandom(1,-1),1,11,0,0,frandom(1,-1))
	Goto RetractorOut

    RetractorOut:
	SBME DEFG 1
	TNT1 A 3 A_JumpIfNoAmmo("InstaDeselect")
	TNT1 A 0 A_PlaySound("Weapons/StickyBombHolster")
	TNT1 A 3
	SBMD FEDCBA 1
	SBMG A 2
	Goto StickyOut

////
    AltFire:
	TNT1 A 0 A_JumpIfInventory("StickyBombMode",1,"StickyIn")	
    StickyOut:
	TNT1 A 0 A_GiveInventory("StickyBombMode",1)
    StickOut:
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombMode")
	SBMG A 8
	S2MG A 8
	goto Ready
    StickyIn:
	TNT1 A 0 A_TakeInventory("StickyBombMode",1) 
	TNT1 A 0 A_PlayWeaponSound("Weapons/StickyBombMode")
	S2MG A 8
	SBMG A 8
	Goto Ready

////
    InstaDeselect:
	TNT1 A 0 A_CheckReload
	Goto Ready
    } 
}

ACTOR StickyThrowPower : Ammo
{
   Inventory.Amount 1
   Inventory.MaxAmount 9
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 9
   Inventory.Icon STTPRCNT
   Inventory.PickupMessage "Picked up an UNLIMITED POWERRR!!!!"
   States
   {
   Spawn:
      TNT1 A -1
      Stop
   }
}

ACTOR StickyBombMode : Inventory
{
    Inventory.MaxAmount 1
}

ACTOR ThrownBomb1
{
    Radius 10
    Height 10
    Speed 15
    Damage 20
    PROJECTILE
    BounceType "Hexen"
    BounceFactor 0.6
    BounceCount 5
    Gravity 0.65
    -NOGRAVITY
    +CANBOUNCEWATER
    +ALLOWBOUNCEONACTORS
    BounceSound "Weapons/StickyBombBounce"
    Scale 0.4
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(12,14),0,1)
	SBMB A 1
    Goto Spawn+2
    Death:
    SBMB A 15
    SBMB A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerDeath")
	TNT1 A 0 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
	TNT1 BCD 5
	Stop
    XDeath:
    SBMB A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerDeath")
	TNT1 A 0 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
	TNT1 BCD 5
	Stop
    NukerDeath:
	TNT1 A 0 A_SpawnItemEx("NukerStickyBombBoom",0,0,0,0,0,0,0,0,0)
	TNT1 BCD 5
	Stop
    }
}

ACTOR ThrownBomb2 : ThrownBomb1
{
    Speed 18
}

ACTOR ThrownBomb3 : ThrownBomb1
{
    Speed 21
}

ACTOR ThrownBomb4 : ThrownBomb1
{
    Speed 24
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(14,16),0,1)
	SBMB A 1
    Goto Spawn+2
    }
}

ACTOR ThrownBomb5 : ThrownBomb4
{
    Speed 27
}

ACTOR ThrownBomb6 : ThrownBomb4
{
    Speed 30
}

ACTOR ThrownBomb7 : ThrownBomb4
{
    Speed 33
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(16,18),0,1)
	SBMB A 1
    Goto Spawn+2
    }
}

ACTOR ThrownBomb8 : ThrownBomb7
{
    Speed 36
}

ACTOR ThrownBomb9 : ThrownBomb7
{
    Speed 39
}

Actor ThrownSticky1
{
    Radius 10
    Height 10
    Speed 15
    Damage 0
    Health 1
    Projectile
    +SHOOTABLE
    +SEEKERMISSILE
    +DONTSPLASH
    +DONTFALL
    -NOGRAVITY
    Gravity 0.65
    Scale 0.4
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(12,14),0,1)
	SBMB BC 3
	Goto Spawn+2
	TNT1 A 0 A_Stop
	TNT1 A 0 A_SeekerMissile(0,0,1,256,0)
	SBMB B 1 Bright A_Fire(35)
	TNT1 A 0 A_SeekerMissile(0,0,1,256,0)
	SBMB B 1 Bright A_Fire(35)
	TNT1 A 0 A_SeekerMissile(0,0,1,256,0)
	SBMB BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 A_Fire(35)
	Goto StickyBombOnEnemy
    Death:
    TNT1 A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"DeathNuker")
	TNT1 A 1 A_PlaySound("Weapons/StickyBombThud")
	TNT1 A 0 A_SpawnItem("StickyBombWallie")
	Stop
    DeathNuker:
	TNT1 A 1 A_PlaySound("Weapons/StickyBombThud")
	TNT1 A 0 A_SpawnItem("StickyBombWallieNuker")
	Stop
    XDeath:
	TNT1 A 0 A_Stop
	Goto Spawn+6
    StickyBombOnEnemy:
	TNT1 A 0 A_PlaySound("Weapons/StickyBombActivate")
	SBMB EEEEEEEEEE 1 Bright A_Fire(35)
	TNT1 A 0 A_AlertMonsters
    SBMB A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerDeath")
	TNT1 A 0 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
	TNT1 BCD 5
	Stop
    NukerDeath:
	TNT1 A 0 A_SpawnItemEx("NukerStickyBombBoom",0,0,0,0,0,0,0,0,0)
	TNT1 BCD 5
	Stop
    }
}

Actor StickyBombOnWall
{
    Radius 12
    Height 16
    Projectile
    +SHOOTABLE
    +DONTSPLASH
    +SEEKERMISSILE
    +EXTREMEDEATH
    +DONTFALL
    Speed 0
    Damage 0
    Scale 0.4
    States
    {
    Spawn:
	SBMB B 60
	TNT1 A 0 A_AlertMonsters
	TNT1 A 1 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
	Stop
    }
}

ACTOR ThrownSticky2 : ThrownSticky1
{
    Speed 18
}

ACTOR ThrownSticky3 : ThrownSticky1
{
    Speed 21
}

ACTOR ThrownSticky4 : ThrownSticky1
{
    Speed 24
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(14,16),0,1)
	SBMB BC 3
	Goto Spawn+2
    }
}

ACTOR ThrownSticky5 : ThrownSticky4
{
    Speed 27
}

ACTOR ThrownSticky6 : ThrownSticky4
{
    Speed 30
}

ACTOR ThrownSticky7 : ThrownSticky4
{
    Speed 33
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(16,18),0,1)
	SBMB BC 3
	Goto Spawn+2
    }
}

ACTOR ThrownSticky8 : ThrownSticky7
{
    Speed 36
}

ACTOR ThrownSticky9 : ThrownSticky7
{
    Speed 39
}

actor StickyBombWallie
{
  Radius 10
  Height 10
  Speed 0
  Health 10
  Mass 999999999
  +NOGRAVITY
  +FRIENDLY
  +SHOOTABLE
  +NOBLOOD
  +DONTFALL
  +NOICEDEATH
  +DONTRIP
  +LOOKALLAROUND
  Obituary "%o was facehugged by %k's jumping sticky bomb."
  Scale 0.4
  States
  {
  Spawn:
    SBMB BBBB 8 A_LookEx(LOF_NOSOUNDCHECK,0,256,0,0,"Whoopee")
    SBMB D 8 A_PlaySound ("Weapons/StickyBombTick")
    loop
  See:
    SBMB BBBB 8 A_Chase
    SBMB E 8 A_PlaySound ("Weapons/StickyBombTick")
    loop
  Whoopee:
    SBMB E 18 A_PlaySound("Weapons/StickyBombJump")
    SBMB B 0 A_CustomMissile("StickyJumper",0)
    Stop
  Death:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
    TNT1 BCD 5
    Stop
  }
}

actor StickyBombWallieNuker : StickyBombWallie
{
  States
  {
  Death:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_SpawnItemEx("NukerStickyBombBoom",0,0,0,0,0,0,0,0,0)
    TNT1 BCD 5
    Stop
  }
}

ACTOR StickyJumper : ThrownBomb1
{
    BounceType None
    States
    {
    Spawn:
	TNT1 A 0 
	TNT1 A 0 ThrustThingZ(0,random(18,21),0,1)
	SBMB BC 3
	Goto Spawn+2
    Death:
	TNT1 A 1 A_PlaySound("Weapons/StickyBombThud")
	TNT1 A 0 A_SpawnItem("StickyBombWallie")
	Stop
    Death:
    TNT1 A 0 A_AlertMonsters
    SBMB A 0 A_JumpIfInTargetInventory("NukerUpgrade",1,"NukerDeath")
    TNT1 A 0 A_SpawnItemEx("StickyBombBoom",0,0,0,0,0,0,0,0,0)
    TNT1 BCD 5
    Stop
  NukerDeath:
    TNT1 A 0 A_SpawnItemEx("NukerStickyBombBoom",0,0,0,0,0,0,0,0,0)
    TNT1 BCD 5
    Stop
    }
}

ACTOR StickyBombBoom
{
    +NOINTERACTION
    +NOGRAVITY
    +NOCLIP
    Renderstyle Add
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySound("weapons/larpaboom")
    TNT1 A 0 A_Explode(125,128)
    TNT1 A 1 A_SpawnItemEx("MissileExplode",0,0,0,0,0,0,0,0,0)
    TNT1 AAAAAAAAAAAAAAA 1 A_SpawnItemEx("LarpaPellet",0,0,0,4,0,6+random(-1,3),random(0,360),32,0)
    stop
    }
}

ACTOR NukerStickyBombBoom
{
    +NOINTERACTION
    +NOGRAVITY
    +NOCLIP
    Renderstyle Add
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySound("weapons/larpaboom")
    TNT1 A 0 A_Explode(250,192)
    TNT1 A 1 A_SpawnItemEx("NukerMissileExplode",0,0,0,0,0,0,0,0,0)
    TNT1 AAAAAAAAAAAAAAA 1 A_SpawnItemEx("NukerLarpaPellet",0,0,0,4,0,6+random(-1,3),random(0,360),32,0)
    stop
    }
}
