actor KingAxeBoss : BaseMM8BDMWep_CBM 
{
tag "$TAGC_BG"
dropitem "CopyClassUpgradeDropped"
Weapon.AmmoUse 0
Weapon.AmmoGive 168
Obituary "$OB_KINGSPIN"
Inventory.Pickupmessage "King?"
weapon.ammotype "DinnerAmmo"
inventory.icon "KingWep1"
States
{
Spawn:
C_0B G 1
loop
Ready:
KINH A 0 ACS_ExecuteAlways(998,0,DYE_KINGMAN)
goto Ready1
Ready1:
KINH A 0 A_GunFlash("Flash",GFF_NOEXTCHANGE)
goto Ready2

Ready2:
KINH A 0 A_JumpIfInventory("TheKingStaminaDelay",1,"Ready2a")
KINH A 0 A_JumpIfInventory("DinnerAmmo",42,"Ready3")
KINH A 2 A_WeaponReady(8)
KINH A 0 A_GiveInventory("DinnerAmmo",2)
KINH A 0 A_TakeInventory("TheKingStamina",2)
goto Ready2+1
Ready2a:
KINH A 0 A_JumpIfInventory("DinnerAmmo",42,"Ready3a")
KINH A 2 A_WeaponReady(8)
KINH A 0 A_GiveInventory("DinnerAmmo",2)
goto Ready2

Ready3:
KINH A 0 A_JumpIfInventory("TheKingStaminaDelay",1,"Ready3a")
KINH A 2 A_WeaponReady
KINH A 0 A_GiveInventory("DinnerAmmo",2)
KINH A 0 A_TakeInventory("TheKingStamina",2)
goto Ready3+1
Ready3a:
KINH A 2 A_WeaponReady
KINH A 0 A_GiveInventory("DinnerAmmo",2)
goto Ready3

Deselect:
KINH A 0 OffSet(2,34)
KINH AAA 0 A_Lower
KINH A 1 A_Lower
goto Deselect+1
Select:
KINH AAA 0 A_Raise
KINH A 1 A_Raise
loop

Flash:
TNT1 A 1
stop

Fire:
KINH A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"FireAir")
goto FireGround
FireAir:
KINH D 0 OffSet(-10,12)A_PlaySoundEx("weapon/TheKingAxeV","Weapon")
KINH D 0 OffSet(-10,22)
KINH E 0 OffSet(-10,32)
KINH D 0 A_JumpIfInventory("PowerRage_ST",1,"FireAir_R")
KINH E 1 A_GiveInventory("KingMainA1_CI",1)
KINH E 1 OffSet(-10,42)A_GiveInventory("KingMainA2_CI",1)
KINH F 1 OffSet(1,33)A_GiveInventory("KingMainA3_CI",1)
KINH F 1 OffSet(-11,52)
KINH F 1 OffSet(-23,72)
TNT1 A 7 OffSet(14,172)
goto FireEnd
FireAir_R:
KINH E 1 A_GiveInventory("KingMainA1_CI",1)
KINH E 1 OffSet(-10,42)A_GiveInventory("KingMainA2_CI",1)
KINH F 1 OffSet(1,33)A_GiveInventory("KingMainA3_CI",1)
KINH F 1 OffSet(-11,52)
KINH F 1 OffSet(-23,72)
TNT1 A 3 OffSet(14,172)
goto FireEnd
FireGround:
KINH D 0 A_JumpIfInventory("PowerRage_ST",1,"FireGround_R")
KINH D 3 A_PlaySoundEx("weapon/TheKingAxeH","Weapon")
KINH H 1 A_GiveInventory("KingMain1_CI",1)
KINH H 1 OffSet(-40,34)A_GiveInventory("KingMain2_CI",1)
KINH H 1 OffSet(-82,36)A_GiveInventory("KingMain3_CI",1)
KINH H 1 OffSet(-126,38)A_GiveInventory("KingMain4_CI",1)
KINH H 1 OffSet(-172,40)A_GiveInventory("KingMain5_CI",1)
KINH H 1 OffSet(-220,42)
TNT1 A 3 OffSet(14,172)
goto FireEnd
FireGround_R:
KINH D 2 A_PlaySoundEx("weapon/TheKingAxeH","Weapon")
KINH H 1 A_GiveInventory("KingMain1_CI",1)
KINH H 1 OffSet(-50,34)A_GiveInventory("KingMain2_CI",1)
KINH H 1 OffSet(-102,36)A_GiveInventory("KingMain3_CI",1)
KINH H 1 OffSet(-156,38)A_GiveInventory("KingMain4_CI",1)
KINH H 1 OffSet(-202,40)A_GiveInventory("KingMain5_CI",1)
TNT1 A 2 OffSet(14,172)
goto FireEnd
FireEnd:
KINH A 0 A_JumpIfInventory("PowerRage_ST",1,"FireEnd_R")
KINH A 1 OffSet(14,172)
KINH A 1 OffSet(12,152)
KINH A 1 OffSet(10,132)
KINH A 1 OffSet(8,112)
KINH A 1 OffSet(6,92)
KINH A 1 OffSet(4,72)
KINH A 1 OffSet(2,52)
Goto Ready2
FireEnd_R:
KINH A 1 OffSet(16,192)
KINH A 1 OffSet(12,152)
KINH A 1 OffSet(8,112)
KINH A 1 OffSet(4,72)
Goto Ready2

AltFire:
KINH A 0 A_JumpIfInventory("DinnerAmmo",42,"AltFire2")
Goto Ready2
AltFire2:
KINH E 0 A_GiveInventory("TheKingSpinFlag",1)
KINH E 0 A_Refire(1)
KINH E 1 offset(-4,34)A_JumpIfInventory("PowerRage_ST",1,"AltFire2_R")
KINH E 1 offset(-8,34)
goto SpinToWin
AltFire2_R:
KINH E 1 offset(-6,34)
goto SpinToWin
SpinToWin:
KINH I 0 A_JumpIfInventory("DinnerAmmo",1,"SpinToWin2")
goto AltFireEnd
SpinToWin2:
KINH I 0 A_JumpIfInventory("PowerRage_ST",1,"SpinToWin_R")
KINH I 0 A_TakeInventory("DinnerAmmo",4)
KINH I 1 offset(-6,52)A_GiveInventory("TheKingSpinSnd_P",1)
//KINH A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"AltfireAir")
KINH J 0 A_GiveInventory("TheKingSpinSnd_P",1)
KINH J 0 A_FireCustomMissile("TheKingSpinAlt",0,0,0,0)
KINH J 1 offset(-6,52)A_GiveInventory("TheKingSpinBoost",1)
KINH A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"AltfireAir")
KINH J 0 A_Refire("SpinToWin")
goto AltFireEnd
SpinToWin_R:
KINH I 0 A_TakeInventory("DinnerAmmo",8)
KINH I 0 A_GiveInventory("TheKingSpinSnd_P",1)
KINH I 0 A_FireCustomMissile("TheKingSpinAlt",0,0,0,0)
KINH I 1 offset(-6,52)A_GiveInventory("TheKingSpinBoost",1)
KINH A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"AltfireAir")
KINH J 0 A_GiveInventory("TheKingSpinSnd_P",1)
KINH J 0 A_FireCustomMissile("TheKingSpinAlt",0,0,0,0)
KINH J 1 offset(-6,52)A_GiveInventory("TheKingSpinBoost",1)
KINH A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"AltfireAir")
KINH J 0 A_Refire("SpinToWin")
goto AltFireEnd

