actor TripleBladeBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_10A"
dropitem "TripleBladeWepCDropped"
Weapon.AmmoUse 8
Weapon.AmmoGive 28
Weapon.SlotNumber 1
Obituary "$OB_TRIPLEBLADE"
weapon.ammotype "TripleBladeBossAmmo"
Inventory.Pickupmessage "Picked up Blade Man's right arm?"
+WEAPON.ALT_USES_BOTH
inventory.icon "BLDHYICO"
States
{
Spawn:
C_10 A 1
loop

Ready:
BLDH A 0 ACS_ExecuteAlways(998,0,DYE_BLADEMAN)
BLDH A 0 A_GunFlash
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"SwapReady")
Goto Ready0

Ready1:
BLDH A 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH A 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Ready1a")
BLDH A 27 A_WeaponReady(10)
BLDH A 0 A_GiveInventory("TripleBladeBossAmmo",1)
goto Ready2
Ready1a:
BLDH A 27 A_WeaponReady(2)
BLDH A 0 A_GiveInventory("TripleBladeBossAmmo",1)
goto Ready2a

Ready0:
BLDH A 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
Ready2:
BLDH A 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Ready2a")
BLDH A 6 A_WeaponReady(8)
BLDH A 0 A_GiveInventory("TripleBladeBossAmmo",1)
loop
Ready2a:
BLDH A 6 A_WeaponReady
BLDH A 0 A_GiveInventory("TripleBladeBossAmmo",1)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BLDH A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BLDH A 1 A_Raise
Loop

Fire:
BLDH A 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
goto Fire2
Fire2:
BLDH C 1 A_JumpIfInventory("PowerRage_ST",1,1)
BLDH C 1 OffSet(-43,36)A_GiveInventory("BlademanMainShot1_P",1)
BLDH D 1 OffSet(1,33)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH D 1 OffSet(-48,33)
BLDH E 1 OffSet(1,31)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH E 1 OffSet(-43,43)
BLDH E 1 OffSet(-102,53)A_JumpIfInventory("PowerRage_ST",1,1)
TNT1 A 9 OffSet(8,112)
BLDH A 1 OffSet(8,112)
BLDH A 1 OffSet(7,102)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(6,92)
BLDH A 1 OffSet(5,82)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(4,72)
BLDH A 1 OffSet(3,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(2,52)
BLDH A 1 OffSet(1,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 A_WeaponReady(14)
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH A 0 A_GiveInventory("TripleBladeBossAmmo",1)
Goto Ready0

Altfire:
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingJump")
BLDH A 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Altfire2")
goto Ready0
Altfire2:
BLDH A 0 A_JumpIf(1,1)
BLDH A 0 A_GiveInventory("BlademanInvSync_P_Altfire2",1)
BLDH A 0 A_ReFire(1)
BLDH A 0 A_Stop
BLDH A 0 //A_ChangeFlag("NOGRAVITY",0)
BLDH A 0 A_GiveInventory("BladeInitialJumpCheck_P",1)//A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*8+12,3)
BLDH A 0 A_PlaySound("classes/bladeleap",1,0.75)
BLDH A 1 OffSet(0,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,52)
BLDH A 1 OffSet(0,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,72)
goto AirLoop

AirLoop:
BLDH A 0 A_JumpIf(z-floorz==0,"ReadyBuffer")
BLDH A 0 A_JumpIf(momz==0,"AirLoop_Z")
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"WallClingStart")
BLDH A 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH A 1 OffSet(0,72)
loop
AirLoop_Z:
BLDH A 1 OffSet(0,72)
BLDH A 0 A_JumpIf(z-floorz==0,"ReadyBuffer")
BLDH A 0 A_JumpIf(momz==0,"ReadyBuffer")
goto AirLoop+2

AirLoop2:
BLDH F 0 A_WeaponReady(10)
BLDH F 0 A_JumpIf(z-floorz==0,"ReadySlash1")
BLDH F 0 A_JumpIf(momz==0,"AirLoop2_Z")
BLDH F 0 A_JumpIfInventory("BladeWallCling",1,"WallClingStart2")
BLDH F 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH F 1 A_WeaponReady(10)
loop
AirLoop2_Z:
BLDH F 1 A_WeaponReady(10)
BLDH F 0 A_JumpIf(z-floorz==0,"ReadySlash1")
BLDH F 0 A_JumpIf(momz==0,"ReadySlash1")
goto AirLoop2+3

ReadySlash1:
BLDH F 0 A_GiveInventory("BlademanInvSync_P_ReadySlash1",1)
BLDH F 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"ReadySlash2")
BLDH FFFFFFFFFFFFFF 1 A_WeaponReady(8)
Goto Ready1
ReadySlash2:
BLDH FFFFFFFFFFFFFF 1 A_WeaponReady
Goto Ready1

