actor Concreteman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_9A"
dropitem "ConcreteShotWep"
Weapon.AmmoUse 0
Weapon.AmmoGive 0
Obituary "$OB_CONCRETESHOT"
Inventory.Pickupmessage "$PU_CONCRETESHOT"
weapon.ammotype "ConcreteShoemakerAmmo"
States
{
Spawn:
C_09 A 1
loop

Deselect:
CONH A 0
goto DeselectSwap
Select:
CONH A 0 A_GiveInventory("ConcreteM_StaminaFlag",80)
goto SelectSwap

Ready:
CONH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_CONCRETEMAN)
goto Ready1
Ready1:
CONH A 0 A_JumpIfInventory("ConcreteBlockReady",1,"Ready3")
Ready2:
CONH A 1 A_WeaponReady
wait
Ready3:
CONH Q 1 A_WeaponReady
wait

Fire:
CONH A 0 A_JumpIfInventory("ConcreteBlockReady",1,"FireBlock")
CONH B 0 A_GiveInventory("Concreteman_Fire_P")
CONH BC 5
CONH A 5
CONH A 20 A_WeaponReady(WRF_NOPRIMARY)
Goto Ready2
FireBlock:
CONH R 0 A_GiveInventory("Concreteman_Fire_P")
CONH RS 5
CONH Q 5
CONH Q 20 A_WeaponReady(WRF_NOPRIMARY)
Goto Ready3

AltFirePickup:
CONH N 0 A_ClearReFire
CONH N 0 A_GiveInventory("ConcreteBlockReady",1)
CONH N 0 A_GiveInventory("CementAni_Pickup",1)
CONH N 0 A_GiveInventory("PowerConcMSlow0",1)
CONH N 0 A_TakeInventory("ConcreteGrabbingFlag",999)
CONH N 0 A_PlaySoundEx("weapon/concreteraise","Weapon")
CONH N 2 A_SpawnItemEx("ConcretemanBlockWarper",32,0,8,0,0,0,0,1)
CONH O 0 A_JumpIf(1,1)
CONH O 0 A_GiveInventory("ConcreteBlockFlag",1)
CONH O 0 A_GiveInventory("ConcreteBlockReady",1)
CONH O 0 A_TakeInventory("ConcreteGrabbingFlag",999)
CONH O 2
CONH P 0 A_TakeInventory("ConcreteShoemakerAmmo")
CONH PQ 2
CONH Q 16 A_TakeInventory("PowerConcMSlow0",1)
goto Ready3

AltFire:
CONH A 0 A_JumpIfInventory("CementAni_Leap",1,"CrashLanding")
CONH A 0 A_JumpIfInventory("ConcreteBlockReady",1,"AltBlockCharge")
CONH A 0 A_JumpIfInventory("ConcreteBlockFlag",1,"AltFirePickup")
goto AltfireH1
AltFireH1:
CONH G 1
CONH G 0 A_Refire("AltFireH2")
Goto AltFireH_End
AltFireH2:
CONH G 0 A_GiveInventory("ConcreteGrabbingFlag",1)
CONH G 0 A_JumpIfInventory("PlayerPropertyRage",1,"AltFireH3")
CONH G 1
CONH G 0 A_Refire("AltFireH3")
Goto AltFireH_End
AltFireH3:
CONH H 0 A_JumpIfInventory("ConcreteBlockFlag",1,"AltFirePickup")
CONH H 1
CONH H 0 A_Refire("AltFireH4")
Goto AltFireH_End
AltFireH4:
CONH H 0 A_JumpIfInventory("PlayerPropertyRage",1,"AltFireH5")
CONH H 0 A_JumpIfInventory("ConcreteBlockFlag",1,"AltFirePickup")
CONH H 1
CONH H 0 A_Refire("AltFireH5")
Goto AltFireH_End
AltFireH5:
CONH I 0 A_JumpIfInventory("ConcreteBlockFlag",1,"AltFirePickup")
CONH I 1
CONH I 0 A_Refire("AltFireH5")
Goto AltFireH_End

AltFireH_End:
CONH "#" 0 A_TakeInventory("ConcreteGrabbingFlag",999)
CONH "#" 0 A_JumpIfInventory("ConcreteBlockFlag",1,"AltFirePickup")
CONH "#" 0 A_JumpIf(CallACS("cbm_GetPointerButtonInput",0,false) & BT_JUMP,"Leap")
CONH "#" 0 A_JumpIf(CallACS("cbm_IsInputingMovement"),"AltDash")
CONH G 1
goto Ready2

