actor TopSpinWepSH : BaseMM8BDMWep
{ //Coded by MegaVile
//$Category MM8BDM-Weapons
//$Title Top Spin
Weapon.AmmoUse 4
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_TOPSPIN"
Tag "$TAG_TOPSPIN"
Obituary "$OB_TOPSPIN"
weapon.ammotype "TopSpinAmmo"
inventory.icon "TOPSI"
+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans
States
{
SpawnLoop:
WEAP J 1
loop
Ready:
TOPH M 0 ACS_ExecuteAlways(998,0,9)
TOPH M 0 
TOPH M 1 A_WeaponReady
Goto Ready+2
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TOPH M 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TOPH M 1 A_Raise
Loop
Fire:
TOPH M 0 A_JumpIfNoAmmo("NoAmmo")
TOPH M 0 A_PlaySoundEx("weapon/topspinsh","Weapon")
TOPH M 0 A_FireCustomMissile("TopSpinnerSH",0,1,8,0)
TOPH K 2
TOPH K 2 OffSet(-70,74)
TOPH K 2 OffSet(-121,114)
TOPH L 2 OffSet(1,31)
TOPH L 2 OffSet(-21,56)
TOPH L 2 OffSet(-33,84)
TNT1 A 6
TOPH M 1 OffSet(-4,64)
TOPH M 1 OffSet(-2,48)
TOPH M 1 A_WeaponReady(14)
Goto Ready+1
NoAmmo:
TOPH M 1 ACS_Execute(979,0)
Goto Ready+1
}
}

actor TopSpinnerSH
{
PROJECTILE
scale 2.5
Obituary "$OB_TOPSPIN"
//+RIPPER
+DONTBLAST
-NOGRAVITY
//+FLOORHUGGER
Speed 36
Radius 16
+STEPMISSILE
maxstepheight 16
Height 16
Damage (50)
Damagetype "TopSpin" 
States
{
Spawn:
TOTW AABB 1 A_CheckFloor("Death")
loop

//FloorGo:
//TOTW A 0 A_PlaySoundEx("weapon/TopSpinSH2","Weapon")
//FloorGo2:
//TOTW ABABAB 2
//loop
Death:
TNT1 A 0 A_JumpIf(z-floorz==0,"Death2")
TNT1 A 1
stop
Death2:
TOTW A 0 A_PlaySoundEx("weapon/TopSpinSH2","Weapon")
TNT1 A 1 A_SpawnItemEx("TopSpinnerSHGround",0,0,0,36,0,0,0,0,0)
stop
XDeath:
TNT1 A 0 A_Checkfloor("DoAHop")
TNT1 A 0 A_SpawnItemEx("TopSpinner2SH",0,0,0,2,0,2)
stop
DoAHop:
TNT1 A 0 A_SpawnItemEx("TopSpinner2SH",0,0,0,2,0,12)
Stop
}
}

actor TopSpinnerSHGround
{
PROJECTILE
-NOGRAVITY
+NOEXPLODEFLOOR
+STEPMISSILE
maxstepheight 16
+BOUNCEONCEILINGS
+FORCEXYBILLBOARD
BounceCount 1
Damage (50)
DamageType "TopSpin"
Obituary "$OB_TOPSPIN"
Height 16
Radius 16
Scale 2.5
speed 36
States
{
Spawn:
TOTW AB 2
loop
XDeath:
TNT1 A 0 A_Checkfloor("DoAHop")
TNT1 A 0 A_SpawnItemEx("TopSpinner2SH",0,0,0,2,0,2)
stop
DoAHop:
TNT1 A 0 A_SpawnItemEx("TopSpinner2SH",0,0,0,2,0,12)
Stop
}
}

actor TopSpinner2SH
{
PROJECTILE
scale 2.5
Obituary "$OB_TOPSPIN"
+RIPPER
+DONTBLAST
-NOGRAVITY
//+FLOORHUGGER
Speed 36
Radius 16
Height 16
Damage (6)
Damagetype "TopSpin" 
States
{
Spawn:
TOTW AABB 1 A_CheckFloor("Death")
loop
Death:
TNT1 A 0
stop
}
}