actor TimeStopperBoss : BaseMM8BDMWep_CBM
{
dropitem "TimeBenderWepCDropped"
Weapon.AmmoUse 7
Weapon.AmmoGive 28
Weapon.SlotNumber 6
Obituary "$OB_TIMEBUSTER"
weapon.ammotype "TimeAmmo"
+WEAPON.NOAUTOAIM
States
{
Spawn:
C_02 F 1
loop
Ready:
FLSA A 0 ACS_ExecuteAlways(998,0,15)
FLSA A 0 A_GunFlash
FLSA A 0 A_JumpIfInventory("TimeAmmo",28,"Ready2")
FLSA A 1 A_WeaponReady(WRF_NOSECONDARY)
FLSA A 0 A_GiveInventory("TimeStock",1)
Goto Ready+2
Ready2:
FLSA A 1 A_WeaponReady
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
FLSA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
FLSA A 1 A_Raise
Loop
Fire:
FLSA B 0 A_JumpIfInventory("IsBot",1,"BotFire")
FLSA B 2
Hold:
FLSA C 0 A_JumpIfInventory("IsBot",1,"BotFire3")
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain1_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain2_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain3_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain4_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain3_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain2_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain1_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain5_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain6_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain7_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain6_CI",1)
FLSA C 0 A_ReFire(1)
goto End
FLSA C 0 A_PlaySoundEx("weapon/mbuster","Weapon")
FLSA C 3 A_GiveInventory("FlashmanMain5_CI",1)
FLSA C 0 A_ReFire
goto End


End:
FLSA BA 2
Goto Ready+2

AltFire:
FLSA A 1 A_JumpIfInventory("TimeAmmo",28,"TimeStopper")
goto Ready+2
TimeStopper:
//FLSA A 0 A_JumpIfNoAmmo("NoAmmo")
FLSA DEF 3
FLSA G 1 
FLSA G 0 A_GiveInventory("TimeStopperFlag",1)
FLSA G 0 A_TakeInventory("TimeAmmo",1)
FLSA G 0 A_GunFlash
FLSA G 0 A_PlaySoundEx("weapon/timestopper","SoundSlot6")
FLSA G 0 A_FireCustomMissile("TimeStopperRadius",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
//FLSA A 9//24
Goto Ready+2
NoAmmo:
FLSA A 1
goto Ready+2
Flash:
TNT1 A 0 A_JumpIfInventory("TimeStopperFlag",1,"Deplete")
TNT1 A 0 A_TakeInventory("TimeStock",999)
goto Reload
Reload:
TNT1 A 1 A_GiveInventory("TimeStock",2)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("TimeAmmo",28,"FlashFull")
TNT1 A 0 A_JumpIfInventory("TimeStock",70,"Give")
loop
Give:
TNT1 A 0 A_TakeInventory("TimeStock",70)
TNT1 A 0 A_GiveInventory("TimeAmmo",2)
goto Reload+1
FlashFull:
TNT1 AAAA 1 A_JumpIfInventory("TimeStopperFlag",1,"Deplete")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_SpawnItemEx("FlashmanSparkleSparkle",random(16,48),0,Random(16,48),0,0,0,random(0,359),1)
loop
Deplete:
TNT1 AAA 1
TNT1 A 1 A_TakeInventory("TimeAmmo",1)
TNT1 A 0 A_JumpIfInventory("TimeAmmo",1,"Deplete")
TNT1 A 0 A_TakeInventory("TimeStopperFlag",999)
goto Flash
NoFlash:
TNT1 A 0
stop

BotFire:
FLSA A 0 A_JumpIfCloser(450,"BotFire2")
FLSA A 1
FLSA A 0 A_GiveInventory("TimeStock",1)
Goto Ready+2
BotFire2:
FLSA A 0 A_JumpIfInventory("TimeAmmo",28,"TimeStopper")
goto Fire+1
BotFire3:
FLSA C 0 A_JumpIfCloser(450,1)
goto Hold+1
FLSA C 0 A_JumpIfInventory("TimeAmmo",28,"TimeStopper")
goto Hold+1

}
}

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

actor TimeStock : Inventory
{
inventory.amount 1
inventory.maxamount 999
}

actor TimeStopperFlag : Inventory
{
inventory.amount 1
inventory.maxamount 1
}


actor FlashBullet
{
Translation "204:204=215:215"
PROJECTILE
Obituary "$OB_TIMEBUSTER"
damagetype "Buster"
//seesound "weapon/mbuster"
Speed 65
Damage (6)
radius 6
height 6
scale 2.5
States
{
Spawn:
TNT1 A 1
BASB T 7
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 TimeStopperRadius : BasicExplosion
{
+PIERCEARMOR
damagetype "TimeStop"
Obituary "$OB_TIMEBENDER"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(5,512,0,0,256)
stop
}
}

actor TimeStopSparkleSparkle
{
+NOGRAVITY
-SOLID
+THRUGHOST
+CLIENTSIDEONLY
+NOINTERACTION
speed 0
Radius 1
Height 1
Scale 2.5
Renderstyle "Translucent"
Alpha 0.95
States
{
Spawn:
FLAS CBACBACBA 2 bright //BABABABA 2 bright 
stop
}
}


actor FlashmanSparkleSparkle : BasicClientSide
{
Translation "198:198=4:4","192:192=4:4"
Renderstyle "Translucent"
Alpha 0.95
ReactionTime 10
States
{
Spawn:
FLAS R 0
FLAS R 0 A_Jump(256,1,2,3,4,5,6)
FLAS RST 2 bright A_CountDown
goto Spawn+2
FLAS UVW 2 bright A_CountDown
goto Spawn+5
}
}


actor TimeStopSparkleHelper : BasicHelper
{
Translation "198:198=4:4","192:192=4:4"
ReactionTime 3
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("FlashmanSparkleSparkle",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}}