Flash.BlockCharge:
TNT1 A 0 A_JumpIfInventory("ConcreteShoemakerAmmo",28,"Flash.BlockChargeSnd")
TNT1 A 0 A_GiveInventory("PowerConcMSlow75",1)
TNT1 A 1 A_GiveInventory("ConcreteShoemakerAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
loop
Flash.BlockChargeSnd:
TNT1 A 0 A_PlaySound("weapon/conc_chargeloop",1,0.9)
TNT1 AAAAAAAAA 2 A_RailWait
loop

AltBlockCharge:
CONH T 0 A_GunFlash("Flash.BlockCharge",1)
CONH T 0 A_PlaySound("weapon/conc_chargestart",1,0.5)
goto AltBlockH
AltBlockH:
CONH T 1 A_JumpIfInventory("ConcreteShoemakerAmmo",28,"AltBlockH2")
CONH T 0 A_Refire("AltBlockH")
goto BlockTossWeak
AltBlockH2:
CONH T 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_CONCRETEMAN_CHARGE,TINT_TCLR3)
CONH T 1 A_GiveInventory("PowerConcMSlow75",1)
CONH T 0 A_Refire(1)
goto BlockTossStronk
CONH T 1 A_JumpIfInventory("PlayerPropertyRage",1,2)
CONH T 0 A_Refire(1)
goto BlockTossStronk
CONH U 1 ACS_NamedExecuteWithResult("core_chargecolor",DYE_CONCRETEMAN,TINT_TCLR2)
CONH U 0 A_Refire(1)
goto BlockTossStronk
CONH U 1 A_JumpIfInventory("PlayerPropertyRage",1,"AltBlockH2")
CONH U 0 A_Refire("AltBlockH2")
goto BlockTossStronk

BlockTossWeak:
CONH A 0 A_GunFlash("NoFlash",1)
CONH A 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_CONCRETEMAN,TCLR_NONE)
CONH A 0 A_PlaySound("weapon/conc_throw",1,0.475)
CONH A 0 A_GiveInventory("CementAni_Throw",1)
CONH A 0 A_TakeInventory("ConcreteBlockFlag",999)
CONH A 0 A_TakeInventory("ConcreteBlockReady",999)
CONH A 0 A_TakeInventory("BashTimer",999)
CONH A 0 A_FireCustomMissile("WeakConcreteBlock",0,0,0,56)
CONH VW 2
goto BlockTossEnd
BlockTossStronk:
CONH A 0 A_GunFlash("NoFlash",1)
CONH A 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_CONCRETEMAN,TCLR_NONE)
CONH A 0 A_PlaySound("weapon/conc_throw",1,0.475)
CONH A 0 A_GiveInventory("CementAni_Throw",1)
CONH A 0 A_TakeInventory("ConcreteBlockFlag",999)
CONH A 0 A_TakeInventory("ConcreteBlockReady",999)
CONH A 0 A_TakeInventory("BashTimer",999)
CONH A 0 A_FireCustomMissile("StronkConcreteBlock",0,0,0,16)
CONH VW 2
goto BlockTossEnd
BlockTossEnd:
CONH A 0 ACS_NamedExecuteWithResult("core_chargecolor",DYE_CONCRETEMAN,TCLR_NONE)
CONH XY 2
CONH A 12
CONH A 2 A_GiveInventory("ConcreteCleanResetFlags",1)
CONH A 2
Goto Ready2


Flash.AltDash:
TNT1 A 1 A_GiveInventory("Concreteman_DashThrust_P")
loop

AltDash:
CONH D 0 A_GiveInventory("CementAni_Dash",1)
CONH D 0 A_TakeInventory("ConcreteBashFlag")
CONH D 0 A_SetArg(1,angle*65536)

CONH D 0 A_GunFlash("Flash.AltDash",1)

CONH F 0 A_GiveInventory("ConcreteShoulder_P")
CONH FEED 1 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
CONH D 0 A_GiveInventory("BashTimer",1)
CONH D 0 A_CheckFloor("InTheZone")
goto InTheAir

InTheZone:
CONH D 0 A_JumpIfInventory("BashTimer",9,"End")
CONH D 0 A_GiveInventory("ConcreteShoulder_P")
CONH DDDD 1 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
CONH D 0 A_GiveInventory("BashTimer",1)
CONH D 0 A_JumpIfInventory("BashTimer",42,"End")
CONH D 0 A_CheckFloor("InTheZone")
goto InTheAir
InTheAir:
CONH D 0 A_GiveInventory("ConcreteShoulder_P")
CONH DDDD 1 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
CONH D 0 A_GiveInventory("BashTimer",1)
CONH D 0 A_JumpIfInventory("BashTimer",42,"End")
CONH D 0 A_CheckFloor("ShortTransition")
loop
ShortTransition:
CONH D 0 A_GiveInventory("ConcreteShoulder_P")
CONH DDDD 1 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
CONH D 0 A_GiveInventory("ConcreteShoulder_P")
CONH DDDD 1 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
goto InTheZone
End:

CONH D 0 A_TakeInventory("CementAni_Dash",999)
CONH D 0 A_GiveInventory("CementAni_DashStop",1)

CONH D 0 A_JumpIfInventory("ConcreteBashFlag",1,"Rebound")
CONH D 4 A_GunFlash("NoFlash",1)
CONH B 4
CONH A 10
Goto DashEnd
Rebound:
CONH D 0 A_TakeInventory("CementAni_Dash",999)
CONH D 0 A_GiveInventory("CementAni_DashStop",1)
CONH D 0 A_GiveInventory("NoJumpCancel",1)

