actor Dustman : VCBaseClass
{
Player.ScoreIcon "DUSTMUGS"
player.startitem "BaseFlagPack", 1
player.displayname "Dustman"
player.soundclass "dustmanc"
player.viewheight 43
player.startitem "NormalArmor"
player.startitem "DustCrusherBoss"
player.startitem "Base56Ammo",56
player.startitem "UltimateAttackItem3"
player.startitem "UltSoundWatcherSpawn3"
player.startitem "IsFromMM4"
player.jumpz 14
States
{
Spawn:
DUSM A 0
DUSM B 1 A_JumpIf(z-floorz>0, "Jumping")
DUSM A 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+2

See:
DUSM BBBBBCCCCCDDDDDEEEEE 1 A_JumpIf(z-floorz>0, "Jumping")
Goto Spawn+1

Jumping:
DUS4 A 1 A_JumpIf(z-floorz<=0, "Spawn")
wait

Missile:
DUS4 B 0 A_JumpIfInventory("DustVacuumAnim",1,"Missile4")
DUS4 BBBBB 1 A_JumpIf(z-floorz>0, "JumpingMissile")
goto Spawn+1

Animation1:
Missile2:
DUS4 BCBC 1 A_JumpIf(z-floorz>0, "JumpingMissile2")

Missile3:
DUS4 DEBBBBBBBBB 1 A_JumpIf(z-floorz>0, "JumpingMissile")
goto Spawn+1

JumpingMissile:
DUS4 JJJJJ 1 A_JumpIf(z-floorz<=0, "Missile")
goto Jumping

JumpingMissile2:
DUS4 JKJK 1 A_JumpIf(z-floorz<=0, "Missile2")

JumpingMissile3:
DUS4 HIJJJJJJJJJ 1 A_JumpIf(z-floorz<=0, "Missile")
goto Jumping

Animation2:
DUS4 FFFF 1 A_JumpIf(z-floorz>0, "JumpingA2")

Missile4:
DUS4 GGGG 1 A_JumpIf(z-floorz>0, "JumpingMissile4")
goto Spawn+1

JumpingA2:
DUS4 KKKK 1 A_JumpIf(z-floorz<=0, "Animation2")

JumpingMissile4:
DUS4 JJJJ 1 A_JumpIf(z-floorz<=0, "Missile4")
goto Jumping

Animation3:
DUS4 L 20
DUS4 NMOP 2
DUS4 N 10
goto Spawn+2

ClassTimeStop:
PLAY A 0 SetPlayerProperty(0,1,4)
PLAY A 0 ACS_Execute(528,0)
DUSM AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Stop
PLAY A 0 SetPlayerProperty(0,0,4)
Goto pain+1
ClassPain:
DUSM HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
Goto Spawn+1
ClassDeath:
DUSM ] 20 ACS_ExecuteAlways(999,0,0)
DUSM ] 0 A_PlayerScream
NOFX A 0 A_SpawnItemEx("FakeDeathFX",0,0,32)
NOFX A 1 A_CheckPlayerDone
wait
ClassIceDeath:
DUSM A 35
NOFX A 0 A_SpawnItemEx("FrozenDeathFX",0,0,16)
NOFX A 1 A_CheckPlayerDone
wait
WeaponGetM:
CUTM H 0 A_JumpIfInTargetInventory("DustCrusherWepM",1,2)
CUTM H 0 A_GiveToTarget("WeaponGetter")
CUTM H 0 A_GiveToTarget("DustCrusherWepM")
goto ClassDeath
}
}

