actor ProtoBusterBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_0A"
dropitem "PowerUpgradeGiverDropped"
weapon.preferredskin "ProtomanHero-ShieldLess"

Weapon.AmmoUse 1
Weapon.AmmoGive 3
Weapon.SlotNumber 1
Inventory.Pickupmessage "$PU_PROTOBUSTER"
Obituary "$OB_HEROPROTOBUSTER"
Tag "$TAG_PROTOBUSTER"
States
{
Spawn:
C_00 A 1
loop
Ready:
PROC J 0 A_JumpIfInventory("Once",1,"Ready2")
PROC J 0 ACS_ExecuteAlways(981,0,0)
PROC J 0 A_GiveInventory("Once",1)
Goto Ready2

Ready2:
PROC J 0 ACS_ExecuteAlways(998,0,DYE_PROTOMANC)
PROC J 0 A_TakeInventory("WeaponCharge",999)
PROC J 0 A_TakeInventory("StopShield",1)
PROC J 0 A_JumpIfInventory("HeroProtoShieldTossedFlag",1,"ReadyNoShield")
PROC J 0 A_GunFlash
PROC LK 1 A_WeaponReady
Ready2X:
PROC J 1 A_WeaponReady
PROC J 0 A_JumpIfInventory("HeroProtoShieldTossedFlag",1,"ReadyNoShield")
Goto Ready2X
ReadyNoShield:
PROC D 1 A_WeaponReady
PROC D 0 A_JumpIfInventory("HeroProtoShieldTossedFlag",1,"ReadyNoShield")
Goto Ready2+1

Deselect:
PROC J 0 A_GiveInventory("StopShield",1)
PROC LK 0 A_TakeInventory("ProtoSlide",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
PROC J 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PROC J 1 A_Raise
Loop

Fire:
PROC D 0 A_JumpIfInventory("StopShield",1,"FireX")
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain_CI",1)
PROC DDD 0 A_TakeInventory("WeaponCharge",999)
PROC D 0 A_JumpIfInventory("HeroProtoShieldTossedFlag",1,3)
PROC K 1
PROC L 1
PROC D 1
PROC EF 2
PROC FEDD 1
PROC D 0 A_Refire("HoldS")
goto FireXL
FireXL:
PROC DDDDDDDDDDDDD 1 A_WeaponReady
goto Ready2+2
FireX:
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain_CI",1)
PROC EF 2
PROC FEDD 1 A_TakeInventory("WeaponCharge",999)
PROC D 0 A_Refire("HoldS")
goto FireXL
Fire2X:
PROC D 0 ACS_ExecuteAlways(991,0,DYE_PROTOMANC)
PROC D 0 A_TakeInventory("WeaponCharge",999)
PROC D 0 A_GiveInventory("StopShield",1)
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.1_CI",1)
PROC EF 1
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.2_CI",1)
PROC DE 1
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.3_CI",1)
PROC FD 1
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.4_CI",1)
PROC EF 1
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.5_CI",1)
PROC DE 1 
PROC F 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain2.6_CI",1)
PROC FD 1
PROC DDD 3
PROC D 0 A_Refire("HoldS")
goto Ready2+1
Fire3X:
PROC D 0 ACS_ExecuteAlways(991,0,DYE_PROTOMANC)
PROC D 0 A_TakeInventory("ProtoStrikeReady",9)
PROC D 0 A_TakeInventory("WeaponCharge",999)
PROC D 0 A_GiveInventory("StopShield",1)
BUST C 0 A_PlaySoundEx("weapon/cfire2","Weapon")
PROC F 3 A_GiveInventory("ProtomanHeroMain3_CI",1)
PROC ED 3
PROC D 8
PROC D 0 A_Refire("HoldS")
goto Ready2+1
HoldS:
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_JumpIfInventory("WeaponCharge",24,"ChargeX2")
PROC D 0 A_JumpIfInventory("WeaponCharge",12,"ChargeX1")
PROC D 0 A_JumpIfInventory("WeaponCharge",10,"ChargeX")
PROC D 1 A_GiveInventory("WeaponCharge_RC",1)
PROC D 0 A_Refire("HoldS")
Goto FireX
ChargeXX:
PROC D 0 A_PlaySoundEx("weapon/pchargelong","Weapon")
goto ChargeX+2
ChargeX:
PROC D 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"ChargeXX")
PROC D 0 A_PlaySoundEx("weapon/pcharge","Weapon")
PROC D 1
PROC D 0 A_Refire("ChargeX.a")
Goto Fire2X
ChargeX.a:
PROC D 1
PROC D 0 A_Refire("ChargeX1")
Goto Fire2X
ChargeX1:
PROC D 0 A_JumpIfInventory("WeaponCharge",24,"ChargeX2")
PROC D 1 ACS_ExecuteAlways(998,0,63,5)
PROC D 0 A_Refire("ChargeX1.a")
Goto Fire2X
ChargeX1.a:
PROC R 1 ACS_ExecuteAlways(998,0,DYE_PROTOMANC,1)
PROC R 0 A_GiveInventory("WeaponCharge_RC",1)
PROC R 0 A_Refire("ChargeX1.b")
Goto Fire2X
ChargeX1.b:
PROC R 1
PROC R 0 A_Refire("ChargeX1.c")
Goto Fire2X
ChargeX1.c:
PROC R 1 A_GiveInventory("WeaponCharge",1)
PROC R 0 A_Refire("ChargeX1")
Goto Fire2X
ChargeX2:
PROC S 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"Charge2SS")
PROC S 1 ACS_ExecuteAlways(998,0,64,6)
PROC S 0 A_Refire("ChargeX2.a")
Goto Fire3X
ChargeX2.a:
PROC R 1 ACS_ExecuteAlways(998,0,DYE_PROTOMANC,7)
PROC R 0 A_JumpIfInventory("IsBot", 1, "BotFireX")
PROC R 0 A_Refire("ChargeX2")
Goto Fire3X
Charge2SS:
PROC S 0 A_GiveInventory("ProtoStrikeReady",1)
goto Charge2S
Charge2S:
PROC S 0 ACS_ExecuteAlways(998,0,64,6)
PROC S 1 A_WeaponReady(WRF_NOPRIMARY|WRF_NOSWITCH)
PROC S 0 A_Refire("Charge2S.a")
Goto Fire3X
Charge2S.a:
PROC R 0 ACS_ExecuteAlways(998,0,DYE_PROTOMANC,7)
PROC R 1 A_WeaponReady(WRF_NOPRIMARY|WRF_NOSWITCH)
PROC R 0 A_JumpIfInventory("IsBot",1,"ProtoStrike")
PROC R 0 A_Refire("Charge2S")
Goto Fire3X
BotFireX:
PROC S 0 A_Jump(16, "Fire3X")
PROC S 0 A_Refire("ChargeX2")
Goto Fire3X
BotFireX2:
PROC S 0 A_Jump(32, "ProtoStrike")
PROC S 0 A_Refire("Charge2S")
Goto Fire3X