WallClingStart:
BLDH A 0 A_JumpIf(1,1)
BLDH A 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH A 0 A_Stop
BLDH A 1 OffSet(0,72)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,62)
BLDH A 1 OffSet(0,52)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,42)
BLDH A 0 A_JumpIfInventory("TripleBladeClingTimer",1,"WallClingBuffer")
Goto Ready1
WallClingBuffer:
BLDH A 4 A_WeaponReady(14)
Goto ClingReady
WallClingStart2:
BLDH A 0 A_JumpIf(1,1)
BLDH A 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH A 2 A_Stop
BLDH A 0 A_JumpIfInventory("TripleBladeClingTimer",1,"WallClingBuffer2")
Goto Ready1
WallClingBuffer2:
BLDH A 2 A_WeaponReady(14)
Goto ClingReady

ClingReady:
BLDH A 1 A_WeaponReady
SwapReady:
ClingReadyCheck:
BLDH A 0 A_JumpIfInventory("TripleBladeClingTimer",1,"ClingReadyCheck2")
Goto Ready1
ClingReadyCheck2:
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingReady")
Goto Ready1
ReadyBuffer:
BLDH A 0 A_JumpIf(1,1)
BLDH A 0 A_TakeInventory("NoJumpCancel",99)
BLDH A 0 A_TakeInventory("StunArmor",99)
BLDH A 5 A_WeaponReady(14)
BLDH AAAAAA 5 A_WeaponReady(10)
Goto Ready0

ClingJump:
BLDH A 0 A_JumpIfInventory("TripleBladeBossAmmo",1,1)
Goto DeClingSFX
BLDH F 0 A_JumpIf(1,1)
BLDH F 0 A_GiveInventory("BlademanInvSync_P_ClingJump",1)
BLDH F 0 A_ReFire(1)
BLDH F 0 A_Stop
BLDH F 0 //A_ChangeFlag("NOGRAVITY",0)
BLDH F 0 A_PlaySound("classes/bladeleap",1,0.25)
BLDH F 0 A_JumpIfInventory("ImpairmentStack",1,2)
BLDH F 2 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*28,3)
Goto AirLoop2
BLDH F 2 A_ChangeVelocity(cos(pitch)*(50*ACS_NamedExecuteWithResult("ImpairmentACS")/100),0,-sin(pitch)*(28*ACS_NamedExecuteWithResult("ImpairmentACS")/100),3)
Goto AirLoop2

DeClingSFX:
BLDH F 0 //A_PlaySound("misc/hitconfirm",1,1.0)
Goto Ready1

BladeSlash:
BLDH F 0 A_JumpIf(1,1)
BLDH F 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH F 0 A_ReFire(1)
BLDH F 0 A_ScaleVelocity(0.4)
BLDH F 0 A_GiveInventory("BlademanMain3_CI",1)
BLDH F 1 A_WeaponReady(14)
BLDH G 1
BLDH G 1 OffSet(-23,65)
BLDH H 3 A_WeaponReady(14)
TNT1 A 6 OffSet(0,92)
Goto AirFall
AirFall:
TNT1 A 0 A_JumpIf(z-floorz==0,"AirLand")
TNT1 A 0 A_JumpIf(momz==0,"AirFall_Z")
TNT1 A 1 ThrustThingZ(0,5,1,1)
loop
AirFall_Z:
TNT1 A 1 ThrustThingZ(0,5,1,1)
TNT1 A 0 A_JumpIf(z-floorz==0,"AirLand")
TNT1 A 0 A_JumpIf(momz==0,"AirLand")
goto AirFall+2

