actor KnifeSpreadWep : BaseMM8BDMWep
{
//$Category MM8BDM-Weapons
//$Title Knife Spread
//$Sprite DOSWD0
Weapon.AmmoUse 2
Weapon.AmmoGive 28
Weapon.SlotNumber 4
Inventory.Pickupmessage "$PU_KNIFESPREAD"
Obituary "$OB_KNIFESPREAD"
Tag "$TAG_KNIFESPREAD"
weapon.ammotype "KnifeSpreadAmmo"
inventory.icon "KNIFES"
States
{
SpawnLoop:
DOSW D -1
loop
Ready:
KNFH A 0 ACS_ExecuteAlways(998,0,DOSREBORN_COLOR_KNIFE)
KNFH A 0 A_JumpIfNoAmmo("ReadyNoAmmo")
KNFH A 1 A_WeaponReady
Goto Ready+2
ReadyNoAmmo:
KNFH J 1 A_WeaponReady
KNFH J 0 A_JumpIfNoAmmo("ReadyNoAmmo")
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
KNFH A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
KNFH A 1 A_Raise
Loop
Fire:
KNFH A 0 A_JumpIfNoAmmo("NoAmmo")
KNFH A 0 A_PlaySoundEx("weapon/bladeshoot","Weapon")
KNFH A 0 A_FireCustomMissile("SpreadKnife1",-21,1,8,0)
KNFH A 0 A_FireCustomMissile("SpreadKnife2",-7,0,8,0)
KNFH A 0 A_FireCustomMissile("SpreadKnife3",7,0,8,0)
KNFH A 0 A_FireCustomMissile("SpreadKnife4",21,0,8,0)
KNFH BCDEFG 2
TNT1 A 4
KNFH A 0 A_JumpIfNoAmmo("NoAmmoEnd")
KNFH HI 1
KNFH A 17
KNFH A 0 A_Refire
Goto Ready+1
NoAmmoEnd:
KNFH KL 1
KNFH J 17
Goto ReadyNoAmmo
NoAmmo:
KNFH J 1 ACS_Execute(979,0)
Goto ReadyNoAmmo
}
}
actor KnifeSpreadWepSH : KnifeSpreadWep replaces KnifeSpreadWep {+INVENTORY.RESTRICTABSOLUTELY Inventory.RestrictedTo megamans}

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

actor SpreadKnife1
{
PROJECTILE
Speed 32
Damage (21)
damagetype "KnifeSpread"
Obituary "$OB_KNIFESPREAD"
+BOUNCEONCEILINGS
+BOUNCEONFLOORS
Radius 6
Height 7
scale 2.5
States
{
Spawn:
KNIF DEBC 2
Extend:
KNIF A 0 A_Stop
KNIF DE 2
TNT1 A 1 A_SpawnItemEx("KnifeExtend", 0, 0, 0, 32, 0, 0, 42)
Death:
TNT1 A 1
stop
}
}

actor SpreadKnife2 : SpreadKnife1
{
States
{
Spawn:
KNIF DEBC 2
Extend:
KNIF A 0 A_Stop
KNIF DE 2
TNT1 A 1 A_SpawnItemEx("KnifeExtend", 0, 0, 0, 32, 0, 0, 14)
Death:
TNT1 A 1
stop
}
}

actor SpreadKnife3 : SpreadKnife1
{
States
{
Spawn:
KNIF DEBC 2
Extend:
KNIF A 0 A_Stop
KNIF DE 2
TNT1 A 1 A_SpawnItemEx("KnifeExtend", 0, 0, 0, 32, 0, 0, -14)
Death:
TNT1 A 1
stop
}
}

actor SpreadKnife4 : SpreadKnife1
{
States
{
Spawn:
KNIF DEBC 2
Extend:
KNIF A 0 A_Stop
KNIF DE 2
TNT1 A 1 A_SpawnItemEx("KnifeExtend", 0, 0, 0, 32, 0, 0, -42)
Death:
TNT1 A 1
stop
}
}

actor KnifeExtend : SpreadKnife1
{
Speed 42
Height 4
States
{
Spawn:
KNIF AAAA 2
loop
Death:
TNT1 A 1
stop
}
}