ProtoStrike:
PROC F 0 ACS_ExecuteAlways(991,0,DYE_PROTOMANC)
PROC F 0 A_ClearReFire
PROC F 0 A_TakeInventory("ProtoStrikeReady",9)
PROC F 0 A_TakeInventory("WeaponCharge",999)
PROC F 0 A_GiveInventory("StopShield",1)
PROC F 0 A_PlaySoundEx("weapon/pshot","Weapon")
PROC F 6 A_GiveInventory("ProtomanAlt_CI",1)
PROC ED 3
PROC D 4 A_ClearRefire
PROC D 5
goto Ready2+1

User1Fire:
PROC D 0 A_JumpIfInventory("StopShield",1,"User1FireX")
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain_CI",1)
PROC KLD 1 A_TakeInventory("WeaponCharge",999)
PROC EF 3
PROC D 2
goto User1FireXL
User1FireXL:
PROC DDDDDDDDDDDDD 1 A_WeaponReady
goto Ready2+2
User1FireX:
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_PlaySoundEx("weapon/mbuster","Weapon")
PROC D 0 A_GiveInventory("ProtomanHeroMain_CI",1)
PROC E 3
PROC FD 3 A_TakeInventory("WeaponCharge",999)
goto User1FireXL

Altfire:
PROC I 0 A_JumpIfInventory("ProtoStrikeReady",1,"ProtoStrike")
PROC I 0 A_JumpIf(ACS_NamedExecuteWithResult("cbm_user1_check")==1, "User1Fire")
PROC J 0 A_JumpIf(z-floorz==0,"SlideSlide")
Goto Ready2+5
SlideSlide://HeroProtoShieldTossedFlag
//PROC K 0 A_GiveInventory("StopShield",1)
PROC D 0 A_JumpIfInventory("HeroProtoShieldTossedFlag",1,"ProtoSlide")
PROC D 0 A_PlaySoundEx("weapon/chargekick","Weapon")
PROC D 0 //SetPlayerProperty(0,1,0)
PROC D 0// ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,2,10)
PROC D 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,0,1)
PROC J 0 A_GiveInventory("ProtoShieldBashFlag",1)
PROC J 0 A_GiveInventory("CopySlidePickup",1)
PROC J 0 A_SpawnItemEx("ShieldBashFXSpawner",0,0,0,0,0,0,0,1) //code seemingly causes servers to violently combust so i commented this out in the hopes that once we find a fix we can just add it back in
PROC J 1 Offset(16,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC J 1 Offset(38,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC J 1 Offset(54,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC J 1 Offset(66,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC J 1 Offset(92,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC JJJJJJJJJJ 1 Offset(78,32) A_SpawnItemEx("ProtomanHeroShieldBasher")
PROC JJJJJ 1 Offset(78,32)
PROC J 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,1,1)
PROC J 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,10,1)
PROC J 0 SetPlayerProperty(0,0,0)
PROC J 1 Offset(66,32)
PROC J 1 Offset(54,32)
PROC J 1 Offset(38,32)
PROC J 1 Offset(16,32)
PROC K 0 A_TakeInventory("ProtoShieldBashFlag",1)
PROC K 0 A_TakeInventory("WeaponCharge",999)
//PROC K 0 A_TakeInventory("StopShield",1)
goto Ready2+7

ProtoSlide:
PROC D 0 A_GiveInventory("ProtoSlide",1)
PROC D 0 A_PlaySoundEx("weapon/chargekick","Weapon")
PROC D 0// SetPlayerProperty(0,1,0)
PROC D 0// ACS_ExecuteAlways(CORE_ACS_191,0,APROP_Speed,2,10)
PROC D 0 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,0,1)
//PROC D 0 A_JumpIfInventory("StopShield",1,4)
PROC D 0 A_GiveInventory("StopShield",1)
PROC D 0 A_GiveInventory("ProtoSlide",1)
PSLI A 1 A_GiveInventory("CopySlidePickup",1)
PSLI BCDE 1
//PROC K 0 A_Jump(256,10)
//PSLI E 1 A_GiveInventory("CopySlidePickup",1)
PSLI F 1
PSLI G 1 Offset(2,32)
PSLI G 1 Offset(2,30)
PSLI G 1 Offset(-2,32)
PSLI G 1 Offset(-2,30)
PSLI F 2 A_WeaponReady(14)
PSLI E 2
PSLI D 2
PSLI C 1 SetPlayerProperty(0,0,0)//17
PSLI BAA 1 
PROC D 7 ACS_ExecuteAlways(CORE_ACS_191,0,APROP_JumpZ,10,1)
PROC K 0 A_TakeInventory("ProtoSlide",1)
PROC K 0 A_TakeInventory("WeaponCharge",999)
PROC K 0 A_TakeInventory("StopShield",1)
PROC K 0// A_GunFlash
PROC DDD 1 A_WeaponReady
Goto ReadyNoShield

Flash:
TNT1 A 0 A_GiveInventory("ProtoShieldHitbox_P",1)
TNT1 A 0 A_SpawnItemEx("ProtoShieldFX",23,-10,8,momx,momy,momz,0,9,0)
TNT1 A 1 A_JumpIfInventory("StopShield",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
goto Flash+1

NoFlash:
TNT1 A 0
stop
}
}

actor ProtomanHeroShieldTossItem : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "PROTUP"
tag "$TAGC_0A2"
inventory.pickupmessage "can you pleeeaaaase add an ultrakill reference im BEGGING you"
scale 2.0
+INVBAR
States
{
Use:
TNT1 A 0
TNT1 A 0 A_JumpIfInventory("ShieldCooldownEx",1,"No")
TNT1 A 0 A_JumpIfInventory("ShieldCooldown",1,"No")
TNT1 A 0 A_GiveInventory("StopShield",1)
TNT1 A 0 A_GiveInventory("HeroProtoShieldTossedFlag")
TNT1 A 0 A_PlaySoundEx("weapon/BombThrow","SoundSlot7")
TNT1 A 0 A_JumpIf(CallACS("CCBM_BlastCheckInput")==17,"Far")
TNT1 A 0 A_JumpIf(CallACS("CCBM_BlastCheckInput")==9,"Close")
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"P_B")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"P_R")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"P_O")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"P_P")
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNew",0,0,28,55*cos(pitch),0,55*sin(-pitch),0)
goto Done
P_B:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewB",0,0,28,55*cos(pitch),0,55*sin(-pitch),0)
goto Done
P_R:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewR",0,0,28,55*cos(pitch),0,55*sin(-pitch),0)
goto Done
P_O:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewO",0,0,28,55*cos(pitch),0,55*sin(-pitch),0)
goto Done
P_P:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewP",0,0,28,55*cos(pitch),0,55*sin(-pitch),0)
goto Done