AirLand:
BLDH A 0 A_JumpIf(1,1)
BLDH A 1 OffSet(0,92)
BLDH A 1 OffSet(0,82)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,72)
BLDH A 1 OffSet(0,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 1 OffSet(0,52)
BLDH A 1 OffSet(0,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH A 0
Goto Ready0

Flash:
TNT1 A 1 A_JumpIfInventory("BladeWallCling",1,"FClingStart") 
Goto FEnd
FlashLoop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_JumpIfInventory("BladeWallCling",1,"FCling") 
loop
FCling:
TNT1 A 0 A_GiveInventory("BladeReclingSound_P",1)
FClingStart:
TNT1 A 0 //A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 SetPlayerProperty(0,1,0)
Goto FClingLoop
FClingLoop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("BladeWallAmmoTake_P",1)
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 0 A_Stop
TNT1 A 0 A_JumpIf(z-floorz<=32,"FEnd")
TNT1 A 1
TNT1 A 0 //A_JumpIf(ACS_NamedExecuteWithResult("cbm_bladedropcheck")==1,"FEnd")//C_JAX_CHECK_JUMP
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"FClingLoop")
goto FEnd
FEnd:
TNT1 A 0 A_GiveInventory("BlademanInvSync_P_Flash",1)
TNT1 A 1 //A_ChangeFlag("NOGRAVITY",0)
TNT1 A 0 SetPlayerProperty(0,0,0)
Goto FlashLoop
}
}

actor TripleBladeBoss2 : BaseMM8BDMWep_CBM
{
tag "$TAGC_10A2"
dropitem "TripleBladeWepCDropped"
Weapon.AmmoUse 8
Weapon.AmmoGive 28
Weapon.SlotNumber 2
Obituary "$OB_TRIPLEBLADE"
weapon.ammotype "TripleBladeBossAmmo"
Inventory.Pickupmessage "Picked up Blade Man's left arm?"
+WEAPON.ALT_USES_BOTH
inventory.icon "BLDHZICO"
States
{
Spawn:
C_10 A 1
loop

Ready:
BLDH I 0 ACS_ExecuteAlways(998,0,DYE_BLADEMAN)
BLDH I 0 A_GunFlash
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"SwapReady")
Goto Ready0

Ready1:
BLDH I 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH I 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Ready1a")
BLDH I 35 A_WeaponReady(10)
BLDH I 0 A_GiveInventory("TripleBladeBossAmmo",1)
goto Ready2
Ready1a:
BLDH I 35 A_WeaponReady(2)
BLDH I 0 A_GiveInventory("TripleBladeBossAmmo",1)
goto Ready2a

Ready0:
BLDH I 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
Ready2:
BLDH I 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Ready2a")
BLDH I 8 A_WeaponReady(8)
BLDH I 0 A_GiveInventory("TripleBladeBossAmmo",1)
loop
Ready2a:
BLDH I 8 A_WeaponReady
BLDH I 0 A_GiveInventory("TripleBladeBossAmmo",1)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BLDH I 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BLDH I 1 A_Raise
Loop

Fire:
BLDH I 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
goto Fire2
Fire2:
BLDH K 1 A_JumpIfInventory("PowerRage_ST",1,1)
BLDH K 1 OffSet(-43,36)A_GiveInventory("BlademanMainShot2_P",1)
BLDH L 1 OffSet(-1,33)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH L 1 OffSet(48,33)
BLDH M 1 OffSet(-1,31)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH M 1 OffSet(43,43)
BLDH M 1 OffSet(102,53)A_JumpIfInventory("PowerRage_ST",1,1)
TNT1 A 9 OffSet(-8,112)
BLDH I 1 OffSet(-8,112)
BLDH I 1 OffSet(-7,102)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(-6,92)
BLDH I 1 OffSet(-5,82)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(-4,72)
BLDH I 1 OffSet(-3,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(-2,52)
BLDH I 1 OffSet(-1,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 A_WeaponReady(14)
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH I 0 A_GiveInventory("TripleBladeBossAmmo",1)
Goto Ready0

Altfire:
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingJump")
BLDH I 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"Altfire2")
goto Ready0
Altfire2:
BLDH I 0 A_JumpIf(1,1)
BLDH I 0 A_GiveInventory("BlademanInvSync_P_Altfire2",1)
BLDH I 0 A_ReFire(1)
BLDH I 0 A_Stop
BLDH I 0 //A_ChangeFlag("NOGRAVITY",0)
BLDH I 0 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*8+12,3)
BLDH I 0 A_PlaySound("classes/bladeleap",1,0.75)
BLDH I 1 OffSet(0,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,52)
BLDH I 1 OffSet(0,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,72)
goto AirLoop

AirLoop:
BLDH I 0 A_JumpIf(z-floorz==0,"ReadyBuffer")
BLDH I 0 A_JumpIf(momz==0,"AirLoop_Z")
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"WallClingStart")
BLDH I 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH I 1 OffSet(0,72)
loop
AirLoop_Z:
BLDH I 1 OffSet(0,72)
BLDH I 0 A_JumpIf(z-floorz==0,"ReadyBuffer")
BLDH I 0 A_JumpIf(momz==0,"ReadyBuffer")
goto AirLoop+2

