actor SwirlFlameWep_NormalBar : NormalBar{args 229,220}
actor SwirlFlameWep : BaseMM8BDMWep 
{
Weapon.AmmoUse 7
Weapon.AmmoGive 28
Weapon.SlotNumber 5
Inventory.Pickupmessage "$PU_SWIRLFLAME"
Obituary "$OB_SWIRLFLAME"
Tag "$TAG_SWIRLFLAME"
weapon.ammotype "SwirlFlameAmmo"
inventory.pickupsound "weapon/weaponup"
inventory.icon "SFMEICON"
+WEAPON.AMMO_OPTIONAL
Scale 2.0
States
{
SpawnLoop:
SFME Z 1
loop
Ready:
SFME A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_SWIRLFLAME)
SFME A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
SFME A 0 
goto DeselectSwap
Select:
SFME A 0 
goto SelectSwap
Fire:
SFME A 0 A_JumpIfNoAmmo("NoAmmo")
SFME A 0 A_JumpIfInventory("SwirlFlameFlag",1,"Fire2")
SFME A 0 A_PlaySoundEx("misc/gammafire", "Weapon")
SFME BC 4
SFME D 0 A_FireCustomMissile("SwirlFlame",0,1,8,8)
SFME D 10
SFME CB 4
SFME A 4 A_GiveInventory("SwirlFlameFlag",1)
SFME A 4 A_Refire
goto Ready+1
Fire2:
SFME A 0 A_PlaySoundEx("misc/gammafire", "Weapon")
SFME BC 4
SFME D 0 A_FireCustomMissile("SwirlFlame2",0,1,8,8)
SFME D 10
SFME CB 4
SFME A 4 A_TakeInventory("SwirlFlameFlag",1)
SFME A 4 A_Refire
goto Ready+1
NoAmmo:
SFME A 0 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor SwirlFlameFlag : Once {}

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

actor SwirlFlame : BasicProjectile
{
+BRIGHT
+STEPMISSILE
MaxStepHeight 64
+RIPPER
+NOEXPLODEFLOOR
+THRUACTORS
-NOGRAVITY
damagetype "SwirlFlame"
obituary "$OB_SWIRLFLAME"
Radius 24
Height 64
damage (0)
speed 6
reactiontime 20
states
{
Spawn:
GAMA U 0
GAMA U 0 A_Recoil(-3)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA UUUU 1 A_Weave(1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA VVVV 1 A_Weave(1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA WWWW 1 A_Weave(1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA U 0 A_CountDown
goto Spawn+2
}
}

actor SwirlFlame2 : SwirlFlame
{
states
{
Spawn:
GAMA U 0
GAMA U 0 A_Recoil(-3)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA UUUU 1 A_Weave(-1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA VVVV 1 A_Weave(-1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA WWWW 1 A_Weave(-1.75, 0, 14, 0)
GAMA U 0 A_PlaySoundEx("weapon/atomicfire", "Voice", 0, 0)
GAMA U 0 A_spawnItemEx("SwirlFlameWall")
GAMA U 0 A_CountDown
goto Spawn+2

}
}


actor SwirlFlameWall : BasicProjectile
{
+BRIGHT
+FLOORHUGGER
+RIPPER
damage (0)
damagetype "SwirlFlame"
obituary "$OB_SWIRLFLAME"
reactiontime 7
scale 2.0
renderstyle "translucent"
states
{
Spawn:
GAMF A 0
TNT1 A 0 ACS_NamedExecuteWithResult("core_alphaprojectile", CallACS("core_getptrtid", AAPTR_TARGET), APROJ_TEAM, 19659, 512) // 6553 = 0.1 * 65536
GAMF A 0 A_PlaySoundEx("weapon/pharaoh2", 0)
GAMF ABC 4 A_Explode(CallACS("vile_cbm_damage",6), 32, 0, 0, 24)
Firey:
GAMF D 0 A_CountDown
GAMF DEF 4 A_Explode(CallACS("vile_cbm_damage",6), 32, 0, 0, 24)
loop
Death:
GAMF CBA 4 A_Explode(CallACS("vile_cbm_damage",6), 32, 0, 0, 24)
stop
}
}