//Music by Melody Man

Actor MadGrinder : TerminalArmorClass
{
Player.ScoreIcon "MADGMUGS"
player.startitem "BaseFlagPack", 1
player.displayname "MadGrinder"
player.soundclass "MadGrinderc"
player.morphweapon "RollerSlamBoss"
PainSound "weapon/mm7pain"
player.viewheight 114
projectilepassheight 160
player.forwardmove 0.95, 0.95
player.sidemove 0.93, 0.93
player.jumpz 12
renderstyle translucent
alpha 0.0
MaxStepHeight 32
MaxDropOffHeight 32
States
{
Spawn:
PLAY A 0
MGD1 B 0 A_JumpIfInventory("BaseCustomFlag2",1,"Spawn.NoSaw")
MGD1 B 1 A_JumpIf(z-floorz>0,"Jumping")
MGD1 A 0 A_JumpIfInventory("BaseCustomFlag2",1,"Spawn.NoSaw")
MGD1 A 1 A_JumpIf(z-floorz>0,"Jumping")
Goto Spawn+3
Spawn.NoSaw:
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto Spawn
MGD2 B 0 A_JumpIf(momx>1||momy>1||momx<-1||momy<-1,"See.NoSaw")
MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 A 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto Spawn+2
MGD2 A 0 A_JumpIf(momx>1||momy>1||momx<-1||momy<-1,"See.NoSaw")
MGD2 A 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
Goto Spawn.NoSaw+3

See:
MGD1 B 0 A_JumpIfInventory("BaseCustomFlag2",1,"See.NoSaw")
SeeB: MGD1 BBBBBB 1 A_JumpIf(z-floorz>0,"Jumping")
SeeC: MGD1 CCCCCC 1 A_JumpIf(z-floorz>0,"Jumping")
SeeD: MGD1 DDDDDD 1 A_JumpIf(z-floorz>0,"Jumping")
SeeE: MGD1 EEEEEE 1 A_JumpIf(z-floorz>0,"Jumping")
Goto Spawn+2
See.NoSaw:
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 B 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeB MGD2 B 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 C 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeC MGD2 C 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 D 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeD MGD2 D 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
MGD2 E 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto SeeE MGD2 E 1 A_JumpIf(z-floorz>0,"Jumping.NoSaw")
Goto Spawn.NoSaw+3

Jumping:
MGD1 I 0 A_JumpIfInventory("BaseCustomFlag2",1,"See.NoSaw")
MGD1 IJ 1 A_JumpIf(z-floorz<=0,"Spawn")
loop
Jumping.NoSaw:
MGD2 I 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto Jumping MGD2 I 1 A_JumpIf(z-floorz<=0,"Spawn.NoSaw")
MGD2 J 0 A_JumpIfInventory("BaseCustomFlag2",1,1) Goto Jumping MGD2 J 1 A_JumpIf(z-floorz<=0,"Spawn.NoSaw")
loop

Animation0:
Missile:
MGD1 AAA 1 A_JumpIfInventory("BaseCustomFlag2",1,"Missile.NoSaw")
Goto Spawn+2
Missile.NoSaw:
MGD2 AAA 1
Goto Spawn.NoSaw+3

Animation1:
RollerSlamA:
MGD1 KKK 1 A_JumpIfInventory("BaseCustomFlag2",1,"RollerSlamA.NoSaw")
Goto Spawn+2
RollerSlamA.NoSaw:
MGD2 KKK 1
Goto Spawn.NoSaw+3
Animation2:
RollerSlamB:
MGD1 LLL 1 A_JumpIfInventory("BaseCustomFlag2",1,"RollerSlamB.NoSaw")
Goto Spawn+2
RollerSlamB.NoSaw:
MGD2 LLL 1
Goto Spawn.NoSaw+3

Animation3:
MadBlasterA:
MGD1 FFF 1 A_JumpIfInventory("BaseCustomFlag2",1,"MadBlasterA.NoSaw")
Goto Spawn+2
MadBlasterA.NoSaw:
MGD2 FFF 1
Goto Spawn.NoSaw+3
Animation4:
MadBlasterB:
MGD1 GGG 1 A_JumpIfInventory("BaseCustomFlag2",1,"MadBlasterB.NoSaw")
Goto Spawn+2
MadBlasterB.NoSaw:
MGD2 GGG 1
Goto Spawn.NoSaw+3

Animation5:
MohawkSawA:
MGD1 MMM 1
Goto Spawn+2
Animation6:
MohawkSawB:
MGD1 NNN 1
Goto Spawn+2

Animation7:
InvisibleMadGrinder:
TNT1 AAA 1
wait

ClassPain:
MGD1 H 0 A_JumpIfInventory("BaseCustomFlag2",1,"ClassPain.NoSaw")
MGD1 HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
Goto Spawn+1
ClassPain.NoSaw:
MGD2 HHHHHHHHHH 2 A_SpawnItem("PainFX",0,3)
Goto Spawn+1

ClassDeath:
NOFX A 0 A_JumpIfInventory("BaseCustomFlag2",1,"ClassDeath.NoSaw")
NOFX A 0 A_SpawnItemEx("DeadMadGrinder",0,0,0,0,0,0,0,1)
NOFX A 20 ACS_ExecuteAlways(999,0,0)
NOFX A 1 A_CheckPlayerDone
wait
ClassDeath.NoSaw:
NOFX A 0 A_SpawnItemEx("DeadMadGrinder2",0,0,0,0,0,0,0,1)
NOFX A 20 ACS_ExecuteAlways(999,0,0)
NOFX A 1 A_CheckPlayerDone
wait
}
}

Actor DeadMadGrinder
{
Translation "192:192=93:93", "198:198=239:239"
+NOINTERACTION
Damage (0)
height 8
radius 8
scale 2.5
const int DEG = 36;
const int OFS = 128;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
MGD1 H 35
"####" "#" 1 A_Jump(256,"Death.Timer1")
Goto Death.Timer1
Death.Timer1:
"####" "#" 0 A_Quake(2,3,0,500) "####" "#" 0 A_PlaySoundEx("weapon/mm7explode","SoundSlot5")
"####" "#" 0 A_SpawnItemEx("HannyaNEDMissileFX",Random(-OFS,OFS),Random(-OFS,OFS),Random(0,OFS))
"####" "#" 12
"####" "#" 0 A_StopSoundEx("SoundSlot5")
"####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",4,"Death.Timer2")
loop
Death.Timer2:
"####" "#" 0 A_Quake(2,3,0,500) "####" "#" 0 A_PlaySoundEx("weapon/mm7explode","SoundSlot5")
"####" "#" 0 A_SpawnItemEx("HannyaNEDMissileFX",Random(-OFS,OFS),Random(-OFS,OFS),Random(0,OFS))
"####" "#" 9
"####" "#" 0 A_StopSoundEx("SoundSlot5")
"####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",10,"Death.Timer3")
loop
Death.Timer3:
"####" "#" 0 A_Quake(2,3,0,500) "####" "#" 0 A_PlaySoundEx("weapon/mm7explode","SoundSlot5")
"####" "#" 0 A_SpawnItemEx("HannyaNEDMissileFX",Random(-OFS,OFS),Random(-OFS,OFS),Random(0,OFS))
"####" "#" 6
"####" "#" 0 A_StopSoundEx("SoundSlot5")
"####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",20,"Death.Timer4")
loop
Death.Timer4:
"####" "#" 0 A_Quake(2,3,0,500) "####" "#" 0 A_PlaySoundEx("weapon/mm7explode","SoundSlot5")
"####" "#" 0 A_SpawnItemEx("HannyaNEDMissileFX",Random(-OFS,OFS),Random(-OFS,OFS),Random(0,OFS))
"####" "#" 3
"####" "#" 0 A_StopSoundEx("SoundSlot5")
"####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",40,"Death")
loop
Death:
TNT1 A 0 A_PlaySoundEx("mm7/dead","Auto")
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*1)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*2)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*3)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*4)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*5)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*6)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*7)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*8)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*9)
TNT1 A 0 A_SpawnItemEx("FakeDeathFXMM7",0,0,64,0,0,0,DEG*10)
TNT1 A 35 A_Quake(3,35,0,500)
stop
}
}

Actor DeadMadGrinder2 : DeadMadGrinder
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
MGD2 H 35
"####" "#" 1 A_Jump(256,"Death.Timer1")
Goto Death.Timer1
}
}

Actor DeadHannyaNED : DeadMadGrinder
{
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
HNYA V 35
"####" "#" 1 A_Jump(256,"Death.Timer1")
Goto Death.Timer1
}
}