CONH D 0 A_PlaySoundEx("weapon/shoulderhit","Weapon")
CONH D 0 A_PlaySoundEx("weapon/shoulderhit","Body")
CONH D 0 A_GiveInventory("ConcreteDashThrustEnd",1)
CONH D 10 A_GunFlash("NoFlash",1)
CONH A 0 A_TakeInventory("NoJumpCancel",999)
Waitin:
CONH BBBBBBBBBBBBBBBBBBBBBBBBBBBBAA 1 A_CheckFloor("DashEnd")
goto DashEnd
DashEnd:
CONH A 1 A_GiveInventory("ConcreteCleanResetFlags",1)
Goto Ready2

Leap:
CONH J 0 A_GiveInventory("CementAni_Leap",1)
CONH J 0 A_GiveInventory("NoJumpCancel",1)
CONH J 0 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,1)
CONH J 0 A_TakeInventory("ConcreteBlockFlag",999)
CONH J 0 A_PlaySoundEx("weapon/buttleap","Weapon")
CONH J 0 A_Recoil(-15)
CONH J 0 ThrustThingZ(0,60,0,0)
CONH J 2
CONH K 12
goto Ready2Stomp

Ready2Stomp:
CONH K 0 A_JumpIf(z-floorz==0,"Landing")
CONH K 0 A_JumpIf(momz==0,"Ready2StompZ")
CONH K 0 A_JumpIfInventory("Quaking",999,"Landing")
CONH K 0 A_GiveInventory("Quaking",1+CallACS("core_checkrune",RUNE_RAGE))
CONH K 0 A_SpawnItemEx("ConcreteButt",0,0,-10,0,0,-15)
CONH K 1 A_Refire("CrashLanding")//A_WeaponReady(4)
loop
Ready2StompZ:
CONH K 0 A_GiveInventory("Quaking",1+CallACS("core_checkrune",RUNE_RAGE))
CONH K 0 A_SpawnItemEx("ConcreteButt",0,0,-10,0,0,-15)
CONH K 1 A_Refire("CrashLanding")
CONH K 0 A_JumpIf(z-floorz==0,"Landing")
CONH K 0 A_JumpIf(momz==0,"Landing")
CONH K 0 A_JumpIfInventory("Quaking",999,"Landing")
goto Ready2Stomp+3

Ready2Stomp2:
CONH K 0 A_JumpIf(z-floorz==0,"Landing")
CONH K 0 A_JumpIf(momz==0,"Ready2Stomp2Z")
CONH K 0 A_JumpIfInventory("Quaking",999,"Landing")
CONH K 0 A_GiveInventory("Quaking",3+CallACS("core_checkrune",RUNE_RAGE)*3)
CONH K 0 A_SpawnItemEx("ConcreteButt2",0,0,-10,0,0,-15)
CONH K 1 ThrustThingZ(0,-10,0,1)
loop
Ready2Stomp2Z:
CONH K 0 A_GiveInventory("Quaking",5+CallACS("core_checkrune",RUNE_RAGE)*5)
CONH K 0 A_SpawnItemEx("ConcreteButt2",0,0,-10,0,0,-15)
CONH K 1 ThrustThingZ(0,-10,0,1)
CONH K 0 A_JumpIf(z-floorz==0,"Landing")
CONH K 0 A_JumpIf(momz==0,"Landing")
CONH K 0 A_JumpIfInventory("Quaking",999,"Landing")
goto Ready2Stomp2+3

CrashLanding:
CONH L 0 A_JumpIfInventory("ConcreteBlockReady",1,"AltBlockCharge")
CONH L 0 A_Stop
CONH L 0 A_GiveInventory("PowerConcMSlow0",1)
CONH L 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
CONH L 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,2)
CONH L 4
CONH L 6 A_GiveInventory("Quaking",5+CallACS("core_checkrune",RUNE_RAGE)*5)
CONH L 0 ThrustThingZ(0,-250,0,0)
CONH L 0 A_TakeInventory("PowerConcMSlow0",1)
CONH L 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
CONH L 0 ACS_NamedExecuteWithResult("core_nogravityplayer",0,0)
goto Ready2Stomp2
Landing:
CONH M 0 A_GiveInventory("Concreteman_FloorQuake_P")
CONH M 1
CONH M 0 A_TakeInventory("NoJumpCancel",1)
CONH M 0 ACS_NamedExecuteWithResult("cbm_cantpushwallsplayer",0,0)
CONH M 8 A_GiveInventory("ConcreteCleanResetFlags",1)
CONH I 2 A_TakeInventory("PowerConcMSlow0",1)
CONH HG 2
goto Ready2


}
}


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

actor BashTimer : Inventory
{
inventory.amount 1
inventory.maxamount 56
}

