actor TripleBladeWep : BaseMM8BDMWep 10097
{
//$Category MM8BDM-Weapons
//$Title Triple Blade
//$Sprite TRIPA0
Weapon.AmmoUse 1
Weapon.AmmoGive 28
Weapon.SlotNumber 3
Obituary "$OB_TRIPLEBLADE"
Tag "$TAG_TRIPLEBLADE"
Inventory.Pickupmessage "$PU_TRIPLEBLADE"
weapon.ammotype "TripleBladeAmmo"
inventory.icon "BLAWI"
+WEAPON.NOAUTOAIM
States
{
SpawnLoop:
TRIP A -1
loop
Ready:
TRIP B 0 ACS_ExecuteAlways(998,0,205)
TRIP C 1 A_WeaponReady
Goto Ready+1
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TRIP C 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TRIP C 1 A_Raise
Loop
Fire:
TRIP C 0 A_JumpIfNoAmmo("NoAmmo")
TRIP C 0 A_PlaySoundEx("weapon/bladeshoot","Weapon")
TRIP C 0 A_FireCustomMissile("TripleBlade",0,1,8,0,0,0)
TRIP C 0 A_JumpIf(pitch > 270 && pitch < 270+11.25, "Top")
TRIP C 0 A_JumpIf(pitch > 90-11.25 && pitch < 90, "Bottom")
goto Center
Top:
TRIP C 0 A_FireCustomMissile("TripleBladeR",180,0,8,0,0,9.25)
TRIP C 0 A_FireCustomMissile("TripleBlade",0,0,8,0,0,-9.25)
goto FireEnd
Bottom:
TRIP C 0 A_FireCustomMissile("TripleBlade",0,0,8,0,0,9.25)
TRIP C 0 A_FireCustomMissile("TripleBladeR",180,0,8,0,0,-9.25)
goto FireEnd
Center:
TRIP C 0 A_FireCustomMissile("TripleBlade",0,0,8,0,0,9.25)
TRIP C 0 A_FireCustomMissile("TripleBlade",0,0,8,0,0,-9.25)
goto FireEnd
FireEnd:
TRIP DE 2
TRIP C 8
goto Ready+1
NoAmmo:
TRIP C 1 ACS_Execute(979,0)
Goto Ready+1
}
}

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

actor TripleBlade
{
PROJECTILE
+RIPPER
+DONTBLAST
Obituary "$OB_TRIPLEBLADE"
Radius 16
Height 5
Scale 2.5
damagetype "TripleBlade"
Damage (5)
Speed 30
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIf(momz>=30, "90Degrees")
TNT1 A 0 A_JumpIf(momz>=22.5, "67P5Degrees")
TNT1 A 0 A_JumpIf(momz>=15, "45Degrees")
TNT1 A 0 A_JumpIf(momz>=7.5, "22P5Degrees")
TNT1 A 0 A_JumpIf(momz<7.5 && momz>-7.5, "0Degrees")
TNT1 A 0 A_JumpIf(momz<=-29, "N90Degrees")
TNT1 A 0 A_JumpIf(momz<=-7.5, "N22P5Degrees")
TNT1 A 0 A_JumpIf(momz<=-22.5, "N67P5Degrees")
TNT1 A 0 A_JumpIf(momz<=-15, "N45Degrees")
TBL1 E 1
wait
90Degrees:
TBL1 A 1
wait
67P5Degrees:
TBL1 B 1
wait
45Degrees:
TBL1 C 1
wait
22P5Degrees:
TBL1 D 1
wait
0Degrees:
TBL1 E 1
wait
N22P5Degrees:
TBL1 F 1
wait
N45Degrees:
TBL1 G 1
wait
N67P5Degrees:
TBL1 H 1
wait
N90Degrees:
TBL1 I 1
wait
Death:
TNT1 A 0
stop
}
}

actor TripleBladeR : TripleBlade
{
    States
    {
    Spawn:
        TNT1 A 0
        TNT1 A 0 A_SetAngle(angle+180)
        TNT1 A 0 A_JumpIf(momz>0, "90Degrees")
        TNT1 A 0 A_JumpIf(momz<0, "N90Degrees")
        TBL1 I 1
        wait
    }
}