Actor MadGrinderAmmoWatcher
{
+NOGRAVITY
+NOINTERACTION
Height 4
Radius 4
States
{
Spawn: 
TNT1 AA 0
//TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 1 A_JumpIfInTargetInventory("IsDead",1,"Death")  TNT1 A 0 A_GiveToTarget("MohawkSawAmmo",1)
TNT1 A 1 A_JumpIfInTargetInventory("IsDead",1,"Death")  TNT1 A 0 A_GiveToTarget("MohawkSawAmmo",1)
TNT1 A 0 A_JumpIfInTargetInventory("BaseCustomFlag1",1,"Spawn")
TNT1 A 0 A_GiveToTarget("Base56Ammo",1)
TNT1 A 0 A_GiveToTarget("BaseAltfireAmmo",1)
loop
Death:
TNT1 A 0
stop
}
}

Actor MadGrinderSawWatcher : MadGrinderAmmoWatcher
{
States
{
Spawn: 
TNT1 A 0
TNT1 A 1 A_JumpIfInTargetInventory("IsDead",1,"Death")
//A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("MohawkSawAmmo",350,"Spawn2")
TNT1 A 0 A_GiveToTarget("BaseCustomFlag2",1)
loop
Spawn2:
TNT1 A 0 A_TakeFromTarget("BaseCustomFlag2",1)
Goto Spawn
}
}

actor MadGrinderMetool
{
Translation "198:198=216:216", "192:192=4:4"
+NOCLIP
+FLOORHUGGER
+MISSILE
Height 8
Radius 8
Scale 2.5
States
{
Spawn:
TNT1 AA 0
TFOG AABBCC 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
METT DDDDEEEE 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
Spawn2:
METT BBBBBBBBBBBBBBBBBBBB 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("VCOnceMore",1,"Spawn3")
TNT1 A 0 A_SetAngle(Random(0.0,360.0))
loop
Spawn3:
TNT1 A 0 A_FaceTarget
Spawn3B:
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
METT B 1 A_JumpIfInTargetInventory("VCOnceMore",3,"Death")
loop
Death:
TNT1 A 1 A_Jump(256,"DeathA","DeathB")
wait
DeathA:
TNT1 A 0 A_PlaySound("weapon/mm7explode",0,0.5)
7EXP ABCDEF 2
stop
DeathB:
TNT1 A 0 A_SpawnItemEx("LaunchedMetool",0,0,32,Random(10,20),0,Random(10,20),Random(0,359),SXF_TRANSFERTRANSLATION)
stop
}
}

Actor LaunchedMetool
{
PROJECTILE
-NOGRAVITY
+BOUNCEONWALLS
+BOUNCEONCEILINGS
obituary "$OB_MADGRINDERMETOOL"
Gravity 1.0
Height 8
Radius 8
Scale 2.5
ReactionTime 40
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
M3T0 WXYZ 2 A_CountDown
Goto Spawn+2
Death:
TNT1 A 0 A_PlaySound("weapon/mm7explode",0,0.5)
TNT1 A 0 A_Explode(10,30,0,0,30)
7EXP ABCDEF 2 A_Stop
stop
}
}

actor MadGrinderSpawner
{
Translation "192:192=93:93", "198:198=239:239"
+NOINTERACTION
+DONTREFLECT
Height 8
Radius 8
Scale 2.5
var int User_Z;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_SetUserVar("User_Z",320)
TNT1 AA 1 A_Warp(AAPTR_TARGET,0,0,User_Z,0,24)
Spawn2:
MGD1 K 1 A_Warp(AAPTR_TARGET,0,0,User_Z,0,24)
TNT1 A 0 A_SetUserVar("User_Z",User_Z-32)
TNT1 A 0 A_JumpIf(User_Z<=0,"Death")
loop
Death:
TNT1 A 0 A_GiveToTarget("VCOnceMore",1)
MGD1 K 1 A_Warp(AAPTR_TARGET,0,0,User_Z,0,24)
stop
}
}

Actor RollerSlamBoss : VCBaseWeapon
{
weapon.ammotype "Base56Ammo"
weapon.ammotype2 "BaseAltfireAmmo"
Obituary "$OB_MADGRINDER1"
States
{
Ready:
TNT1 A 0
TNT1 A 0 SetPlayerProperty(0,1,4)
TNT1 A 0 ACS_ExecuteAlways(991,0,10882)
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",7)
TNT1 A 0 A_GiveInventory("InvProtection",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
TNT1 A 0 A_ChangeFlag("NOTELEFRAG",True)
TNT1 A 7
TNT1 A 0 A_PlaySound("misc/teleport2",0,0.7)
TNT1 AAAAAAA 0 A_SpawnItemEx("MadGrinderMetool",32*Random(2,10),0,0,0,0,0,Random(0,359))
TNT1 A 7
TNT1 A 0 A_PlaySound("misc/teleport2",0,0.7)
TNT1 AAAAAAA 0 A_SpawnItemEx("MadGrinderMetool",32*Random(2,10),0,0,0,0,0,Random(0,359))
TNT1 A 7
TNT1 A 0 A_PlaySound("misc/teleport2",0,0.7)
TNT1 AAAAAAA 0 A_SpawnItemEx("MadGrinderMetool",32*Random(2,10),0,0,0,0,0,Random(0,359))
TNT1 A 7
TNT1 A 0 A_PlaySound("misc/teleport2",0,0.7)
TNT1 AAAAAAA 0 A_SpawnItemEx("MadGrinderMetool",32*Random(2,10),0,0,0,0,0,Random(0,359))
TNT1 A 7
TNT1 A 0 A_PlaySound("misc/teleport2",0,0.7)
TNT1 AAAAAAA 0 A_SpawnItemEx("MadGrinderMetool",32*Random(2,10),0,0,0,0,0,Random(0,359))
TNT1 A 50 ACS_ExecuteAlways(991,0,10882)
TNT1 A 0 A_GiveInventory("VCOnceMore",1)
TNT1 A 0 A_PlaySoundEx("misc/hugequake2","Weapon")
TNT1 A 50 A_Quake(3,35,0,1000)
TNT1 A 0 A_SpawnItemEx("MadGrinderSpawner")
TNT1 A 11 Offset(0,-304)
TNT1 A 0 A_GiveInventory("ShadowVisible")
TNT1 A 0 ACS_NamedExecuteWithResult("VC_SetState",1)
MGDH A 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
MGDH A 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
MGDH A 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",1)
MGDH A 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
TNT1 A 0 A_Quake(3,70,0,1000)
TNT1 A 0 A_SpawnItemEx("MadGrinderIntroQuake")
TNT1 A 0 A_SpawnItemEx("MadGrinderIntroQuake2")
TNT1 A 0 A_GiveInventory("VCOnceMore",1)
TNT1 A 0 A_SpawnItemEx("RollerSlamShockWaver")
TNT1 A 0 A_PlaySound("weapon/WilyPressCrush",1,0.7)
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("RollerSlamRocks",Random(32,320),0,0,0,0,Random(6,18),Random(0,359))
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
MGDH A 0 SetPlayerProperty(0,0,3)
MGDH A 0 SetPlayerProperty(0,0,4)
TNT1 A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 A_GiveInventory("GravityRestore")
MGDH A 0 A_TakeInventory("VCOnceMore",999)
MGDH A 0 ACS_NamedExecuteWithResult("VC_SetState",0)
TNT1 A 0 A_SpawnItemEx("MadGrinderSawWatcher")
MGDH A 35 A_SpawnItemEx("MadGrinderAmmoWatcher")
MGDH A 0 A_TakeInventory("InvProtection",1)
MGDH A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_ChangeFlag("NOTELEFRAG",False)
MGDH A 0 A_SpawnItemEx("MadGrinderRollerSounder")
Goto Ready.Idle

Ready.Idle:
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.Idle.CanTF")
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.Start")
"####" "#" 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
loop

Ready.Idle.CanTF:
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1")
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.Start.CanTF")
"####" "#" 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
loop

Ready.Start:
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE")
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD")
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC")
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB")
"####" "#" 1 A_Jump(256,"Ready.Reset")
wait

Ready.Start.CanTF:
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF.CanTF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE.CanTF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD.CanTF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC.CanTF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB.CanTF")
"####" "#" 1 A_Jump(256,"Ready.Reset.CanTF")
wait

Ready.Reset:
"####" "#" 0 A_TakeInventory("CutterFlag",36)
"####" "#" 1 A_Jump(256,"Ready.MoveA")
wait

Ready.MoveA:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveA.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveA.Continue:
MGDH B 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveA.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB")
MGDH B 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveA.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB")
"####" "#" 1 A_Jump(256,"Ready.MoveA")
wait

Ready.MoveB:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveB.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveB.Continue:
MGDH C 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveB.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC")
MGDH C 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveB.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC")
"####" "#" 1 A_Jump(256,"Ready.MoveB")
wait

Ready.MoveC:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveC.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveC.Continue:
MGDH D 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveC.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD")
MGDH D 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveC.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD")
"####" "#" 1 A_Jump(256,"Ready.MoveC")
wait

Ready.MoveD:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveD.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveD.Continue:
MGDH E 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveD.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE")
MGDH E 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveD.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE")
"####" "#" 1 A_Jump(256,"Ready.MoveD")
wait

Ready.MoveE:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveE.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveE.Continue:
MGDH F 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveE.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF")
MGDH F 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveE.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF")
"####" "#" 1 A_Jump(256,"Ready.MoveE")
wait

Ready.MoveF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle")
wait
Ready.MoveF.Continue:
MGDH A 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveF.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",36,"Ready.Reset")
MGDH A 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIfInventory("MohawkSawAmmo",350,"Ready.MoveF.CanTF") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",36,"Ready.Reset")
"####" "#" 1 A_Jump(256,"Ready.MoveF")
wait

Ready.Reset.CanTF:
"####" "#" 0 A_TakeInventory("CutterFlag",36)
"####" "#" 1 A_Jump(256,"Ready.MoveA.CanTF")
wait

Ready.MoveA.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveA.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveA.CanTF.Continue:
MGDH B 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB.CanTF")
MGDH B 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"Ready.MoveB.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveA.CanTF")
wait

Ready.MoveB.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveB.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveB.CanTF.Continue:
MGDH C 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC.CanTF")
MGDH C 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"Ready.MoveC.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveB.CanTF")
wait

Ready.MoveC.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveC.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveC.CanTF.Continue:
MGDH D 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD.CanTF")
MGDH D 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"Ready.MoveD.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveC.CanTF")
wait