AirLoop2:
BLDH N 0 A_WeaponReady(10)
BLDH N 0 A_JumpIf(z-floorz==0,"ReadySlash1")
BLDH N 0 A_JumpIf(momz==0,"AirLoop2_Z")
BLDH N 0 A_JumpIfInventory("BladeWallCling",1,"WallClingStart2")
BLDH N 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH N 1 A_WeaponReady(10)
loop
AirLoop2_Z:
BLDH N 1 A_WeaponReady(10)
BLDH N 0 A_JumpIf(z-floorz==0,"ReadySlash1")
BLDH N 0 A_JumpIf(momz==0,"ReadySlash1")
goto AirLoop2+3

ReadySlash1:
BLDH N 0 A_GiveInventory("BlademanInvSync_P_ReadySlash1",1)
BLDH N 0 A_JumpIfInventory("TripleBladeBossAmmo",5,"ReadySlash2")
BLDH NNNNNNNNNNNNNN 1 A_WeaponReady(8)
Goto Ready1
ReadySlash2:
BLDH NNNNNNNNNNNNNN 1 A_WeaponReady
Goto Ready1

WallClingStart:
BLDH I 0 A_JumpIf(1,1)
BLDH I 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH I 0 A_Stop
BLDH I 1 OffSet(0,72)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,62)
BLDH I 1 OffSet(0,52)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,42)
BLDH I 0 A_JumpIfInventory("TripleBladeClingTimer",1,"WallClingBuffer")
Goto Ready1
WallClingBuffer:
BLDH I 4 A_WeaponReady(14)
Goto ClingReady
WallClingStart2:
BLDH I 0 A_JumpIf(1,1)
BLDH I 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH I 2 A_Stop
BLDH I 0 A_JumpIfInventory("TripleBladeClingTimer",1,"WallClingBuffer2")
Goto Ready1
WallClingBuffer2:
BLDH I 2 A_WeaponReady(14)
Goto ClingReady

ClingReady:
BLDH I 1 A_WeaponReady
SwapReady:
ClingReadyCheck:
BLDH I 0 A_JumpIfInventory("TripleBladeClingTimer",1,"ClingReadyCheck2")
Goto Ready1
ClingReadyCheck2:
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingReady")
Goto Ready1
ReadyBuffer:
BLDH I 0 A_JumpIf(1,1)
BLDH I 0 A_TakeInventory("NoJumpCancel",99)
BLDH I 0 A_TakeInventory("StunArmor",99)
BLDH I 5 A_WeaponReady(14)
BLDH IIIIII 5 A_WeaponReady(10)
Goto Ready0