actor PowerConcMSlow75 : PowerSpeed
{
powerup.duration 6
Speed 0.75
+POWERSPEED.NOTRAIL
}
actor PowerConcMSlow0 : PowerSpeed
{
powerup.duration 10
Speed 0.0
+POWERSPEED.NOTRAIL
}


actor ConcreteM_StaminaFlag : Inventory
{
inventory.amount 1
inventory.maxamount 560
}


actor ConcStaminaDelay : Powerup
{
Powerup.Duration -3
}

actor ConcreteGrabbingFlag : Inventory {}
actor ConcreteBlockFlag : Inventory {}
actor ConcreteBlockReady : Inventory {}
actor ConcreteBashFlag : Inventory {}

actor CementAni_Pickup : Powerup
{
Powerup.Duration 8
}
actor CementAni_Dash : Inventory {}
actor CementAni_DashStop : CementAni_Pickup {}
actor CementAni_Leap : Inventory {}
actor CementAni_LeapStop : CementAni_Pickup {}
actor CementAni_Throw : CementAni_Pickup {}


actor Concreteman_Fire_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/concreteshot","Weapon")
TNT1 A 0 A_JumpIfInventory("ConcreteM_StaminaFlag",1,"Pickup2")
goto PickupX
Pickup2:
TNT1 A 0 A_FireCustomMissile("ConcreteShotgun",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("ConcreteShotgun",random(-4,-12),0,-8,0,0,random(0,5))
TNT1 A 0 A_FireCustomMissile("ConcreteShotgun",random(4,12),0,-8,0,0,random(0,5))
goto End
PickupX:
TNT1 A 0 A_FireCustomMissile("ConcreteShotgunX",0,0,-8,0)
TNT1 A 0 A_FireCustomMissile("ConcreteShotgunX",random(-4,-12),0,-8,0,0,random(0,5))
TNT1 A 0 A_FireCustomMissile("ConcreteShotgunX",random(4,12),0,-8,0,0,random(0,5))
goto End
End:
TNT1 A 0 A_GiveInventory("ConcreteStamina_P",1)
stop
}
}

actor ConcreteStamina_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_CheckFloor("End")
goto P_Stam
P_Stam:
TNT1 A 0 A_JumpIfInventory("ConcStaminaDelay",1,"P_StamX")
TNT1 A 0 A_GiveInventory("ConcStaminaDelay",1)
stop
P_StamX:
TNT1 A 0 A_JumpIfInventory("HelperIsActiveFlag1",1,3)
TNT1 A 0 A_GiveInventory("HelperIsActiveFlag1",1)
TNT1 A 0 A_SpawnItemEx("ConcreteStaminaHelper")
TNT1 A 0 A_TakeInventory("ConcreteM_StaminaFlag",10)
goto P_Stam+1
End:
TNT1 A 0
stop
}
}

actor ConcreteStaminaHelper : BasicHelper
{
States
{
Spawn:
TNT1 A 1
goto SpawnWait
Spawn2:
TNT1 A 0 A_GiveToTarget("ConcreteM_StaminaFlag",2)
TNT1 A 1
TNT1 A 0 A_JumpIfInTargetInventory("ConcreteM_StaminaFlag",0,"Death")
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInTargetInventory("ConcStaminaDelay",1,"SpawnWait")
loop
SpawnWait:
TNT1 A 1
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_JumpIfInTargetInventory("ConcStaminaDelay",1,"SpawnWait")
goto Spawn2
Death:
TNT1 A 1 A_TakeFromTarget("HelperIsActiveFlag1")
stop
}
}


actor ConcreteCleanResetFlags : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_TakeInventory("ConcreteShoemakerAmmo")
TNT1 A 0 A_TakeInventory("BashTimer")
TNT1 A 0 A_TakeInventory("Quaking")

TNT1 A 0 A_TakeInventory("ConcreteGrabbingFlag")
TNT1 A 0 A_TakeInventory("ConcreteBlockFlag")
TNT1 A 0 A_TakeInventory("ConcreteBlockReady")
TNT1 A 0 A_TakeInventory("ConcreteBashFlag")
TNT1 A 0 A_TakeInventory("CementAni_Dash")
TNT1 A 0 A_TakeInventory("CementAni_Leap")
TNT1 A 0 A_TakeInventory("CementAni_Throw")

TNT1 A 0 A_TakeInventory("CementAni_Pickup")
TNT1 A 0 A_TakeInventory("CementAni_DashStop")
TNT1 A 0 A_TakeInventory("CementAni_LeapStop")
stop
}
}