actor DustCrusherBoss : VCBaseWeapon
{
	Weapon.AmmoType "DustManAmmo"
	Weapon.AmmoType2 "Base56Ammo"
	Weapon.ammouse 0
	Obituary "$OB_DUSTMAN1"
	States
	{
		Ready:
		TNT1 A 0
		DUSA B 0 A_JumpIfInventory("DustManAmmo",8,"Ready.TF")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
		DUSA A 0 A_GiveInventory("Base56Ammo",2)
		goto Ready
		
		Ready.TF:
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") DUSA A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") DUSA A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") DUSA A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
		DUSA A 1 A_WeaponReady(WRF_NOSECONDARY*CallACS("VC_AmmoCheck",1,18)) DUSA A 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack") DUSA A 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
		DUSA A 0 A_GiveInventory("Base56Ammo",2)
		goto Ready
		
		Deselect:
		TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
		DUSA A 1 A_Lower
		Loop
		
		Select:
		TNT1 A 0 ACS_ExecuteAlways(991,0,785)
		TNT1 A 0 A_GunFlash
		TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
		DUSA A 1 A_Raise
		Loop
		
		Fire:
		DUSA A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
		DUSA BC 3
		DUSA B 0 A_PlaySoundEx("weapon/mbuster","Weapon")
		DUSA C 0 A_FireCustomMissile("DustManCrusher",0,1,0,20)
		DUSA C 1 Offset(2,27)
		DUSA C 1 Offset(1,29)
		DUSA C 1 Offset(2,28)
		DUSA C 12 A_WeaponReady(WRF_NOFIRE)
		DUSA BAAA 2 A_ClearRefire
		goto Ready
		
		User1:
		DUSA A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
		DUSA BC 3
		DUSA B 0 A_PlaySoundEx("weapon/dustshot","Weapon")
		DUSA C 0 A_FireCustomMissile("PowerDustShot",0,1,0,20)
		DUSA C 0 A_TakeInventory("DustManAmmo",999)
		DUSA C 0 A_Quake(2,3,0,128)
		DUSA C 1 Offset(4,26)
		DUSA C 1 Offset(1,29)
		DUSA C 1 Offset(4,32)
		DUSA C 1 Offset(2,27)
		DUSA C 1 Offset(1,29)
		DUSA C 1 Offset(2,28)
		DUSA CCCCCBA 2 A_WeaponReady(WRF_NOFIRE)
		goto Ready
		
		Altfire:
		RATU A 0 A_JumpIfInventory("NoAltfire",1,"Ready")
		DUSA A 0 ACS_NamedExecuteWithResult("VC_SetState",2)
		DUSA BCCC 1
		goto Alt.Holding
		
		Alt.Holding:
		DUSA C 0 A_JumpIfInventory("Base56Ammo",2,1)
		goto AltEnd
		DUSA C 0 A_GiveInventory("DustVacuumAnim")
		DUSA C 0 A_PlaySoundEx("weapon/dustvacuum","Weapon")
		DUSA C 0 A_GiveInventory("DustSuckHitboxCreator")
		DUSA C 0 A_SpawnItem("DustSuctionStrong")
		DUSA C 0 A_SpawnItem("DustSuctionWeak")
		TNT1 AAAAAA 0 A_FireCustomMissile("DustVacuumFXSpawner",random(-16,16),0,random(-10,10),random(60,80),0,random(-10,10))
		DUSA D 1 Offset(-2,0) A_SpawnItemEx("DustManGuard",33,0,0,momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		DUSA C 0 A_JumpIfInventory("DustSuctionFlag",1,"GotIt")
		DUSA C 0 A_GiveInventory("DustSuckHitboxCreator")
		DUSA C 0 A_SpawnItem("DustSuctionStrong")
		DUSA C 0 A_SpawnItem("DustSuctionWeak")
		TNT1 AAAAAA 0 A_FireCustomMissile("DustVacuumFXSpawner",random(-16,16),0,random(-10,10),random(60,80),0,random(-10,10))
		DUSA E 1 Offset(2,0) A_SpawnItemEx("DustManGuard",33,0,0,momx, momy, momz, 0, SXF_ABSOLUTEMOMENTUM|SXF_TRANSFERTRANSLATION)
		DUSA C 0 A_JumpIfInventory("DustSuctionFlag",1,"GotIt")
		DUSA C 0 A_TakeInventory("Base56Ammo",2)
		DUSA C 0 A_Refire("Alt.Holding")
		goto AltEnd
		
		AltEnd:
		DUSA C 0 A_WeaponReady(WRF_NOFIRE)
		DUSA C 0 A_StopSound(CHAN_WEAPON)
		DUSA BBBBBAAAAA 1 A_ClearRefire
		goto Ready
		
		GotIt:
		DUSA A 0 A_WeaponReady(WRF_NOFIRE)
		DUSA A 0 A_StopSound(CHAN_WEAPON)
		DUSA A 0 A_PlaySoundEx("weapon/dustcapture","Weapon")
		TNT1 A 0 A_GiveInventory("InvProtection",1)
		TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
		DUSA F 1 Offset(-1,0)
		DUSA F 1 Offset(1,0)
		DUSA G 1 Offset(-1,0)
		DUSA G 1 Offset(1,0)
		DUSA HHHHAA 1 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 A_TakeInventory("InvProtection",1)
		TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
		goto Ready
		
		UltimateAttack:
		DUSA A 1
		DUSA A 0 ACS_NamedExecuteWithResult("VC_SetState",3)
		TNT1 A 0 ACS_NamedExecuteAlways("VC_UltimateText",0,35)
		TNT1 A 0 A_TakeInventory("UltAttackFlag",1)
		TNT1 A 0 A_TakeInventory("MediumUltimateAmmo",300)
		CUTA A 0 A_PlaySoundEx("classes/ultimateactivation","Auto")
		CUTA A 0 A_GiveInventory("DustUltCooldown")
		TNT1 A 0 A_Stop
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_GiveInventory("InvProtection")
		TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
		DRIH A 0 ACS_Execute(191,0,APROP_JumpZ,0,1)
		DUSA ABCCC 4
		DUSA C 0 A_PlaySoundEx("weapon/duststeam","Weapon")
		DUSA C 1 Offset(3,0)
		DUSA C 1 Offset(-3,0)
		DUSA C 1 Offset(3,0)
		DUSA C 1 Offset(-3,0)
		DUSA C 1 Offset(3,0)
		DUSA C 1 Offset(-3,0)
		DUSA C 1 Offset(3,0)
		DUSA C 1 Offset(-3,0) A_FireCustomMissile("DustPressLine")
		DUSA C 1 Offset(3,0)
		DUSA C 1 Offset(-3,0)
		DUSA CCBA 2 A_WeaponReady(WRF_NOFIRE)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_TakeInventory("InvProtection")
		TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
		DRIH A 0 ACS_Execute(191,0,APROP_JumpZ,14,1)
		TNT1 A 0 A_TakeInventory("UltAttackFlag",1)
		goto Ready
		
		Flash:
		TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
		TNT1 A 1 A_JumpIfInventory("DustManAmmo",8,"Flash2")
		loop
		
		Flash2:
		TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
		TNT1 A 3 A_GiveInventory("DustHeadSteamer")
		TNT1 A 0 A_JumpIfInventory("DustManAmmo",8,"Flash2")
		goto Flash
	}
}