Ready.MoveD.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveD.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveD.CanTF.Continue:
MGDH E 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE.CanTF")
MGDH E 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"Ready.MoveE.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveD.CanTF")
wait

Ready.MoveE.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveE.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveE.CanTF.Continue:
MGDH F 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF.CanTF")
MGDH F 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"Ready.MoveF.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveE.CanTF")
wait

Ready.MoveF.CanTF:
"####" "#" 0 A_JumpIfInventory("MadGrinderIsMoving",1,"Ready.MoveF.CanTF.Continue")
"####" "#" 1 A_Jump(256,"Ready.Idle.CanTF")
wait
Ready.MoveF.CanTF.Continue:
MGDH A 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",36,"Ready.Reset.CanTF")
MGDH A 1 A_GiveInventory("MadGrinderReadyPickUp",1) "####" "#" 0 A_JumpIfInventory("UltAttackFlag",1,"UltimateAttack")
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("VC_CheckBtn",3)==3,"User1") "####" "#" 0 A_GiveInventory("CutterFlag",1)
"####" "#" 0 A_JumpIfInventory("CutterFlag",36,"Ready.Reset.CanTF")
"####" "#" 1 A_Jump(256,"Ready.MoveF.CanTF")
wait

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
MGDH A 1 A_Lower
loop
Select:
TNT1 A 0 ACS_ExecuteAlways(998,0,10882)
Select2:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
MGDH A 1 A_Raise
loop

Fire:
"####" "#" 0 A_GiveInventory("BaseCustomFlag1",1)
"####" "#" 0 A_GiveInventory("RollerSlamSlowDown",1)
"####" "#" 0 A_JumpIf(z-floorz>8,"Fire.Air")
Goto Fire.Ground
Fire.Ground:
"####" "#" 0 A_PlaySoundEx("misc/sharktorpedo","SoundSlot5")
"####" "#" 0 A_PlaySoundEx("weapons/mm1/superarmload","Voice")
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 0 A_Quake(4,16,0,450)
"####" "#" 0 A_TakeInventory("Base56Ammo",14)
"####" "#" 0 A_SpawnItemEx("RollerSlamQuaker")
"####" "#" 0 A_SpawnItemEx("RollerSlamShockWaver")
"####" "#" 0 A_SpawnItemEx("RollerSlamDamager",48,0,32)
"####" "#" 0 A_PlaySound("weapon/WilyPressCrush",1,0.7)
"####" "####################" 0 A_SpawnItemEx("RollerSlamRocks",Random(32,320),0,0,0,0,Random(6,18),Random(0,359))
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 0 A_Refire("Fire.Start")
Goto Fire.Finish
Fire.Air:
"####" "#" 0 A_PlaySoundEx("misc/sharktorpedo","SoundSlot5")
"####" "#" 0 A_PlaySoundEx("weapons/mm1/superarmload","Voice")
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 0 A_TakeInventory("Base56Ammo",14)
"####" "#" 0 A_PlaySound("weapon/GutsmanToss","Weapon")
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp1",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp2",1)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp3",1)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp4",1)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp5",1)
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2) "####" "#" 0 A_GiveInventory("AirRollerSlamPickUp6",1)
"####" "#" 0 A_WeaponReady(WRF_NOFIRE)
"####" "########" 1 ACS_NamedExecuteWithResult("VC_SetState",0)
Fire.Finish:
"####" "#" 0 A_TakeInventory("BaseCustomFlag1",1)
"####" "#" 0 A_TakeInventory("RollerSlamSlowDown",1)
Goto Ready.Idle

Altfire:
"####" "#" 0 A_GunFlash("Flash.Blaster")
"####" "##" 1
"####" "##" 1
Altfire.Start:
"####" "#" 0 A_GunFlash("Flash.Blaster.Start")
"####" "#" 0 A_JumpIfInventory("BaseAltfireAmmo",7,1)
Goto Altfire.Finish
"####" "####" 1
"####" "##" 1
"####" "##" 1
"####" "####" 1
"####" "#" 0 A_Refire("Altfire.Start")
Altfire.Finish:
"####" "#" 0 A_GunFlash("Flash.Blaster.Finish")
"####" "##" 1
"####" "##" 1
Goto Ready.Idle

User1:
"####" "#" 0 A_GunFlash("Flash.SawBlade")
"####" "####" 1
"####" "##########" 1
"####" "#" 10
Goto Ready.Idle

UltimateAttack:
"####" "#" 0 A_PlaySoundEx("classes/ultimateactivation","Auto") "####" "#" 0 ACS_NamedExecuteAlways("VC_UltimateText",0,138)
"####" "#" 0 A_GiveInventory("PowerUltBuildCooldown",1) "####" "#" 0 A_TakeInventory("UltAttackFlag",1)
"####" "#" 0 A_ChangeFlag("INVULNERABLE",True) "####" "#" 0 A_GiveInventory("InvProtection",1)
"####" "#" 0 A_GiveInventory("BaseCustomFlag1",1)
"####" "#" 1 A_CheckFloor("UltimateAttack.Start")
wait
UltimateAttack.Start:
"####" "#" 0 SetPlayerProperty(0,1,4)
"####" "#" 0 A_SpawnItemEx("TerminatorUltimateAlarm")
"####" "#" 0 A_PlaySoundEx("misc/sharktorpedo","SoundSlot5")
"####" "#" 0 A_PlaySoundEx("weapons/mm1/superarmload","Voice")
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-192)ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 0 A_Quake(4,16,0,450)
"####" "#" 0 A_SpawnItemEx("MadGrinderIntroQuakeUlt")
"####" "#" 0 A_SpawnItemEx("MadGrinderIntroQuake2")
"####" "#" 0 A_PlaySound("weapon/WilyPressCrush",1,0.7)
"####" "####################" 0 A_SpawnItemEx("RollerSlamRocks",Random(32,320),0,0,0,0,Random(6,18),Random(0,359))
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 0 A_GiveInventory("VCOnceMore",1)
"####" "#" 0 A_JumpIfInventory("VCOnceMore",3,1)
Goto UltimateAttack.Start+2
"####" "###############" 1 Offset(0,31)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "##" 1 Offset(0,-24)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "##" 1 Offset(0,-136)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "##" 1 Offset(0,-248)ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 0 A_PlaySoundEx("misc/gutsgboost","Weapon")
"####" "#" 0 A_PlaySoundEx("weapon/pchargelong","Voice")
UltimateAttack.Waiting:
MGDH A 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH A 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH B 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH B 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH C 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH C 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH D 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH D 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH E 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH E 1 Offset(0,-303)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH F 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
MGDH F 1 Offset(0,-305)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1) "####" "#" 0 A_Quake(2,3,0,450)
"####" "#" 0 A_GiveInventory("VCOnceMore",1) "####" "#" 0 A_JumpIfInventory("VCOnceMore",70,"UltimateAttack.Finish")
loop
UltimateAttack.Finish:
"####" "#" 0 A_JumpIfInventory("CutterFlag",30,"UltimateAttack.FinishF")
"####" "#" 0 A_JumpIfInventory("CutterFlag",24,"UltimateAttack.FinishE")
"####" "#" 0 A_JumpIfInventory("CutterFlag",18,"UltimateAttack.FinishD")
"####" "#" 0 A_JumpIfInventory("CutterFlag",12,"UltimateAttack.FinishC")
"####" "#" 0 A_JumpIfInventory("CutterFlag",6,"UltimateAttack.FinishB")
Goto UltimateAttack.FinishA
UltimateAttack.FinishA: MGDH A 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.FinishB: MGDH B 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.FinishC: MGDH C 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.FinishD: MGDH D 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.FinishE: MGDH E 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.FinishF: MGDH F 0 Offset(0,-304)ACS_NamedExecuteWithResult("VC_SetState",1) Goto UltimateAttack.Finish.End
UltimateAttack.Finish.End:
"####" "#" 1 Offset(0,-304)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-248)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-192)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",1)
"####" "#" 1 Offset(0,-136)ACS_ExecuteAlways(991,0,10883) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-80)ACS_ExecuteAlways(991,0,10884) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 1 Offset(0,-24)ACS_ExecuteAlways(991,0,10882) "####" "#" 0 ACS_NamedExecuteWithResult("VC_SetState",2)
"####" "#" 0 A_Quake(4,32,0,450)
"####" "#" 0 A_SpawnItemEx("RollerSlamShockWaver")
"####" "#" 0 A_SpawnItemEx("MadGrinderIntroQuakeUlt")
"####" "#" 0 A_SpawnItemEx("MadGrinderIntroQuake2")
"####" "#" 0 A_PlaySound("weapon/WilyPressCrush",1,0.7)
"####" "#" 0 A_SpawnItemEx("HannyaNEDStart",0,0,32)
"####" "####################" 0 A_SpawnItemEx("RollerSlamRocks",Random(32,320),0,0,0,0,Random(6,18),Random(0,359))
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 1 Offset(0,30)ACS_NamedExecuteWithResult("VC_SetState",0) "####" "#" 1 Offset(0,34)ACS_NamedExecuteWithResult("VC_SetState",0)
"####" "#" 0 A_ChangeFlag("INVULNERABLE",False) "####" "#" 0 A_TakeInventory("InvProtection",1)
"####" "#" 0 A_TakeInventory("BaseCustomFlag1",1)
"####" "#" 0 SetPlayerProperty(0,0,4) "####" "#" 0 A_TakeInventory("VCOnceMore",999)
"####" "#" 0 A_SpawnItemEx("MadGrinderUltWatcher")
"####" "#" 0 A_TakeInventory("UltAttackFlag",1)
Goto Ready.Idle