actor Concreteman_DashThrust_P : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,"Pickup_R")
TNT1 A 0 A_CheckFloor(2)
TNT1 A 0 A_SetArg(1,CallACS("cbm_GradualAngleTurn",Args[1],angle*65536,1*65536,360*65536))
goto Thrust
TNT1 A 0 A_SetArg(1,CallACS("cbm_GradualAngleTurn",Args[1],angle*65536,3*65536,360*65536))//4
goto Thrust
Thrust:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),2)
TNT1 A 0 A_ChangeVelocity(18*cos(Args[1]/65536.0),18*sin(Args[1]/65536.0),momz,CVF_REPLACE)
TNT1 A 0//13.5 air
TNT1 A 0 A_SpawnItemEx("ConcreteShoulderChecker",2,0,32,36,0,0,Args[1]/65536.0-angle)
stop
Pickup_R:
TNT1 A 0 A_CheckFloor(2)
TNT1 A 0 A_SetArg(1,CallACS("cbm_GradualAngleTurn",Args[1],angle*65536,3*33268,360*65536))//1.5
goto Thrust_R
TNT1 A 0 A_SetArg(1,CallACS("cbm_GradualAngleTurn",Args[1],angle*65536,9*33268,360*65536))//4.5
goto Thrust_R
Thrust_R:
TNT1 A 0 A_JumpIf(CallACS("cbm_IsDashingDisabled"),2)
TNT1 A 0 A_ChangeVelocity(22*cos(Args[1]/65536.0),22*sin(Args[1]/65536.0),momz,CVF_REPLACE)
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("ConcreteShoulderChecker",2,0,32,44,0,0,Args[1]/65536.0-angle)
stop

}
}


actor ConcreteDashThrustEnd : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 A_CheckFloor("PickupF")
goto PickupA
PickupF:
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 ThrustThing(Args[1]/65536.0*256/360,-18,1,0)//-36
stop
PickupA:
TNT1 A 0 ThrustThingZ(0,40,0,0)
TNT1 A 0 ThrustThing(Args[1]/65536.0*256/360,-14,1,0)//-28
stop
}
}


actor ConcretemanBlockWarper : ShieldWarper_CBM
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient",1)
TNT1 A 0 ACS_NamedExecuteAlways("cbm_clientwarper",0,91)
Goto Shield
Shield:
CONC E 1 A_Warp(AAPTR_TARGET,32,0,8,0,24)
CONC E 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
CONC E 1 A_Warp(AAPTR_TARGET,28,5,14,0,24)
CONC E 1 A_Warp(AAPTR_TARGET,24,10,20,0,24)
CONC E 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
CONC E 1 A_Warp(AAPTR_TARGET,20,15,26,0,24)
CONC E 1 A_Warp(AAPTR_TARGET,16,20,32,0,24)
CONC E 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
CONC E 1 A_Warp(AAPTR_TARGET,12,25,38,0,24)
CONC E 1 A_Warp(AAPTR_TARGET,8,30,44,0,24)
CONC E 0 A_JumpIfInTargetInventory("PlayerPropertyRage",1,2)
CONC E 1 A_Warp(AAPTR_TARGET,4,35,50,0,24)
CONC E 1 A_Warp(AAPTR_TARGET,0,40,56,0,24)
wait
}
}

actor ConcreteShotgun : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ConcreteM_Shot"
Obituary "$OB_CONCRETESHOT"
species "ConcreteShot"
-NOGRAVITY
+SKYEXPLODE
+EXPLODEONWATER
+THRUSPECIES
damage (100)	
Radius 16
Height 32
speed 33
scale 2.5
States
{
Spawn:
CONC B 0
CONC B 0 A_ChangeVelocity(0,0,2.5)
goto Spawn2
Spawn2:
CONC BC 2
loop
XDeath:
TNT1 A 0 A_SpawnItemEX("ConcreteCaseEffect")
TNT1 A 1 A_PlaySoundEx("weapon/concreteblock","Weapon")
stop
Death:
CONC D 0 A_SpawnItemEX("ConcreteCaseEffect")
CONC D 0 A_SetGravity(0.0)
CONC D 0 A_SetScale(2.0)
CONC D 4
CONC D 0 A_JumpIfCloser(48,"XDeath")
CONC D 0 A_SpawnItemEx("ConcreteShotgunBlock",0,0,0,0,0,0,0,4)
TNT1 A 4 A_PlaySoundEx("weapon/concreteblock","Weapon")
stop
}
}

actor ConcreteShotgunX : ConcreteShotgun
{
var int user_S;
States
{
Death:
CONC D 0 A_SetUserVar("user_S",random(0,3))
CONC D 0 A_SetGravity(0.0)
CONC D 4
CONC D 0 A_SpawnItemEx("ConcreteShotgunXFX",0,0,0,-2-user_S/3,2+user_S/3,5+user_S,0,1)
CONC D 0 A_SpawnItemEx("ConcreteShotgunXFX",0,0,0,-2-user_S/3,-2-user_S/3,5+user_S,0,1)
CONC D 0 A_SpawnItemEx("ConcreteShotgunXFX",0,0,0,-2-user_S/3,2+user_S/3,3+user_S,0,1)
CONC D 0 A_SpawnItemEx("ConcreteShotgunXFX",0,0,0,-2-user_S/3,-2-user_S/3,3+user_S,0,1)
TNT1 A 4 A_PlaySoundEx("weapon/concreteblock","Weapon")
stop
}
}