Close:
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"CP_B")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"CP_R")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"CP_O")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"CP_P")
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNew",0,0,28,45*cos(pitch),0,55*sin(-pitch),0)
goto Done
CP_B:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewB",0,0,28,45*cos(pitch),0,55*sin(-pitch),0)
goto Done
CP_R:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewR",0,0,28,45*cos(pitch),0,55*sin(-pitch),0)
goto Done
CP_O:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewO",0,0,28,45*cos(pitch),0,55*sin(-pitch),0)
goto Done
CP_P:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewP",0,0,28,45*cos(pitch),0,55*sin(-pitch),0)
goto Done

Far:
TNT1 A 0 A_JumpIfInventory("LightTeamFlag",1,"FP_B")
TNT1 A 0 A_JumpIfInventory("WilyTeamFlag",1,"FP_R")
TNT1 A 0 A_JumpIfInventory("CossackTeamFlag",1,"FP_O")
TNT1 A 0 A_JumpIfInventory("KingTeamFlag",1,"FP_P")
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNew",0,0,28,55*cos(pitch),0,45*sin(-pitch),0)
goto Done
FP_B:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewB",0,0,28,55*cos(pitch),0,45*sin(-pitch),0)
goto Done
FP_R:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewR",0,0,28,55*cos(pitch),0,45*sin(-pitch),0)
goto Done
FP_O:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewO",0,0,28,55*cos(pitch),0,45*sin(-pitch),0)
goto Done
FP_P:
TNT1 A 0 A_SpawnItemEx("HeroProtoShieldTossNewP",0,0,28,55*cos(pitch),0,45*sin(-pitch),0)
goto Done

Done:
TNT1 A 0 A_GiveInventory("ProtomanHeroShieldReturnItem",1)
TNT1 A 0 A_SpawnItemEx("ProtoShieldReturnCheck_H",0,0,0,0,0,0,0,1)
stop
No:
TNT1 A 0
stop
}
}

actor ProtomanHeroShieldReturnItem : ProtomanHeroShieldTossItem
{
States
{
Use:
TNT1 A 0
TNT1 A 0 A_GiveInventory("ShieldReturn",1)
fail
}
}

actor HeroProtoShieldTossedFlag : Once {}
actor ReturnShieldStall : Powerup {powerup.duration 105}
actor ProtoShieldBashFlag : Once {}
actor ProtoStrikeReady : Once {}
actor ShieldReturn : Powerup {powerup.duration 6}

actor ProtoShotC
{
Translation "204:204=215:215","202:202=4:4","199:199=215:215"
PROJECTILE
damagetype "ProtoM_Shot"
Obituary "$OB_PROTOBUSTER"
+FORCEXYBILLBOARD
+THRUGHOST
+BRIGHT
Damage (10)
radius 5
height 5
Speed 27
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
TNT1 A 2
W_0B B 2
W_0B B 0 A_ChangeFlag("THRUGHOST",0)
W_0B B 1
wait
Death:
NEDR UVU 2
stop
}
}

actor ProtoShotCB : ProtoShotC{translation "204:204=205:205","202:202=4:4","199:199=205:205"}
actor ProtoShotCR : ProtoShotC{translation "204:204=171:171","202:202=4:4","199:199=171:171"}
actor ProtoShotCO : ProtoShotC{translation "204:204=104:104","202:202=4:4","199:199=104:104"}
actor ProtoShotCP : ProtoShotC{translation "204:204=229:229","202:202=4:4","199:199=229:229"}

