actor TimeStopperBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_2F"
dropitem "TimeBenderWepCDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Obituary "$OB_TIMEBUSTER"
weapon.ammotype "ZaWarudoAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_02 F 1
loop
Ready:
FLSA A 0 ACS_ExecuteAlways(998,0,DYE_FLASHMAN)
FLSA A 0 A_GunFlash
goto Ready1
Ready1:
FLSA A 0 A_JumpIfInventory("ZaWarudoAmmo",1960,"Ready2")
FLSA A 2 A_WeaponReady(8)
FLSA A 0 A_JumpIfInventory("TimeStopperFlag",1,2)
FLSA A 0 A_GiveInventory("ZaWarudoAmmo",2)
FLSA A 0
loop
Ready2:
FLSA A 2 A_WeaponReady
FLSA A 0 A_GiveInventory("ZaWarudoAmmo",2)
loop

Deselect:
FLSA AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
FLSA A 1 A_Lower
Loop
Select:
FLSA AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
FLSA A 1 A_Raise
Loop

Fire:
FLSA B 0 A_JumpIfInventory("IsBot",1,"BotFire")
FLSA B 2
goto Fire1
Fire1:
FLSA C 0 A_JumpIfInventory("IsBot",1,"BotFire3")
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain1_CI",1)
FLSA C 0 A_ReFire("Fire2")
goto FireE
Fire2:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain2_CI",1)
FLSA C 0 A_ReFire("Fire3")
goto FireE
Fire3:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain3_CI",1)
FLSA C 0 A_ReFire("Fire4")
goto FireE
Fire4:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain4_CI",1)
FLSA C 0 A_ReFire("Fire5")
goto FireE
Fire5:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain3_CI",1)
FLSA C 0 A_ReFire("Fire6")
goto FireE
Fire6:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain2_CI",1)
FLSA C 0 A_ReFire("Fire7")
goto FireE
Fire7:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain1_CI",1)
FLSA C 0 A_ReFire("Fire8")
goto FireE
Fire8:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain5_CI",1)
FLSA C 0 A_ReFire("Fire9")
goto FireE
Fire9:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain6_CI",1)
FLSA C 0 A_ReFire("Fire10")
goto FireE
Fire10:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain7_CI",1)
FLSA C 0 A_ReFire("Fire11")
goto FireE
Fire11:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain6_CI",1)
FLSA C 0 A_ReFire("Fire12")
goto FireE
Fire12:
FLSA C 0 A_PlaySoundEx("weapon/rbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain5_CI",1)
FLSA C 0 A_ReFire("Fire1")
goto FireE


FireE:
FLSA BA 2
Goto Ready1

AltFire:
FLSA DEF 3
FLSA G 1
FLSA G 0 A_GiveInventory("TimeStopperFlag",1)
FLSA G 0 A_GunFlash("Flash.Deplete",GFF_NOEXTCHANGE)
FLSA G 0 A_PlaySoundEx("weapon/timestopper","SoundSlot7")
FLSA G 0 A_FireCustomMissile("FlashM_TimeBender",0,1,0,0)
FLSA G 0 A_SpawnItemEx("TimeStopSparkleHelper",0,0,28,0,0,0,0,1)
//FLSA G 0 A_GiveInventory("Repulsion",1)
FLSA G 4 A_SetBlend(white,0.95,5)
FLSA FEHA 3
Goto Ready1

Flash:
TNT1 A 0 A_JumpIfInventory("ZaWarudoAmmo",1960,"Flash.Full")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 2 A_GiveInventory("ZaWarudoAmmo",8)
loop
Flash.Full:
TNT1 AAAA 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_SpawnItemEx("FlashmanSparkleFX_Aura",random(16,48),0,Random(16,48),0,0,0,random(0,359),1)
loop
Flash.Deplete:
TNT1 A 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_TakeInventory("ZaWarudoAmmo",70)
TNT1 AA 1 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("ZaWarudoAmmo",1,"Flash.Deplete")
TNT1 AA 2 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_TakeInventory("TimeStopperFlag",999)
goto Flash

BotFire:
FLSA A 0 A_JumpIfCloser(450,"BotFire2")
FLSA A 2
FLSA A 0 A_GiveInventory("ZaWarudoAmmo",2)
Goto Ready1
BotFire2:
FLSA A 0 A_JumpIfInventory("ZaWarudoAmmo",1960,"Altfire")
goto Fire+1
BotFire3:
FLSA C 0 A_JumpIfCloser(450,1)
goto Fire1+1
FLSA C 0 A_JumpIfInventory("ZaWarudoAmmo",1960,"Altfire")
goto Fire1+1
}
}

actor ZaWarudoAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 1960
+INVENTORY.IGNORESKILL
}

actor TimeStopperFlag : OnceC {}

actor FlashBullet
{
Translation "204:204=215:215"
PROJECTILE
damagetype "FlashM_Shot"
Obituary "$OB_TIMEBUSTER"
+FORCEXYBILLBOARD
+BRIGHT
Damage (60)
radius 6
height 6
Speed 65
scale 2.5
States
{
Spawn:
TNT1 A 1
W_0D B 7
W_0D B 2
stop
}
}