AltFireEnd:
KINH I 0 A_GiveInventory("TheKingSpinSnd_P",1)
KINH IJ 2 offset(-6,52)
KINH IJ 3 offset(-6,52)A_TakeInventory("TheKingSpinFlag",20)
KINH E 1 offset(-8,34)A_JumpIfInventory("PowerRage_ST",1,"AltFireEnd_R")
KINH E 1 offset(-4,34)
Goto Ready2
AltFireEnd_R:
KINH E 1 offset(-6,34)
Goto Ready2

AltfireAir:
KINH A 0 A_JumpIfInventory("DinnerAmmo",80,1)
goto SpinToWin
KINH D 0 ACS_NamedExecuteWithResult("BULL_SetState",1)
KINH D 0 A_PlaySoundEx("weapon/axerisechop","Body")
KINH D 0 A_TakeInventory("UnSolid",1)
KINH D 0 A_ChangeFlag("SOLID",0)
KINH D 0 A_ChangeVelocity(25,0,25,3)
KINH D 1 A_TakeInventory("DinnerAmmo",80)
AltfireAirLoop:
KINH D 1 A_ChangeVelocity(1.25,0,-2.5,1)
KINH D 0 A_JumpIf(z-floorz==0,"AltfireAirChop")
loop
AltfireAirChop:
TNT1 A 0 A_SpawnItemEx("ResolidifyPlayer_H")
KINH D 0 A_ScaleVelocity(.25)
KINH D 0 A_PlaySoundEx("weapon/torchpunch","Weapon")
//KINH E 0 A_GiveInventory("KingMainA1_CI",1)
KINH E 0 A_GiveInventory("KingMainA1_CI",1)
KINH F 0 A_GiveInventory("KingMainA2_CI",1)
KINH F 0 A_GiveInventory("KingMainA3_CI",1)
//KINH F 0 A_GiveInventory("KingMainA5_CI",1)
KINH A 1 A_TakeInventory("TheKingSpinFlag",20)
KINH E 1 OffSet(-10,42)
KINH F 1 OffSet(1,33)
KINH F 1 OffSet(-11,52)
KINH F 1 OffSet(-23,72)
TNT1 A 7 OffSet(14,172)
goto FireEnd


NoAmmo:
KINH A 0
Goto Ready2
}
}