Flash.Blaster:
TNT1 A 0 A_GiveInventory("BaseCustomFlag1",1)
TNT1 A 0 A_PlaySoundEx("misc/door","Weapon")
MGDH GH 1 ACS_NamedExecuteWithResult("VC_SetState",3)
MGDH IJ 1 ACS_NamedExecuteWithResult("VC_SetState",4)
Flash.Blaster.Start:
MGDH KKKK 1 ACS_NamedExecuteWithResult("VC_SetState",4)
TNT1 A 0 A_PlaySoundEx("weapon/firec","SoundSlot5")
TNT1 A 0 A_PlaySoundEx("weapon/flameblastfire","SoundSlot6")
TNT1 A 0 A_PlaySoundEx("weapons/mm2/atomicfirefire","SoundSlot7")
TNT1 A 0 A_FireCustomMissile("MadBlasterShot",0,0,0,72)
TNT1 A 0 A_TakeInventory("BaseAltfireAmmo",7)
MGDH LM 1 ACS_NamedExecuteWithResult("VC_SetState",3)
MGDH NO 1 ACS_NamedExecuteWithResult("VC_SetState",4)
MGDH KKKK 1 ACS_NamedExecuteWithResult("VC_SetState",4)
Flash.Blaster.Finish:
TNT1 A 0 A_PlaySoundEx("misc/door","Weapon")
MGDH JI 1 ACS_NamedExecuteWithResult("VC_SetState",4)
MGDH HG 1 ACS_NamedExecuteWithResult("VC_SetState",3)
TNT1 A 0 A_TakeInventory("BaseCustomFlag1",1)
stop

Flash.SawBlade:
TNT1 A 0 A_PlaySoundEx("weapon/NeedleSARDakka","Weapon")
MGDH PQ 1 ACS_NamedExecuteWithResult("VC_SetState",5) MGDH RS 1 ACS_NamedExecuteWithResult("VC_SetState",6)
MGDH TSTSTSTSTS 1 ACS_NamedExecuteWithResult("VC_SetState",0)
TNT1 A 0 A_StopSoundEx("Voice")
TNT1 A 0 A_TakeInventory("MohawkSawAmmo",350)
TNT1 A 0 A_FireCustomMissile("MohawkSawBlade",0,0,0,72)
MGDH A 10 ACS_NamedExecuteWithResult("VC_SetState",0)
stop

EndFlash:
TNT1 A 0
stop
}
}

Actor MadGrinderIntroQuake : QuakeDamage
{
Obituary "$OB_MADGRINDER4"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(7,556,0,0,556)
stop
}
}

Actor MadGrinderIntroQuakeUlt : QuakeDamage
{
Obituary "$OB_MADGRINDER4"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(7,1556,0,0,1556)
stop
}
}

Actor MadGrinderIntroQuake2 : QuakeDamage
{
Obituary "$OB_MADGRINDER2"
damageType "MadGrinder"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(200,100,0,0,100)
stop
}
}

Actor MadGrinderReadyPickUp : CustomInventory
{
const int XOFS = 32;
const int YOFS = 32;
const int ZOFS = 32;
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz<8,"PickUp2.Ground")
Goto PickUp2.Air

PickUp2.Ground:
TNT1 A 0 ACS_NamedExecuteWithResult("Mad_Grinder_CheckBtn")
TNT1 A 0 A_JumpIfInventory("MadGrinderIsMoving",1,1)
Goto PickUp3
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 0,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS*-1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS*-2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 0,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS*-1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS*-2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 2,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 1,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS* 0,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS*-1,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS,YOFS*-2,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 2,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 1,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS* 0,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS*-1,ZOFS* 2,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox",XOFS* 2,YOFS*-2,ZOFS* 2,momx,momy,momx)
Goto PickUp3

PickUp2.Air:
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox2",0,0,0,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox2",XOFS/2,0,0,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox2",-XOFS/2,0,0,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox2",0,YOFS/2,0,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox2",0,-YOFS/2,0,momx,momy,momx)
Goto PickUp3

PickUp3:
TNT1 A 0 A_WeaponReady(WRF_NOPRIMARY*CallACS("VC_AmmoCheck",1,14)|WRF_NOSECONDARY*CallACS("VC_AmmoCheck",3,14))
stop
}
}

Actor MadGrinderMovementPickUp : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("MadGrinderIsMoving",1)
stop
}
}

Actor MadGrinderIsMoving : Powerup
{
    powerup.duration 2
}

Actor MadGrinderRollerSounder
{
+NOGRAVITY
+NOINTERACTION
Height 1
Radius 1
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 8
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("MadGrinderIsMoving",1,1)
loop
TNT1 A 0 A_GiveToTarget("GrinderMoveSounder")
loop

Death:
TNT1 A 0
stop
}
}

Actor RoadRollerHitBox
{
PROJECTILE
-NOBLOCKMAP
+DONTBLAST
+DONTSPLASH
+DONTREFLECT
damagetype "MadGrinder"
Obituary "$OB_MADGRINDER1"
damage (12)
Speed 0
Radius 32
Height 32
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
}
}

Actor RoadRollerHitBox2 : RoadRollerHitBox
{
damagetype "MadGrinder2"
Obituary "$OB_MADGRINDER2"
damage (10)
}

Actor RoadRollerProtect : PowerProtection
{
	Powerup.Duration 3
	DamageFactor "MadGrinder", 0.0
}

Actor RoadRollerProtect2 : PowerProtection
{
	Powerup.Duration 1
	DamageFactor "MadGrinder2", 0.0
}

Actor RollerSlamSlowDown : PowerSpeed
{
+POWERSPEED.NOTRAIL
powerup.duration -999
Speed 0.50
}

Actor RollerSlamDamager
{
PROJECTILE
Damagetype "MadGrinderMain"
Obituary "$OB_MADGRINDER3"
Radius 1
Height 1
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(45,96,0)
stop
}
}

actor RollerSlamFlinger
{
//+SERVERSIDEONLY
PROJECTILE
+NOINTERACTION
+NOCLIP
+DONTBLAST
damage 0
radius 1
height 1
speed 0
var int user_force;
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("CannotBeMoved",1,"Death")
TNT1 A 0 A_SetUserVar("user_force",-30)
Spawn2:
TNT1 A 0 A_TransferPointer(AAPTR_TARGET,AAPTR_DEFAULT,AAPTR_TARGET,AAPTR_TRACER) //target's target to self's tracer
TNT1 A 0 A_FaceTracer
TNT1 A 0 ThrustThing(angle*256/360,user_force,1,ACS_ExecuteWithResult(257,0))
stop
Death:
TNT1 A 0
stop
}
}