actor DustVacuumAnim : Powerup
{
Powerup.Duration 4
}

actor DustSuctionFlag : Powerup
{
Powerup.Duration 2
}

actor DustManAmmo : Ammo
{
	inventory.amount 1
	inventory.maxamount 8
	+INVENTORY.IGNORESKILL
}


actor DustManCrusher : DustCrusher
{
damage (20)//(18)
speed 40
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DUST A 1 A_JumpIfInTargetInventory("BaseCustomFlag1",1,"Death")
goto Spawn+2
XDeath:
Death:
TNT1 A 0 A_PlaySoundEx("weapon/dustsplit","Body")
TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
TNT1 A 0 A_Stop
TNT1 A 6 A_SpawnItemEx("ExplosionEffect1")
MMFX A 0 A_SpawnItemEx("DustManBit1",0,0,0,28,0,0,45,1)
MMFX A 0 A_SpawnItemEx("DustManBit2",0,0,0,28,0,0,-45,1)
MMFX A 0 A_SpawnItemEx("DustManBit3",0,0,0,28,0,0,225,1)
MMFX A 0 A_SpawnItemEx("DustManBit4",0,0,0,28,0,0,-225,1)
TNT1 A 0 A_CheckFloor("Death.Floor")
TNT1 A 0 A_CheckCeiling("Death.Ceiling")
TNT1 A 0 A_SpawnItemEx("DustFloorBit1",-8,0,0,random(5,9),0,random(-2,6),random(135,225),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit2",-8,0,0,random(5,9),0,random(-2,6),random(135,225),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit3",-8,0,0,random(5,9),0,random(-2,6),random(135,225),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit4",-8,0,0,random(5,9),0,random(-2,6),random(135,225),1)
stop
Death.Floor:
TNT1 A 0 A_SpawnItemEx("DustFloorBit1",0,0,6,random(-8,8),random(-8,8),random(4,8),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit2",0,0,6,random(-8,8),random(-8,8),random(4,8),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit3",0,0,6,random(-8,8),random(-8,8),random(4,8),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit4",0,0,6,random(-8,8),random(-8,8),random(4,8),random(0,359),1)
stop
Death.Ceiling:
TNT1 A 0 A_SpawnItemEx("DustFloorBit1",0,0,-6,random(-8,8),random(-8,8),random(-8,4),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit2",0,0,-6,random(-8,8),random(-8,8),random(-8,4),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit3",0,0,-6,random(-8,8),random(-8,8),random(-8,4),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("DustFloorBit4",0,0,-6,random(-8,8),random(-8,8),random(-8,4),random(0,359),1)
stop
}
}

actor DustManBit1 : DustBit1
{
species "DustManType"
+THRUSPECIES
damage(6)
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
}

actor DustManBit2 : DustBit2
{
species "DustManType"
+THRUSPECIES
damage(6)
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
}

actor DustManBit3 : DustBit3
{
species "DustManType"
+THRUSPECIES
damage(6)
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
}

actor DustManBit4 : DustBit4
{
species "DustManType"
+THRUSPECIES
damage(6)
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
}

actor DustFloorBit1 : DustBit1
{
damage(6)
damagetype "Dustman"
Obituary "$OB_DUSTMAN1"
-NOGRAVITY
-FLOORCLIP
-NOGRAVITY
-THRUACTORS
+NOEXPLODEFLOOR
species "DustManType"
+THRUSPECIES
reactiontime 280
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DUST "#" 0
"####" B 0
goto Air

Spawn2:
"####" "#" 0 A_Stop
"####" "#" 0 ThrustThingZ(0,0,0,1)
goto loopit

loopit:
"####" "#" 0 A_Countdown
"####" "#" 1 A_JumpIf(z-floorz>0, "Air")
loop

Air:
"####" "#" 0 A_Countdown
"####" "#" 1 A_JumpIf(z-floorz<=0, "Spawn2")
loop

Death:
TNT1 A 0
stop
}
}

actor DustFloorBit2 : DustFloorBit1
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DUST "#" 0
"####" C 0
goto Air
}
}