actor ProtoShot2C : ProtoShotC {
Speed 36
DamageType "ProtoM_Shot2"
}

actor ProtoShot2CB : ProtoShot2C{translation "204:204=205:205","202:202=4:4","199:199=205:205"}
actor ProtoShot2CR : ProtoShot2C{translation "204:204=171:171","202:202=4:4","199:199=171:171"}
actor ProtoShot2CO : ProtoShot2C{translation "204:204=104:104","202:202=4:4","199:199=104:104"}
actor ProtoShot2CP : ProtoShot2C{translation "204:204=229:229","202:202=4:4","199:199=229:229"}

actor ProtoM_Shot2Protection : PowerProtection
{
DamageFactor "ProtoM_Shot2", 0.33
PowerUp.Duration 12
}

actor HeroProtoShot3 {
Translation "192:192=108:108", "198:198=110:110"
PROJECTILE
Obituary "$OB_PROTOBUSTER"
DamageType "ProtoM_Shot3"
+BRIGHT
Speed 75
Radius 18
Height 18
Damage (30)
Scale 2
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
PRCH A 0
PRCH AAABBB 1 A_SpawnItemEx("HeroProtoShotTrail",0,0,0,0,0,0,0,1)
loop
}
}

actor HeroProtoShot3B : HeroProtoShot3{translation "192:192=205:205","198:198=74:74"}
actor HeroProtoShot3R : HeroProtoShot3{translation "192:192=171:171","198:198=41:41"}
actor HeroProtoShot3O : HeroProtoShot3{translation "192:192=104:104","198:198=128:128"}
actor HeroProtoShot3P : HeroProtoShot3{translation "192:192=229:229","198:198=232:232"}

actor HeroProtoShot3Ex : HeroProtoShot3 {Speed 75}

actor HeroProtoShot3Bex : HeroProtoShot3Ex{translation "192:192=205:205","198:198=74:74"}
actor HeroProtoShot3Rex : HeroProtoShot3Ex{translation "192:192=171:171","198:198=41:41"}
actor HeroProtoShot3Oex : HeroProtoShot3Ex{translation "192:192=104:104","198:198=128:128"}
actor HeroProtoShot3Pex : HeroProtoShot3Ex{translation "192:192=229:229","198:198=232:232"}

actor HeroProtoShotTrail : BasicClientside
{
Translation "192:192=108:108", "198:198=110:110"
renderstyle "add"
scale 1.5
+NOINTERACTION
States
{
Spawn:
TNT1 A 1
Fade:
PRCH AAABBB 1 A_FadeOut(0.1)
loop
}
}

actor HeroProtoShieldShot3 : HeroProtoShot3
{
+THRUSPECIES
Obituary "$OB_PROTOBANK"
Species "ProtomanHeroStupidShield"
Damage (20)
Speed 30
States
{
Spawn:
TNT1 A 0
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
TNT1 A 0 A_PlaySound("item/protoreflect")
PRCH AAABBB 1 //A_SpawnItemEx("HeroProtoShotTrail",0,0,0,0,0,0,0,1)
goto SpawnLOOP+1
}
}

actor HeroProtoShieldShot3B : HeroProtoShieldShot3{translation "192:192=205:205","198:198=74:74"}
actor HeroProtoShieldShot3R : HeroProtoShieldShot3{translation "192:192=171:171","198:198=41:41"}
actor HeroProtoShieldShot3O : HeroProtoShieldShot3{translation "192:192=104:104","198:198=128:128"}
actor HeroProtoShieldShot3P : HeroProtoShieldShot3{translation "192:192=229:229","198:198=232:232"}

//*DOUBLING* this thing's speed means it's maybe irresponsible not to rewrite it as a fastproj.
//The original version used some jank with scaling velocity, for reasons beyond me.
actor HeroProtoShieldShot4 : FastProjectile
{
Translation "192:192=108:108", "198:198=110:110"
PROJECTILE
Obituary "$OB_PROTOBANK2"
DamageType "ProtoM_Shot3"
+BRIGHT
+THRUSPECIES
Species "ProtomanHeroStupidShield"
Speed 90
Radius 18
Height 18
Damage (20)
Scale 2
States
{
Spawn:
TNT1 AA 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
TNT1 A 0 A_PlaySound("weapon/ultrakillreference")
SpawnLOOP:
PRCH AAABBB 1 A_SpawnItemEx("HeroProtoShotTrail",0,0,0,0,0,0,0,1)
loop
}
}

actor HeroProtoShieldShot4B : HeroProtoShieldShot4{translation "192:192=205:205","198:198=74:74"}
actor HeroProtoShieldShot4R : HeroProtoShieldShot4{translation "192:192=171:171","198:198=41:41"}
actor HeroProtoShieldShot4O : HeroProtoShieldShot4{translation "192:192=104:104","198:198=128:128"}
actor HeroProtoShieldShot4P : HeroProtoShieldShot4{translation "192:192=229:229","198:198=232:232"}

actor ProtoStrikeShot : BasicExplosion
{
Translation "192:192=87:87", "198:198=42:42"
damagetype "ProtoM_Strike"
Obituary "$OB_PROTOSTRIKE"
+BRIGHT
Speed 60
scale 3.0
States
{
Spawn:
CHBU A 0
CHBU A 0 A_Explode(7,44,0,0,44)
CHBU A 2 A_Explode(7,44,0,0,44)
CHBU B 1 A_Explode(7,44,0,0,44)
CHBU B 1 A_Stop
CHBU CDABCD 2 A_Explode(7,44,0,0,44)
stop
}
}