actor KingShieldBoss : BaseMM8BDMWep_CBM 
{
tag "$TAGC_BG2"
dropitem "CopyClassUpgradeDropped"
weapon.preferredskin "King-Shield"
Weapon.AmmoUse 0
Weapon.AmmoGive 168
Obituary "$OB_KINGSHIELD"
Inventory.Pickupmessage "King!"
weapon.ammotype "DinnerAmmo"
inventory.icon "KingWep2"
States
{
Spawn:
C_0B G 1
loop
Ready:
KINH S 0 ACS_ExecuteAlways(998,0,DYE_KINGMAN)
goto Ready1
Ready1:
KINH S 0 A_JumpIfInventory("TheKingLostShield",1,"Ready4")
KINH S 0 A_GiveInventory("VivifyDelay10",1)
KINH S 0 A_TakeInventory("StopShield",1)
KINH S 0 A_GunFlash("Flash",GFF_NOEXTCHANGE)
goto Ready2
Ready2:
KINH S 0 A_JumpIfInventory("VivifyDelay10",1,"Ready2a")
KINH S 0 A_JumpIfInventory("TheKingStaminaDelay",1,"Ready2b")
goto Ready3
Ready2a:
KINH S 2 A_WeaponReady(4)
KINH S 0 A_GiveInventory("DinnerAmmo",2)
goto Ready2
Ready2b:
KINH S 2 A_WeaponReady
KINH S 0 A_GiveInventory("DinnerAmmo",2)
goto Ready2

Ready3:
KINH S 2 A_WeaponReady
KINH S 0 A_GiveInventory("DinnerAmmo",2)
KINH S 0 A_TakeInventory("TheKingStamina",3)
loop

Ready4:
KINH K 2 A_WeaponReady(4)
KINH K 0 A_GiveInventory("DinnerAmmo",1)
KINH K 0 A_TakeInventory("TheKingStamina",2)
KINH K 0 A_JumpIfInventory("TheKingStamina",1,"Ready4")
KINH L 0 A_TakeInventory("TheKingLostShield",1)
KINH L 2 A_WeaponReady(12)
KINH L 0 A_GiveInventory("DinnerAmmo",1)
KINH M 2 A_WeaponReady(12)
KINH M 0 A_GiveInventory("DinnerAmmo",1)
goto Ready1+2

Deselect:
KINH S 0 A_GiveInventory("StopShield",1)
KINH S 0 OffSet(-2,34)A_JumpIfInventory("TheKingLostShield",1,"Deselect2")
KINH SSS 0 A_Lower
KINH S 1 A_Lower
goto Deselect+2
Deselect2:
KINH KKK 0 A_Lower
KINH K 1 A_Lower
loop
Select://TNT1 AAAAAAAAAAAAAAAAAAAAAA
KINH S 0 A_JumpIfInventory("TheKingLostShield",1,"Select2")
KINH SSS 0 A_Raise
KINH S 1 A_Raise
goto Select+1
Select2:
KINH KKK 0 A_Raise
KINH K 1 A_Raise
loop

Fire:
KINH S 0 A_GunFlash("NoFlash",GFF_NOEXTCHANGE)
KINH S 0 A_PlaySoundEx("weapon/TheKingShield","Weapon")
KINH S 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,85,100)//75% speed
KINH S 0 A_JumpIfInventory("PowerRage_ST",1,"FireRage")
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-14,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(18,30)A_SpawnItemEx("TheKingShieldFX",28,-14,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-10,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(36,28)A_SpawnItemEx("TheKingShieldFX",28,-10,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-7,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(50,26)A_SpawnItemEx("TheKingShieldFX",28,-7,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-4,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(64,24)A_SpawnItemEx("TheKingShieldFX",28,-4,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-2,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(76,22)A_SpawnItemEx("TheKingShieldFX",28,-2,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",6)
KINH S 0 A_SpawnItemEx("TheKingShieldX2",28,0,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(88,20)A_SpawnItemEx("TheKingShieldFX",28,0,2,momx,momy,momz,0,9,0)
KINH S 0 A_GunFlash("FlashMain",GFF_NOEXTCHANGE)
KINH S 0 A_GiveInventory("VivifyDelay6",1)
KINH S 0 A_SpawnItemEx("TheKingShieldSparkle0",0,0,28,0,0,0,0,1,0)
goto FireL1
FireRage:
KINH S 0 A_GiveInventory("TheKingStamina",12)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-14,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(18,30)A_SpawnItemEx("TheKingShieldFX",28,-14,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",12)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-4,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(64,24)A_SpawnItemEx("TheKingShieldFX",28,-4,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStamina",12)
KINH S 0 A_SpawnItemEx("TheKingShieldX2",28,0,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(88,20)A_SpawnItemEx("TheKingShieldFX",28,0,2,momx,momy,momz,0,9,0)
KINH S 0 A_GunFlash("FlashMain",GFF_NOEXTCHANGE)
KINH S 0 //A_GiveInventory("VivifyDelay4",1)
KINH S 0 A_SpawnItemEx("TheKingShieldSparkle0",0,0,28,0,0,0,0,1,0)
goto FireL1
FireL1:
KINH R 1 OffSet(98,19)A_GiveInventory("TheKingShieldFlag",1)
KINH R 0 A_Refire(1)
goto FireEnd
KINH R 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH R 0 A_JumpIfInventory("VivifyDelay6",1,"FireL1")
KINH S 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL2
FireL2:
KINH S 1 A_GiveInventory("TheKingShieldFlag",1)
KINH S 0 A_Refire(1)
goto FireEnd
KINH S 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH S 0 A_JumpIfInventory("VivifyDelay6",1,"FireL2")
KINH T 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL3
FireL3:
KINH T 1 A_GiveInventory("TheKingShieldFlag",1)
KINH T 0 A_Refire(1)
goto FireEnd
KINH T 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH T 0 A_JumpIfInventory("VivifyDelay6",1,"FireL3")
KINH U 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL4
FireL4:
KINH U 1 A_GiveInventory("TheKingShieldFlag",1)
KINH U 0 A_Refire(1)
goto FireEnd
KINH U 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH U 0 A_JumpIfInventory("VivifyDelay6",1,"FireL4")
KINH T 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL5
FireL5:
KINH T 1 A_GiveInventory("TheKingShieldFlag",1)
KINH T 0 A_Refire(1)
goto FireEnd
KINH T 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH T 0 A_JumpIfInventory("VivifyDelay6",1,"FireL5")
KINH S 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL6
FireL6:
KINH S 1 A_GiveInventory("TheKingShieldFlag",1)
KINH S 0 A_Refire(1)
goto FireEnd
KINH S 0 A_JumpIfInventory("TheKingStamina",224,"FireEndBreak")
KINH S 0 A_JumpIfInventory("VivifyDelay6",1,"FireL6")
KINH R 0 A_GiveInventory("TheKingStamina_P",1)
goto FireL1

FireEnd:
KINH S 0 A_GunFlash("NoFlash",GFF_NOEXTCHANGE)
KINH S 0 A_GiveInventory("StopShield",1)
KINH S 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,1,1)//100% speed
KINH S 0 A_JumpIfInventory("PowerRage_ST",1,"FireEndR")
KINH S 0 A_SpawnItemEx("TheKingShieldX2",28,0,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(88,20)A_SpawnItemEx("TheKingShieldFX",28,0,2,momx,momy,momz,0,9,0)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-2,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(76,22)A_SpawnItemEx("TheKingShieldFX",28,-2,2,momx,momy,momz,0,9,0)
KINH S 0 A_TakeInventory("TheKingShieldFlag",999)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-4,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(64,24)A_SpawnItemEx("TheKingShieldFX",28,-4,2,momx,momy,momz,0,9,0)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-7,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(50,26)A_SpawnItemEx("TheKingShieldFX",28,-7,2,momx,momy,momz,0,9,0)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-10,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStaminaDelay",1)
KINH S 1 OffSet(36,28)A_SpawnItemEx("TheKingShieldFX",28,-10,2,momx,momy,momz,0,9,0)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-14,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(18,30)A_SpawnItemEx("TheKingShieldFX",28,-14,2,momx,momy,momz,0,9,0)
goto Ready1
FireEndR:
KINH S 0 A_SpawnItemEx("TheKingShieldX2",28,0,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(88,20)A_SpawnItemEx("TheKingShieldFX",28,0,2,momx,momy,momz,0,9,0)
KINH S 0 A_TakeInventory("TheKingShieldFlag",999)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-4,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(64,24)A_SpawnItemEx("TheKingShieldFX",28,-4,2,momx,momy,momz,0,9,0)
KINH S 0 A_GiveInventory("TheKingStaminaDelay",1)
KINH S 0 A_SpawnItemEx("TheKingShieldX1",28,-10,2,momx,momy,momz,0,9,0)
KINH S 1 OffSet(36,28)A_SpawnItemEx("TheKingShieldFX",28,-10,2,momx,momy,momz,0,9,0)
goto Ready1
FireEndBreak:
KINH K 0 A_GunFlash("NoFlash",GFF_NOEXTCHANGE)
KINH K 0 A_GiveInventory("StopShield",1)
KINH K 0 A_PlaySoundEx("DyHead/YayoiPunch","Weapon")
KINH K 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,1,1)//100% speed
KINH K 0 A_SpawnItemEx("TheKingShieldDeath",28,0,2,8,0,momz+3,0,1)

KINH K 0 A_JumpIfInventory("PowerRage_ST",1,"FireEndBreakR")
KINH K 1 OffSet(88,20)
KINH K 1 OffSet(76,22)
KINH K 0 A_TakeInventory("TheKingShieldFlag",999)
KINH K 1 OffSet(64,24)
KINH K 1 OffSet(50,26)
KINH K 1 OffSet(36,28)A_GiveInventory("TheKingLostShield",1)
KINH K 1 OffSet(18,30)
goto Ready4
FireEndBreakR:
KINH K 1 OffSet(88,20)
KINH K 0 A_TakeInventory("TheKingShieldFlag",999)
KINH K 1 OffSet(64,24)
KINH K 1 OffSet(36,28)A_GiveInventory("TheKingLostShield",1)
goto Ready4


AltFire:
KINH "#" 0 A_GunFlash("NoFlash",GFF_NOEXTCHANGE)
KINH "#" 0 A_GiveInventory("StopShield",1)
KINH "#" 0 A_GiveInventory("TheKingXFlag",1)
KINH "#" 0 A_Refire(1)
KINH "#" 0 A_GunFlash("FlashAlt",GFF_NOEXTCHANGE)
KINH "#" 2 OffSet(-16,42)
KINH "#" 2 OffSet(-32,52)
KINH "#" 2 OffSet(-46,62)
KINH "#" 2 OffSet(-60,72)
goto AltFire_1
AltFire_1://Start Up
KINH "#" 1 OffSet(-64,72)
KINH "#" 1 OffSet(-60,72)
KINH "#" 0 A_Refire("AltFire_2")
goto AltFireEnd
AltFire_2:
KINH "#" 1 OffSet(-64,72)
KINH "#" 1 OffSet(-60,72)
KINH "#" 0 A_Refire("AltFire_3")
goto AltFireEnd
AltFire_3:
KINH "#" 1 OffSet(-64,72)
KINH "#" 1 OffSet(-60,72)
KINH "#" 0 A_Refire("AltFire_4")
goto AltFireEnd
AltFire_4:
KINH "#" 1 OffSet(-64,72)
KINH "#" 1 OffSet(-60,72)
KINH "#" 0 A_Refire("AltFire2")
goto AltFireEnd
AltFire2:
KINH "#" 0 A_JumpIfInventory("TheKingXAttackDelay",1,"AltFireWait")
KINH "#" 0 A_PlaySoundEx("misc/kingblast","Weapon")
KINH "#" 0 A_GiveInventory("TheKingXAttackDelay_RC",1)
KINH "#" 0 A_GiveInventory("KingMainX_CI",1)
goto AltFireWait
AltFireWait:
KINH "#" 2 OffSet(-64,72)A_RailWait
KINH "#" 2 OffSet(-60,72)
KINH "#" 0 A_Refire("AltFire2")
goto AltFireEnd
AltFireEnd:
KINH "#" 2 OffSet(-46,62)A_TakeInventory("TheKingXFlag",9)
KINH "#" 2 OffSet(-32,52)
KINH "#" 2 OffSet(-16,42)
KINH "#" 0 A_JumpIfInventory("TheKingLostShield",1,"Ready4")
Goto Ready1+2

AltFireX:
KINH S 0 A_JumpIfInventory("DinnerAmmo",40,1)
Goto Ready2
KINH S 0 A_PlaySoundEx("weapon/TrioCharge3","Weapon")
KINH S 0 A_GiveInventory("KingShield2_CI",1)
KINH S 4 A_TakeInventory("DinnerAmmo",40)
Goto Ready2

Flash:
TNT1 A 0 A_GiveInventory("TheKingShieldHitbox_P",1)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_SpawnItemEx("TheKingShieldFX",28,-18,2,momx,momy,momz,0,9,0)
goto Flash+1

FlashMain:
TNT1 A 0 A_GiveInventory("TheKingShieldHitboxB_P",1)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_SpawnItemEx("TheKingShieldFX0",28,0,2,momx,momy,momz,0,9,0)
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,3)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_SpawnItemEx("TheKingShieldFX0",28,0,2,momx,momy,momz,0,9,0)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1 A_SpawnItemEx("TheKingShieldFX0",28,0,2,momx,momy,momz,0,9,0)
TNT1 A 0 A_GiveInventory("DinnerAmmo",1)
goto FlashMain+1

FlashAlt:
TNT1 A 4
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_GiveInventory("DinnerAmmo",1)
loop

NoAmmo:
MGCH A 0
Goto Ready+2
}
}


actor DinnerAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 168
+INVENTORY.IGNORESKILL
}

actor TheKingShieldFlag : Inventory
{
inventory.amount 1
inventory.maxamount 112
}

actor TheKingStaminaDelay : Powerup
{
Powerup.Duration 70
}
actor TheKingStamina : Inventory
{
inventory.amount 1
inventory.maxamount 224
}
actor TheKingLostShield : OnceC {}

actor TheKingXFlag : OnceC {}
actor TheKingSpinFlag : Inventory
{
inventory.amount 1
inventory.maxamount 2
}

actor TheKingShieldDelay : Powerup
{
Powerup.Duration 5//35
}

actor TheKingXAttackDelay : Powerup
{
+INVENTORY.ADDITIVETIME
Powerup.Duration 20
}

actor TheKingSpinSnd : Powerup
{
+INVENTORY.ADDITIVETIME
Powerup.Duration 3
}

actor TheKingXAttackDelay_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("TheKingXAttackDelay",1)
goto PickupR
PickupR:
TNT1 A 0 A_GiveInventory("TheKingXAttackDelay",1)
stop
}
}

actor TheKingSpinBoost : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
TNT1 A 0 A_JumpIfInventory("ImpairmentStack",1,2)
TNT1 A 0 A_Recoil(-1.1)
stop
TNT1 A 0 A_Recoil(-1.1*ACS_NamedExecuteWithResult("ImpairmentACS")/100)
stop
Ground:
TNT1 A 0 A_JumpIfInventory("ImpairmentStack",1,2)
TNT1 A 0 A_Recoil(-1.6)
stop
TNT1 A 0 A_Recoil(-1.6*ACS_NamedExecuteWithResult("ImpairmentACS")/100)
stop
}
}