ClingJump:
BLDH A 0 A_JumpIfInventory("TripleBladeBossAmmo",1,1)
Goto DeClingSFX
BLDH N 0 A_JumpIf(1,1)
BLDH N 0 A_GiveInventory("BlademanInvSync_P_ClingJump",1)
BLDH N 0 A_ReFire(1)
BLDH N 0 A_Stop
BLDH N 0 //A_ChangeFlag("NOGRAVITY",0)
BLDH N 0 A_PlaySound("classes/bladeleap",1,0.25)
BLDH N 0 A_JumpIfInventory("ImpairmentStack",1,2)
BLDH N 2 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*28,3)
Goto AirLoop2
BLDH N 2 A_ChangeVelocity(cos(pitch)*(50*ACS_NamedExecuteWithResult("ImpairmentACS")/100),0,-sin(pitch)*(28*ACS_NamedExecuteWithResult("ImpairmentACS")/100),3)
Goto AirLoop2

DeClingSFX:
BLDH F 0 //A_PlaySound("misc/hitconfirm",1,1.0)
Goto Ready1

BladeSlash:
BLDH N 0 A_JumpIf(1,1)
BLDH N 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH N 0 A_ReFire(1)
BLDH N 0 A_ScaleVelocity(0.4)
BLDH N 0 A_GiveInventory("BlademanMain3_CI",1)
BLDH N 1 A_WeaponReady(14)
BLDH O 1
BLDH O 1 OffSet(23,65)
BLDH P 3 A_WeaponReady(14)
TNT1 A 6 OffSet(0,92)
Goto AirFall
AirFall:
TNT1 A 0 A_JumpIf(z-floorz==0,"AirLand")
TNT1 A 0 A_JumpIf(momz==0,"AirFall_Z")
TNT1 A 1
loop
AirFall_Z:
TNT1 A 1
TNT1 A 0 A_JumpIf(z-floorz==0,"AirLand")
TNT1 A 0 A_JumpIf(momz==0,"AirLand")
goto AirFall+2

AirLand:
BLDH I 0 A_JumpIf(1,1)
BLDH I 1 OffSet(0,92)
BLDH I 1 OffSet(0,82)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,72)
BLDH I 1 OffSet(0,62)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 1 OffSet(0,52)
BLDH I 1 OffSet(0,42)A_JumpIfInventory("PowerRage_ST",1,1)
BLDH I 0
Goto Ready0

Flash:
TNT1 A 1 A_JumpIfInventory("BladeWallCling",1,"FClingStart") 
Goto FEnd
FlashLoop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_JumpIfInventory("BladeWallCling",1,"FCling") 
loop
FCling:
TNT1 A 0 A_GiveInventory("BladeReclingSound_P",1)
FClingStart:
TNT1 A 0 //A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 SetPlayerProperty(0,1,0)
Goto FClingLoop
FClingLoop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("BladeWallAmmoTake_P",1)
TNT1 A 0 A_JumpIfInventory("FlightDisableFlag",1,2)
TNT1 A 0 A_Stop
TNT1 A 0 A_JumpIf(z-floorz<=32,"FEnd")
TNT1 A 1
TNT1 A 0 //A_JumpIf(ACS_NamedExecuteWithResult("cbm_bladedropcheck")==1,"FEnd")//C_JAX_CHECK_JUMP
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"FClingLoop")
goto FEnd
FEnd:
TNT1 A 0 A_GiveInventory("BlademanInvSync_P_Flash",1)
TNT1 A 1 //A_ChangeFlag("NOGRAVITY",0)
TNT1 A 0 SetPlayerProperty(0,0,0)
Goto FlashLoop
}
}


actor TripleBladeBossAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 30
}