actor ProtoStrikeShotB : ProtoStrikeShot{translation "192:192=205:205","198:198=74:74"}
actor ProtoStrikeShotR : ProtoStrikeShot{translation "192:192=171:171","198:198=41:41"}
actor ProtoStrikeShotO : ProtoStrikeShot{translation "192:192=104:104","198:198=128:128"}
actor ProtoStrikeShotP : ProtoStrikeShot{translation "192:192=229:229","198:198=232:232"}

actor ProtoStrikeShot2 : ProtoStrikeShot
{
scale 2.75
States
{
Spawn:
CHBU E 0
CHBU E 0 A_Explode(2,44,0,0,44)
CHBU E 2 A_Explode(2,32,0,0,32)
CHBU F 0 A_Stop
CHBU FGEFGEF 2 A_Explode(2,32,0,0,32)
stop
}
}
actor ProtoStrikeShot2B : ProtoStrikeShot2{translation "192:192=205:205","198:198=74:74"}
actor ProtoStrikeShot2R : ProtoStrikeShot2{translation "192:192=171:171","198:198=41:41"}
actor ProtoStrikeShot2O : ProtoStrikeShot2{translation "192:192=104:104","198:198=128:128"}
actor ProtoStrikeShot2P : ProtoStrikeShot2{translation "192:192=229:229","198:198=232:232"}

actor ProtoStrikeShot3 : ProtoStrikeShot2
{
scale 2.5
States
{
Spawn:
CHBU E 0
CHBU E 0 A_Explode(2,44,0,0,44)
CHBU E 1 A_Explode(2,32,0,0,32)
CHBU F 1 A_Stop
CHBU FGEFGEF 2 A_Explode(2,32,0,0,32)
stop
}
}

actor ProtoStrikeShot3B : ProtoStrikeShot3{translation "192:192=205:205","198:198=74:74"}
actor ProtoStrikeShot3R : ProtoStrikeShot3{translation "192:192=171:171","198:198=41:41"}
actor ProtoStrikeShot3O : ProtoStrikeShot3{translation "192:192=104:104","198:198=128:128"}
actor ProtoStrikeShot3P : ProtoStrikeShot3{translation "192:192=229:229","198:198=232:232"}

actor ProtoStrikeShot4 : ProtoStrikeShot2
{
scale 2.25
States
{
Spawn:
CHBU E 0
CHBU E 0 A_Explode(2,44,0,0,44)
CHBU E 0 A_Stop
CHBU FGEFGEF 2 A_Explode(2,32,0,0,32)
stop
}
}

actor ProtoStrikeShot4B : ProtoStrikeShot4{translation "192:192=205:205","198:198=74:74"}
actor ProtoStrikeShot4R : ProtoStrikeShot4{translation "192:192=171:171","198:198=41:41"}
actor ProtoStrikeShot4O : ProtoStrikeShot4{translation "192:192=104:104","198:198=128:128"}
actor ProtoStrikeShot4P : ProtoStrikeShot4{translation "192:192=229:229","198:198=232:232"}