actor TheKingSpinBoostStarter : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
TNT1 A 0 A_Recoil(-1.5)
stop
Ground:
TNT1 A 0 A_Recoil(-2.0)
stop
}
}

actor TheKingSpinSnd_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TheKingSpinSnd",1,"No")
TNT1 A 0 A_PlaySoundEx("weapon/TheKingSpin","Weapon")
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("TheKingSpinSnd",1)
goto PickupR
PickupR:
TNT1 A 0 A_GiveInventory("TheKingSpinSnd",2)
stop
No:
TNT1 A 0 
stop
}
}

actor TheKingStamina_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("VivifyDelay6",1)
TNT1 A 0 A_JumpIfInventory("TheKingShieldFlag",112,"Pickup2")
stop
Pickup2:
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"Pickup2_R")
TNT1 A 0 A_GiveInventory("TheKingStamina",6)
stop
Pickup2_R:
TNT1 A 0 A_GiveInventory("TheKingStamina",3)
stop

}
}

actor TheKingSlash1
{
Translation "192:192=215:215", "198:198=220:220"
PROJECTILE
damagetype "DMGNoHitstun"
Obituary "$OB_KINGSLASH1"
+THRUACTORS
+DONTBLAST
+DONTSPLASH
ReactionTime 1
damage (0)
Radius 4
Height 4
speed 85
scale 2.5
mass -70
meleerange -14
States
{
Spawn:
KGNP J 1
KGNP J 1 A_CountDown
wait
Death:
TNT1 A 0 A_Stop
TNT1 A 0 A_Explode(8,70,0,0,71)
KGNP JK 2
KGNP J 2
stop
}
}

