actor RollingCutterWep : MegaBuster 10056
{
Weapon.AmmoUse 4
Weapon.AmmoGive 112
Weapon.SlotNumber 4
Obituary "%o was sliced and diced by %k's rolling cutter."
Inventory.Pickupmessage "Power up! Rolling Cutter!"
weapon.ammotype "RollingCutterAmmo"
inventory.pickupsound "weapon/weaponup"
+WEAPON.AMMO_OPTIONAL
inventory.icon "RCUTSI"
Scale 2.0
States
{
Spawn:
WEA2 F 1
loop
Ready:
BUSH S 0 ACS_ExecuteAlways(998,0,25)
BUSH S 0 A_TakeInventory("CutterFlag",999)
BUSH S 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BUSH S 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BUSH S 1 A_Raise
Loop
Fire:
BUSH S 0 A_JumpIfNoAmmo("NoAmmo")
BUSH T 2 A_FireCustomMissile("RollingCutter",0,1,8,0)
BUSH UVWXY 2
Goto Check
Check:
TNT1 A 1 A_GiveInventory("CutterFlag",1)
TNT1 A 0 A_JumpIfInventory("CutterFlag",300,"Return")
Goto Check
Return:
BUSH Y 0 A_TakeInventory("CutterFlag",999)
BUSH YZ 2 
BUSH S 0 A_Refire
Goto Ready+1
NoAmmo:
BUSH S 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor RollingCutterAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 28
}

actor RollingCutter
{
PROJECTILE
Radius 8
Height 8
scale 2.5
+DONTSPLASH
damage (1)
+DOOMBOUNCE
+RIPPER
+DONTBLAST
+NOTARGETSWITCH
meleerange 12
reactiontime 48
+SKYEXPLODE
//+FLOAT
damagetype "Cutter"
speed 22
FloatSpeed 16
bouncefactor 1.0
wallbouncefactor 1.0
States
{
Spawn:
RCUT A 0
RCUT A 0 A_PlaySound("weapon/rollingcutter")
RCUT AAAA 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT BBBB 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT CCCC 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT DDDD 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_PlaySound("weapon/rollingcutter")
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT AAAA 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT BBBB 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT CCCC 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT DDDD 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_PlaySound("weapon/rollingcutter")
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT A 0 A_CustomMissile("ReturningCutter",0,0,0,0)
stop
Death:
RCUT A 0 A_GiveToTarget("CutterFlag",999)
stop
}
}

actor ReturningCutter : RollingCutter
{
radius 0
height 0
speed 24
damagetype "Cutter"
damage 0
+DONTSPLASH
+NOINTERACTION
States
{
Spawn:
RCUT A 0 //A_Stop
RCUT A 0 //A_Chase
RCUT A 0 A_FaceTarget
RCUT A 0 A_JumpIfCloser(60,"Death")
RCUT A 0 A_PlaySound("weapon/rollingcutter")
RCUT A 0 //A_Recoil(-22)
RCUT AAAA 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT A 0 //A_Stop
RCUT A 0 //A_Chase
RCUT A 0 A_FaceTarget
RCUT A 0 A_JumpIfCloser(60,"Death")
RCUT B 0 //A_Recoil(-22)
RCUT BBBB 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT A 0 //A_Stop
RCUT A 0 //A_Chase
RCUT A 0 A_FaceTarget
RCUT A 0 A_JumpIfCloser(60,"Death")
RCUT C 1 //A_Recoil(-22)
RCUT CCCC 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT A 0 //A_Stop
RCUT A 0 //A_Chase
RCUT A 0 A_FaceTarget
RCUT A 0 A_JumpIfCloser(60,"Death")
RCUT D 1 //A_Recoil(-22)
RCUT DDDD 1 A_SpawnItemEx("RollingCutterDamager",0,0,0,2,0,0)
RCUT A 0 A_Countdown
RCUT A 0 A_JumpIfInTargetInventory("CutterFlag",999,"Death")
RCUT A 0 A_CustomMissile("ReturningCutter",0,0,0,0)
stop
}
}

actor RollingCutterDamager
{
PROJECTILE
damagetype "Cutter"
+RIPPER
damage (12)
radius 20
height 20
States
{
Spawn:
TNT1 A 2
stop
}
}

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