actor HeroProtoShieldToss {
PROJECTILE
Translation "192:192=87:87", "198:198=42:42"
Obituary "%k's Proto Shield was only meant to be wielded by %h, so %o died upon trying it on."
+HEXENBOUNCE
+SKYEXPLODE
-BOUNCEONFLOORS
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+CANBOUNCEWATER
+THRUACTORS
-NOGRAVITY
+BOUNCEONACTORS
+USEBOUNCESTATE
-NOBLOCKMAP //Hack solution moment -Greg
+SHOOTABLE 
+NOTARGETSWITCH 
+SKYEXPLODE
Health 1000 
painchance 0 
painchance "ProtoM_Shot3", 999 
damagefactor "ProtoM_Shot3", 0.1 //Hack solution ended -Greg
BounceFactor 0.35
WallBounceFactor 0.4
Speed 40
Radius 16
Height 32
Damage (1)
Scale 2.5
bouncecount 25
DamageType "ProtomanHeroShieldToss"
Species "ProtomanHeroStupidShield"
States
{
Spawn:
TNT1 AA 0
TNT1 A 0 A_GiveToTarget("ReturnShieldStall",1)
PROS BBBBBBBBB 1 //A_JumpIf(velz > -5 && velz < 5 && z-floorz > 1, "ApexStart")
PROS B 0 A_ChangeFlag(THRUACTORS, false)
SpawnLoop:
"####" "#" 1 A_JumpIfInTargetInventory("IsDead",1,"ShieldReturn")
"####" "#" 1 A_GiveToTarget("ReturnShieldStall",1)
"####" "#" 0 A_JumpIf(velz > -5 && velz < 5 && z-floorz > 1, "ApexStart")
"####" "#" 0 A_JumpIf(velx == 0 && vely == 0, "Death")
loop
ApexStart:
PROS B 0 A_JumpIfInventory("OnceC",1,"SpawnLoop")
PROS B 0 A_PlaySound("weapon/ProtoShieldShine","Body",5,0)
ApexLoop:
PROS CCCCC 1
PROS C 0 A_JumpIf(velz > -5 && velz < 5 && z-floorz > 1, "ApexLoop")
PROS B 0 A_StopSound
PROS B 1 A_GiveInventory("OnceC",1)
goto SpawnLoop
Bounce.Actor:Bounce.Actor.Creature:
PROS B 0 A_ChangeFlag("THRUACTORS", 1)
PROS B 0 A_GiveToTarget("ReturnShieldStall",1)
PROS B 1 A_ChangeVelocity(10.0, 0, velz, CVF_RELATIVE|CVF_REPLACE)
PROS B 1
PROS B 0 A_ChangeFlag("THRUACTORS", 0)
goto SpawnLoop

Death:
PROS B 0 A_CheckFloor("SpawnTossShield")
PROS A 0 A_SpawnItemEx("TeleportFogProto",0,0,0,0,0,0,0,1)
PROS B 0 A_GiveToTarget("ShieldReturn",1)
PROS A 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupEnd",1)
stop
SpawnTossShield:
PROS B 0 A_SpawnItemEx("HeroProtoShieldTossed",0,0,1,0,0,0,0,sxf_transfertranslation|sxf_transferpointers)
stop
//Hack solution: copy code -Greg
Pain.ProtoM_Shot3:
"####" "#" 0
"####" "#" 0 A_ChangeFlag (THRUACTORS, true)
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("gond_protoshieldcheck",ACS_NamedExecuteWithResult("core_gettarget"),1024) >= 0, "Shot")
"####" "#" 0 A_JumpIf(velz > -5 && velz < 5 && z-floorz > 1, "ShieldMachineBrokeApex")
goto ShieldMachineBroke
Shot:
"####" "#" 0 A_JumpIfInventory("OnceC",1,"SadShot")
"####" "#" 0 A_JumpIf(velz > -5 && velz < 5 && z-floorz > 1, "ApexShot")
SadShot:
"####" "#" 0 A_GiveInventory("ProtomanHeroShieldShot3_CI",1)
goto ShieldMachineBroke
ApexShot:
"####" "#" 0 A_GiveInventory("ProtomanHeroShieldShot4_CI",1)
"####" "#" 0 //A_Print("Yippee!") yippee!
goto ShieldMachineBrokeApex

ShieldMachineBroke:
P_SH A 0 A_ChangeFlag("NOINTERACTION", TRUE)
PROS B 0 A_PlaySound("weapon/StoneBreak","Body",5,0)
PROS B 0 A_GiveToTarget("ShieldReturn",1)
PROS B 0 A_SpawnItemEx("ProtoShieldSplit1",0,0,8,frandom(2,6),0,frandom(0,10),frandom(0,360),1)
TNT1 A 35 A_SpawnItemEx("ProtoShieldSplit2",0,0,8,frandom(2,6),0,frandom(0,6),frandom(0,360),1)
PROS B 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupBreak",1)
stop

ShieldMachineBrokeApex:
P_SH A 0 A_ChangeFlag("NOINTERACTION", TRUE)
PROS B 0 A_PlaySound("weapon/StoneBreak","Body",5,0)
PROS B 0 A_GiveToTarget("ShieldReturn",1)
PROS B 0 A_SpawnItemEx("ProtoShieldSplit1",0,0,8,frandom(2,6),0,frandom(0,10),frandom(0,360),1)
TNT1 A 105 A_SpawnItemEx("ProtoShieldSplit2",0,0,8,frandom(2,6),0,frandom(0,6),frandom(0,360),1)
PROS B 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupBreak",1)
stop

ShieldReturn:
P_SH A 0
P_SH A 0 A_SpawnItemEx("TeleportFogProto",0,0,0,0,0,0,0,1)
P_SH A 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupEnd",1)
stop
}
}

actor ProtoShieldSplit1 : BasicClientside
{
	-NOGRAVITY
	Scale 2.5
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 //ACS_NamedExecuteAlways("BULL_Tidifier", 0)
		TNT1 A 0 A_Jump(256,1,11)
		PR_S A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		stop
		PR_S B 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S B 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S B 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S B 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S B 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		stop
	}
}

actor ProtoShieldSplit2 : BasicClientside
{
	-NOGRAVITY
	Scale 2.5
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 //ACS_NamedExecuteAlways("BULL_Tidifier", 0)
		TNT1 A 0 A_Jump(256,1,11)
		PR_S C 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S C 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S C 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S C 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S C 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		stop
		PR_S D 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S D 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S D 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S D 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		PR_S D 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		TNT1 A 1 A_ChangeVelocity(0,0,-1.5,CVF_RELATIVE)
		stop
	}
}

actor HeroProtoShieldTossB : HeroProtoShieldToss{translation "192:192=205:205","198:198=74:74"}
actor HeroProtoShieldTossR : HeroProtoShieldToss{translation "192:192=171:171","198:198=41:41"}
actor HeroProtoShieldTossO : HeroProtoShieldToss{translation "192:192=104:104","198:198=128:128"}
actor HeroProtoShieldTossP : HeroProtoShieldToss{translation "192:192=229:229","198:198=232:232"}

actor HeroProtoShieldTossNew : HeroProtoShieldToss{Speed 25}
actor HeroProtoShieldTossNewB : HeroProtoShieldTossB{Speed 25}
actor HeroProtoShieldTossNewR : HeroProtoShieldTossR{Speed 25}
actor HeroProtoShieldTossNewO : HeroProtoShieldTossO{Speed 25}
actor HeroProtoShieldTossNewP : HeroProtoShieldTossP{Speed 25}

