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

Deselect:
BLDH A 0
goto DeselectSwap
Select:
BLDH A 0
goto SelectSwap

Ready:
BLDH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_BLADEMAN)
BLDH A 0 A_GunFlash("Flash",1)
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("SwordArmAmmo",8,"Ready1a")
BLDH A 35 A_WeaponReady(8+2)
BLDH A 0 A_GiveInventory("SwordArmAmmo",1)
goto Ready2
Ready1a:
BLDH A 35 A_WeaponReady(2)
BLDH A 0 A_GiveInventory("SwordArmAmmo",1)
goto Ready2a

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

Fire:
BLDH A 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
BLDH B 2
BLDH C 2 OffSet(-43,36)A_GiveInventory("Blademan_Fire1_P",1)
BLDH D 2 OffSet(-48,33)
BLDH E 2 OffSet(-43,43)
BLDH E 2 OffSet(-102,53)
TNT1 A 8
BLDH A 2 OffSet(-18,112)
BLDH A 2 OffSet(-12,82)
BLDH A 2 OffSet(-7,60)
BLDH A 2 OffSet(-3,44)
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH A 0 A_GiveInventory("SwordArmAmmo",1)
Goto Ready0

FireOld:
BLDH A 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
//goto Fire2
//Fire2:
BLDH B 0 //A_JumpIf(1,1)
BLDH B 1
BLDH C 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH C 1 OffSet(-43,36)A_GiveInventory("Blademan_Fire1_P",1)
BLDH D 1 OffSet(1,33)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH D 1 OffSet(-48,33)
BLDH E 1 OffSet(1,31)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH E 1 OffSet(-43,43)
BLDH E 1 OffSet(-102,53)A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 9
BLDH A 1 OffSet(8,112)
BLDH A 1 OffSet(7,102)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH A 1 OffSet(6,92)
BLDH A 1 OffSet(5,82)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH A 1 OffSet(4,72)
BLDH A 1 OffSet(3,62)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH A 1 OffSet(2,52)
BLDH A 1 OffSet(1,42)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH A 1 A_WeaponReady(2+4+8)
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH A 0 A_GiveInventory("SwordArmAmmo",1)
Goto Ready0

Altfire:
BLDH A 0 A_JumpIfInventory("BladeWallCling",1,"ClingJump")
BLDH A 0 A_JumpIfInventory("SwordArmAmmo",8,"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_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*8+12,3)
BLDH A 0 A_PlaySound("classes/bladeleap",1,0.75)
BLDH A 2 OffSet(0,52)
BLDH A 2 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_Refire(2)
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(2+8+64)
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_Refire(2)
BLDH F 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH F 1 A_WeaponReady(2+8+64)
loop
AirLoop2_Z:
BLDH F 1 A_WeaponReady(2+8+64)
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 FFFFFFFFFFFFFF 1 A_WeaponReady(2+8+64)
BLDH F 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
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 4 OffSet(0,82)
BLDH A 4 OffSet(0,64)
BLDH A 4 OffSet(0,48)
BLDH A 0 A_JumpIfInventory("SwordArmAmmo",1,"ClingReady")//WallClingBuffer
Goto Ready1
WallClingBuffer:
//4
BLDH A 8 A_WeaponReady(2+4+8+64)//4
Goto ClingReady
WallClingStart2:
BLDH A 0 //A_JumpIf(1,1)
BLDH A 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH A 3 OffSet(0,36)A_Stop
BLDH A 4 OffSet(0,42)
BLDH A 3 OffSet(0,36)
BLDH A 0 A_JumpIfInventory("SwordArmAmmo",1,"ClingReady")//WallClingBuffer2
Goto Ready1
WallClingBuffer2:
//2
BLDH A 8 A_WeaponReady(2+4+8+64)//2
Goto ClingReady

ClingReady:
BLDH A 1 A_WeaponReady
SwapReady:
ClingReadyCheck:
BLDH A 0 A_JumpIfInventory("SwordArmAmmo",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 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
BLDH A 0 A_GiveInventory("VivifyDelay3",1)
BLDH A 5 A_WeaponReady(2+4+8+64)
BLDH A 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH AAAAAA 5 A_WeaponReady(2+8)
Goto Ready0

ClingJump:
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_PlaySound("classes/bladeleap",1,0.75)
BLDH F 2 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*28,3)
Goto AirLoop2

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 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
BLDH F 0 A_ScaleVelocity(0.25)
BLDH F 0 A_FireCustomMissile("BladeSlash",0,0,0,0)
BLDH F 1 OffSet(0,32)
BLDH G 1
BLDH G 1 OffSet(-23,65)
BLDH H 3 OffSet(1,32)
TNT1 A 6
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 A 0 //A_JumpIf(1,1)
BLDH A 2 OffSet(9,107)
BLDH A 2 OffSet(5,77)
BLDH A 2 OffSet(2,52)
Goto Ready0

Flash:
TNT1 A 1 A_GiveInventory("Blademan_Flash_P")
loop
}
}