actor TripleBladeClingTimer : Ammo
{
inventory.amount 1
inventory.maxamount 263
}

actor BladeWallCling : OnceC {}
actor BladeWallClingEnd : OnceC {}
actor BladeWallClingNo : OnceC {}
actor BladeSlashBuffer : OnceC {}

actor BladeWallAmmoTake_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",1)
stop
}
}

actor BladeInitialJumpCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("ImpairmentStack",1,"Pickup3")
goto Pickup2
Pickup2:
TNT1 A 0 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*8+12,3)
stop
Pickup3:
TNT1 A 0 A_ChangeVelocity(cos(pitch)*(50*ACS_NamedExecuteWithResult("ImpairmentACS")/100),0,-sin(pitch)*8+(12*ACS_NamedExecuteWithResult("ImpairmentACS")/100),3)
stop
}
}

actor TripleBladeReclingCheck : Powerup
{
Powerup.Duration 5
}

actor BladeReclingSound_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("TripleBladeReclingCheck",1,"Pickup3")
goto Pickup2
Pickup2:
TNT1 A 0 A_PlaySound("classes/bladecling",1,1.0)
stop
Pickup3:
TNT1 A 0 A_PlaySound("classes/bladecling",1,0.25)
stop
}
}

actor BlademanInvSync_P_Reset : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("NoJumpCancel",99)
TNT1 A 0 A_TakeInventory("StunArmor",99)
TNT1 A 0 A_TakeInventory("BladeWallCling",99)
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",999)
TNT1 A 0 A_TakeInventory("BladeSlashBuffer",99)
TNT1 A 0 A_TakeInventory("VivifyDelay4",99)
stop
}
}

actor BlademanInvSync_P_Flash : CustomInventory
{
States
{
Pickup:
TNT1 A 0 //A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("BladeWallCling",999)
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",999)
stop
}
}

actor BlademanInvSync_P_Altfire2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("VivifyDelay4",1)
TNT1 A 0 A_GiveInventory("StunArmor",1)
TNT1 A 0 A_GiveInventory("NoJumpCancel",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_GiveInventory("TripleBladeReclingCheck",1)
TNT1 A 0 A_TakeInventory("BladeWallCling",999)
TNT1 A 0 A_TakeInventory("BladeWallClingNo",99)
TNT1 A 0 A_TakeInventory("BladeSlashBuffer",99)
TNT1 A 0 A_TakeInventory("TripleBladeBossAmmo",5)
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",999)
stop
}
}
actor BlademanInvSync_P_ClingJump : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeSlashBuffer",1)
TNT1 A 0 A_GiveInventory("NoJumpCancel",1)
TNT1 A 0 A_GiveInventory("TripleBladeReclingCheck",1)
TNT1 A 0 A_GiveInventory("VivifyDelay4",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("BladeWallCling",999)
TNT1 A 0 A_TakeInventory("BladeWallClingNo",99)
TNT1 A 0 A_TakeInventory("TripleBladeBossAmmo",5)
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",999)
stop
}
}

actor BlademanInvSync_P_ReadySlash1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeSlashBuffer",1)
TNT1 A 0 A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("TripleBladeClingTimer",999)
TNT1 A 0 A_TakeInventory("NoJumpCancel",99)
TNT1 A 0 A_TakeInventory("StunArmor",99)
TNT1 A 0 A_TakeInventory("BladeWallCling",99)
TNT1 A 0 A_TakeInventory("VivifyDelay4",99)
stop
}
}


actor BlademanInvSync_P_WallClingStart : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 A_GiveInventory("TripleBladeClingTimer",263)
TNT1 A 0 A_TakeInventory("BladeSlashBuffer",99)
stop
}
}