// One-week-old problems require one-day-old solutions.
actor HeroProtoShieldTossed
{
+MISSILE
-NOBLOCKMAP
+NOGRAVITY
+NOTARGETSWITCH
+SKYEXPLODE
+RIPPER
+THRUGHOST
damage(0)

-SOLID

+DONTBLAST
+SHOOTABLE
+DONTDRAIN
+CANTSEEK
speed 0
scale 2.5
Species "ProtomanHeroStupidShield"
Health 1000
Radius 16
Height 32
painchance 0
painchance "ProtoM_Shot3", 999
damagefactor "ProtoM_Shot3", 0.1
States
{
Spawn:
P_SH AA 0
TNT1 A 0 A_GiveToTarget("ReturnShieldStall",1)
P_SH ABCD 4 A_JumpIfInTargetInventory("ShieldReturn",1,"ShieldReturn")
P_SH H 0 A_JumpIfInTargetInventory("IsDead",1,"ShieldReturn")
TNT1 A 0 A_GiveToTarget("ReturnShieldStall",1)
P_SH EFGH 4 A_JumpIfInTargetInventory("ShieldReturn",1,"ShieldReturn")
P_SH H 0 A_JumpIfInTargetInventory("IsDead",1,"ShieldReturn")
P_SH H 0 DamageThing(5)
loop
Pain.ProtoM_Shot3:
"####" "#" 0 
"####" "#" 0 A_JumpIf(ACS_NamedExecuteWithResult("gond_protoshieldcheck",ACS_NamedExecuteWithResult("core_gettarget"),1024) >= 0, "Shot")
"####" "#" 1 A_JumpIf(true,"Spawn")
wait
Shot:
"####" "#" 0 A_GiveInventory("ProtomanHeroShieldShot3_CI",1)
goto Spawn

ShieldReturn:
P_SH A 0
P_SH A 0 A_SpawnItemEx("TeleportFogProto",0,0,0,0,0,0,0,1)
P_SH A 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupEnd",1)
stop

Death:
XDeath:
TNT1 A 5 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupEnd",1)
stop
}
}

actor TeleportFogProto : TeleportFogFancy
{
states
{
Spawn:
TNT1 A 0
TNT1 A 1 //Thing_SetTranslation(0, ACS_NamedExecuteWithResult("core_copytranslation"))
TFOG CB 3
TFOG A 65 A_ChangeVelocity(0,0,13,CVF_RELATIVE|CVF_REPLACE)
stop
}
}

actor ProtoShieldReturnCheck_H : BasicHelper
{
States
{
Spawn:
TNT1 AA 0 
SpawnLoop:
TNT1 AAAAA 1 A_JumpIfInTargetInventory("ShieldReturn",1,"YouNeedToBeQuiet")
TNT1 AAAAA 1 A_JumpIfInTargetInventory("ReturnShieldStall",1,"SpawnLoop")
P_SH A 0 A_GiveToTarget("HeroProtoShieldTossedFlag_PickupEnd",1)
YouNeedToBeQuiet:
TNT1 A 0 
stop
}
}

actor ShieldCooldownHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("ShieldCooldown",175)
SpawnLoop:
TNT1 A 1
TNT1 A 0 A_TakeFromTarget("ShieldCooldown",1)
TNT1 A 5 A_JumpIfInTargetInventory("ShieldCooldown",1,"SpawnLoop")
stop
}
}
actor ShieldCooldown : Inventory
{
inventory.amount 1
inventory.maxamount 175
}

actor ShieldCooldownEXHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("ShieldCooldownEX",105)
SpawnLoop:
TNT1 A 1
TNT1 A 0 A_TakeFromTarget("ShieldCooldownEX",1)
TNT1 A 5 A_JumpIfInTargetInventory("ShieldCooldownEX",1,"SpawnLoop")
stop
}
}
actor ShieldCooldownEX : Inventory
{
inventory.amount 1
inventory.maxamount 105
}

actor HeroProtoShieldTossedFlag_PickupEnd : CustomInventory
{
States{Pickup:
TNT1 A 0
TNT1 A 0 A_TakeInventory("ProtomanHeroShieldReturnItem",999)
TNT1 A 0 A_TakeInventory("HeroProtoShieldTossedFlag",999)
TNT1 A 0 A_PlaySoundEx("weapon/ProtoShieldPickup","SoundSlot7")
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,2)
TNT1 A 0 A_SpawnItemEX("ShieldCooldownHelper")
goto End
TNT1 A 0 A_SpawnItemEX("ShieldCooldownEXHelper")
End:
TNT1 A 0 A_GiveInventory("ProtomanHeroShieldTossItem")
stop
}
}

actor HeroProtoShieldTossedFlag_PickupBreak : CustomInventory
{
States{Pickup:
TNT1 A 70
TNT1 A 0 A_TakeInventory("ProtomanHeroShieldReturnItem",999)
TNT1 A 0 A_TakeInventory("HeroProtoShieldTossedFlag",999)
TNT1 A 0 A_PlaySoundEx("weapon/ProtoShieldPickup","SoundSlot7")
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,2)
TNT1 A 0 A_SpawnItemEX("ShieldCooldownHelper")
goto End
TNT1 A 0 A_SpawnItemEX("ShieldCooldownEXHelper")
End:
TNT1 A 0 A_GiveInventory("ProtomanHeroShieldTossItem")
stop
}
}

actor ProtomanHeroShieldBasher : BasicExplosion
{
Obituary "%o was in the way of %k's Shield Bash."
DamageType "ProtomanHeroShieldBash"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(8,48,0,0,48)
stop
}
}

actor ProtomanHeroShieldBasherProtection : PowerProtection
{
damagefactor "ProtomanHeroShieldBash", 0
powerup.duration 35
}

