actor Bitchmaker : Weapon
{
  Game Doom
  Weapon.AmmoUse 1
  Weapon.AmmoGive 0
  Weapon.AmmoType "MagnumClip"
  Weapon.AmmoUse2 0
  Weapon.AmmoGive2 6
  Weapon.AmmoType2 "HellraiserAmmo"
  Weapon.SlotNumber 5
  Weapon.SelectionOrder 4
  Weapon.UpSound "Magnum/Up"
  Weapon.Kickback 200
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "Sticked your palms to ''Bitchmaker'' magnum! Does it look like a bitch? (5)"
  Obituary "%o wasn't a lucky punk. %h went ahead, and made %k's day."
  Weapon.BobStyle InverseSmooth
  Weapon.BobSpeed 1.2
  Weapon.BobRangeY 0.5
  Weapon.BobRangeX 1.1
  +NOALERT
  +AMMO_CHECKBOTH
  +NOAUTOAIM
  Scale 0.8
  States
  {
  Ready:
	BITU ABCD 1
  ReadyMain:
    BITG A 0 A_JumpIfInventory("MacheteGoesFast",1,"CaberToss")
    BITG A 0 A_JumpIfInventory("MagnumClip",1,2)
	BITG B 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
	Goto ReadyMain
    BITG A 1 A_WeaponReady(WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
    Loop
  Deselect:
	BITU DCBA 1
	TNT1 A 0 A_StopSound(1)
    TNT1 A 0 SetPlayerProperty(0, 0, PROP_INSTANTWEAPONSWITCH)
    TNT1 AAAAAAAAAAAAAAA 0 A_Lower
    TNT1 A 1 A_Lower
    Wait
  Select:
    TNT1 A 0 SetPlayerProperty(0, 1, PROP_INSTANTWEAPONSWITCH)
    TNT1 A 0 A_Raise
    TNT1 A 1 A_Raise
    Loop
  HammerCheck:
    BITG A 0 A_JumpIfInventory("MagnumClip",1,1)
	Goto ReadyMain
  Hammer:
	BITG B 0 A_PlaySound("Magnum/Hammer2",4,0.8)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITH A random(1,2) A_JumpIf(Health<75,1)
	BITH B random(1,2)
	BITH C random(1,2)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITH D random(1,2) A_JumpIf(Health<50,1)
	BITH E random(1,2)
	BITH F random(1,2)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITH G random(1,2) A_JumpIf(Health<25,1)
	BITH H random(1,2)
	BITG A 3
	Goto ReadyMain
  Fire:
    BITG A 0 A_JumpIfInventory("MagnumClip",1,1)
	Goto HammerCheck
	BITG A 0 A_PlaySound("Magnum/Fire",1,0.8)
	BITG A 0 A_PlaySound("Magnum/Add",5,0.7)
	BITG A 0 A_Recoil(8)
	BITG A 0 A_AlertMonsters
	BITG A 0 A_GunFlash
	BITG A 0 A_FireCustomMissile("GunsmokeSpawner_Medium_Dark",0,0,13,6)
	BITG A 0 A_FireCustomMissile("MagnumProjectile",0,1,15,7,0,0)
	BITG A 0 A_Quake(1,4,0,16,"none")
	BITG A 0 A_SetAngle(Angle-1)
	BITG A 0 A_SetPitch(Pitch-1)
	BITF A 1 Bright A_ZoomFactor(0.95)
	BITG A 0 A_SetAngle(Angle-2.5)
	BITG A 0 A_SetPitch(Pitch-2.5)
	BITF B 1 Bright A_ZoomFactor(0.9)
	BITG A 0 A_SetAngle(Angle-2)
	BITG A 0 A_SetPitch(Pitch-2)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,5)
	BITG A 0 A_JumpIf(Health<75,4)
	BITF C 1 A_ZoomFactor(0.925)
	BITG A 0 A_SetAngle(Angle-1.5)
	BITG A 0 A_SetPitch(Pitch-1.5)
	BITF D 1 A_ZoomFactor(0.95)
	BITG A 0 A_SetAngle(Angle-1.25)
	BITG A 0 A_SetPitch(Pitch-1.25)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,5)
	BITG A 0 A_JumpIf(Health<50,4)
	BITF E 1 A_ZoomFactor(0.97)
	BITG A 0 A_SetAngle(Angle-1)
	BITG A 0 A_SetPitch(Pitch-1)
	BITF F 1 A_ZoomFactor(0.98)
	BITG A 0 A_SetPitch(Pitch-0.5)
	BITG A 0 A_SetPitch(Pitch-0.5)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,5)
	BITG A 0 A_JumpIf(Health<25,4)
	BITF G 1 A_ZoomFactor(0.99)
	BITG A 0 A_SetPitch(Pitch-0.25)
	BITG A 0 A_SetPitch(Pitch-0.25)
	BITF H 1 A_ZoomFactor(1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITF I 1 A_JumpIf(Health<75,2)
	BITF JKL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITF M 1 A_JumpIf(Health<50,2)
	BITF NOP 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITF Q 1 A_JumpIf(Health<25,2)
	BITF RS 1
	Goto HammerCheck
  AltDryFire:
    BITG A 0
	Goto ReadyMain
  AltFire:
    BITG A 0 A_JumpIfInventory("MagnumClip",1,1)
	Goto AltDryFire
	BITG B 0 A_PlaySound("Magnum/Hammer2",4,0.8)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITH H 1 A_JumpIf(Health<75,2)
	BITH G 1
	BITH F 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITH E 1 A_JumpIf(Health<50,2)
	BITH D 1
	BITH C 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITH B 1 A_JumpIf(Health<25,2)
	BITH A 1
	BITG B 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITA A 1 A_JumpIf(Health<75,2)
	BITA BCD 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,4)
	BITA E 1 A_JumpIf(Health<50,3)
	BITA FGHI 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,4)
	BITA J 1 A_JumpIf(Health<25,3)
	BITA KLMN 1
  AltLoop:
	BI2F B 0 A_JumpIfInventory("MagnumClip",1,1)
	Goto Lolnope
	BI2F AB 1
	BI2F B 0 A_PlaySound("Magnum/Fire",1,0.8)
	BI2F B 0 A_PlaySound("Magnum/Add",5,0.7)
	BI2F B 0 A_Recoil(4)
	BI2F B 0 A_AlertMonsters
	BI2F B 0 A_TakeInventory("MagnumClip",1,TIF_NOTAKEINFINITE)
	BI2F B 0 A_GunFlash
	BI2F B 0 A_FireCustomMissile("GunsmokeSpawner_Medium_Dark",0,0,13,6)
	BI2F B 0 A_FireCustomMissile("MagnumProjectile",600*random(-0.001,0.001),0,15,7,0,600*random(-0.001,0.001))
	BI2F B 0 A_Quake(1,4,0,16,"none")
	BITG A 0 A_SetAngle(Angle-0.5)
	BITG A 0 A_SetPitch(Pitch-0.5)
	BI2F C 1 Bright A_ZoomFactor(0.975)
	BITG A 0 A_SetAngle(Angle-1)
	BITG A 0 A_SetPitch(Pitch-1)
	BI2F D 1 Bright A_ZoomFactor(0.96)
	BITG A 0 A_SetAngle(Angle-0.75)
	BITG A 0 A_SetPitch(Pitch-0.75)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,5)
	BITG A 0 A_JumpIf(Health<50,4)
	BI2F E 1 A_ZoomFactor(0.97)
	BITG A 0 A_SetAngle(Angle-0.5)
	BITG A 0 A_SetPitch(Pitch-0.5)
	BI2F F 1 A_ZoomFactor(0.98)
	BITG A 0 A_SetAngle(Angle-0.25)
	BITG A 0 A_SetPitch(Pitch-0.25)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,5)
	BITG A 0 A_JumpIf(Health<25,4)
	BI2F G 1 A_ZoomFactor(0.99)
	BITG A 0 A_SetAngle(Angle-0.125)
	BITG A 0 A_SetPitch(Pitch-0.125)
	BI2F H 1 A_ZoomFactor(1)
	BITG A 0 A_SetPitch(Pitch-0.1)
	BITG A 0 A_SetPitch(Pitch-0.1)
	BITG A 0 A_ReFire("AltLoop")
  TheBacketh:
  TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BITA N 1 A_JumpIf(Health<75,2)
	BITA MLK 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,4)
	BITA J 1 A_JumpIf(Health<50,3)
	BITA IHGF 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,4)
	BITA E 1 A_JumpIf(Health<25,3)
	BITA DCBA 1
	Goto HammerCheck
  Lolnope:
	BI2F AB 1
	BI2F B 0 A_PlaySound("Magnum/Hammer2",6,0.8)
	BI2F IJ 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BI2F J 0 A_JumpIf(Health<50,2)
	BI2F EF 1
	BI2F G 0 A_PlaySound("Magnum/Hammer1",4,0.3)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	BI2F J 0 A_JumpIf(Health<25,2)
	BI2F GH 1
	BITG A 0 A_ReFire("Lolnope")
	Goto TheBacketh
  Flash:
    TNT1 A 4 A_Light2
    TNT1 A 7 A_Light1
    TNT1 A 0 A_Light0
    Stop
  Reload:
	TNT1 A 0 A_JumpIfInventory("MagnumClip",0,"ReadyMain")
	TNT1 A 0 A_JumpIfInventory("HellraiserAmmo",1,1)
	Goto ReadyMain
  ReloadMain:
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO A 1 A_JumpIf(Health<75,1)
	BITO B 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO C 1 A_JumpIf(Health<50,1)
	BITO D 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO E 1 A_JumpIf(Health<25,1)
	BITO F 1
	BITO F 0 A_PlaySound("Magnum/Open",5,0.75)
	BITO GH 1
	BITO IJ 1 A_FireCustomMissile("BuellerCasingSpawner2",0,0,1,2)
	BITO KKKK 1 A_FireCustomMissile("BuellerCasingSpawner2",0,0,1,2)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO K 2 A_JumpIf(Health<75,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO K 2 A_JumpIf(Health<50,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITO K 2 A_JumpIf(Health<25,1)
	BITO K 2
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL A 1 A_JumpIf(Health<75,1)
	BITL B 1
	BITL C 0 A_PlaySound("Magnum/Load",5)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL C 1 A_JumpIf(Health<50,1)
	BITL D 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL E 1 A_JumpIf(Health<25,1)
	BITL FG 1
  ReloadWorking:
	TNT1 A 0 A_TakeInventory("HellraiserAmmo",1,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("MagnumClip", 1)
	TNT1 A 0 A_JumpIfInventory("MagnumClip",0,2)
	TNT1 A 0 A_JumpIfInventory("HellraiserAmmo",1,2)
	TNT1 A 0
	Goto ReloadFinish
	TNT1 A 0
	Goto ReloadWorking
  ReloadFinish:
	BITL HIJKL 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL M 2 A_JumpIf(Health<75,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL M 2 A_JumpIf(Health<50,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL M 2 A_JumpIf(Health<25,1)
	BITL M 0 A_PlaySound("Magnum/Close",5)
	BITL N 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL O 1 A_JumpIf(Health<75,2)
	BITL P 1
	BITL Q 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL R 1 A_JumpIf(Health<50,2)
	BITL S 1
	BITL T 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	BITL V 1 A_JumpIf(Health<25,2)
	BITL W 1
	BITG B 2
	Goto Hammer
  Zoom:
    BITP A 0 A_JumpIfInventory("ZoomReFire",1,"PunchHoes")
    BITP A 0 A_JumpIfInventory("MagnumClip",1,"LoadedEnter")
	BI2X ABCD 1
  EnterMain:
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
	Goto PunchHoes
  LoadedEnter:
    BITX ABCD 1
	Goto EnterMain
  PunchHoes:
	QML1 A 0 A_Gunflash("PunchFlash", GFF_NOEXTCHANGE)
	QML1 A 0 A_JumpIfInventory("PowerStrength2",1,2)
    QML1 A 0 A_Jump(256,3)
  	FML1 A 0 A_SetBlend("Orange",0.05,10)
	FML1 A 0 A_PlaySound("Melee/Firepunch",0)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" A 1 A_SetPitch(pitch-0.3)
	"####" B 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" C 1 A_SetPitch(pitch-0.3)
	"####" D 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerStrength2",1,3)
	"####" A 0 A_CustomPunch(30, 1, 0, "PunchCracker", 100)
	"####" A 0 A_Jump(256,2)
	"####" A 0 A_CustomPunch(90, 1, 0, "FlamePunchCracker", 150)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" E 1 A_SetPitch(pitch+0.3)
	"####" F 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" G 1 A_SetPitch(pitch+0.3)
	"####" H 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" I 1
	"####" J 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" K 1
	TNT1 A 5
	TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWZOOM)
    TNT1 A 1 //Had to add an extra tic here, else punch looping won't work. Why? Don't ask me, ask JumpIfInventory and WeaponReady being next to each other.
	TNT1 A 0 A_JumpIfInventory("MagnumClip",1,"LoadedReturn")
	BI2X DCBA 1
  ReturnMain:
	FMGU A 0 A_TakeInventory("ZoomReFire",1)
	Goto ReadyMain
  LoadedReturn:
    BITX DCBA 1
	Goto ReturnMain
  PunchFlash:
    BITP A 0 A_JumpIfInventory("MagnumClip",1,2)
	BI2P A 0
	"####" G 1 A_PlaySound("Punch/Swing",6,1.0)
	"####" ABC 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" DE 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" FE 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" DC 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" BA 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" GG 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" GGG 1
	Stop
  CaberToss:
  	BITG A 1 A_JumpIfInventory("MacheteAmmo",1,1)
	Goto ReadyMain
	MCHT A 0 A_TakeInventory("MacheteAmmo",1)
	BITU DCBA 1

    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<75,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<50,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<25,1)
	TNT1 A 1
    MC4S A 0 A_PlaySound("Machete1/Slash",1,0.9)
    MC4S A 0 A_PlaySound("Machete2/Slash",5,0.2)
	MCHT ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerStrength2",1,3)
	MCHT A 0 A_SpawnItemEX("MacheterangProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*35,0,sin(-pitch)*35,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	TNT1 A 0 A_Jump(256,2)
	MCHT A 0 A_SpawnItemEX("MacheterangBerserkProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*25,0,sin(-pitch)*25,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	// This solution is ten times better. Just let it bouncecount out.
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT D 1 A_JumpIf(Health<75,1)
	MCHT E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT F 1 A_JumpIf(Health<50,1)
	MCHT G 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT H 1 A_JumpIf(Health<25,1)
	MCHT I 1
	TNT1 A 3

	BITU ABCD 1
	Goto ReadyMain
  Spawn:
    BITG X -1
    Stop
	}
}

ACTOR MagnumClip : Ammo
{
   Inventory.MaxAmount 6
   Inventory.Icon BITGX0
   +IGNORESKILL
}

ACTOR MagnumProjectile : FastProjectile
{
  Radius 10
  Height 14
  Speed 250
  Damage 80
  Projectile
  Obituary "%o wasn't a lucky punk. %h went ahead, and made %k's day."
  MissileType "MagnumTrail"
  MissileHeight 0
  DamageType Fire
  Decal "Scorch"
  States
  {
  Spawn:
	TNT1 AA 0 A_PlaySound("Magnum/Fly",5,0.8,1)
	TNT1 A 1 A_ChangeVelocity(0, 0, -0.3, CVF_RELATIVE)
	Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("MagnumImpact",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 0 A_Explode(100,128,0)
	TNT1 A 0 A_PlaySound("Magnum/Explode",5,0.7)
	TNT1 A 1 A_PlaySound("Magnum/Hit",4)
    Stop
  }
}

ACTOR MagnumTrail
{
	+NOINTERACTION
	+NOGRAVITY
	States
	{
	Spawn:
	TNT1 AA 0 A_SpawnItemEx("Chrome_Fire",random(2,-2),random(2,-2),random(2,-2),frandom(0.3,0.2),frandom(0.3,0.2),frandom(0.3,0.2),frandom(0.0,360.0),SXF_CLIENTSIDE)
	TNT1 A 0 A_SpawnItemEx("Chrome_Smoke",random(2,-2),random(2,-2),random(2,-2),frandom(0.1,0.2),frandom(0.1,0.2),frandom(0.1,0.2),frandom(0.0,360.0),SXF_CLIENTSIDE)
	TNT1 A 0 A_SpawnItemEx("MagnumTrail1",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	TNT1 A 1 A_SpawnItemEx("MagnumTrail2",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	Stop
	}
}

ACTOR MagnumTrail1
{
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Add
	Alpha 1
	Scale 0.25
	States
	{
	Spawn:
	BPRP A 0
	BPRP A 1 Bright
	BPRP A 0 A_SetScale(ScaleX+0.2)
	BPRP A 1 Bright A_FadeOut(0.2)
	BPRP A 0 A_SetScale(ScaleX+0.2)
	BPRP A 1 Bright A_FadeOut(0.2)
	BPRP A 0 A_SetScale(ScaleX-0.2)
	BPRP A 1 Bright A_FadeOut(0.2)
	BPRP A 0 A_SetScale(ScaleX-0.2)
	BPRP A 1 Bright A_FadeOut(0.2)
	Stop
	}
}

ACTOR MagnumTrail2
{
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Add
	Alpha 1
	Scale 0.15
	States
	{
	Spawn:
	BPRR A 0
	BPRR A 1 Bright
	BPRR A 0 A_SetScale(ScaleX+0.1)
	BPRR A 1 Bright A_FadeOut(0.2)
	BPRR A 0 A_SetScale(ScaleX+0.1)
	BPRR A 1 Bright A_FadeOut(0.2)
	BPRR A 0 A_SetScale(ScaleX-0.1)
	BPRR A 1 Bright A_FadeOut(0.2)
	BPRR A 0 A_SetScale(ScaleX-0.1)
	BPRR A 1 Bright A_FadeOut(0.2)
	Loop
	}
}

ACTOR MagnumImpact
{
	+NOINTERACTION
	+NOGRAVITY
	States
	{
	Spawn:
			TNT1 A 0 NoDelay A_JumpIf(CallACS("SmokeCheck")==2, 8)
		    TNT1 A 0 A_JumpIf(CallACS("SmokeCheck")==1, 4)	
			TNT1 AAAAAAAAAA 0 A_SpawnItemEx("Patriarch_Cloud", FRandom(-15, 15),
									FRandom(-15, 15), FRandom(-15, 15),
									FRandom(-2.0, -2.0), FRandom(-2.0, 2.0),
									FRandom(-2.0, 2.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_JumpIf(CallACS("SmokeCheck")==2, 8)
		    TNT1 A 0 A_JumpIf(CallACS("SmokeCheck")==1, 4)	
			TNT1 AAAAAAAAAA 0 A_SpawnItemEx("Patriarch_Smoke", FRandom(-15, 15),
									FRandom(-15, 15), FRandom(-15, 15),
									FRandom(1.5, -2.5), FRandom(-1.0, 1.0),
									FRandom(-1.0, 1.0), 0, SXF_CLIENTSIDE, 10)
			TNT1 A 0 A_JumpIf(CallACS("SmokeCheck")==2, 8)
		    TNT1 A 0 A_JumpIf(CallACS("SmokeCheck")==1, 4)	
			TNT1 AAAAAAAAA 0 A_SpawnItemEx("Patriarch_Ember", FRandom(-10, 10),
									FRandom(-10, 10), FRandom(-10, 10),
									FRandom(-2.0, -8.0), FRandom(-6.0, 6.0),
									FRandom(1.0, 5.0), 0, SXF_CLIENTSIDE, 10)
	TNT1 A 0 A_SpawnItemEx("MagnumImpact1",0,0,0,0,0,0,0,SXF_CLIENTSIDE)
	TNT1 A 11
	Stop
	}
}

ACTOR MagnumImpact1
{
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Add
	Alpha 1
	Scale 0.35
	States
	{
	Spawn:
	BPRH ABCDEFGHIJ 1 Bright A_FadeOut(0.05)
	Stop
	}
}