actor BladeSlash
{
Translation "192:192=4:4","198:198=251:251"
PROJECTILE
damagetype "BladeM_Swipe"
Obituary "$OB_BLADESLASH"
+THRUACTORS
+DONTBLAST
+DONTSPLASH
ReactionTime 1
damage (0)
Radius 4
Height 4
speed 75
scale 2.5
States
{
Spawn:
BLDH V 0
BLDH V 1 A_CountDown
wait
Death:
BLDH V 0 A_PlaySoundEx("classes/bladeslice","Weapon")
BLDH V 0
BLDH VVWW 1 A_Explode(6,75,0,0,50)
stop
}
}

actor BladeSlash2 : BladeSlash
{
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
wait
Death:
BLDH V 0
TNT1 AAAA 1 A_Explode(3,75,0,0,75)
stop
}
}

actor BladeSlashB : BladeSlash{Translation "192:192=205:205","198:198=74:74"}
actor BladeSlashR : BladeSlash{Translation "192:192=54:54","198:198=41:41"}
actor BladeSlashO : BladeSlash{Translation "192:192=104:104","198:198=128:128"}
actor BladeSlashP : BladeSlash{Translation "192:192=229:229","198:198=232:232"}


actor BladeWallCheck
{
PROJECTILE
+THRUACTORS
+DONTBLAST
renderstyle none
Damage (0)
Radius 24//32
Height 4
States
{
Spawn:
PLAY A 1
stop
Death:
PLAY A 0
PLAY A 0 A_JumpIfInTargetInventory("BladeWallClingNo",1,"DeathNo")
PLAY A 0 A_GiveToTarget("BladeWallCling",1)
PLAY A 0 A_TakeFromTarget("BladeWallClingEnd",1)
PLAY A 1
stop
DeathNo:
PLAY A 1
stop
}
}

actor BladeDropItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "BldeIcon"
scale 2.0
inventory.pickupmessage "Here, hold this."
Tag "$TAGC_10A3"
+INVBAR
states
{
Spawn:
BLDX Y 1
loop
Use:
TNT1 A 0 A_GiveInventory("BlademanInvSync_P_Flash",1)
TNT1 A 1 //A_ChangeFlag("NOGRAVITY",0)
TNT1 A 0 SetPlayerProperty(0,0,0)
Goto FlashLoop
fail
No:
TNT1 A 0
fail
}
}

actor TripleBladeBossShot
{
Translation "192:192=4:4","198:198=251:251"
PROJECTILE
damagetype "BladeM_Shot"
Obituary "$OB_TRIPLEBLADE"
+RIPPER
Damage (5)
Radius 8
Height 5
Speed 30
Scale 2.5
States
{
Spawn:
//BLDH T 0
//BLDH T 1
//wait
TNT1 A 0
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 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")
X_AA T 1
wait
90Degrees:
X_AA A 1
wait
67P5Degrees:
X_AA B 1
wait
45Degrees:
X_AA C 1
wait
22P5Degrees:
X_AA D 1
wait
0Degrees:
X_AA E 1
wait
N22P5Degrees:
X_AA F 1
wait
N45Degrees:
X_AA G 1
wait
N67P5Degrees:
X_AA H 1
wait
N90Degrees:
X_AA I 1
wait


Death:
TNT1 A 0
stop
}
}

actor TripleBladeBossShotB : TripleBladeBossShot{Translation "192:192=205:205","198:198=74:74"}
actor TripleBladeBossShotR : TripleBladeBossShot{Translation "192:192=54:54","198:198=41:41"}
actor TripleBladeBossShotO : TripleBladeBossShot{Translation "192:192=104:104","198:198=128:128"}
actor TripleBladeBossShotP : TripleBladeBossShot{Translation "192:192=229:229","198:198=232:232"}

actor QuintupleBladeBossShot : TripleBladeBossShot{damage (3)}

actor BlademanMainShot1_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"Pickup2")
goto Pickup1
Pickup1:
TNT1 A 0 A_GiveInventory("BlademanMain1_CI",1)
stop
Pickup2:
TNT1 A 0 A_GiveInventory("BlademanMain1X_CI",1)
stop
}
}