actor TheKingSlash1B : TheKingSlash1{translation "192:192=205:205","198:198=74:74"}
actor TheKingSlash1R : TheKingSlash1{translation "192:192=171:171","198:198=41:41"}
actor TheKingSlash1O : TheKingSlash1{translation "192:192=104:104","198:198=128:128"}
actor TheKingSlash1P : TheKingSlash1{translation "192:192=229:229","198:198=232:232"}

actor TheKingSlash2 : TheKingSlash1
{
Obituary "$OB_KINGSLASH2"
speed 46
-THRUACTORS
States
{
Spawn:
TNT1 A 1
X_5F D 2
X_5F E 2
X_5F F 2
X_5F F 1 A_CountDown
wait
Death:
TNT1 A 2 A_Explode(5,64,0,0,65)
stop
}
}

actor TheKingSlash2B : TheKingSlash2{translation "192:192=205:205","198:198=74:74"}
actor TheKingSlash2R : TheKingSlash2{translation "192:192=171:171","198:198=41:41"}
actor TheKingSlash2O : TheKingSlash2{translation "192:192=104:104","198:198=128:128"}
actor TheKingSlash2P : TheKingSlash2{translation "192:192=229:229","198:198=232:232"}

actor TheKingSpinAlt : BasicExplosion
{
Damagetype "King_AxeSpin"
Obituary "$OB_KINGSPIN"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_Explode(4,128,0,0,16)
stop
}
}