actor Blademan_W2 : BaseMM8BDMWep_CBM
{
tag "$TAGC_10A2"
dropitem "TripleBladeWep"
Weapon.AmmoUse 8
Weapon.AmmoGive 28
Obituary "$OB_TRIPLEBLADEMAN"
weapon.ammotype "SwordArmAmmo"
Inventory.Pickupmessage "Picked up Blade Man's left arm?"
+WEAPON.ALT_USES_BOTH
+WEAPON.NOAUTOAIM
inventory.icon "BLDHZICO"
States
{
Spawn:
C_10 A 1
loop

Deselect:
BLDH I 0
goto DeselectSwap
Select:
BLDH I 0
goto SelectSwap

Ready:
BLDH I 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_BLADEMAN)
BLDH I 0 A_GunFlash("Flash",1)
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("SwordArmAmmo",8,"Ready1a")
BLDH I 35 A_WeaponReady(2+8)
BLDH I 0 A_GiveInventory("SwordArmAmmo",1)
goto Ready2
Ready1a:
BLDH I 35 A_WeaponReady(2)
BLDH I 0 A_GiveInventory("SwordArmAmmo",1)
goto Ready2a

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

Fire:
BLDH I 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
BLDH J 2
BLDH K 2 OffSet(43,36)A_GiveInventory("Blademan_Fire2_P",1)
BLDH L 2 OffSet(48,33)
BLDH M 2 OffSet(43,43)
BLDH M 2 OffSet(102,53)
TNT1 A 8
BLDH I 2 OffSet(18,112)
BLDH I 2 OffSet(12,82)
BLDH I 2 OffSet(7,60)
BLDH I 2 OffSet(3,44)
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH I 0 A_GiveInventory("SwordArmAmmo",1)
Goto Ready0

FireOld:
BLDH I 0 A_JumpIfInventory("BladeSlashBuffer",1,"BladeSlash")
//goto Fire2
//Fire2:
BLDH J 0 //A_JumpIf(1,1)
BLDH J 1
BLDH K 1 A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH K 1 OffSet(43,36)A_GiveInventory("Blademan_Fire2_P",1)
BLDH L 1 OffSet(-1,33)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH L 1 OffSet(48,33)
BLDH M 1 OffSet(-1,31)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH M 1 OffSet(43,43)
BLDH M 1 OffSet(102,53)A_JumpIfInventory("PlayerPropertyRage",1,1)
TNT1 A 9
BLDH I 1 OffSet(-8,112)
BLDH I 1 OffSet(-7,102)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH I 1 OffSet(-6,92)
BLDH I 1 OffSet(-5,82)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH I 1 OffSet(-4,72)
BLDH I 1 OffSet(-3,62)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH I 1 OffSet(-2,52)
BLDH I 1 OffSet(-1,42)A_JumpIfInventory("PlayerPropertyRage",1,1)
BLDH I 1 A_WeaponReady(2+4+8)
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingReadyCheck")
BLDH I 0 A_GiveInventory("SwordArmAmmo",1)
Goto Ready0

Altfire:
BLDH I 0 A_JumpIfInventory("BladeWallCling",1,"ClingJump")
BLDH I 0 A_JumpIfInventory("SwordArmAmmo",8,"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_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*8+12,3)
BLDH I 0 A_PlaySound("classes/bladeleap",1,0.75)
BLDH I 2 OffSet(0,52)
BLDH I 2 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_Refire(2)
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(2+8+64)
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_Refire(2)
BLDH N 0 A_SpawnItemEx("BladeWallCheck",0,0,40,momx,momy,0,0,8)
BLDH N 1 A_WeaponReady(2+8+64)
loop
AirLoop2_Z:
BLDH N 1 A_WeaponReady(2+8+64)
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 NNNNNNNNNNNNNN 1 A_WeaponReady(2+8+64)
BLDH N 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
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 4 OffSet(0,82)
BLDH I 4 OffSet(0,64)
BLDH I 4 OffSet(0,48)
BLDH I 0 A_JumpIfInventory("SwordArmAmmo",1,"ClingReady")//WallClingBuffer
Goto Ready1
WallClingBuffer:
//4
BLDH I 8 A_WeaponReady(2+4+8+64)//4
Goto ClingReady
WallClingStart2:
BLDH I 0 //A_JumpIf(1,1)
BLDH I 0 A_GiveInventory("BlademanInvSync_P_WallClingStart",1)
BLDH I 3 OffSet(0,36)A_Stop
BLDH I 4 OffSet(0,42)
BLDH I 3 OffSet(0,36)
BLDH I 0 A_JumpIfInventory("SwordArmAmmo",1,"ClingReady")//WallClingBuffer2
Goto Ready1
WallClingBuffer2:
//2
BLDH I 8 A_WeaponReady(2+4+8+64)//2
Goto ClingReady

ClingReady:
BLDH I 1 A_WeaponReady
SwapReady:
ClingReadyCheck:
BLDH I 0 A_JumpIfInventory("SwordArmAmmo",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 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
BLDH I 0 A_GiveInventory("VivifyDelay3",1)
BLDH I 5 A_WeaponReady(2+4+8+64)
BLDH I 0 A_GiveInventory("BlademanInvSync_P_Reset",1)
BLDH IIIIII 5 A_WeaponReady(2+8)
Goto Ready0

ClingJump:
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_PlaySound("classes/bladeleap",1,0.75)
BLDH N 2 A_ChangeVelocity(cos(pitch)*50,0,-sin(pitch)*28,3)
Goto AirLoop2

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 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
BLDH N 0 A_ScaleVelocity(0.25)
BLDH N 0 A_FireCustomMissile("BladeSlash",0,0,0,0)
BLDH N 1 OffSet(0,32)
BLDH O 1
BLDH O 1 OffSet(23,65)
BLDH P 3 OffSet(-1,32)
TNT1 A 6
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 2 OffSet(-9,107)
BLDH I 2 OffSet(-5,77)
BLDH I 2 OffSet(-2,52)
Goto Ready0

Flash:
TNT1 A 1 A_GiveInventory("Blademan_Flash_P")
loop
}
}


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

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

actor BlademanFlash_F : Inventory {}

actor BlademanFullReset_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_TakeInventory("BladeWallCling")
TNT1 A 0 A_TakeInventory("BladeWallClingEnd")
TNT1 A 0 A_TakeInventory("BladeWallClingNo")
TNT1 A 0 A_TakeInventory("BladeSlashBuffer")
TNT1 A 0 A_TakeInventory("BlademanFlash_F")
stop
}
}