actor DustFloorBit3 : DustFloorBit1
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DUST "#" 0
"####" D 0
goto Air
}
}

actor DustFloorBit4 : DustFloorBit1
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DUST "#" 0
"####" E 0
goto Air
}
}

actor DustManGuard
{
species "DustManType"
+THRUSPECIES
+THRUGHOST
Speed 0
+DONTSPLASH
Damage 0
Height 60
Radius 32
health 9999
scale 2.5
+SHOOTABLE
+NOBLOOD
-SOLID
painchance 256
+DONTRIP
+NORADIUSDMG
+GHOST
+NOTARGETSWITCH
//Class immunities:
damagefactor "SkullManBlue",0.0
damagefactor "SkullManWhite",0.0
damagefactor "Darkman2",0.0
damagefactor "Darkman2Alt",0.0
damagefactor "Darkman4Alt",0.0
damagefactor "AstroSatellite",0.0
damagefactor "ConcretemanTackle",0.0
damagefactor "ConcretemanStomp",0.0
damagefactor "EnkerThirdfire",0.0
damagefactor "JunkManCube",0.0
damagefactor "DustVacuum",0.0
//Assist immunities:
damagefactor "Rounder",0.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(0,0,2)
TNT1 A 0 A_ChangeFlag("SHOOTABLE",1)
TNT1 A 0 A_ChangeFlag("DONTRIP",1)
TNT1 A 1
TNT1 A 1
Stop
Death:
TNT1 A 0
stop
Pain:
TNT1 A 0 A_CheckFlag("DONTBLAST","Death",AAPTR_TRACER)
TNT1 A 0 A_JumpIfInTargetInventory("DustSuctionFlag",1,"Death")
TNT1 A 0 A_GiveToTarget("Health",1)
TNT1 A 0 A_GiveToTarget("DustSmokeSpawner")
TNT1 A 0 A_GiveToTarget("DustManAmmo",1)
TNT1 A 0 A_GiveToTarget("DustSuctionFlag",1)
TNT1 A 1 A_PlaySoundEx("item/energyup","Body")
stop
}
}