actor TheKingShieldX1 : BasicHelper
{
+NOTIMEFREEZE
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,-16,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,-8,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,0,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,8,0,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEx("TheKingShieldHitbox0",0,16,0,momx,momy,momz,0,8)
stop
}
}

actor TheKingShieldX2 : BasicHelper
{
+NOTIMEFREEZE
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",0,-24,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",0,-16,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",0,-8,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox3",0,0,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",0,8,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",0,16,0,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEx("TheKingShieldHitbox2",0,24,0,momx,momy,momz,0,8)
stop
}
}

actor TheKingShieldSparkle0 : BasicHelper
{
States
{
Spawn:
TNT1 A 0

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,0,0,1,0,-3,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,-10,0,1,3,-2,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,10,0,1,-3,-2,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,-10,10,1,4,-1,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,10,10,1,-4,-1,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,-10,20,1,5,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,10,20,1,-5,0,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,-10,30,1,4,1,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,10,30,1,-4,1,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,-10,40,1,3,2,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,10,40,1,-3,2,0,1)

TNT1 A 0 A_SpawnItemEx("TheKingShieldSparkle1",28,0,50,1,0,3,0,1)
TNT1 A 1
stop
}
}

actor TheKingShieldSparkle1 : BasicClientSide
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
Spawn:
TNT1 A 0
X_6B ABCD 3
stop
}
}
actor TheKingShieldSparkle2 : TheKingShieldSparkle1
{
Scale 1.5
}


actor TheKingShieldHitbox0_H : BasicHelper
{
+NOTIMEFREEZE
states
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,-16,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,-8,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,0,0,momx,momy,momz,0,8)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox0",0,8,0,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEx("TheKingShieldHitbox0",0,16,0,momx,momy,momz,0,8)
stop
}
}

actor TheKingShieldHitbox_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox1",28,-34,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox2",28,-26,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox3",28,-18,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox4",28,-10,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitbox5",28,-2,2,0,0,0,0,1)
stop
}
}
actor TheKingShieldHitboxB_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB1",28,-24,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB2",28,-16,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB3",28,-8,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB4",28,0,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB5",28,8,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB6",28,16,2,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("TheKingShieldHitboxB7",28,24,2,0,0,0,0,1)
stop
}
}


actor TheKingShieldHitbox0 : BasicShieldHitbox
{
+NODAMAGE
+THRUSPECIES
Species "TheKing"
Height 54//42
States
{
Spawn:
TNT1 A 0
TNT1 A 2
stop
Pain:
TNT1 A 0 A_SpawnItemEx("TheKingShieldDeathFX",3,0,16)
TNT1 A 1 A_PlaySound("item/protoreflect")
stop
}
}
actor TheKingShieldHitbox1 : BasicShieldHitbox
{
+NODAMAGE
+THRUSPECIES
Species "TheKing"
Meleerange 28
Accuracy -34
Mass 2
Height 54//42
States
{
Pain:
TNT1 A 0 A_SpawnItemEx("TheKingShieldDeathFX",3,0,16)
TNT1 A 0 A_PlaySound("item/protoreflect")
goto Spawn
}
}
actor TheKingShieldHitbox2 : TheKingShieldHitbox1
{
Accuracy -26
}
actor TheKingShieldHitbox3 : TheKingShieldHitbox1
{
Accuracy -18
}
actor TheKingShieldHitbox4 : TheKingShieldHitbox1
{
Accuracy -10
}
actor TheKingShieldHitbox5 : TheKingShieldHitbox1
{
Accuracy -2
}


actor TheKingShieldHitboxB1 : TheKingShieldHitbox1
{
-NOTARGETSWITCH
+QUICKTORETALIATE
+INVULNERABLE
+NOPAIN
-SHOOTABLE
Accuracy -24
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_RearrangePointers(0,0,2)
TNT1 A 0 //A_ClearTarget
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_ChangeFlag("NOPAIN",0)
TNT1 A 0 A_ChangeFlag("SHOOTABLE",1)
goto SpawnL
SpawnL:
TNT1 A 0
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"Death2")
TNT1 A 0 A_JumpIfInventory("StopShield",1,"SpawnStop",8)
KNIA L 1 A_Warp(8,Meleerange,Accuracy,/*Mass*/2,0,24)
loop
Pain:
TNT1 A 0 A_ChangeFlag("NOPAIN",1)
TNT1 A 0 A_ChangeFlag("SHOOTABLE",0)
TNT1 A 0 A_SpawnItemEx("TheKingShieldDeathFX",3,0,16)
TNT1 A 0 A_PlaySound("item/protoreflect")
TNT1 A 0 A_JumpIfInventory("TheKingShieldDelay",1,"PainEnd",8)
TNT1 A 0 A_JumpIfInventory("TheKingShieldFlag",14,"PainFire",8)
goto PainEnd
PainFire:
TNT1 A 1 //1 tic delay is needed for target to register
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_GiveIfPlayerHitMe",808)
goto PainEnd
PainEnd:
TNT1 A 0 A_ChangeFlag("NOPAIN",0)
TNT1 A 0 A_ChangeFlag("SHOOTABLE",1)
goto SpawnL
}
}
actor TheKingShieldHitboxB2 : TheKingShieldHitboxB1
{
Accuracy -16
}
actor TheKingShieldHitboxB3 : TheKingShieldHitboxB1
{
Accuracy -8
}
actor TheKingShieldHitboxB4 : TheKingShieldHitboxB1
{
-NORADIUSDMG
//+DONTTHRUST
Accuracy 0
Mass 99999
}
actor TheKingShieldHitboxB5 : TheKingShieldHitboxB1
{
Accuracy 8
}
actor TheKingShieldHitboxB6 : TheKingShieldHitboxB1
{
Accuracy 16
}
actor TheKingShieldHitboxB7 : TheKingShieldHitboxB1
{
Accuracy 24
}