actor ShieldBashFXSpawner
{
PROJECTILE
ReactionTime 10
+DONTBLAST
+NOINTERACTION
States
{
Spawn:
TNT1 A 0 A_Countdown
TNT1 A 0 A_SpawnItemEx("BasicHardQuakeFX",0,-10,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("BasicHardQuakeFX",0,10,0,0,0,0,0,1)
TNT1 A 0 A_Warp(AAPTR_TARGET,0,0,0,0,WARPF_NOCHECKPOSITION)
TNT1 A 3
loop
}
}

actor ProtoShieldHitbox_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_SpawnItemEx("Protoman_ShieldHitbox1",28,-16,8,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("Protoman_ShieldHitbox2",28,-8,8,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("Protoman_ShieldHitbox3",28,0,8,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("Protoman_ShieldHitbox4",28,8,8,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("Protoman_ShieldHitbox5",28,16,8,0,0,0,0,1)
stop
}
}

actor Protoman_ShieldHitbox1 : BasicShieldHitbox
{
Meleerange 28
Accuracy -16
Mass 8
}
actor Protoman_ShieldHitbox2 : Protoman_ShieldHitbox1
{
Accuracy -8
}
actor Protoman_ShieldHitbox3 : Protoman_ShieldHitbox1
{
Accuracy 0
}
actor Protoman_ShieldHitbox4 : Protoman_ShieldHitbox1
{
Accuracy 8
}
actor Protoman_ShieldHitbox5 : Protoman_ShieldHitbox1
{
Accuracy 16
}

actor ProtomanHeroMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShotC",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShotCB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShotCR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShotCO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShotCP",0,0,8,0)
goto Done
}
}


actor ProtomanHeroMain2.1_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",-12,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",-12,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",-12,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",-12,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",-12,0,0,0)
goto Done
}
}

actor ProtomanHeroMain2.2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",-6,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",-6,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",-6,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",-6,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",-6,0,0,0)
goto Done
}
}

actor ProtomanHeroMain2.3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",0,0,0,0)
goto Done
}
}

actor ProtomanHeroMain2.4_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",6,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",6,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",6,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",6,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",6,0,0,0)
goto Done
}
}

actor ProtomanHeroMain2.5_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",12,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",12,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",12,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",12,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",12,0,0,0)
goto Done
}
}

actor ProtomanHeroMain2.6_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoShot2C",18,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CB",18,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CR",18,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CO",18,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoShot2CP",18,0,0,0)
goto Done
}
}

actor ProtomanHeroMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"FireX2")
TNT1 A 0 A_FireCustomMissile("HeroProtoShot3",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"FireB2")
TNT1 A 0 A_FireCustomMissile("HeroProtoShot3B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"FireR2")
TNT1 A 0 A_FireCustomMissile("HeroProtoShot3R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"FireO2")
TNT1 A 0 A_FireCustomMissile("HeroProtoShot3O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_JumpIfInventory("ProtomanUpgradeFlag",1,"FireP2")
TNT1 A 0 A_FireCustomMissile("HeroProtoShot3P",0,0,8,0)
goto Done

FireX2: TNT1 A 0 A_FireCustomMissile("HeroProtoShot3ex",0,0,8,0) goto Done
FireB2: TNT1 A 0 A_FireCustomMissile("HeroProtoShot3Bex",0,0,8,0) goto Done
FireR2: TNT1 A 0 A_FireCustomMissile("HeroProtoShot3Rex",0,0,8,0) goto Done
FireO2: TNT1 A 0 A_FireCustomMissile("HeroProtoShot3Oex",0,0,8,0) goto Done
FireP2: TNT1 A 0 A_FireCustomMissile("HeroProtoShot3Pex",0,0,8,0) goto Done
}
}

actor ProtomanHeroShieldShot3_CI : TeamColor_CI
{
states
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("LightTeamFlag",1,"P_B")
TNT1 A 0 A_JumpIfInTargetInventory("WilyTeamFlag",1,"P_R")
TNT1 A 0 A_JumpIfInTargetInventory("CossackTeamFlag",1,"P_O")
TNT1 A 0 A_JumpIfInTargetInventory("KingTeamFlag",1,"P_P")
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot3",0,0,16,cos(-pitch)*30,0,sin(-pitch)*30)
goto Done
P_B:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot3B",0,0,16,cos(-pitch)*30,0,sin(-pitch)*30)
goto Done
P_R:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot3R",0,0,16,cos(-pitch)*30,0,sin(-pitch)*30)
goto Done
P_O:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot3O",0,0,16,cos(-pitch)*30,0,sin(-pitch)*30)
goto Done
P_P:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot3P",0,0,16,cos(-pitch)*30,0,sin(-pitch)*30)
goto Done
}
}

//Cough hack wheeze -Greg
actor ProtomanHeroShieldShot4_CI : TeamColor_CI
{
states
{
Pickup:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("LightTeamFlag",1,"P_B")
TNT1 A 0 A_JumpIfInTargetInventory("WilyTeamFlag",1,"P_R")
TNT1 A 0 A_JumpIfInTargetInventory("CossackTeamFlag",1,"P_O")
TNT1 A 0 A_JumpIfInTargetInventory("KingTeamFlag",1,"P_P")
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot4",0,0,16,cos(-pitch)*90,0,sin(-pitch)*90)
goto Done
P_B:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot4B",0,0,16,cos(-pitch)*90,0,sin(-pitch)*90)
goto Done
P_R:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot4R",0,0,16,cos(-pitch)*90,0,sin(-pitch)*90)
goto Done
P_O:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot4O",0,0,16,cos(-pitch)*90,0,sin(-pitch)*90)
goto Done
P_P:
TNT1 A 0 A_SpawnItemEX("HeroProtoShieldShot4P",0,0,16,cos(-pitch)*90,0,sin(-pitch)*90)
goto Done
}
}
//Wheeze hack cough -Greg

actor ProtomanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot2",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot3",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot4",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShotB",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot2B",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot3B",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot4B",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShotR",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot2R",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot3R",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot4R",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShotO",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot2O",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot3O",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot4O",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShotP",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot2P",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot3P",0,0,8,0)
TNT1 A 0 A_FireCustomMissile("ProtoStrikeShot4P",0,0,8,0)
goto Done
}
}