actor ConcreteShotgunXFX : BasicGraphicEffectM
{
-NOGRAVITY
+THRUACTORS
+NOPAIN
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2,3,4,5,6,7,8)
Spawn2:
9P_A PQRS 2
loop
Spawn3:
9P_A PSRQ 2
loop
}
}

actor ConcreteShotgunBlock : CBM_ShootableActor//ProjSpawnFuncActor
{
//+USEDAMAGEEVENTSCRIPT
//var int user_NoOwnerDamage;
+FORCEYBILLBOARD
+GHOST
+NOGRAVITY
+DONTRIP
+CANTSEEK
+MISSILE
+TOUCHY
+SHOOTABLE
+NOTAUTOAIMED
+NOBLOOD
+DONTBLAST
+DONTDRAIN
+NOTARGETSWITCH
+THRUSPECIES
damagefactor "ConcreteShot", 0.0
damagefactor "ConcreteM_Shot", 0.0
damagefactor "ConcreteM_Bash", 5.0
damagefactor "VehicleHazard", 9999.0

species "ConcreteShot"//MovingPlatform
Health 300
Mass 9999
radius 16
height 32
scale 2.0
States
{
Spawn:
CONC D 0
CONC D 1 A_SetArg(3,20)
CONC D 0 A_ChangeFlag("TOUCHY",0)
CONC D 0 A_ChangeFlag("MISSILE",0)
CONC D 0 A_ChangeFlag("SOLID",1)
goto SpawnL
SpawnL:
CONC E 0 A_JumpIfInventory("WeaponCharge",64,"SpawnL2")
CONC E 1 A_GiveInventory("WeaponCharge",1)
CONC E 0 A_JumpIfInTargetInventory("ConcreteGrabbingFlag",1,"Spawn_Check")
loop
SpawnL2:
CONC F 1 A_CountDownArg(3)
CONC F 0 A_JumpIfInTargetInventory("ConcreteGrabbingFlag",1,"Spawn_Check2")
loop
Spawn_Check:
CONC E 0 A_JumpIfInTargetInventory("ConcreteBlockReady",1,"SpawnL")
CONC E 0 A_JumpIfInTargetInventory("ConcreteBlockFlag",1,"SpawnL")
CONC E 0 A_JumpIfCloser(64,"Give")
goto SpawnL
Give:
CONC E 0 A_JumpIfInTargetInventory("ConcreteBlockFlag",1,"SpawnL")
CONC E 0 A_GiveToTarget("ConcreteBlockFlag",1)
TNT1 A 0 A_NoBlocking
TNT1 A 1
stop
Spawn_Check2:
CONC F 0 A_JumpIfInTargetInventory("ConcreteBlockReady",1,"SpawnL2")
CONC F 0 A_JumpIfInTargetInventory("ConcreteBlockFlag",1,"SpawnL2")
CONC F 0 A_JumpIfCloser(64,"Give2")
goto SpawnL2
Give2:
CONC F 0 A_JumpIfInTargetInventory("ConcreteBlockFlag",1,"SpawnL2")
CONC F 0 A_GiveToTarget("ConcreteBlockFlag",1)
TNT1 A 0 A_NoBlocking
TNT1 A 1
stop
Death:
CONC F 1 A_SetGravity(0.0)
CONC F 2 A_NoBlocking
CONC G 3
stop
}
}

actor DeathConcreteM_BashHit : Basic_DeathFling_H{Args 70,120,0}
actor PainConcreteM_BashHit : BasicWatcher
{
States
{
Spawn:
TNT1 A 0 nodelay A_GiveToTarget("ConcreteBashFlag",1,AAPTR_TARGET)
stop
}
}

actor ConcreteShoulder : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ConcreteM_Bash"
Obituary "$OB_CONCRETESHOULDER"
renderstyle translucent
alpha 0.4
//species "ConcreteShot"
damage (250+CallACS("core_checkrune",RUNE_SPREAD,2)*500)
Radius 14
Height 25
speed 40
scale 2.5
States
{
Spawn:
TNT1 A 0
9P_A DDEEFF 1 A_JumpIfInTargetInventory("ConcreteBashFlag",1,"Cease")
stop
Cease:
TNT1 A 0
stop
Death:
TNT1 A 1
stop
}
}

actor ConcreteShoulderChecker
{
PROJECTILE
+DONTBLAST
+DONTREFLECT
+THRUSPECIES
+SERVERSIDEONLY
Species "Megaman"
RenderStyle None
damage (0)
Radius 4
Height 4
Speed 40
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("PropBlowerEffect")
stop
XDeath:
Death:
TNT1 A 0 A_GiveToTarget("ConcreteBashFlag",1)
Crash:
Cease:
TNT1 A 1
stop
}
}

actor ConcreteM_BashProtect : PowerProtection
{
Powerup.Duration 6
DamageFactor "ConcreteM_Bash", 0.0
}

actor ConcreteShoulder_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/shoulderbash","Weapon")
//TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,0,36,32,0,0,ACS_ExecuteWithResult(C_GET_USER_VAR,WEPANGLE_NUM)-angle,1)

TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,0,36,32,0,0,Args[1]/65536.0-angle,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,0,0,32,0,0,Args[1]/65536.0-angle,1)

TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,-28,36,32,0,0,Args[1]/65536.0-angle,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,-28,0,32,0,0,Args[1]/65536.0-angle,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,28,36,32,0,0,Args[1]/65536.0-angle,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShoulder",2,28,0,32,0,0,Args[1]/65536.0-angle,1)

//TNT1 A 0 A_SpawnItemEx("ConcreteShoulderChecker",2,0,32,40,0,0,Args[1]/65536.0-angle)
stop
}
}

actor ConcreteButt
{
PROJECTILE
damagetype "ConcreteM_Flat"
Obituary "$OB_CONCRETEBUTT"
+DONTBLAST
+THRUGHOST
renderstyle none
damage (100+CallACS("core_checkrune",RUNE_SPREAD,2)*200)
Radius 15
Height 2
States
{
Spawn:
TNT1 A 1
stop
}
}

actor ConcreteButt2 : ConcreteButt
{
damage (200+CallACS("core_checkrune",RUNE_SPREAD,2)*400)
}

actor WeakConcreteBlock : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ConcreteM_Toss"
Obituary "$OB_CONCRETETOSS"
-NOGRAVITY
Damage (300)
Radius 16
Height 16
Speed 34
scale 2.5
States
{
Spawn:
CONC E 0
CONC E 0 A_ChangeVelocity(0,0,5)
CONC E 1
wait
Death:
TNT1 A 0 A_SetGravity(0.0)
TNT1 A 0 A_PlaySoundEx("weapon/concreteblockw","Weapon")
CONC FG 3
stop
}
}

actor StronkConcreteBlock : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ConcreteM_Toss"
Obituary "$OB_CONCRETETOSS2"
+SKYEXPLODE
+EXPLODEONWATER
Damage (50)
Radius 16
Height 16
Speed 68
scale 2.5
States
{
Spawn:
CONC E 0
CONC EEEEEEEEEEEEEEE 1 A_SpawnItemEx("StronkConcreteBlockFX",0,0,0,0,0,0,0,1)
CONC E 0 A_ChangeFlag("NOGRAVITY",0)
CONC E 1 A_SpawnItemEx("StronkConcreteBlockFX",0,0,0,0,0,0,0,1)
wait
Death:
TNT1 A 0 A_JumpIf(ceilingz-z<=16,"Ceiling")
TNT1 AA 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(5,9),0,7,random(0,360),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(7,12),0,7,random(0,90),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(7,12),0,7,random(90,180),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(7,12),0,7,random(180,270),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(7,12),0,7,random(270,360),1)
TNT1 AA 0 A_SpawnItemEx("ConcreteDebFX",0,0,8,random(12,15),0,7,random(0,360),1)
goto DeathEnd
Ceiling:
TNT1 AA 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(5,9),0,0,random(0,360),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(7,12),0,0,random(0,90),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(7,12),0,0,random(90,180),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(7,12),0,0,random(180,270),1)
TNT1 A 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(7,12),0,0,random(270,360),1)
TNT1 AA 0 A_SpawnItemEx("ConcreteDebFX",0,0,-8,random(12,15),0,0,random(0,360),1)
goto DeathEnd
DeathEnd:
TNT1 A 0 A_PlaySoundEx("weapon/concreteblocks","Voice")
TNT1 A 2 A_SpawnItemEx("StronkConcreteBlockBoom",0,0,8)
stop
}
}

actor StronkConcreteBlockBoom : BasicExplosion
{
Translation "192:192=88:88","198:198=95:95"
damagetype "ConcreteM_TossBit"
Obituary "$OB_CONCRETETOSS2"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(350,128,0,0,16)
TNT1 A 2 A_SpawnItemEx("BasicBoom6FX_4_198",0,0,0,0,0,0,0,1)
stop
}
}

actor StronkConcreteBlockFX : BasicGraphicEffect
{
alpha 0.6
States
{
SpawnFrame:
TNT1 A 1
9P_A C 1 A_FadeOut(0.125)
wait
}
}

actor ConcreteDeb : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ConcreteM_TossBit"
Obituary "$OB_CONCRETETOSS2"
-NOGRAVITY
Damage (9)
Radius 8
Height 8
scale 2.5
States
{
Spawn:
9P_A M 1
loop
Death:
TNT1 A 0 A_SetGravity(0.0)
9P_A NO 4
stop
}
}

actor ConcreteDebFX : BasicGraphicEffectM
{
-NOGRAVITY
+THRUACTORS
+FLOORCLIP
Height 4
Radius 4
States
{
Spawn:
9P_A M 1
wait
Death:
TNT1 A 0 A_SetGravity(0.0)
9P_A NO 4
stop
}
}


actor ConcreteShockLanding : BasicExplosion
{
damagetype "ConcreteM_HalfShock"
Obituary "$OB_CONCRETESLAM"
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAAAAAAAA 0 A_SpawnItemEx("ConcreteShockLandingFX",128,0,0,0,0,0,random(0,360),5)
TNT1 A 2 A_Explode(200,192,0,0,32)
stop
}
}