actor PowerDustShot
{
Obituary "$OB_DUSTMAN2"
damagetype "DustPowerShot"
PROJECTILE
scale 2.5
speed 80
radius 24
height 24
damage(20)
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DU4P AABBCCDD 2 A_SpawnItemEx("PowerDustImage",0,0,0,0,0,0,0,1)
goto Spawn+2
Death:
TNT1 A 0 A_PlaySoundEx("weapon/dustbreak","Body")
TNT1 A 0 A_SpawnItemEx("DustPowerDebris1",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris2",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris3",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris4",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris5",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris6",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris7",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 0 A_SpawnItemEx("DustPowerDebris8",random(-8,8),random(-8,8),random(-8,8),random(-15,15),random(-15,15),random(-15,15),0,1)
TNT1 A 2
stop
XDeath:
TNT1 A 0
stop
}
}

actor PowerDustImage : BasicClientSide
{
States
{
Spawn:
TNT1 A 1
DU4P AABBCCDD 1 A_FadeOut(0.12)
stop
}
}

actor DustSmokeSpawner : CustomInventory
{
States
{
Pickup:
TNT1 AAAA 0 A_SpawnItemEx("DustSmokeFX",25,random(-5,5),random(62,70),random(3,6),random(-6,6),random(-6,6))
stop
}
}

actor DustSmokeFX
{
+CLIENTSIDEONLY
PROJECTILE
+NOCLIP
scale 2.5
height 2
radius 2
renderstyle translucent
alpha 0.6
speed 0
reactiontime 25
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DU4P HHHH 1 A_ScaleVelocity(0.75)
loopit:
D84P H 0 A_ScaleVelocity(0.75)
DU4P H 1 A_SetScale(scaleX - 0.1, scaleY - 0.1)
DU4P H 0 A_Countdown
loop
}
}

actor DustVision : PowerUp
{
Powerup.Duration 1200
Powerup.Color Gray, 0.5
}

actor DustManStopWatcher
{
Height 0
Radius 0
+NOINTERACTION
-SOLID
+NOGRAVITY
+MISSILE
scale 2.5
reactiontime 140
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("MovementFrozen3")
TNT1 A 0 A_GiveToTarget("StunImmunity")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
DU4P E 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_Countdown
TNT1 A 0 A_GiveToTarget("MovementFrozen3")
TNT1 A 0 A_GiveToTarget("StunImmunity")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
DU4P E 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_Countdown
TNT1 A 0 A_GiveToTarget("MovementFrozen3")
TNT1 A 0 A_GiveToTarget("StunImmunity")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
DU4P F 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_Countdown
TNT1 A 0 A_GiveToTarget("MovementFrozen3")
TNT1 A 0 A_GiveToTarget("StunImmunity")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
DU4P F 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_Countdown
loopit:
TNT1 A 0 A_GiveToTarget("MovementFrozen3")
TNT1 A 0 A_GiveToTarget("StunImmunity")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0) == 0, "Death")
DU4P G 1 A_Warp(AAPTR_TARGET, 0.0,0.0,0.0,0.0,WARPF_NOCHECKPOSITION)
TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 0 A_TakeFromTarget("NoThirdFire")
TNT1 A 0 A_TakeFromTarget("DustVision")
TNT1 A 0 A_GiveToTarget("MovementReturnFailsafe",1)
TNT1 A 0 A_PlaySoundEx("weapon/dustbreak","Body")
TNT1 A 0 A_SpawnItemEx("DustPowerDebris1",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris2",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris3",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris4",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris5",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris6",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris7",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 0 A_SpawnItemEx("DustPowerDebris8",random(-24,24),random(-24,24),random(0,72),random(-6,6),random(-6,6),random(-6,6))
TNT1 A 2
stop
}
}