actor TheKingShieldDeathFX : BasicClientSide
{
+BRIGHT
renderstyle add
alpha 0.9
Scale 1.5
states
{
Spawn:
KGNP M 0 A_SetScale(scaleX + 0.1, 2.5) 
KGNP M 1 A_FadeOut(0.05)
loop
}
}

actor TheKingShieldDeath
{
PROJECTILE
DamageType "King_ShieldDrop"
Obituary "$OB_KINGSHIELDX"
-NOGRAVITY
+THRUGHOST
+SKYEXPLODE
+BOUNCEONFLOORS
//+BOUNCEONWALLS
+BOUNCEONCEILINGS
//+ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
BounceFactor 0.91
BounceCount 4
Species "TheKing"
ReactionTime 35
Damage (25)
Height 54
Radius 26
Speed 14
Scale 2.5
States
{
Spawn:
KGNP S 1
TNT1 A 1 A_CountDown
loop
Death:
KGNP M 0 A_Stop
KGNP M 0 A_ChangeFlag("NOGRAVITY",1)
KGNP M 1 A_FadeOut(0.15)
wait
}
}

actor TheKingShieldFX : ProtoShieldFX
{
States
{
Spawn:
TNT1 A 0
KGNP A 1
stop
}
}

actor TheKingShieldFX0 : ProtoShieldFX
{
States
{
Spawn:
TNT1 A 0
KGNP A 1 A_SpawnItemEx("TheKingShieldSparkle2",random(4,8),random(-48,48),random(-4,70),0,0,0,0,1,196)
stop
}
}




actor TheKingShieldCounter : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("TheKingShieldDelay",1,"No")
TNT1 A 0 A_GiveInventory("TheKingShieldDelay",1)
TNT1 A 0 A_TakeInventory("TheKingShieldFlag",28)
TNT1 A 0 //A_PlaySoundEx("weapon/heat1","SoundSlot7")
TNT1 A 0 A_SpawnItemEx("TheKingShieldHelper",0,0,0,0,0,0,0,1)
stop
No:
TNT1 A 0
stop
}
}

actor TheKingShieldHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySoundEx("weapon/heat1","Weapon")
TNT1 AAAA 1 A_GiveToTarget("TheKingShieldFX1_P",1)
TNT1 AAAA 1 A_GiveToTarget("TheKingShieldFX2_P",1)
TNT1 AAAA 1 A_GiveToTarget("TheKingShieldFX3_P",1)
TNT1 A 1 A_GiveToTarget("TheKingShieldFire_P",1)
stop
}
}


actor TheKingShieldFire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("TheKingStamina",24)
TNT1 A 0 A_PlaySoundEx("weapon/centaurflash","SoundSlot7")
//CustomRailgun(25,0, "purple", "white", 1, 1)
TNT1 A 0 A_GiveInventory("KingMainSld_CI",1)

//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,0)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,-10)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,-20)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,-30)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,10)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,20)
//TNT1 A 0 A_SpawnItemEx("TheKingShieldLaser",28,-18,28,55,0,0,30)
stop
}
}

actor TheKingShieldFX1_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TheKingShieldFX1",25,0,28,0,0,0,0,1)
stop
}
}
actor TheKingShieldFX2_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TheKingShieldFX2",25,0,28,0,0,0,0,1)
stop
}
}
actor TheKingShieldFX3_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("TheKingShieldFX3",25,0,28,0,0,0,0,1)
stop
}
}

actor TheKingShieldFX1 : BasicClientSide
{
States
{
Spawn:
KGNP B 0
KGNP B 1
stop
}
}
actor TheKingShieldFX2 : BasicClientSide
{
States
{
Spawn:
KGNP C 0
KGNP C 1
stop
}
}
actor TheKingShieldFX3 : BasicClientSide
{
States
{
Spawn:
KGNP D 0
KGNP D 1
stop
}
}


actor TheKingShieldLaser
{
Translation "249:249=72:72"
PROJECTILE
Obituary "$OB_KINGSHIELD"
DamageType "DMGNoHitstun"
+THRUGHOST
+THRUSPECIES
Species "TheKing"

+HEXENBOUNCE
-ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
WALLBOUNCEFACTOR 0.99
BOUNCEFACTOR 0.99
reactiontime 10//150

damage (8)
Height 10
Radius 10
Speed 35
Scale 2.0
States
{
Spawn:
TNT1 A 1
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
LaserSummon:
KGNP EEEEEEEEEE 1 A_SpawnItemEx("TheKingShieldLaserFX",0,0,0,0,0,0,0,1)
KGNP E 0 A_CountDown
goto LaserSummon
Death:
TNT1 A 0
stop
}
}


actor TheKingShieldLaserB : TheKingShieldLaser{translation "249:249=74:74"}
actor TheKingShieldLaserR : TheKingShieldLaser{translation "249:249=41:41"}
actor TheKingShieldLaserO : TheKingShieldLaser{translation "249:249=128:128"}
actor TheKingShieldLaserP : TheKingShieldLaser{translation "249:249=232:232"}