actor FlashBulletB : FlashBullet{translation "204:204=205:205"}
actor FlashBulletR : FlashBullet{translation "204:204=171:171"}
actor FlashBulletO : FlashBullet{translation "204:204=104:104"}
actor FlashBulletP : FlashBullet{translation "204:204=229:229"}


actor FlashM_TimeBender : BasicExplosion
{
damagetype "FlashM_Stopper"
Obituary "$OB_TIMEBENDER"
+PIERCEARMOR
States
{
Spawn:
TNT1 A 0
TNT1 A 4 A_Explode(50,512,0,0,256)
stop
}
}

actor FlashM_GenesisSparkleFX : BasicClientSide
{
Translation "192:192=4:4","198:198=4:4"
+FORCEXYBILLBOARD
+BRIGHT
Renderstyle "Translucent"
Alpha 0.95
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,5,9,13,17)
FLSA MNOP 3
stop
FLSA M random(1,3)
FLSA NO 3
FLSA P random(1,3)
stop
FLSA MNOP 2
stop
FLSA MNOP random(2,3)
stop
FLSA MNOP random(1,3)
stop
}
}

actor FlashM_SparkleFX_Base : BasicClientSide
{
Translation "192:192=4:4","198:198=4:4","250:250=4:4","249:249=4:4"
+FORCEXYBILLBOARD
+BRIGHT
Renderstyle "Translucent"
Alpha 0.95
ReactionTime 10
States
{
Spawn://FLAS CBACBACBA 2 bright //BABABABA 2 bright 
TNT1 A 0
TNT1 A 0
SpawnX:
TNT1 A 0 A_Jump(256,1,2,3,4,5,6)
Spawn1:
X_2F ABC 2 A_CountDown
loop
Spawn2:
X_2F DEF 2 A_CountDown
loop
/*
SpawnY://,"202:202=4:4","199:199=4:4"
TNT1 A 0 A_Jump(256,1,2,3,4,5,6)
Spawn3:
Y_2F ABC 2 A_CountDown
loop
Spawn4:
Y_2F DEF 2 A_CountDown
loop
SpawnW://,"204:204=4:4","195:195=4:4"
TNT1 A 0 A_Jump(256,1,2,3,4,5,6)
Spawn5:
W_2F ABC 2 A_CountDown
loop
Spawn6:
W_2F DEF 2 A_CountDown
loop
*/
SpawnV://215 161 160
TNT1 A 0 A_Jump(256,1,2,3,4,5,6)
Spawn7:
V_2F ABC 2 A_CountDown
loop
Spawn8:
V_2F DEF 2 A_CountDown
loop
}
}

actor FlashmanSparkleFX_X : FlashM_SparkleFX_Base
{
States
{
Spawn:
TNT1 A 0
goto SpawnX
}
}
/*actor FlashmanSparkleFX_Y : FlashM_SparkleFX_Base
{
States
{
Spawn:
TNT1 A 0
goto SpawnY
}
}
actor FlashmanSparkleFX_W : FlashM_SparkleFX_Base
{
States
{
Spawn:
TNT1 A 0
goto SpawnW
}
}*/
actor FlashmanSparkleFX_V : FlashM_SparkleFX_Base
{
States
{
Spawn:
TNT1 A 0
goto SpawnV
}
}
actor FlashmanSparkleFX_Aura : FlashM_SparkleFX_Base
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Jump(32,"SpawnV")
goto SpawnX
}
}

actor TimeStopSparkleHelper : BasicHelper
{
Translation "192:192=4:4","198:198=4:4","250:250=168:168","249:249=208:208"
ReactionTime 3
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("FlashmanSparkleFX_X",random(-384,384),random(-384,384),random(-384,384),0,0,0,0,129)
TNT1 AAAAAAAAAA 0 A_SpawnItemEx("FlashmanSparkleFX_V",random(-384,384),random(-384,384),random(-384,384),0,0,0,0,129)
TNT1 A 2 A_CountDown
loop
}
}

actor FlashmanMain1_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,0,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",0,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",0,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",0,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",0,0,8,0)goto Done}}

actor FlashmanMain2_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,5,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",5,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",5,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",5,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",5,0,8,0)goto Done}}

actor FlashmanMain3_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,10,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",10,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",10,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",10,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",10,0,8,0)goto Done}}

actor FlashmanMain4_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,15,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",15,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",15,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",15,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",15,0,8,0)goto Done}}

actor FlashmanMain5_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,-5,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",-5,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",-5,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",-5,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",-5,0,8,0)goto Done}}

actor FlashmanMain6_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,-10,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",-10,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",-10,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",-10,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",-10,0,8,0)goto Done}}

actor FlashmanMain7_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("FlashBullet" ,-15,0,8,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("FlashBulletB",-15,0,8,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("FlashBulletR",-15,0,8,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("FlashBulletO",-15,0,8,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("FlashBulletP",-15,0,8,0)goto Done}}