actor Blademan_Flash_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"FCling")
TNT1 A 0 A_JumpIfInventory("BlademanFlash_F",1,"FEnd")
stop
FCling:
TNT1 A 0 A_JumpIfInventory("BlademanFlash_F",1,"FClingLoop")
TNT1 A 0 A_PlaySoundEx("classes/bladecling","Body")
//TNT1 A 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,2)
TNT1 A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
TNT1 A 0 A_GiveInventory("BlademanFlash_F",1)
FClingLoop:
TNT1 A 0 A_GiveInventory("BladeWallAmmoTake_P",1)
TNT1 A 0 A_JumpIfInventory("PlayerPropertyGrounded",1,2)
TNT1 A 0 A_Stop
TNT1 A 0 A_JumpIf(z-floorz<=16,"FEnd")
TNT1 A 0 A_JumpIf(CallACS("cbm_bladedropcheck")==1,"FEnd")//C_JAX_CHECK_JUMP
stop
FEnd:
TNT1 A 0 A_GiveInventory("BlademanInvSync_P_Flash",1)
//TNT1 A 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,0)
TNT1 A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
TNT1 A 0 A_TakeInventory("BlademanFlash_F")
stop
}
}

actor BladeWallAmmoTake_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("CutterFlag",49,"PickupT")
TNT1 A 0 A_GiveInventory("CutterFlag",1)
stop
PickupT:
TNT1 A 0 A_TakeInventory("CutterFlag")
TNT1 A 0 A_TakeInventory("SwordArmAmmo",1)
stop
}
}

