actor ScorchWheelBoss : MegaBuster
{
Weapon.AmmoUse 14
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "%o was scorched by %k's Scorch Wheel."
weapon.ammotype "Petrol"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
Spawn:
WEA3 M 1
loop
Ready:
TUCA A 0 ACS_ExecuteAlways(998,0,38)
TUCA A 0 A_JumpIfInventory("Petrol",1,"Ready2")
TUCA A 0 A_TakeInventory("TurboCar",1)
TUCA A 0 ACS_ExecuteAlways(191,0,0)
TUCA A 7 A_WeaponReady(WRF_NOFIRE)
TUCA A 0 A_GiveInventory("Petrol",2)
Goto Ready+1
Ready2:
TUCA A 0 A_JumpIfInventory("Petrol",14,"Ready3")
TUCA A 0 A_TakeInventory("TurboCar",1)
TUCA A 0 ACS_ExecuteAlways(191,0,0)
TUCA A 7 A_WeaponReady(WRF_NOPRIMARY)
TUCA A 0 A_GiveInventory("Petrol",2)
loop
Ready3:
TUCA A 0 A_TakeInventory("TurboCar",1)
TUCA A 0 ACS_ExecuteAlways(191,0,0)
TUCA A 7 A_WeaponReady
TUCA A 0 A_GiveInventory("Petrol",2)
loop
Deselect:
ICEB A 0 A_TakeInventory("ScorchWheelBoss")
ICEB A 0 A_GiveInventory("ScorchWheelBoss")
TUCA A 1 A_SelectWeapon("ScorchWheelBoss")
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TUCA A 1 A_Raise
Loop
Fire:
TUCA A 0 A_JumpIfInventory("CarCount",14,"StopCar")
TUCA A 0 A_TakeInventory("TurboCar",1)
TUCA A 0 A_JumpIfNoAmmo("NoAmmo")
TUCA A 0 A_TakeInventory("BasicArmor",9999)
TUCA BCDEF 2
TUCA A 0 A_PlaySoundEx("weapon/scorchwheel","Weapon")
Goto Hold
Hold:
TNT1 A 0 ACS_ExecuteAlways(191,0,1)
TNT1 A 0 A_JumpIfInventory("WheelCount",15,"Throw")
TNT1 A 0 A_GiveInventory("WheelCount",1)
TNT1 AA 1 A_SpawnItemEx("ScorchWheelFX1",0,0,0,momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
TNT1 AA 1 A_SpawnItemEx("ScorchWheelFX3",0,0,0,momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
TNT1 AA 1 A_SpawnItemEx("ScorchWheelFX5",0,0,0,momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM, 0)
TNT1 A 0 A_Refire
Goto Throw
Throw:
TNT1 A 0 ACS_ExecuteAlways(191,0,0)
TNT1 A 0 A_TakeInventory("WheelCount",99)
TNT1 A 15 A_FireCustomMissile("ScorchWheel",0,1,0,0)
TUCA GH 2 A_ClearRefire
Goto Ready+1
Altfire:
TUCA C 0 A_JumpIfInventory("CarCount",10,"StopCar")
TUCA C 0 A_JumpIf(momz==0, "SlideSlide")
Goto Ready+1
SlideSlide:
TNT1 A 0 A_JumpIfInventory("Petrol",1,"Continue")
goto Ready+1
Continue:
TNT1 A 0 SetPlayerProperty(0,1,0)
TNT1 A 0 SetPlayerProperty(0,1,4) 
TNT1 A 0 A_JumpIfNoAmmo("NoAmmo")
TNT1 A 0 A_GiveInventory("TurboCar",1)
TUCA XY 2 A_PlaySoundEx("classes/drilling","classes")
TNT1 A 0 A_GiveInventory("CarCount",1)
TNT1 A 0 A_JumpIfInventory("CarCount",10,"Go")
Goto Continue
Go:
TNT1 A 0 SetPlayerProperty(0,0,4) 
TNT1 A 0 A_PlaySoundEx("classes/drillout","classes")
CarMode:
TNT1 A 0 A_GiveInventory("TurboCar",1)
TNT1 C 0 A_Recoil(-7)
TNT1 A 0 A_SpawnItemEx("CarRadius",0,0,0)
TNT1 A 0 A_TakeInventory("Petrol",1)
TUCA XY 1 A_WeaponReady(WRF_NOPRIMARY/WRF_NOSWITCH)
TNT1 A 0 A_JumpIfInventory("Petrol",1,"CarMode")
goto StopCar
StopCar:
TNT1 A 0 A_TakeInventory("TurboCar",999)
TNT1 A 0 A_TakeInventory("CarCount",999)
TNT1 A 0 A_GiveInventory("NoCar",1)
TNT1 A 0 SetPlayerProperty(0,0,0)
TUCA A 35
TNT1 A 0 A_TakeInventory("NoCar",1)
Goto Ready+1
NoAmmo:
TUCA A 0
//TUCA A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor CarRadius
{
PROJECTILE
+DONTSPLASH
Obituary "%o was mowed down by %k's Crash Drive."
Damagetype "Scorch"
Damage 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(7,160,0)
stop
}
}

actor Petrol : Ammo
{
inventory.amount 1
inventory.maxamount 42
}

actor TurboCar : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor NoCar : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor CarCount : Ammo
{
inventory.amount 1
inventory.maxamount 10
}