actor NeonFlashWep_NormalBar : NormalBar{args 192,240}
actor NeonFlashWep : BaseMM8BDMWep
{
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_NEONFLASH"
Obituary "$OB_NEONFLASH"
Tag "$TAG_NEONFLASH"
weapon.ammotype "NeonFlashAmmo"
inventory.icon "NFLSICON"
States
{
SpawnLoop:
NFLS Z 1
loop
Ready:
NFLS A 0 ACS_NamedExecuteWithResult("core_weaponcolor",COLOR_NEONFLASH)
NFLS A 1 A_WeaponReady
Goto Ready+1
ReadyC: Goto Ready+1
Deselect:
NFLS A 0 
goto DeselectSwap
Select:
NFLS A 0 
goto SelectSwap
Fire:
NFLS A 0 A_JumpIfNoAmmo("NoAmmo")
NFLS G 0 A_PlaySoundEx("weapon/CyberDistorter","Weapon")
NFLS A 0 A_FireCustomMissile("NeonFlash",0,1,8,0)
NFL0 ABCDEF 2
NFL0 G 18
NFL0 G 0 ACS_NamedExecuteWithResult("core_clientsound", CSND_CRYSTALRELOAD) // A_PlaySoundEx("weapons/mm5/crystaleyereload", "Weapon")
NFL0 HIJK 2

NFLS A 0 A_Refire("Fire")
Goto Ready+1
NoAmmo:
NFLS A 1 ACS_NamedExecuteAlways("core_noammo",0)
Goto Ready+1
}
}

actor NeonFlash : BasicProjectile
{
PROJECTILE
damagetype "NeonFlash"
Obituary "$OB_NEONFLASH"
+NOTARGETSWITCH
Speed 50
Damage (CallACS("vile_cbm_damage",20))
radius 24
height 24
scale 2.5
States
{
Spawn:
NNFL ABCDABCDABCD 2 A_ScaleVelocity(0.8)
NNFL EFGH 2 A_ScaleVelocity(0.8)
goto XDeath
XDeath:
TNT1 A 0 A_SpawnItemEx("NeonFlashExplosion",0,0,32)
TNT1 A 0 A_PlaySoundEx("weapons/mm4/flashstopperexplode","Weapon")
STOP
Death:
TNT1 A 0
stop
}
}

actor NeonFlashProtection : PowerProtection
{damagefactor "NeonFlash2", 0.0 Powerup.Duration 2}


actor NeonFlashFX : BasicGraphicEffect
{
translation "4:4=192:192"
renderstyle add
+FORCEXYBILLBOARD
+BRIGHT
height 1
radius 1
damagetype "NeonFlash2"
alpha 1.0
scale 5.0
-SOLID
+NOGRAVITY
states
{
SpawnFrame:
FST2 A 0
FST2 ABCDEF 1 A_FadeOut(0.12)
stop
}
}

actor NeonFlashExplosion : BasicExplosion
{
damagetype "NeonFlash2"
Obituary "$OB_NEONFLASH"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("NeonFlashFX")
TNT1 A 1 A_Explode(CallACS("vile_cbm_damage",22), 350,0)
TNT1 A 1 ACS_NamedExecuteAlways("core_neonflashlight", 0, 350)
stop
}
}


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


actor NeonFlashHit : CustomInventory
{
    States
    {
    Pickup:
        TNT1 A 0 A_GiveInventory("FlashStopperHitCheck", 1)
        goto End
    End:
        TNT1 A 0
        stop
    }
}

actor NeonFlashBlind : NeonFlashHit
{
    States
    {
    Pickup:
        TNT1 A 0 A_JumpIfInventory("BrightBlind", 1,3)
		TNT1 A 0 A_SpawnItemEx("FlashBlindWatcher")
        TNT1 A 0 A_GiveInventory("BrightBlind",125)
        TNT1 A 0 ACS_NamedExecuteAlways("core_flashstopper", 0)
        goto End
        TNT1 A 0 A_GiveInventory("BrightBlind",55)
        goto End
    }
}