actor ReboundStrikeBoss : BaseMM8BDMWep_CBM
{
tag "Strikeman Pitcher"
dropitem "ReboundStrikerWepCDropped"
Inventory.Pickupmessage "oh thats a fuckin baseball alright"
Obituary "%o was smacked to the benches by %k's Rebound Striker."
weapon.ammotype "ReboundStrikerLimit"
weapon.ammotype2 "ReboundStrikerPower"
Weapon.SlotNumber 0
inventory.icon "Str1Icon"
States
{
Spawn:
C_00 F 1
loop
Ready:
SRKH A 0 A_GunFlash
SRKH A 2 ACS_ExecuteAlways(998,0,10905)
Goto Ready1

Ready0:
SRKH A 1 A_WeaponReady(WRF_NOPRIMARY)
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH A 0 A_TakeInventory("StrikeBuntCheck",99)
goto Ready1

Ready1:
SRKH A 1 A_WeaponReady(WRF_ALLOWRELOAD)
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH A 0 A_TakeInventory("StrikeBuntCheck",99)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
SRKH A 1 A_Lower
goto Deselect+1

Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
SRKH A 1 A_Raise
Loop

Fire:
SRKH A 0 A_JumpIfInventory("ReboundStrikerLimit",35,1)
goto NoFire
SRKH A 0 A_GunFlash("Flash.MoveAside")
SRKH A 0 A_TakeInventory("ReboundStrikerLimit",35)
SRKH A 0 A_TakeInventory("WeaponCharge",999)
SRKH BC 1
SRKH D 0 A_PlaySoundEx("weapon/reboundweak","Weapon")
SRKH D 0 A_GiveInventory("StrikemanMain_CI")
SRKH DEF 1
TNT1 A 13
SRKH GA 2
goto Ready1

NoFire:
SRKH A 1
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
goto Ready1

Altfire:
SRKH A 0 A_JumpIfInventory("ReboundStrikerPower",7,1)
goto Fire
SRKH A 0 A_GunFlash("Flash.MoveAside")
SRKH A 0 A_TakeInventory("ReboundStrikerPower",7)
SRKH A 0 A_TakeInventory("WeaponCharge",999)
SRKH A 0 A_PlaySoundEx("weapon/searchdash","SoundSlot6")
SRKH BC 1
SRKH D 0 A_PlaySoundEx("weapon/reboundweak","Weapon")
SRKH D 0 A_GiveInventory("StrikemanMainAlt_CI")
SRKH DEF 1
TNT1 A 13
SRKH GA 2
goto Ready1

Reload:
SRKH S 0 A_JumpIfInventory("ReboundStrikerPower",7,1)
goto Ready0
SRKH A 0 A_TakeInventory("ReboundStrikerPower",7)
SRKH A 0 A_PlaySoundEx("weapon/reboundstartup","Weapon")
SRKH A 1 OffSet(0,42)
SRKH A 1 OffSet(0,52)
SRKH A 1 OffSet(0,62)
SRKH A 1 OffSet(0,72)
SRKH A 1 OffSet(0,82)
SRKH A 1 OffSet(0,92)
SRKH A 1 OffSet(0,102)
SRKH A 1 OffSet(0,112)
SRKH A 1 OffSet(0,122)
Reload2:
TNT1 A 0 A_TakeInventory("UnSolid",99)
TNT1 A 0 A_ChangeFlag("SOLID",0)
TNT1 A 0 A_ChangeFlag("THRUSPECIES",1)
TNT1 A 1 A_ChangeVelocity(momx,momy,momz-0.5,CVF_REPLACE)
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadBounce")
loop

ReloadBounce:
TNT1 A 0 A_GiveInventory("WeaponCharge",1)
TNT1 A 0 ACS_ExecuteAlways(512,0,2,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"ReloadBounceHigh")
goto ReloadBounceLow

ReloadBounceLow:
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_StopSound(0)
TNT1 A 1 A_PlaySoundEx("weapon/reboundbounce","Body")
goto ReloadBounceWait

ReloadBounceHigh:
TNT1 A 0 ThrustThingZ(0,60,0,0)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_StopSound(0)
TNT1 A 1 A_PlaySoundEx("weapon/reboundbounce","Body")
goto ReloadBounceWait

ReloadBounceWait:
TNT1 A 1 A_SpawnItemEx("StrikeMeleeC",16,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_Recoil(-1)
TNT1 A 0 A_JumpIfInventory("StrikeHitTarget",1,"ReloadBounceBack")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",4,"ReloadEnd")
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadBounce")
loop

ReloadBounceBack:
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("StrikeHitTarget",9)
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 A_Recoil(8)
TNT1 A 0 A_StopSound(0)
TNT1 A 0 A_PlaySoundEx("weapon/reboundbounce","Body")
TNT1 A 1
goto ReloadBounceWait

ReloadEnd:
TNT1 A 1 A_SpawnItemEx("StrikeMeleeC",16,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_Recoil(-1)
TNT1 A 0 A_JumpIfInventory("StrikeHitTarget",1,"ReloadBounceBack")
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadEndForReal")
loop
ReloadEndForReal:
TNT1 A 0 A_SpawnItemEx("ResolidifyPlayer_H")
SRKH A 0 ACS_ExecuteAlways(512,0,3,0)
SRKH A 0 A_TakeInventory("WeaponCharge",9)
SRKH A 1 OffSet(0,122)
SRKH A 1 OffSet(0,107)
SRKH A 1 OffSet(0,92)
SRKH A 1 OffSet(0,77)
SRKH A 1 OffSet(0,62)
SRKH A 0 A_ChangeFlag("THRUACTORS",0)
SRKH A 0 A_SpawnItemEx("ReSolidifyPlayer_H")
SRKH A 1 OffSet(0,47)
Goto Ready1

Flash:
SRK2 P 2 A_JumpIfInventory("IsDead",1,"NoFlash")
Goto Flash_Loop

Flash_Loop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
SRKH H 1
loop

Flash.AnimateMeFucker:
SRKH I 0 A_PlaySoundEx("weapon/reboundgrab", "Body")
SRKH IJKL 1
SRKH LLKJIM 1 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
goto Flash_Loop

Flash.MoveAside:
SRKH NOOOON 2 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
goto Flash_Loop

Flash.MoveAsider:
SRKH NOOOOOOOON 2 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
goto Flash_Loop

Flash.StopBatTime:
SRKH Q 4
goto Flash.Invis

Flash.ReadyToCharge:
SRKH Q 2
goto Flash.Invis2

Flash.Invis:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("StrikeBuntCheck",1,1)
goto Flash.StartBatTime
TNT1 A 1
loop

Flash.Invis2:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1
loop

Flash.StartBatTime:
SRKH Q 2
goto Flash_Loop
}
}

actor ReboundStrikerBoss : BaseMM8BDMWep_CBM
{
tag "Strikeman Batter"
dropitem "ReboundStrikerWepCDropped"
Inventory.Pickupmessage "oh thats a fuckin baseball alright"
Obituary "%o was smacked to the benches by %k's Rebound Striker."
weapon.ammotype "ReboundStrikerLimit"
weapon.ammotype2 "ReboundStrikerPower"
Weapon.SlotNumber 1
inventory.icon "Str2Icon"
States
{
Spawn:
C_00 F 1
loop
Ready:
SRKH A 0 A_GunFlash
SRKH A 2 ACS_ExecuteAlways(998,0,10905)
Goto Ready1

Ready0:
SRKH A 1 A_WeaponReady(WRF_NOPRIMARY)
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH A 0 A_TakeInventory("StrikeBuntCheck",99)
goto Ready1

Ready1:
SRKH A 1 A_WeaponReady(WRF_ALLOWRELOAD)
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH A 0 A_TakeInventory("StrikeBuntCheck",99)
loop

Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
SRKH R 1 A_Lower
goto Deselect+1

Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
SRKH R 1 A_Raise
Loop

Fire:
SRKH A 0 A_JumpIfInventory("ReboundStrikerLimit",35,1)
goto NoFire
SRKH A 0 A_GunFlash("Flash.MoveAside")
SRKH A 0 A_TakeInventory("ReboundStrikerLimit",35)
SRKH A 0 A_TakeInventory("WeaponCharge",999)
SRKH BC 1
SRKH D 0 A_PlaySoundEx("weapon/reboundweak","Weapon")
SRKH D 0 A_GiveInventory("StrikemanMain_CI")
SRKH DEF 1
TNT1 A 13
SRKH GA 2
goto Ready1

NoFire:
SRKH A 1
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
goto Ready1

Swing:
SRKH S 0 A_JumpIfInventory("PowerRage_ST",1,"SwingR")
SRKH S 0 A_PlaySoundEx("Weapon/pharaohpunchswing","Weapon")
SRKH ST 1
SRKH T 0 A_GiveInventory("StrikemanBat_CI",1)
SRKH UVWX 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
TNT1 AAAAAAAAAAAAAAAAAAAAA 1 Offset(0,72) A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GunFlash("Flash_Loop")
SRKH A 1 Offset(0,72)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 1 Offset(0,57)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_WeaponReady(14)
SRKH A 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
goto Ready0

SwingR:
SRKH S 0 A_PlaySoundEx("Weapon/pharaohpunchswing","Weapon")
SRKH ST 1
SRKH T 0 A_GiveInventory("StrikemanBat_CI",1)
SRKH UVWX 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
TNT1 AAAAAAA 1 Offset(0,72) A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GunFlash("Flash_Loop")
SRKH A 1 Offset(0,72)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 1 Offset(0,57)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_WeaponReady(14)
SRKH A 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
goto Ready0

Altfire:
SRKH R 1 A_GunFlash("Flash.Invis2")
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
SRKH R 0 A_GiveInventory("StrikeBuntCheck",1)
SRKH R 0 A_Refire("AltfireStart")
Goto Ready1
AltfireStart:
SRKH RR 1 Offset(0,36)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
SRKH R 0 A_Refire("Altfire2")
goto Ready1
Altfire2:
SRKH RR 1 Offset(0,32)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
SRKH R 0 A_Refire("Altfire3")
goto Ready1
Altfire3:
SRKH RR 1 Offset(0,28)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
SRKH R 0 A_Refire("Altfire4")
goto Ready1
Altfire4:
SRKH RR 1 Offset(0,32)A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH A 0 A_GiveInventory("ReboundStrikerLimit_RC",1)
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
AltfireRefire:
SRKH R 0 A_Refire("AltfireStart")
SRKH R 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"Swing")
SRKH RR 1 A_TakeInventory("StrikeBuntCheck",99)
goto Ready1

AltfireFire:
SRKH S 0 ACS_ExecuteAlways(512,0,1,0)
TNT1 A 0 A_PlaySoundEx("weapon/reboundbunt","Weapon")
SRKH ST 1
SRKH UVWX 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
TNT1 AAAA 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
SRKH YZ 1 A_JumpIfInventory("StrikeHUDCheck2",1,"AltfireFire")
goto AltfireRefire

AltfireEnd:
SRKH A 0 A_GunFlash("Flash_Loop")
Goto Ready1

Reload:
SRKH S 0 A_JumpIfInventory("ReboundStrikerPower",7,1)
goto Ready0
SRKH A 0 A_TakeInventory("ReboundStrikerPower",7)
SRKH A 0 A_PlaySoundEx("weapon/reboundstartup","Weapon")
SRKH A 1 OffSet(0,42)
SRKH A 1 OffSet(0,52)
SRKH A 1 OffSet(0,62)
SRKH A 1 OffSet(0,72)
SRKH A 1 OffSet(0,82)
SRKH A 1 OffSet(0,92)
SRKH A 1 OffSet(0,102)
SRKH A 1 OffSet(0,112)
SRKH A 1 OffSet(0,122)
Reload2:
TNT1 A 0 A_TakeInventory("UnSolid",99)
TNT1 A 0 A_ChangeFlag("SOLID",0)
TNT1 A 0 A_ChangeFlag("THRUSPECIES",1)
TNT1 A 1 A_ChangeVelocity(momx,momy,momz-0.5,CVF_REPLACE)
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadBounce")
loop

ReloadBounce:
TNT1 A 0 A_GiveInventory("WeaponCharge",1)
TNT1 A 0 ACS_ExecuteAlways(512,0,2,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_JAX_CHECK_JUMP)==1,"ReloadBounceHigh")
goto ReloadBounceLow

ReloadBounceLow:
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_StopSound(0)
TNT1 A 1 A_PlaySoundEx("weapon/reboundbounce","Body")
goto ReloadBounceWait

ReloadBounceHigh:
TNT1 A 0 ThrustThingZ(0,60,0,0)
TNT1 A 0 A_Recoil(-8)
TNT1 A 0 A_StopSound(0)
TNT1 A 1 A_PlaySoundEx("weapon/reboundbounce","Body")
goto ReloadBounceWait

ReloadBounceWait:
TNT1 A 1 A_SpawnItemEx("StrikeMeleeC",16,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_Recoil(-1)
TNT1 A 0 A_JumpIfInventory("StrikeHitTarget",1,"ReloadBounceBack")
TNT1 A 0 A_JumpIfInventory("WeaponCharge",4,"ReloadEnd")
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadBounce")
loop

ReloadBounceBack:
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("StrikeHitTarget",9)
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 A_Recoil(8)
TNT1 A 0 A_StopSound(0)
TNT1 A 0 A_PlaySoundEx("weapon/reboundbounce","Body")
TNT1 A 1
goto ReloadBounceWait

ReloadEnd:
TNT1 A 1 A_SpawnItemEx("StrikeMeleeC",16,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_Recoil(-1)
TNT1 A 0 A_JumpIfInventory("StrikeHitTarget",1,"ReloadBounceBack")
TNT1 A 0 A_JumpIf(z-floorz<=0,"ReloadEndForReal")
loop
ReloadEndForReal:
TNT1 A 0 A_SpawnItemEx("ResolidifyPlayer_H")
SRKH A 0 ACS_ExecuteAlways(512,0,3,0)
SRKH A 0 A_TakeInventory("WeaponCharge",9)
SRKH A 1 OffSet(0,122)
SRKH A 1 OffSet(0,107)
SRKH A 1 OffSet(0,92)
SRKH A 1 OffSet(0,77)
SRKH A 1 OffSet(0,62)
SRKH A 0 A_ChangeFlag("THRUACTORS",0)
SRKH A 0 A_SpawnItemEx("ReSolidifyPlayer_H")
SRKH A 1 OffSet(0,47)
Goto Ready1


Flash:
SRK2 P 2 A_JumpIfInventory("IsDead",1,"NoFlash")
Goto Flash_Loop

Flash_Loop:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
SRK2 H 1
loop

Flash.AnimateMeFucker:
SRK2 I 0 A_PlaySoundEx("weapon/reboundgrab", "Body")
SRK2 IJKL 1
SRK2 LLKJIM 1 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
Goto Flash_Loop

Flash.MoveAside:
SRK2 NOOOOOOON 2 A_JumpIfInventory("StrikeHUDCheck",1,"Flash.AnimateMeFucker")
Goto Flash_Loop

Flash.StopBatTime:
SRK2 Q 4
goto Flash.Invis

Flash.ReadyToCharge:
SRK2 Q 2
goto Flash.Invis2

Flash.Invis:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("StrikeBuntCheck",1,1)
goto Flash.StartBatTime
TNT1 A 1
loop

Flash.Invis2:
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 1
loop

Flash.StartBatTime:
SRK2 Q 2
Goto Flash_Loop
}
}

actor ReboundStrikerLimit_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PowerRage_ST",1,"PickupR")
TNT1 A 0 A_GiveInventory("ReboundStrikerLimit",1)
stop
PickupR:
TNT1 A 0 A_GiveInventory("ReboundStrikerLimit",2)
stop
}
}

actor StrikemanMain_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("StrikeM_ReboundStriker",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("StrikeM_ReboundStrikerB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("StrikeM_ReboundStrikerR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("StrikeM_ReboundStrikerO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("StrikeM_ReboundStrikerP",0,0,8,0)
goto Done
}
}

actor StrikemanMainAlt_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("ReboundStrikerPowerballAlt",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ReboundStrikerPowerballAltB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ReboundStrikerPowerballAltR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ReboundStrikerPowerballAltO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ReboundStrikerPowerballAltP",0,0,8,0)
goto Done
}
}

actor StrikemanBat_CI : TeamColor_CI
{
States
{
FireX:
TNT1 A 0 A_FireCustomMissile("StrikeMelee")
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("StrikeMeleeB")
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("StrikeMeleeR")
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("StrikeMeleeO")
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("StrikeMeleeP")
goto Done
}
}