actor Concreteman_FloorQuake_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SetArg(4,CallACS("cbm_countinv_acs",33,0))//Record Quaking stack to Args[4]
//TNT1 A 0 A_PlaySoundEx("weapon/buttstomp","Body")
TNT1 A 0 A_GiveInventory("CementAni_LeapStop",1)
TNT1 A 0 A_GiveInventory("PowerConcMSlow0",1)
TNT1 A 0 A_TakeInventory("CementAni_Leap",999)
TNT1 A 0 A_TakeInventory("ConcreteShoemakerAmmo")

TNT1 A 0 A_JumpIf(Args[4]<10,"Min")
TNT1 A 0 A_JumpIf(Args[4]>=70,"Max")
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_FloorQuakeDamage",150+50*(Args[4]/10),Args[4]/10,90)
TNT1 A 0 A_SpawnItemEx("Concreteman_FloorQuakeFX_H",0,0,0,0,0,Args[4]/100.0,0,1)
stop
Min:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_FloorQuakeDamage",200,1,90)
TNT1 A 0 A_SpawnItemEx("Concreteman_FloorQuakeFX_H",0,0,0,0,0,10/100.0,0,1)
stop
Max:
TNT1 A 0 ACS_NamedExecuteWithResult("cbm_FloorQuakeDamage",450,7,90)
TNT1 A 0 A_SpawnItemEx("Concreteman_FloorQuakeFX_H",0,0,0,0,0,70/100.0,0,1)
stop
}
}

actor Concreteman_FloorQuakeSpawn : Basic_FloorQuakeSpawn
{
Obituary "$OB_CONCRETESLAM"
damagetype "ConcreteM_HalfShock"
States
{
Quake:
TNT1 A 4 A_SpawnItemEx("Concreteman_FloorQuakeBoom",0,0,28,0,0,0,0,1+SXF_TRANSFERSPECIAL)//32768
stop
}
}

actor Concreteman_FloorQuakeBoom : Basic_FloorQuakeBoom
{
Obituary "$OB_CONCRETESLAM"
damagetype "ConcreteM_HalfShock"
MeleeRange 40
Accuracy 60
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode((Accuracy+Args[0]*MeleeRange)*Args[1],15,0,0,15)
FX:
TNT1 A 0 A_FaceTarget
TNT1 A 0 A_SpawnItemEx("ConcreteShockLandingFX",random(10,30),random(-20,20),-28,0,0,1,30,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShockLandingFX",random(10,30),random(-20,20),-28,0,0,1,0,1)
TNT1 A 0 A_SpawnItemEx("ConcreteShockLandingFX",random(10,30),random(-20,20),-28,0,0,1,-30,1)
TNT1 A 4
stop
}
}

actor Concreteman_FloorQuakeFX_H : Basic_FloorQuakeFX_H
{
var int user_TranslateWhiteColors;
ActiveSound "weapon/buttstomp"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(4,momz*100.0+2.5)
//TNT1 A 0 Radius_Quake(2,10,0,1+Args[4]/10,0)
TNT1 A 0 A_ActiveSound
TNT1 A 10 A_SpawnItemEx("Concreteman_FloorQuakeFX",0,0,-momz,0,0,0,45,1+SXF_TRANSFERSPECIAL)
stop
}
}

actor Concreteman_FloorQuakeFX : Basic_FloorQuakeFX
{
Accuracy 50
Mass 50
MeleeRange 4
States
{
SpawnL:
TNT1 A 0 A_SpawnItemEx("ConcreteShockLandingFX",Accuracy+Mass*Args[1]-random(0,3)*10,0,0,0,0,1,Args[3]*360.0f/Args[4],1)
TNT1 A 0 A_CountDownArg(3,"SpawnCycle2")
loop
SpawnCycle2:
TNT1 A 0 A_CountDownArg(0)
TNT1 A 0 A_SetAngle(angle+random(Args[2],Args[2]*2))
TNT1 A 0 A_SetArg(1,Args[1]+1)
TNT1 A 0 A_SetArg(4,Args[2]*Args[1])
TNT1 A 0 A_SetArg(3,Args[4]-1)
goto SpawnL2
SpawnL2:
TNT1 A 0 A_SpawnItemEx("ConcreteShockLandingFX",Accuracy+Mass*Args[1]-random(0,3)*10,0,0,0,0,1,Args[3]*360.0f/Args[4],1)
TNT1 A 0 A_CountDownArg(3,"SpawnCycle")
loop
}
}

actor ConcreteShockLandingFX : BasicGraphicEffect
{
//Translation "202:202=88:88"
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,1,2)
9P_A T 1
goto Spawn2
9P_A U 1
goto Spawn2
Spawn2:
"####" "#" 3
stop
}
}

actor Concreteman_W_NormalBar : NormalBar {Args 88,95}
actor Concreteman_W_ScriptBar : ScriptBar {}