actor TheKingShieldLaserFX : BasicClientSide
{
renderstyle translucent
alpha 0.9
+BRIGHT
Scale 2.0
States
{
Spawn:
KGNP E 1 A_FadeOut(0.1)
loop
}
}

actor TheKingXAttack
{
PROJECTILE
+RIPPER
DamageType "King_XShock"
Obituary "$OB_KINGPEWX"
damage (10)
Radius 20//42
Height 32//56
Speed 35
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
KGNP FFGG 1
Xellent:
KGNP H 1 A_SpawnItemEx("TheKingXAttackFX1",0,0,0,0,0,0,0,1)
KGNP I 1 A_SpawnItemEx("TheKingXAttackFX2",0,0,0,0,0,0,0,1)
loop
Death:
TNT1 A 1
stop
}
}

actor King_XShockProtect : PowerProtection
{
Powerup.Duration 15
DamageFactor "King_XShock", 0.0
}

actor TheKingXAttackFX1 : BasicClientSide
{
renderstyle add
alpha 1.0
+BRIGHT
Scale 2.5
States
{
Spawn:
KGNP HIHIFGFG 1 A_FadeOut(0.1)
stop
}
}
actor TheKingXAttackFX2 : TheKingXAttackFX1
{
States
{
Spawn:
KGNP IHIHGFGF 1 A_FadeOut(0.1)
stop
}
}

actor TheKingXAttackB : TheKingXAttack{translation "192:192=205:205","198:198=74:74"}
actor TheKingXAttackR : TheKingXAttack{translation "192:192=171:171","198:198=41:41"}
actor TheKingXAttackO : TheKingXAttack{translation "192:192=104:104","198:198=128:128"}
actor TheKingXAttackP : TheKingXAttack{translation "192:192=229:229","198:198=232:232"}

actor TheKingLaser
{
//Translation "192:192=215:215", "198:198=220:220"
Translation "249:249=72:72"
PROJECTILE
damagetype "DMGNoHitstun"
Obituary "$OB_KINGLASER"
+THRUGHOST
+FORCEXYBILLBOARD
+HEXENBOUNCE
-ALLOWBOUNCEONACTORS
+CANBOUNCEWATER
WALLBOUNCEFACTOR 0.99
BOUNCEFACTOR 0.99
reactiontime 40//150
damage (3)
Radius 9
Height 9
speed 25
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
KGNP L 0
KGNP L 0 A_SpawnItemEx("TheKingLaserFX",0,0,0,0,0,0,0,1)
KGNP L 1 A_CountDown
loop
}
}

actor TheKingLaserB : TheKingLaser{translation "249:249=74:74"}
actor TheKingLaserR : TheKingLaser{translation "249:249=41:41"}
actor TheKingLaserO : TheKingLaser{translation "249:249=128:128"}
actor TheKingLaserP : TheKingLaser{translation "249:249=232:232"}

actor TheKingLaserFX : BasicClientSide
{
+FORCEXYBILLBOARD
States
{
Spawn:
KGNP L 6
stop
}
}

actor KingMain1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingSlash1",-70,0,-14,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingSlash1B",-70,0,-14,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingSlash1R",-70,0,-14,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingSlash1O",-70,0,-14,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingSlash1P",-70,0,-14,0)
goto Done
}
}

actor KingMain2_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingSlash1",-35,0,-7,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingSlash1B",-35,0,-7,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingSlash1R",-35,0,-7,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingSlash1O",-35,0,-7,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingSlash1P",-35,0,-7,0)goto Done}}
actor KingMain3_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingSlash1",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingSlash1B",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingSlash1R",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingSlash1O",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingSlash1P",0,0,0,0)goto Done}}
actor KingMain4_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingSlash1",35,0,7,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingSlash1B",35,0,7,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingSlash1R",35,0,7,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingSlash1O",35,0,7,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingSlash1P",35,0,7,0)goto Done}}
actor KingMain5_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingSlash1",70,0,14,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingSlash1B",70,0,14,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingSlash1R",70,0,14,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingSlash1O",70,0,14,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingSlash1P",70,0,14,0)goto Done}}


actor KingMainA1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2",0,0,0,20)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2B",0,0,0,20)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2R",0,0,0,20)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2O",0,0,0,20)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2P",0,0,0,20)
goto Done
}
}

actor KingMainA2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2B",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2R",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2O",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2P",0,0,0,0)
goto Done
}
}

actor KingMainA3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2",0,0,0,-20)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2B",0,0,0,-20)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2R",0,0,0,-20)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2O",0,0,0,-20)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingSlash2P",0,0,0,-20)
goto Done
}
}


actor KingMainX_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingXAttack",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingXAttackB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingXAttackR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingXAttackO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingXAttackP",0,0,0,0)
goto Done
}
}

actor KingShield1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",-15,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",-15,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",-15,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",-15,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",-15,0,0,0)
goto Done
}
}

actor KingMainSld_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",-15,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",15,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",-15,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",15,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",-15,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",15,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",-15,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",15,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",-15,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",0,0,0,0)
TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",15,0,0,0)
goto Done
}
}

actor KingShield2_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",0,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",0,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",0,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",0,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",0,0,0,0)goto Done}}
actor KingShield3_CI : TeamColor_CI{states{
FireX:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaser",15,0,0,0)goto Done
FireB:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserB",15,0,0,0)goto Done
FireR:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserR",15,0,0,0)goto Done
FireO:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserO",15,0,0,0)goto Done
FireP:TNT1 A 0 A_FireCustomMissile("TheKingShieldLaserP",15,0,0,0)goto Done}}
