actor ScrewCrusherBoss : BaseMM8BDMWep_CBM 
{
dropitem "ScrewCrusherWepCDropped"
Weapon.AmmoUse 1
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_SCREWCRUSHER"
Inventory.Pickupmessage "Power up! Screw Crusher!"
weapon.ammotype "ScrewCrushAmmo"
inventory.icon "Pun2Icon"
States
{
Spawn:
C_0K B 1
loop
Ready:
PNKA A 0 ACS_ExecuteAlways(998,0,944)
PNKA A 0 A_JumpIfInventory("ScrewCrushAmmo",28,"Ready2")
PNKA A 7 A_WeaponReady(WRF_NOSECONDARY)
PNKA A 0 A_GiveInventory("ScrewCrushAmmo",2)
Goto Ready+1
Ready2:
PNKA A 1 A_WeaponReady
loop
Deselect:
TNT1 A 0// A_SelectWeapon("BounceCrusherBoss")
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TNT1 A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
PNKA A 1 A_Raise
Loop
Fire:
//PNKA A 0 A_JumpIfInventory("WepToggleFlag",1,"Fire2")
PNKA ABC 2
PNKA C 0 A_PlaySoundEx("weapon/screwcrusher","Weapon")
PNKA C 0 A_GiveInventory("PunkMain_CI",1)
PNKA DEFG 2
PNKA A 6
PNKA A 0 A_GiveInventory("ScrewCrushAmmo",2)
Goto Ready+1
Fire2:
PNKA K 0 Offset(0,32)
PNKA ABC 2
PNKA A 0 A_PlaySoundEx("weapon/screwcrusher","Weapon")
PNKA A 0 A_FireCustomMissile("BounceCrusher",0,0,8,0)
PNKA D 2
PNKA A 0 A_Refire
PNKA EFG 2
Goto Ready+1
AltFire:
PNKA A 0 A_JumpIfInventory("PunkTimer",1,"StopSpin")
PNKA A 0 A_JumpIfInventory("ScrewCrushAmmo",28,"SpinAttack")
goto Ready+1
SpinAttack:
PNKA A 0 A_ChangeFlag("INVULNERABLE",1)
PNKA A 0 A_GiveInventory("IsInvunFlag",1)
PNKA A 0 SetPlayerProperty(0,1,0)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
PNKA A 0 A_GiveInventory("PunkSpinning",1)
PNKA A 0 A_GiveInventory("PunkTimer",1)
TNT1 A 0 ThrustThingZ(0,4,0,1)
PNKA KLM 1 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_Stop

TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)
TNT1 A 0 A_Stop
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 A 2 A_WeaponReady(6)

TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("StunArmor",1)
TNT1 A 0 A_GiveInventory("SelfTotallyFrozen",1)
TNT1 A 0 ThrustThingZ(0,100,0,1)
PNKA A 0 A_Stop
PNKA A 0 A_Recoil(-100)
PNKA A 0 A_PlaySoundEx("weapon/GameBoyPunkRam","Weapon")
PNKA A 0 A_ChangeFlag("INVULNERABLE",0)
PNKA A 0 A_TakeInventory("IsInvunFlag",1)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",1)
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 AA 1 A_SpawnItemEx("PunkMeleeC",0,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 AA 1 A_SpawnItemEx("PunkMeleeC",0,0,28,momx,momy,momz,0,8)
TNT1 A 0 A_TakeInventory("ScrewCrushAmmo",1)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("PunkMeleeC",0,0,28,momx,momy,momz,0,8)
CHAA A 0 A_TakeInventory("StunArmor",999)
PNKA A 0 A_TakeInventory("ScrewCrushAmmo",28)
StopSpin:
PNKA A 0 A_TakeInventory("ScrewCrushAmmo",5)
TNT1 A 0 A_TakeInventory("PunkTimer",999)
PNKA A 0 A_GiveInventory("PunkStopping",1)
PNKA A 0 A_TakeInventory("PunkSpinning",999)
PNKA A 0 A_ChangeFlag("INVULNERABLE",0)
PNKA A 0 A_TakeInventory("IsInvunFlag",1)
PNKA MLK 1
PNKA K 4 Offset(0,-8)
TNT1 A 0 A_ChangeFlag("NOGRAVITY",0)
PNKA A 0 SetPlayerProperty(0,0,0)
TNT1 A 0 A_GiveInventory("SelfTotallyUnfrozen",1)
PNKA A 0 A_TakeInventory("PunkStopping",999)
Goto Ready+1
}
}