Actor RollerSlamQuaker
{
PROJECTILE
+NOCLIP
+FLOORHUGGER
+NOINTERACTION
Height 1
Radius 1
var int User_Turn;
var int User_X_Ofs;
var int User_Degrees;
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("User_Turn",0)
TNT1 A 0 A_SetUserVar("User_X_Ofs",0)
TNT1 A 0 A_SetUserVar("User_Degrees",0)
TNT1 A 0 A_SpawnItemEx("RollerSlamQuakeExplode",User_X_Ofs,0,0,0,0,0,User_Degrees+User_Turn,SXF_TRANSFERPOINTERS)
TNT1 A 0 A_SetUserVar("User_X_Ofs",User_X_Ofs+32)
Spawn2:
TNT1 A 0 A_SpawnItemEx("RollerSlamQuakeExplode",User_X_Ofs,0,0,0,0,0,User_Degrees+User_Turn,SXF_TRANSFERPOINTERS)
TNT1 A 0 A_SetUserVar(User_Degrees,User_Degrees+18)
TNT1 A 0 A_JumpIf(user_degrees>=360,"Reset")
TNT1 A 1 A_JumpIf(true,"Spawn2")
wait
Reset:
TNT1 A 0 A_SetUserVar("User_Turn",User_Turn+45)
TNT1 A 0 A_SetUserVar("User_Degrees",0)
TNT1 A 0 A_SetUserVar("User_X_Ofs",User_X_Ofs+32)
TNT1 A 0 A_JumpIf(User_X_Ofs>=480,"End")
Goto Spawn2
End:
TNT1 A 0
stop
}
}

Actor RollerSlamQuakeExplode
{
PROJECTILE
-NOBLOCKMAP
+DONTBLAST
+DONTREFLECT
+THRUSPECIES
Damagetype "MadGrinderMain2"
Obituary "$OB_MADGRINDER4"
species "DustManType"
damage (10)
Radius 32
Height 32
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
}
}

Actor RollerSlamQuakeProtect : PowerProtection
{
	Powerup.Duration 5
	DamageFactor "MadGrinderMain2", 0.0
}

Actor RollerSlamShockWaver : RollerSlamQuaker
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetUserVar("User_Degrees",0)
Spawn2:
TNT1 A 0 A_SpawnItemEx("RollerSlamShockWave",0,0,0,40,0,0,User_Degrees,SXF_TRANSFERPOINTERS)
TNT1 A 0 A_SetUserVar(User_Degrees,User_Degrees+18)
TNT1 A 0 A_JumpIf(user_degrees>=360,"End")
TNT1 A 1 A_JumpIf(true,"Spawn2")
wait
}
}

actor RollerSlamShockWave
{
PROJECTILE
Damage(0)
Height 8
Radius 8
scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
QUAK A 10
stop
}
}

actor RollerSlamRocks : ThorSlamRocks
{
Translation"8:8=0:0", "46:46=94:94", "208:208=87:87"
-SOLID
Bouncecount 1
Gravity 1.0
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
POWS B 2
POWS B 0 A_ChangeFlag("NOCLIP",False)
loopit:
POWS B 2 A_JumpIf(z-floorz<=0,"Death")
loop
}
}

Actor MadBlasterShot
{
PROJECTILE
Obituary "$OB_MADGRINDER5"
damagetype "MadGrinderAlt"
+NOCLIP
Damage (24)
Speed 40
Height 12
Radius 6
Scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 2 A_ChangeFlag("NOCLIP",0)
MGDR ABC 4
Goto Spawn+4
Death:
TNT1 A 1 A_CheckFloor(1)
stop
TNT1 A 0 A_SpawnItemEx("MadBlasterFlame")
stop
}
}

actor MadBlasterFlame
{
Translation "183:183=216:216", "42:42=210:210", "248:248=211:211"
PROJECTILE
-NOGRAVITY
+NOEXPLODEFLOOR
Obituary "$OB_MADGRINDER6"
damagetype "MadGrinderAlt2"
damage(1)
radius 16
height 20
scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
TNT1 A 0 A_PlaySoundEx("misc/sunstarwrathpillar","Auto")
FLAF GHIJ 1 A_CheckFloor("Burn")
Goto Spawn+3
Burn:
FLAF G 0 A_SpawnItemEx("OilPitIgnite",0,0,8)
FLAF GHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJGHIJ 2 A_Stop
stop
}
}

actor MohawkSawBlade
{
PROJECTILE
-NOGRAVITY
+RIPPER
+SKYEXPLODE
+DONTREFLECT
+STEPMISSILE
+NOEXPLODEFLOOR
+NOCLIP
damagetype "MadGrinderTF"
Obituary "$OB_MADGRINDER7"
Maxstepheight 32
Damage (0)
Speed 30
radius 4
height 4
scale 2.5
ReactionTime 140
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
Spawn2:
TNT1 A 0 A_ChangeFlag("NOCLIP",0)
MGDR D 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land")
MGDR E 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land") TNT1 A 0 A_PlaySound("weapon/topspin",1)
MGDR F 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land")
MGDR G 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land") TNT1 A 0 A_PlaySound("weapon/topspin",1)
loop

Land:
TNT1 A 0 A_PlaySoundEx("weapon/ringboomerang","Weapon")
TNT1 AAAAAAAAAA 0 A_SpawnItemEx("CutImpactDot",0,0,random(14,18),random(36,48),0,random(-4,4),random(160,220),1)
TNT1 A 0 A_ChangeVelocity(1,0,0,CVF_RELATIVE|CVF_REPLACE)
TNT1 A 0 ThrustThingZ(0,0,0,1)
MGDR DE 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_scaleVelocity(2.0) TNT1 A 0 A_PlaySound("weapon/topspin",1)//2 
MGDR FG 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_scaleVelocity(2.0) TNT1 A 0 A_PlaySound("weapon/topspin",1)//4
MGDR DE 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_scaleVelocity(2.0) TNT1 A 0 A_PlaySound("weapon/topspin",1)//8
MGDR FG 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_scaleVelocity(2.0) TNT1 A 0 A_PlaySound("weapon/topspin",1)//16
MGDR DE 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_scaleVelocity(2.0) TNT1 A 0 A_PlaySound("weapon/topspin",1)//32
MGDR FG 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 AA 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_scaleVelocity(1.2) TNT1 A 0 A_PlaySound("weapon/topspin",1)//42
LoopHold:
MGDR D 1 A_JumpIf(z-floorz>0,"Air2") TNT1 A 0 A_CountDown TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_SpawnItemEx("MohawkSawBladeDamager")
TNT1 AA 0 A_SpawnItemEx("CutImpactDot",0,0,random(8,11),random(36,48),0,random(-4,4),random(160,220),1)
MGDR E 1 A_JumpIf(z-floorz>0,"Air2") TNT1 A 0 A_CountDown TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_SpawnItemEx("MohawkSawBladeDamager")
TNT1 AA 0 A_SpawnItemEx("CutImpactDot",0,0,random(8,11),random(36,48),0,random(-4,4),random(160,220),1) TNT1 A 0 A_PlaySound("weapon/topspin",1)
MGDR F 1 A_JumpIf(z-floorz>0,"Air2") TNT1 A 0 A_CountDown TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_SpawnItemEx("MohawkSawBladeDamager")
TNT1 AA 0 A_SpawnItemEx("CutImpactDot",0,0,random(8,11),random(36,48),0,random(-4,4),random(160,220),1)
MGDR G 1 A_JumpIf(z-floorz>0,"Air2") TNT1 A 0 A_CountDown TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_SpawnItemEx("MohawkSawBladeDamager")
TNT1 AA 0 A_SpawnItemEx("CutImpactDot",0,0,random(8,11),random(36,48),0,random(-4,4),random(160,220),1) TNT1 A 0 A_PlaySound("weapon/topspin",1)
loop

Air2:
MGDR D 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land2")
MGDR E 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land2") TNT1 A 0 A_PlaySound("weapon/topspin",1)
MGDR F 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land2")
MGDR G 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_CheckFloor("Land2") TNT1 A 0 A_PlaySound("weapon/topspin",1)
loop

Land2:
TNT1 A 0 A_PlaySoundEx("weapon/ringboomerang","Weapon")
TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("CutImpactDot",0,0,random(14,18),random(36,48),0,random(-4,4),random(160,220),1)
TNT1 A 0 A_ChangeVelocity(48,0,0,CVF_RELATIVE|CVF_REPLACE)
TNT1 A 0 ThrustThingZ(0,0,0,1)
Goto LoopHold

Death:
TNT1 A 0 A_SpawnItemEx("MohawkSawBlade2",0,0,0,30,0,18,180,1)
stop

End:
TNT1 AAAAA 0 A_SpawnItemEx("HannyaNEDMissileFX",0,0,0,Random(2,6),0,Random(-5,5),Random(0,359))
stop
}
}