actor DustSuctionWeak
{
PROJECTILE
radius 1
height 1
speed 0
damage (0)
+NOINTERACTION
States
{
Spawn:
TNT1 A 0
TNT1 A 2 ACS_ExecuteAlways(C_JAX_SUCKRECODE,0,500,10,2)
stop
}
}

actor DustSuctionStrong
{
PROJECTILE
radius 1
height 1
speed 0
damage (0)
+NOINTERACTION
States
{
Spawn:
TNT1 A 0
TNT1 A 2 ACS_ExecuteAlways(C_JAX_SUCKRECODE,0,250,10,6)
stop
}
}

actor DustPressLine
{
PROJECTILE
radius 8
height 8
+FLOORHUGGER
+THRUACTORS
+DONTREFLECT
speed 30
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 3 A_GiveToTarget("DustUltCooldown")
TNT1 A 3 A_SpawnItemEx("DustManPressStart",0,0,0,0,0,300,0,1)
goto Spawn+2
Death:
TNT1 A 0
stop
}
}

actor DustManPressStart
{
Radius 8
Height 8
scale 2.5
PROJECTILE
+DONTBLAST
+SKYEXPLODE
+DONTREFLECT
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 2
Death:
TNT1 A 0 A_SpawnItemEx("DustManPress", 0, 0, 0, 0, 0, -90, 0, 1, 0)
stop
}
}

actor DustManPress
{
Obituary "$OB_DUSTMAN4"
PROJECTILE
Radius 1
Height 1
scale 2.5
-NOGRAVITY
damage(0)
damagetype "DustmanUlt"
+THRUACTORS
+FORCEXYBILLBOARD 
+DONTREFLECT
speed 30
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DU4P I 1 A_Explode(500,100,0,0,100)
goto Spawn+2
Death:
DU4P IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII 0 A_SpawnItemEx("DustSmokeFX",40,0,0,random(20,30),0,random(0,6),random(0,359),1)
DU4P I 0 A_PlaySoundEx("weapon/dustslam","Body")
DU4P I 0 A_Quake(6,18,0,500)
DU4P I 0 A_Explode(500,100,0,0,100)
DU4P I 0 A_GiveToTarget("DustUltCooldown")
DU4P I 25
DU4P I 0 A_SpawnItemEx("RisingDustManPress",0,0,0,0,0,10)
stop
}
}

actor RisingDustManPress : DustManPress
{
+NOINTERACTION
+NOGRAVITY
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
DU4P I 100
stop
Death:
TNT1 A 0
stop
}
}

actor DustPowerDebris1 : BasicClientSide
{
-NOCLIP
-NOINTERACTION
reactiontime 64
gravity 2.0
States
{
Spawn:
DU4P J 0
goto loopit
loopit:
"####" "#" 0 ThrustThingZ(0,7,1,1)
"####" "#" 1 A_Countdown
loop
Death:
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
"####" "#" 1 A_SetTranslucent(0.0)
"####" "#" 1 A_SetTranslucent(1.0)
stop
}
}

actor DustPowerDebris2 : DustPowerDebris1
{
States
{
Spawn:
DU4P K 0
goto loopit
}
}

