actor BlazingTorchWep : Weapon {}

actor BlazingTorchWepSH : BaseMM8BDMWep
{
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 6
Inventory.Pickupmessage "$PU_BLAZINGTORCH"
Obituary "$OB_BLAZINGTORCH"
Tag "$TAG_BLAZINGTORCH"
weapon.ammotype "BlazingTorchAmmo"
inventory.icon "BTORICON"
States
{
SpawnLoop:
11WP H 1
loop
Ready:
BZTR A 0 ACS_ExecuteAlways(998,0,247)
BZTR A 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BZTR A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BZTR A 1 A_Raise
Loop
Fire:
BZTR A 0 A_JumpIfNoAmmo("NoAmmo")
BZTR A 0 A_PlaySoundEx("weapon/firestorm","Weapon")
BZTR A 0 A_FireCustomMissile("Fireballone",0,1,8,0)
BZTR B 5
BZTR C 7
BZTR CB 2
BZTR D 11
BZTR DDDDDDDDDDDDDDDDDDDD 1 A_WeaponReady(WRF_NOFIRE)
Goto Ready+1
NoAmmo:
BZTR A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor BlazingTorchAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
+INVENTORY.IGNORESKILL
}

actor BlazingTorchSpawner
{
PROJECTILE
+NOINTERACTION
+NOCLIP
Damage(0)
Height 1
Radius 1
Speed 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("Fireballone",20)
stop
}
}

actor Fireballone
{
+BRIGHT
PROJECTILE
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
scale 2.5
+RIPPER
-NOGRAVITY
+HEXENBOUNCE
+NOEXPLODEFLOOR
bouncefactor 1.0
wallbouncefactor 1.0
Speed 32
Radius 15
Height 5
gravity 1.7
Damage (6)
States
{
Spawn:
BTOR A 0
TNT1 A 0 ThrustThingZ(0, 70, 0,0)
BTOR AAAAA 1 A_SpawnItemEx("BlazingTorchFX2", -8, Random(-22, 22), random(-20, 20),0,0,5)
Goto Collapse
Collapse:
TNT1 A 0 A_Stop
TNT1 A 1 A_SpawnItemEx("Fireballtwo")
TNT1 A 0 A_PlaySoundEx("weapon/solarblaze","Weapon")
stop
XDeath:
TNT1 A 1
stop
Death:
TNT1 A 1
stop
}
}

actor Fireballtwo
{
+BRIGHT
PROJECTILE
+NOGRAVITY
+HEXENBOUNCE
+RIPPER
+NOEXPLODEFLOOR
bouncefactor 1.0
wallbouncefactor 1.0
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
scale 2.5
Speed 0
Radius 15
Height 5
gravity 1.7
Damage (6)
States
{
Spawn:
BTOR BCDE 1 A_SpawnItemEx("BlazingTorchFX2", -8, Random(-22, 22), random(-20, 20),0,0,5)
TNT1 A 0 A_PlaySoundEx("weapon/firestorm","Weapon")
BTOR E 0
BTOR BAFGHIJKM 1 A_SpawnItemEx("BlazingTorchFX2", -8, Random(-22, 22), random(-20, 20),0,0,5)
TNT1 A 0 A_PlaySoundEx("weapon/atomicfire","Weapon")
TNT1 A 0 A_SpawnItemEx("FireballThree",0,0,0,30,0,-36)
BTOR N 1
stop
}
}

actor FireballThree
{
+BRIGHT
PROJECTILE
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
scale 2.0
+RIPPER
+HEXENBOUNCE
-BOUNCEONFLOORS
bouncefactor 1.0
wallbouncefactor 1.0
Speed 4
Radius 12
Height 12
gravity 1.7
Damage (13)
reactiontime 80
States
{
Spawn:
TNT1 A 0 A_Explode(5, 32, 0)
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX1")
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX2",random(-10,10),random(-10,10),random(-10,10),0,0,10)
BTOR AB 1
TNT1 A 0 A_Explode(5, 32, 0)
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX1")
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX2",random(-10,10),random(-10,10),random(-10,10),0,0,10)
BTOR CD 1
TNT1 A 0 A_Explode(5, 32, 0)
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX1")
TNT1 A 0 A_SpawnItemEx("BlazingTorchFX2",random(-10,10),random(-10,10),random(-10,10),0,0,10)
BTOR CB 1
loop
XDeath:
Death:
TNT1 A 0 A_SpawnItemEx("TorchWaveSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 0 A_PlaySoundEx("weapon/drillexplode", "Weapon")
TNT1 A 1 A_SpawnItemEx("OilPitIgnite",0,0,8)
stop
}
}

actor TorchWaveSpawner
{
PROJECTILE
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
Scale 2.0
+FLOORHUGGER
Speed 0
Damage (0)
+ripper
+THRUGHOST
Radius 32
Height 32
States
{
Spawn:
TNT1 A 0 
TNT1 A 1 
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,15,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,30,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,45,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,60,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,75,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,90,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,105,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,120,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,135,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,150,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,165,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,180,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,195,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,210,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,225,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,240,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,255,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,270,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,285,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,300,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,315,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,330,SXF_NOCHECKPOSITION)
TNT1 A 0 A_SpawnItemEx("Torchwave",0,0,0,12.5,0,0,345,SXF_NOCHECKPOSITION)
stop
}
}

actor Torchwave
{
PROJECTILE
+FLOORHUGGER
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
Scale 2.0
Speed 0
+RIPPER
+THRUGHOST
Damage (7)
Radius 32
Height 32
States
{
Spawn:
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
TNT1 A 0 A_SpawnItemEx("TorchFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
TNT1 A 4
stop
XDeath:
TNT1 A 1
stop
Death:
TNT1 A 1
stop
}
}

actor TorchFlare
{
+BRIGHT
PROJECTILE
damagetype "BlazingTorch"
Obituary "$OB_BLAZINGTORCH"
Scale 2.5
Speed 0
Damage (5)
+THRUGHOST
+RIPPER
Radius 9
Height 48
//RenderStyle "Translucent"
alpha 0.55
States
{
Spawn:
BTRC A 0
TNT1 A 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
BTRC ABCDEFGHIJK 1
stop
XDeath:
TNT1 A 1
stop
Death:
TNT1 A 1
stop
}
}

actor BlazingTorchFX1
{
+BRIGHT
scale 2.5
+CLIENTSIDEONLY
+MISSILE
+DONTSPLASH
Gravity 0
Damage (0)
height 0
radius 0
States
{
Spawn:
BTOR O 1 A_Fadeout(0.20)
wait
}
}

actor BlazingTorchFX2
{
+BRIGHT
scale 2.5
+CLIENTSIDEONLY
+MISSILE
+DONTSPLASH
Gravity 0
Damage (0)
height 0
radius 0
States
{
Spawn:
BTOR PQRPQRPQRPQRPQR 2 A_Fadeout
stop
}
}

actor BlazingTorchProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "BlazingTorch", 0.15000001
}