actor MohawkSawBlade2 : MohawkSawBlade
{
+BOUNCEONCEILINGS
+BOUNCEONWALLS
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode")
Spawn2:
MGDR D 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_JumpIf(Momz<=0,"Death")
MGDR E 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_JumpIf(Momz<=0,"Death") TNT1 A 0 A_PlaySound("weapon/topspin",1)
MGDR F 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_JumpIf(Momz<=0,"Death")
MGDR G 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_CountDown
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"End") TNT1 A 0 A_JumpIf(Momz<=0,"Death") TNT1 A 0 A_PlaySound("weapon/topspin",1)
loop
Death:
TNT1 A 0 A_SpawnItemEx("ReturningMohawkSawBlade",0,0,0,0,0,0,0,1)
stop
}
}

actor ReturningMohawkSawBlade
{
PROJECTILE
+MISSILE
+NOCLIP
+NOINTERACTION
+THRUSPECIES
damagetype "MadGrinderTF"
Obituary "$OB_MADGRINDER7"
species "MadGrinderSaw"
damage (0)
speed 40
radius 8
height 8
Scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_FaceTarget
MGDR D 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_JumpIfCloser(64,"End") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
MGDR E 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_JumpIfCloser(64,"End") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death") TNT1 A 0 A_PlaySound("weapon/topspin",1)
MGDR F 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_JumpIfCloser(64,"End") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
MGDR G 1 A_SpawnItemEx("MohawkSawBladeDamager") TNT1 A 0 A_JumpIfCloser(64,"End") TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death") TNT1 A 0 A_PlaySound("weapon/topspin",1)
TNT1 A 0 A_CustomMissile("ReturningMohawkSawBlade",0,0)
stop
End:
TNT1 A 0 A_PlaySoundEx("weapon/adapterreturn","Voice")
TNT1 A 1 A_GiveToTarget("MohawkSawAmmo",350)
TNT1 A 0 A_StopSoundEx("Weapon")
stop
Death:
TNT1 AAAAA 0 A_SpawnItemEx("HannyaNEDMissileFX",0,0,0,Random(2,6),0,Random(-5,5),Random(0,359))
stop
}
}

actor MohawkSawBladeDamager
{
PROJECTILE
+RIPPER
damagetype "MadGrinderTF"
Obituary "$OB_MADGRINDER7"
damage (10)
radius 24
height 48
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
}
}

Actor MohawkSawProtect : PowerProtection
{
	Powerup.Duration 2
	DamageFactor "MadGrinderTF", 0.0
}


Actor MohawkSawAmmo : Inventory
{
inventory.amount 1
inventory.maxamount 350
}

actor HannyaNEDEndTrigger : Powerup
{
    powerup.duration -4
}


actor HannyaNEDStart
{
PROJECTILE
+SKYEXPLODE
+THRUACTORS
+DOOMBOUNCE
BounceFactor 1.0
BounceCount 99
Damagetype "Searchman"
Obituary "$OB_SEARCHMAN1"
Radius 8
Height 8
scale 2.5
States
{
Spawn:
TNT1 AA 0
TNT1 AAAAAAA 1 A_ChangeVelocity(15,0,0,CVF_RELATIVE|CVF_REPLACE)
Goto Death

Death:
TNT1 A 0 A_SpawnItemEx("HannyaNED",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS)
stop
}
}

actor HannyaNED
{
Translation "198:198=194:194", "192:192=4:4"
+DONTBLAST
+DOOMBOUNCE
-BOUNCEONACTORS
-BOUNCEONFLOORS
+STANDSTILL
+MISSILE
+HEXENBOUNCE
+RIPPER
+NOGRAVITY
+LOOKALLAROUND
+SEEKERMISSILE
+NOTARGETSWITCH
+NOEXPLODEFLOOR
+DONTREFLECT
WallBounceFactor 1.0
Damage(0)
height 8
radius 8
scale 2.5
const int HGT = 160;
const int RNG = 300;
var int User_Ofs;
States
{
Spawn:
TNT1 A 0
TFOG DDEEFF 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
HNY2 DEFDEFDEFDEFDEF 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
HNY2 ABCABCABCABCABC 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_PlaySoundEx("misc/terraclick","voice")
HNYA ABCABCABCABCABC 1 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
HannyaNEDLook:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 AA 0 A_SeekerMissile(0,0,SMF_LOOK,256) TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_PROJECTILE)
HNYA A 1 A_ChangeVelocity(7,0,momz,CVF_REPLACE|CVF_RELATIVE) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 AA 0 A_SeekerMissile(0,0,SMF_LOOK,256) TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_PROJECTILE)
HNYA B 1 A_ChangeVelocity(7,0,momz,CVF_REPLACE|CVF_RELATIVE) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 AA 0 A_SeekerMissile(0,0,SMF_LOOK,256) TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_PROJECTILE)
HNYA C 1 A_ChangeVelocity(7,0,momz,CVF_REPLACE|CVF_RELATIVE) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_GiveInventory("VCOnceMore",1)
TNT1 A 0 A_JumpIfInventory("VCOnceMore",40,"Reposition")
loop
Reposition:
TFOG FFEE 1 A_Stop
TNT1 A 0 A_PlaySoundEx("misc/teleport2","Auto")
TNT1 AAAA 1 A_Warp(AAPTR_TARGET,0,0,0,0,24)
TFOG EEFF 1 A_Stop
TNT1 A 0 A_TakeInventory("VCOnceMore",99)
Goto HannyaNEDLook
Missile:
TNT1 A 0 A_TakeInventory("VCOnceMore",99)
TNT1 A 0 A_JumpIfTracerCloser(RNG*1,"FireLaser")
TNT1 A 0 A_JumpIfTracerCloser(RNG*2,"FireBomb")
Goto FireMissile
FireMissile:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_FaceTracer(0,0) HNYA A 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA B 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA C 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",10,1)
loop
TNT1 A 0 A_FaceTracer(0,0)
TNT1 A 0 A_PlaySoundEx("weapon/magnetmissile","Body")
TNT1 A 0 A_PlaySoundEx("weapon/napalmrocket", "Weapon")
TNT1 A 0 A_CustomMissile("HannyaNEDMissile",48,0,0,CMF_AIMDIRECTION,pitch)
TNT1 A 0 A_TakeInventory("CutterFlag",10)
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
Goto HannyaNEDLook
FireLaser:
TNT1 A 0 A_FaceTracer(0,0)
TNT1 A 0 A_SetUserVar("User_Ofs",-45)
TNT1 A 0 A_GiveInventory("CutterFlag",2)
TNT1 A 0 A_PlaySoundEx("weapon/lshot","Weapon")
FireLaserHold1:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_FaceTracer(0,0) HNYA A 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs+5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX1",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_FaceTracer(0,0) HNYA B 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs+5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX2",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_FaceTracer(0,0) HNYA C 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs+5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX3",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_JumpIf(User_Ofs>=45,1)
loop
FireLaserHold2:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_FaceTracer(0,0) HNYA A 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs-5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX1",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_FaceTracer(0,0) HNYA B 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs-5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX2",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_FaceTracer(0,0) HNYA C 1 A_Stop TNT1 A 0 A_SetUserVar("User_Ofs",User_Ofs-5) TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_CustomMissile("HannyaNEDLaser",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs) TNT1 A 0 A_CustomMissile("HannyaNEDLaserFX3",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_CustomMissile("HannyaNEDLaserExplosion",HGT,0,0,CMF_AIMDIRECTION,pitch+User_Ofs)
TNT1 A 0 A_JumpIf(User_Ofs<=-45,1)
loop
TNT1 A 0 A_TakeInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",1,"FireLaserHold1")
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
Goto HannyaNEDLook
FireBomb:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_PlaySoundEx("misc/door","Auto")
TNT1 A 0 A_FaceTracer(0,0) HNYA D 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA E 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA F 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA D 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA E 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA F 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA G 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA H 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA I 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA G 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA H 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA I 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA G 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA H 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA I 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_PlaySoundEx("misc/door","Auto")
TNT1 A 0 A_FaceTracer(0,0) HNYA J 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA K 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA L 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA J 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA K 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA L 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
HannyaBombHold:
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_PlaySoundEx("weapon/wrapfire","Weapon")
TNT1 A 0 A_PlaySoundEx("misc/sharktorpedo","Body")
TNT1 A 0 A_CustomMissile("HannyaNEDBomb",160,-48,0,CMF_AIMDIRECTION,pitch)
TNT1 A 0 A_FaceTracer(0,0) HNYA P 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA Q 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA R 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA P 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA Q 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA R 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("HannyaNEDEndTrigger",1,"End")
TNT1 A 0 A_PlaySoundEx("weapon/wrapfire","Weapon")
TNT1 A 0 A_PlaySoundEx("misc/sharktorpedo","Body")
TNT1 A 0 A_CustomMissile("HannyaNEDBomb",160, 48,0,CMF_AIMDIRECTION,pitch)
TNT1 A 0 A_FaceTracer(0,0) HNYA S 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA T 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA U 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA S 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA T 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA U 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA M 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA N 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_FaceTracer(0,0) HNYA O 1 A_Stop TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT,AAPTR_DEFAULT,AAPTR_NULL)
Goto HannyaNEDLook
End:
TNT1 A 0 A_SpawnItemEx("HannyaNEDExit")
stop
Death:
TNT1 A 0 A_SpawnItemEx("DeadHannyaNED")
stop
}
}