actor DustPowerDebris3 : DustPowerDebris1
{
States
{
Spawn:
DU4P L 0
goto loopit
}
}

actor DustPowerDebris4 : DustPowerDebris1
{
States
{
Spawn:
DU4P M 0
goto loopit
}
}

actor DustPowerDebris5 : DustPowerDebris1
{
States
{
Spawn:
DU4P N 0
goto loopit
}
}

actor DustPowerDebris6 : DustPowerDebris1
{
States
{
Spawn:
DU4P O 0
goto loopit
}
}

actor DustPowerDebris7 : DustPowerDebris1
{
States
{
Spawn:
DU4P P 0
goto loopit
}
}

actor DustPowerDebris8 : DustPowerDebris1
{
States
{
Spawn:
DU4P Q 0
goto loopit
}
}

actor DustSuckHitboxCreator : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_RailAttack(5,0,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",0)
TNT1 A 0 A_RailAttack(5,radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",0)
TNT1 A 0 A_RailAttack(5,-radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",0)

TNT1 A 0 A_RailAttack(5,0,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-15)
TNT1 A 0 A_RailAttack(5,radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-15)
TNT1 A 0 A_RailAttack(5,-radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-15)

TNT1 A 0 A_RailAttack(5,0,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",26)
TNT1 A 0 A_RailAttack(5,radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",26)
TNT1 A 0 A_RailAttack(5,-radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",26)

TNT1 A 0 A_RailAttack(5,0,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-43)
TNT1 A 0 A_RailAttack(5,radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-43)
TNT1 A 0 A_RailAttack(5,-radius,false,"none","none",RGF_SILENT,0,"DustSmokeFX2",0,0,96,0,0,0,"none",-43)
stop
}
}

Actor DustSmokeFX2 : BulletPuff
{
damagetype "DustVacuum"
renderstyle "none"
}

actor DustVacuumHitbox
{
Obituary "$OB_DUSTMAN3"
PROJECTILE
+NOEXPLODEFLOOR
species "DustManType"
+THRUSPECIES
Radius 1
Height 1
scale 2.5
speed 0
damage (0)
Damagetype "DustVacuum"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(5,96,0,0,96)
stop
}
}

actor DustVacuumProtect : PowerProtection
{
powerup.duration 3
damagefactor "DustVacuum", 0.0
}

Actor DustVacuumFXSpawner : FastProjectile
{
	PROJECTILE
	+SKYEXPLODE
	-DONTBLAST
	+DONTSPLASH
	+DONTREFLECT
	Speed 225//450
	Damage (0)
	radius 12
	height 12
		States
		{
		Spawn:
		TNT1 AA 0 A_GiveInventory("ProjectileCode")
		TNT1 A 1
		goto Death
		Crash:
		XDeath:
		Death:
		TNT1 A 0 A_Stop
		TNT1 A 1 A_CustomMissile("DustVacuumFX", 0, 0, 0, 0)
		stop
	}
}

Actor DustVacuumFX
{
	PROJECTILE
	+CLIENTSIDEONLY
	+DONTSPLASH
	-DONTBLAST
	//+NOINTERACTION
	-SOLID
	+NOGRAVITY
	height 5
	radius 5
	Scale 1.25
	alpha 1.0
	Speed 80
	reactiontime 17
		States
		{
		Spawn:
		TNT1 AA 0 A_GiveInventory("ProjectileFXCode")
		COSS B 0 A_FadeOut(0.01)
		COSS B 1 A_JumpIfCloser(60,"Death")
		COSS B 0 A_Countdown
		loop
		Death:
		TNT1 A 1
		stop
	}
}

actor DustUltCooldown : UltBuildCooldownGiver
{
Powerup.Duration 70
}

actor DustHeadSteamer : CustomInventory
{
States
{
Pickup:
TNT1 AA 0 A_SpawnItemEx("DustSmokeFX",random(0,20),0,random(62,76),0,0,random(1,2),random(0,359))
stop
}
}