actor BounceCrusherBoss : ScrewCrusherBoss 
{
Weapon.SlotNumber 3
inventory.icon "Pun1Icon"
States
{
Ready:
PNKA K 0 ACS_ExecuteAlways(998,0,944)
PNKA K 0 A_JumpIfInventory("ScrewCrushAmmo",28,"Ready2")
PNKA K 0 A_WeaponReady(WRF_NOSECONDARY)
PNKA K 5 Offset(0,-8)
PNKA K 0 A_GiveInventory("ScrewCrushAmmo",2)
Goto Ready+1
Ready2:
PNKA K 0 A_WeaponReady
PNKA K 1 Offset(0,-8)
loop
Fire:
PNKA K 0 Offset(0,32)
PNKA ABC 2
PNKA C 0 A_PlaySoundEx("weapon/screwcrusher","Weapon")
PNKA C 0 A_GiveInventory("PunkMain2_CI",1)
PNKA D 2
PNKA A 0 A_Refire
PNKA EFG 2
Goto Ready+1
}
}

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

actor PunkTimer :OnceC{}

actor PunkStopDelay : Powerup
{
Powerup.Duration 35
}

actor PunkSpinning : Inventory
{
inventory.amount 1
inventory.maxamount 999
}

actor PunkStopping : Inventory
{
inventory.amount 1
inventory.maxamount 999
}

actor PunkMeleeC : BasicExplosion
{
damagetype "ScrewCrusherM"
Obituary "$OB_PUNKRAM"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveToTarget("PunkMeleeBoostPickup",1)
TNT1 A 1 A_Explode(10,80,0,0,10)
stop
}
}

actor PunkMeleeBoostPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Recoil(-0.11)
stop
}
}

actor PunkMeleeStopPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PunkStopDelay",1,"No")
goto Pickup2
Pickup2:
TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("PunkStopDelay",1)
stop
No:
TNT1 A 0
stop
}
}

actor ScrewCrusherPunkC
{
Translation "198:198=42:42", "202:202=37:37"
PROJECTILE
Obituary "$OB_SCREWCRUSHER"
damagetype "ScrewCrusher"
damage (20)
Height 16
Radius 13
speed 55
scale 2.5
States
{
Spawn:
SCRE TU 2
loop
}
}

actor ScrewCrusherPunkCB : ScrewCrusherPunkC{translation "202:202=205:205", "198:198=74:74"}
actor ScrewCrusherPunkCR : ScrewCrusherPunkC{translation "202:202=171:171", "198:198=41:41"}
actor ScrewCrusherPunkCO : ScrewCrusherPunkC{translation "202:202=104:104", "198:198=128:128"}
actor ScrewCrusherPunkCP : ScrewCrusherPunkC{translation "202:202=229:229", "198:198=232:232"}

actor BounceCrusherSpawner
{
PROJECTILE
+NOINTERACTION
+NOCLIP
Damage(0)
Height 1
Radius 1
Speed 0
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_SpawnItemEx("BounceCrusher",0,0,0,0,0,0,0,1)
stop
}
}

actor BounceCrusherSpawnerB : BounceCrusherSpawner{translation "202:202=205:205", "198:198=74:74"}
actor BounceCrusherSpawnerR : BounceCrusherSpawner{translation "202:202=171:171", "198:198=41:41"}
actor BounceCrusherSpawnerO : BounceCrusherSpawner{translation "202:202=104:104", "198:198=128:128"}
actor BounceCrusherSpawnerP : BounceCrusherSpawner{translation "202:202=229:229", "198:198=232:232"}


actor BounceCrusher : ScrewCrusher
{
Translation "198:198=42:42", "202:202=37:37"
Height 16
Radius 15
damage (19)
States
{
Spawn:
SCRE T 0
SCRE T 0 A_Recoil(-16)
TNT1 A 1 ThrustThingZ(0,65,0,1)
SCRE TU 3 A_CountDown
Goto Spawn+3
}
}

/*
actor Bouncer : CustomInventory //not the big black ones
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "PunkIcon"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
ALIE A 1
stop
Use:
TNT1 A 0 //A_PlaySoundEx("item/refill", "Item")
TNT1 A 0 A_GiveInventory("WepToggleFlag",1)
TNT1 A 0 A_GiveInventory("Un-Bouncer",1)
stop
}
}

actor Un-Bouncer : CustomInventory
{
inventory.amount 1
inventory.maxamount 1
inventory.icon "PunkIcon"
scale 2.0
+COUNTITEM
+INVBAR
states
{
Spawn:
ALIE A 1
stop
Use:
TNT1 A 0 //A_PlaySoundEx("item/refill", "Item")
TNT1 A 0 A_TakeInventory("WepToggleFlag",1)
TNT1 A 0 A_GiveInventory("Bouncer",1)
stop
}
}
*/


actor PunkMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("ScrewCrusherPunkC",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("ScrewCrusherPunkCB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("ScrewCrusherPunkCR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("ScrewCrusherPunkCO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("ScrewCrusherPunkCP",0,0,8,0)
goto Done
}
}

actor PunkMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BounceCrusherSpawner",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BounceCrusherSpawnerB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BounceCrusherSpawnerR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BounceCrusherSpawnerO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BounceCrusherSpawnerP",0,0,8,0)
goto Done
}
}