actor HannyaNEDMissile
{
PROJECTILE
Obituary "$OB_HANNYANED1"
damagetype "HannyaNEDMissile"
Damage (75)
Speed 45
Height 16
Radius 16
Scale 2.5
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode", 1)
TNT1 A 1
HANN A 2
Spawn2:
HANN BC 2
loop
Death:
TNT1 A 0 A_Explode(50,300,0,0,150)
XDeath:
TNT1 A 0 A_Quake(3,12,0,400)
TNT1 A 0 A_PlaySoundEx("weapon/mm7explode", "Weapon")
TNT1 AAAAAAAAAA 0 A_SpawnItemEx("HannyaNEDMissileFX",0,0,0,Random(5,10),0,Random(-10,10),Random(0,359))
7EXP ABCDEF 2
stop
}
}

actor HannyaNEDMissileFX
{
PROJECTILE
+NOINTERACTION
Radius 8
Height 8
scale 2.5
States
{
Spawn:
TNT1 A 0
7EXP ABCDEF 2
stop
}
}

Actor HannyaNEDBomb
{
PROJECTILE
-NOGRAVITY
-NOINTERACTION
+BOUNCEONWALLS
+BOUNCEONCEILINGS
Obituary "$OB_HANNYANED2"
damagetype "HannyaNEDBomb"
Damage (1)
Speed 30
Gravity 2.0
Height 16
Radius 16
Scale 2.5
var int User_Deg;
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_setUserVar("User_Deg",0)
TNT1 A 2 ThrustThingZ(0, 15, 0, 1)
Spawn2:
HANN DEFGHI 2
loop
Death:
TNT1 A 0 A_Quake(3,25,0,400)
TNT1 A 0 A_Explode(20,200,0,0,100)
TNT1 A 0 A_ChangeFlag("NOINTERACTION",True)
TNT1 A 0 A_PlaySoundEx("weapon/mm7explode", "Weapon")
TNT1 A 0 A_SpawnItemEx("HannyaNEDBombExplosion",56,0,0,0,0,0,User_Deg)
TNT1 A 0 A_SpawnItemEx("HannyaNEDBombExplosion",56,0,0,0,0,0,User_Deg+180)
TNT1 A 1 A_setUserVar("User_Deg",User_Deg+60)
TNT1 A 0 A_JumpIf(User_Deg>=210,1)
Goto Death+3
TNT1 A 25
stop
}
}

actor HannyaNEDBombExplosion
{
PROJECTILE
Obituary "$OB_HANNYANED2"
damagetype "HannyaNEDBomb"
+NOINTERACTION
Radius 8
Height 8
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(8,80,0,0,40)
7EXP ABCDEF 2
stop
}
}

Actor HannyaNEDLaser : FastProjectile
{
PROJECTILE
+DONTBLAST
Obituary "$OB_HANNYANED3"
damagetype "HannyaNEDLaser"
damage (1)
speed 300
Radius 16
Height 16
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 10
stop
Death:
TNT1 A 0 A_Explode(7,160,0,0,80)
TNT1 A 5 A_Quake(2,5,0,200,0)
stop
}
}

Actor HannyaNEDLaserFX1
{
PROJECTILE
+PAINLESS
+DONTBLAST
+DONTREFLECT
+CLIENTSIDEONLY
+FORCEYBILLBOARD 
damage(0)
speed 8
Radius 16
Height 16
scale 2.5
states
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileFXCode")
TNT1 A 0 A_SetPitch(pitch+4)
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserTrail1",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIf(pitch>3000,"Death2")
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserFX1",0,0,0,momx,momy,momz,0,553)
TNT1 A 1 A_Stop
stop
Death:
Death2:
TNT1 A 0
stop
}
}

Actor HannyaNEDLaserFX2 : HannyaNEDLaserFX1
{
states
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileFXCode")
TNT1 A 0 A_SetPitch(pitch+4)
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserTrail2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIf(pitch>3000,"Death2")
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserFX2",0,0,0,momx,momy,momz,0,553)
TNT1 A 1 A_Stop
stop
}
}

Actor HannyaNEDLaserFX3 : HannyaNEDLaserFX1
{
states
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileFXCode")
TNT1 A 0 A_SetPitch(pitch+4)
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserTrail3",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIf(pitch>3000,"Death2")
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserFX3",0,0,0,momx,momy,momz,0,553)
TNT1 A 1 A_Stop
stop
}
}

Actor HannyaNEDLaserTrail1 : BaseDecorativeActor
{
renderstyle add
alpha 1.0
scale 2.5
States
{
Spawn:
TNT1 A 0
HANN J 1 A_JumpIfCloser(64,"Death")
stop
Death:
TNT1 A 0
stop
}
}

Actor HannyaNEDLaserTrail2 : HannyaNEDLaserTrail1
{
States
{
Spawn:
TNT1 A 0
HANN K 1 A_JumpIfCloser(64,"Death")
stop
}
}

Actor HannyaNEDLaserTrail3 : HannyaNEDLaserTrail1
{
States
{
Spawn:
TNT1 A 0
HANN L 1 A_JumpIfCloser(64,"Death")
stop
}
}

Actor HannyaNEDLaserExplosion : HannyaNEDLaserFX1
{
+THRUACTORS
states
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileFXCode")
TNT1 A 0 A_SetPitch(pitch+4)
TNT1 A 0 A_JumpIf(pitch>3000,"Death2")
TNT1 A 0 A_SpawnItemEx("HannyaNEDLaserExplosion",0,0,0,momx,momy,momz,0,553)
TNT1 A 1 A_Stop
stop
Death:
TNT1 A 0 A_Stop
TNT1 A 0 A_SpawnItemEx("HannyaNEDMissileFX")
TNT1 AAA 0 A_SpawnItemEx("HannyaNEDMissileFX",0,0,0,Random(5,10),0,Random(-10,10),Random(0,359))
TNT1 A 10 A_Quake(3,10,0,200)
stop
Crash:
XDeath:
Death2:
TNT1 A 0
stop
}
}

Actor HannyaNEDLaserProtect : PowerProtection
{
powerup.duration 1
damagefactor "HannyaNEDLaser", 0.0
}

actor HannyaNEDExit : BasicClientSide
{
Translation "198:198=194:194", "192:192=4:4"
-NOCLIP
-NOGRAVITY
-NOEXPLODEFLOOR
+DOOMBOUNCE
-BOUNCEONFLOORS
radius 8
height 8
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
TNT1 A 0 A_PlaySoundEx("misc/teleport2","Body")
TFOG FFEE 1 A_Stop
TFOG DDDDDDDDDD 1 ThrustThingZ(0,9,0,1)
TFOG D 70
stop
}
}

Actor MadGrinderUltWatcher
{
+MISSILE
-SOLID
+NOGRAVITY
+NOINTERACTION
Height 0
Radius 0
States
{
Spawn: 
TNT1 A 0
Spawn2:
TNT1 A 0 A_JumpIfInTargetInventory("TerminationUltimateAmmo",1,1)
Goto FinishCheck
//TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("core_targetexists",0)==0,"Death")
TNT1 A 0 A_GiveToTarget("MadGrinderUltBuildCooldownGiver",1)
TNT1 A 0 A_TakeFromTarget("TerminationUltimateAmmo",2)
TNT1 A 1 A_JumpIfInTargetInventory("IsDead",1,"Death")
loop
FinishCheck:
TNT1 AAAAA 1 A_GiveToTarget("HannyaNedFinishPickUp",1)
Death:
TNT1 A 1 
stop
}
}

actor HannyaNedFinishPickUp : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("HannyaNEDEndTrigger",1)
TNT1 A 1 A_GiveInventory("MadGrinderUltBuildCooldownGiver",1)
stop
}
}

actor MadGrinderUltBuildCooldownGiver : UltBuildCooldownGiver
{
	Powerup.Duration -2
}