actor BlademanInvSync_P_Reset : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("CBM_BeatBoostRemoveCheck_P")
TNT1 A 0 A_GiveInventory("VivifyDelay3",1)
TNT1 A 0 A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("NoJumpCancel")
TNT1 A 0 A_TakeInventory("BladeWallCling")
TNT1 A 0 A_TakeInventory("BladeSlashBuffer")
TNT1 A 0 A_TakeInventory("VivifyFlag1")
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")
TNT1 A 0 A_TakeInventory("CutterFlag")
stop
}
}

actor BlademanInvSync_P_Altfire2 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("VivifyFlag1",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,true)
TNT1 A 0 A_GiveInventory("NoJumpCancel",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("BladeWallCling")
TNT1 A 0 A_TakeInventory("BladeWallClingNo")
TNT1 A 0 A_TakeInventory("BladeSlashBuffer")
TNT1 A 0 A_TakeInventory("SwordArmAmmo",3)
TNT1 A 0 A_TakeInventory("SwordArmAmmo",4,1)//5
stop
}
}
actor BlademanInvSync_P_ClingJump : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeSlashBuffer",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,true)
TNT1 A 0 A_GiveInventory("NoJumpCancel",1)
TNT1 A 0 A_GiveInventory("VivifyFlag1",1)
TNT1 A 0 A_GiveInventory("BladeWallClingEnd",1)
TNT1 A 0 A_TakeInventory("BladeWallCling")
TNT1 A 0 A_TakeInventory("BladeWallClingNo")
TNT1 A 0 A_TakeInventory("SwordArmAmmo",1)
TNT1 A 0 A_TakeInventory("SwordArmAmmo",3,1)
stop
}
}

actor BlademanInvSync_P_ReadySlash1 : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("VivifyDelay3",1)
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("NoJumpCancel")
TNT1 A 0 A_TakeInventory("BladeWallCling")
TNT1 A 0 A_TakeInventory("VivifyFlag1")
stop
}
}


actor BlademanInvSync_P_WallClingStart : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("BladeWallClingNo",1)
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_NoHitStunplayer",0,false)
TNT1 A 0 A_TakeInventory("BladeSlashBuffer")
TNT1 A 0 A_TakeInventory("VivifyFlag1")
stop
}
}


actor BladeSlash : ProjSpawnFuncActor
{
PROJECTILE
damagetype "BladeM_Swipe"
Obituary "$OB_BLADESLASH"
+THRUACTORS
+DONTBLAST
+DONTSPLASH
ReactionTime 1
damage (0)
Radius 4
Height 4
speed 85
scale 2.5
States
{
Spawn:
BLDH V 0
BLDH V 1 A_CountDown
wait
Death:
BLDH V 0 A_PlaySoundEx("classes/bladeslice","Weapon")
BLDH VVWW 1 A_Explode(90,82,0,0,82)
stop
}
}

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 TripleBladeBossShot : ProjSpawnFuncActor
{
PROJECTILE
damagetype "BladeM_Shot"
Obituary "$OB_TRIPLEBLADE"
+RIPPER
Damage (50)
Radius 8
Height 5
Speed 40
Scale 2.5
States
{
Spawn:
//BLDH T 0
//BLDH T 1
//wait
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")
TRIP B 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 TripleBladeBossShotMulti : TripleBladeBossShot
{
Obituary "$OB_TRIPLEBLADEMAN"
}

actor Blademan_Fire1_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"Pickup2")
goto Pickup1
Pickup1:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",10,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShot",-10,0,0,0,0,0)
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot","Weapon")
stop
Pickup2:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",5,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",10,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",-5,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",-10,0,0,0,0,0)
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot2","Weapon")
stop
}
}

actor Blademan_Fire2_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("BladeWallCling",1,"Pickup2")
goto Pickup1
Pickup1:
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)
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot","Weapon")
stop
Pickup2:
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,2,2.5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,2,5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,2,-2.5)
TNT1 A 0 A_FireCustomMissile("TripleBladeBossShotMulti",0,0,0,0,2,-5)
TNT1 A 0 A_PlaySoundEx("classes/bladeshoot2","Weapon")
stop
}
}

actor Blademan_W_NormalBar : NormalBar {Args 4,251}
actor Blademan_W2_NormalBar : NormalBar {Args 4,251}