actor BlademanMainShot2_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"Pickup2")
goto Pickup1
Pickup1:
TNT1 A 0 A_GiveInventory("BlademanMain2_CI",1)
stop
Pickup2:
TNT1 A 0 A_GiveInventory("BlademanMain2X_CI",1)
stop
}
}

actor QuintupleBlade_Spawner
{
Translation "192:192=4:4","198:198=251:251"
PROJECTILE
Damagetype "DMGNoHitstun"
Obituary "$OB_LASERTRIDENT"
+SKYEXPLODE
+EXPLODEONWATER
+DONTBLAST
+DONTREFLECT
+THRUACTORS
+NOINTERACTION
RenderStyle "None"
//ReactionTime 6
Damage (0)
radius 2
height 2
Speed 0.1
Scale 1.0
States
{
Spawn:
TNT1 AA 0
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,20,0,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,10,0,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,0,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,-10,0,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,-20,0,momx*900,momy*900,momz*900,0,41)
stop
}
}

actor QuintupleBlade_SpawnerB : QuintupleBlade_Spawner{Translation "192:192=205:205","198:198=74:74"}
actor QuintupleBlade_SpawnerR : QuintupleBlade_Spawner{Translation "192:192=54:54","198:198=41:41"}
actor QuintupleBlade_SpawnerO : QuintupleBlade_Spawner{Translation "192:192=104:104","198:198=128:128"}
actor QuintupleBlade_SpawnerP : QuintupleBlade_Spawner{Translation "192:192=229:229","198:198=232:232"}

actor QuintupleBlade_Spawner2 : QuintupleBlade_Spawner
{
States
{
Spawn:
TNT1 AA 0
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,20,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,10,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,0,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,-10,momx*900,momy*900,momz*900,0,41)
TNT1 A 1 A_SpawnItemEx("QuintupleBladeBossShot",0,0,-20,momx*900,momy*900,momz*900,0,41)
stop
}
}

actor QuintupleBlade_Spawner2B : QuintupleBlade_Spawner2{Translation "192:192=205:205","198:198=74:74"}
actor QuintupleBlade_Spawner2R : QuintupleBlade_Spawner2{Translation "192:192=54:54","198:198=41:41"}
actor QuintupleBlade_Spawner2O : QuintupleBlade_Spawner2{Translation "192:192=104:104","198:198=128:128"}
actor QuintupleBlade_Spawner2P : QuintupleBlade_Spawner2{Translation "192:192=229:229","198:198=232:232"}

actor BlademanMain1_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",9,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",-9,0,0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",9,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",-9,0,0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",9,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",-9,0,0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",9,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",-9,0,0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",9,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",-9,0,0,0,0,0)
goto Done
Done:
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot","Weapon")
stop
}
}
actor BlademanMain1X_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner",0,0,0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_SpawnerB",0,0,0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_SpawnerR",0,0,0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_SpawnerO",0,0,0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_SpawnerP",0,0,0,0,0,0)
goto Done
Done:
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot2","Weapon")
stop
}
}

actor BlademanMain2_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",0,0,0,0,2,-5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",0,0,0,0,2,5)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",0,0,0,0,2,-5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotB",0,0,0,0,2,5)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",0,0,0,0,2,-5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotR",0,0,0,0,2,5)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",0,0,0,0,2,-5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotO",0,0,0,0,2,5)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",0,0,0,0,2,-5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotP",0,0,0,0,2,5)
goto Done
Done:
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot","Weapon")
stop
}
}
actor BlademanMain2X_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner2",0,0,0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner2B",0,0,0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner2R",0,0,0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner2O",0,0,0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("QuintupleBlade_Spawner2P",0,0,0,0,0,0)
goto Done
Done:
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot2","Weapon")
stop
}
}

actor BlademanMain3_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("BladeSlash",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("BladeSlash2",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BladeSlashB",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("BladeSlash2",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BladeSlashR",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("BladeSlash2",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BladeSlashO",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("BladeSlash2",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BladeSlashP",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("BladeSlash2",0,0,0,0)
goto Done
}
}