actor GrinderAfterBurn : TurboAfterBurn
{
Obituary "$OB_MADGRINDER5"
}

actor GrinderMoveSounder : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_StopSound(CHAN_BODY)
TNT1 A 0 A_PlaySoundEx("weapon/grindermove","Body")
stop
}
}

actor MadGrinderBoosting : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{
	Use:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("MadGrinderBoostMan")
		TNT1 A 0 A_PlaySoundEx("weapons/busters/superadaptordash","Voice")
		stop
	}
}

actor MadGrinderBoostMan
{
	-SOLID
	+NOGRAVITY
	+MISSILE
	+NOBLOCKMAP
	Height 0
	Radius 0
	scale 2.5
	+NOINTERACTION
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 AAAAAAAA 2 A_GiveToTarget("MadGrinderBoostGive",1)
		TNT1 A 0 A_TakeInventory("BoostCount",999)
		stop
	}
}

actor MadGrinderBoostGive : CustomInventory
{
	inventory.amount 1
	inventory.maxamount 1
	States
	{
	Spawn:
		TNT1 A 0
		stop
	Pickup:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("BoosterFX",10,15,0,0,-2,-10,0)
		TNT1 A 0 A_SpawnItemEx("BoosterFX",10,-15,0,0, 2,-10,0)
		TNT1 A 0 A_SpawnItemEx("BoosterFX",-10,15,0,0,-2,-10,0)
		TNT1 A 0 A_SpawnItemEx("BoosterFX",-10,-15,0,0, 2,-10,0)
		TNT1 A 0 A_Recoil(-3)
		TNT1 A 0 ThrustThingZ(0,35,0,0)
		stop
	}
}

actor AirRollerSlamPickUp1 : CustomInventory
{
const int XOFS = 32;
const int YOFS = 32;
const int ZOFS = 0;
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*1,YOFS* 2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*1,YOFS* 1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*1,YOFS* 0,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*1,YOFS*-1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*1,YOFS*-2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*2,YOFS* 2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*2,YOFS* 1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*2,YOFS* 0,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*2,YOFS*-1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*2,YOFS*-2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*3,YOFS* 2,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*3,YOFS* 1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*3,YOFS* 0,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*3,YOFS*-1,ZOFS,momx,momy,momx)
TNT1 A 0 A_SpawnItemEx("RoadRollerHitBox3",XOFS*3,YOFS*-2,ZOFS,momx,momy,momx)
stop
}
}
actor AirRollerSlamPickUp2 : CustomInventory{const int ZOFS = 24;}
actor AirRollerSlamPickUp3 : CustomInventory{const int ZOFS = 48;}
actor AirRollerSlamPickUp4 : CustomInventory{const int ZOFS = 72;}
actor AirRollerSlamPickUp5 : CustomInventory{const int ZOFS = 96;}
actor AirRollerSlamPickUp6 : CustomInventory{const int ZOFS = 120;}

Actor RoadRollerHitBox3 : RoadRollerHitBox
{
damagetype "MadGrinder3"
Obituary "$OB_MADGRINDER8"
damage (30)
}

Actor RollerSlamProtect : PowerProtection
{
	Powerup.Duration 15
	DamageFactor "MadGrinder3", 0.0
}

actor MadGrinderFloorRush_CI : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("NewWallSlam",1,"PickupNo")
TNT1 A 0 A_GiveInventory("NoNewWallSlam",1)
TNT1 A 0 A_GiveInventory("NewWallSlam",1)
TNT1 A 0 A_GiveInventory("WallSlamRealTimer",1)
TNT1 A 0 A_SpawnItemEX("MadGrinderFloorRushChecker")
stop
PickupNo:
TNT1 A 0
stop
}
}

actor MadGrinderFloorRushChecker
{
Height 0
Radius 0
Damage (0)
+NOINTERACTION
+NOCLIP
DamageType "RaThorWallRush"
Obituary "$OB_MADGRINDER8"
PROJECTILE
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(AAPTR_DEFAULT, AAPTR_DEFAULT, AAPTR_TARGET)
TNT1 A 0 A_TransferPointer(AAPTR_TARGET, AAPTR_DEFAULT, AAPTR_TARGET, AAPTR_TARGET)
SpawnStart0:
TNT1 A 0 A_GiveInventory("WallSlamTimer",1)
SpawnStart:
TNT1 A 0 A_GiveInventory("FloorSlamTrailPickup",1,AAPTR_TRACER)
TNT1 A 1 A_GiveInventory("WallSlamTimer",1,AAPTR_TRACER)
TNT1 A 0 A_Warp(AAPTR_TRACER,0,0,CallACS("TracerHeightGet")/2,0,0)
TNT1 A 0 A_JumpIfInventory("RaThorWallRush_P",1,"DeathCheck",AAPTR_TRACER)
TNT1 A 0 A_JumpIfInventory("WallSlamRealTimer",1,"SpawnStart",AAPTR_TRACER)
goto Death
DeathCheck:
TNT1 A 0 //A_JumpIfInventory("NewWallSlam",1,"Death",AAPTR_TRACER)
TNT1 A 0 A_GiveInventory("WallSlamTimer",1)
TNT1 A 0 A_SpawnItemEx("MadGrinderShockWave",0,0,32,0,0,0,0,SXF_TRANSFERPOINTERS)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("RollerSlamRocks",random(-8,8),random(-8,8),32,random(-8,8),random(-8,8),random(-8,8))
TNT1 A 0 A_Quake(3,10,0,256)
TNT1 A 0 A_PlaySoundEx("misc/quake","Body")
TNT1 A 0 A_PlaySoundEx("weapon/wallrush","Weapon")
TNT1 A 0 A_Warp(AAPTR_TRACER,0,0,CallACS("TracerHeightGet")/2,0,0)
TNT1 A 0 A_Explode(13,12,0,0,12)
TNT1 A 35
Death:
TNT1 A 2 A_GiveInventory("TempPitProtectEnd_P",1,AAPTR_TRACER)
stop
}
}

actor FloorSlamTrailPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 //A_JumpIf(z-floorz==0,"Pickup_NoHurtActor")
TNT1 A 0 A_JumpIfInventory("RaThorWallRush_P",1,"Nope")
TNT1 A 0 A_SpawnItemEx("MadGrinderFloorRushRealChecker",0,0,0,0,0,-4,0)
TNT1 A 0 A_GiveInventory("RaThorSpeedThing",1)
stop
Pickup_NoHurtActor:
TNT1 AAAA 0 A_TakeInventory("WallSlamRealTimer",999)
TNT1 AAAA 0 A_TakeInventory("WallSlamTimer",999)
TNT1 AAAA 0 A_TakeInventory("RaThorWallRush_P",999)
stop
Nope:
TNT1 A 0
stop
}
}

Actor MadGrinderFloorRushRealChecker
{
PROJECTILE
+NOTARGETSWITCH
Scale 2.5
+DONTBLAST
+DONTREFLECT
+MTHRUSPECIES //+THRUSPECIES
//Species "Megaman"
Damage (0)
Radius 8
Height 8
Speed 20
states
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 1 //A_GiveToTarget("RaThorDashFlagX")
stop
Death:
TNT1 A 0 A_CheckFloor("Death2")
stop
Death2:
TNT1 A 0 A_GiveInventory("RaThorWallRush_P",1,AAPTR_TARGET)
stop
}
}

actor MadGrinderShockWave
{
PROJECTILE
+RIPPER
+DONTBLAST
damage (0)
radius 1
height 1
const int SPD = 24;
const int DEG = 15;
States
{
Spawn:
TNT1 AA 0
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 0))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 1))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 2))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 3))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 4))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 5))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 6))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 7))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 8))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG* 9))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*10))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*11))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*12))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*13))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*14))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*15))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*16))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*17))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*18))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*19))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*20))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*21))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*22))
TNT1 A 0 A_SpawnItemEx("MadGrinderShockwavePartV",0,0,0,SPD,0,0,(DEG*23))
stop
}
}

actor MadGrinderShockwavePartV
{
Translation "192:192=87:87"
PROJECTILE
Damagetype "MadGrinder4"
Obituary "$OB_MADGRINDER9"
+FLOORHUGGER
+RIPPER
+NOCLIP
Speed 30
Scale 2.0
Damage (6)
Radius 32
Height 32
States
{
Spawn:
TNT1 AA 0 A_GiveInventory("ProjectileCode",1)
DUOR T 1 A_FadeOut(0.05)
DUOR T 0 A_ChangeFlag("NOCLIP",0)
Spawn2:
DUOR T 1 A_FadeOut(0.05)
loop
}
}

actor MadGrinderShockwavePartProtect : PowerProtection
{
powerup.duration 1
damagefactor "MadGrinder4", 0.0
}