actor Clownman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_8D"
dropitem "ThunderClawWep"
Weapon.AmmoUse 0
Weapon.AmmoGive 28
Obituary "$OB_THUNDERCLAW"
Inventory.Pickupmessage "See you in my dreams..."
weapon.ammotype "YoGeekyAmmo"
+WEAPON.NOAUTOAIM
inventory.icon "TCLAWI"
states
{
Spawn:
C_08 D 1
loop

Deselect:
CLWH A 0
goto DeselectSwap
Select:
CLWH A 0
goto SelectSwap

Ready:
CLWH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_CLOWNMAN)
CLWH A 0 A_GunFlash("Flash",1)
Ready2:
CLWH A 0 A_JumpIfInventory("ThunderClawCooldown",1,"HandGone")
CLWH A 0 A_JumpIfInventory("ClownShockUp",1,"HandGone")
CLWH A 0 A_JumpIfInventory("ClownShockUpPeg",1,"HandGone")
CLWH A 0 A_JumpIfInventory("ClownShockUpPeg2",1,"HandGone")
CLWH A 1 A_WeaponReady
CLWH A 0 A_GiveInventory("YoGeekyAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
loop
Fire:
TNT1 A 0 A_PlaySoundEx("weapon/thunderclaw","Weapon")
TNT1 A 0 A_GiveInventory("ThunderClawCooldown_RC",1)
TNT1 A 0 A_FireCustomMissile("ClownM_TClaw",0,0,-8,0)
goto HandGone
HandGone:
TNT1 A 1 A_WeaponReady(WRF_NOPRIMARY)
TNT1 A 0 A_GiveInventory("YoGeekyAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
goto Ready2

AltFire:
CLWH A 0 A_GiveInventory("ClownAltFlag",1)
goto Ready2
NoAmmo:
CLWH A 0
goto Ready2

Flash:
CLWH C 0 A_JumpIfInventory("GroundThunderClawOut",1,"FlashClawWait")
CLWH C 0 A_JumpIfInventory("GroundThunderClawOut2",1,"FlashClawWait")
CLWH C 0 A_TakeInventory("ClownAltFlag",1)
Flash2:
CLWH C 0
CLWH C 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH C 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashAura")
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashAura")
loop
FlashClaw:
CLWH G 0 A_FireCustomMissile("ClownM_FloorTClaw",0,0,8,0)
CLWH G 0 A_GiveInventory("GroundThunderClawOut",1)
CLWH G 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
CLWH GG 1 A_GiveInventory("ThunderClawIntoGround")
CLWH H 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
CLWH HH 1 A_GiveInventory("ThunderClawIntoGround")
FlashClawWait:
TNT1 A 1 A_GiveInventory("ThunderClawIntoGround")
TNT1 A 0 A_JumpIfInventory("GroundThunderClawOut",1,"FlashClawWait")
TNT1 A 0 A_JumpIfInventory("GroundThunderClawOut2",1,"FlashClawWait")
FlashClawReturn:
CLWH H 0 A_TakeInventory("ClownAltFlag",1)
CLWH H 0 A_JumpIfInventory("PlayerPropertyRage",1,5)
CLWH H 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH H 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
CLWH H 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashAura")
CLWH H 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashAura")
CLWH H 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH G 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
CLWH G 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashAura")
CLWH G 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashAura")
CLWH G 0 A_JumpIfInventory("PlayerPropertyRage",1,5)
CLWH G 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH G 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
CLWH G 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashAura")
CLWH G 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashAura")
CLWH G 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH C 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashAura")
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashAura")
goto Flash2
FlashAura:
CLWH C 0 A_JumpIfInventory("VivifyCycle2",11,"FlashAura4b")
CLWH C 0 A_GiveInventory("VivifyCycle2",1)
CLWH C 0 A_JumpIfInventory("VivifyCycle2",10,"FlashAura4")
CLWH C 0 A_JumpIfInventory("VivifyCycle2",7,"FlashAura3")
CLWH C 0 A_JumpIfInventory("VivifyCycle2",4,"FlashAura2")
FlashAura1:
CLWH D 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH D 0 A_SpawnItemEx("ClownShockFX1",0,0,40,momx,momy,momz,0,1+8+128)
goto FlashAuraLoop
FlashAura2:
CLWH E 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH E 0 A_SpawnItemEx("ClownShockFX2",0,0,40,momx,momy,momz,0,1+8+128)
goto FlashAuraLoop
FlashAura3:
CLWH F 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH F 0 A_SpawnItemEx("ClownShockFX3",0,0,40,momx,momy,momz,0,1+8+128)
goto FlashAuraLoop
FlashAura4b:
CLWH E 0 A_TakeInventory("VivifyCycle2")
FlashAura4:
CLWH E 1 A_JumpIfInventory("ClownAltFlag",1,"FlashClaw")
CLWH E 0 A_SpawnItemEx("ClownShockFX2",0,0,40,momx,momy,momz,0,1+8+128)
goto FlashAuraLoop
FlashAuraLoop:
CLWH C 0 A_GiveInventory("ClownShockPickup",1)
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg",1,"FlashSparkle")
CLWH C 0 A_JumpIfInventory("ClownShockUpPeg2",1,"FlashSparkle")
CLWH C 0 A_JumpIfInventory("ClownShockUp",1,"FlashAura")
goto Flash2
FlashSparkle:
CLWH C 0 A_SpawnItemEx("ClownSparkle",0,0,0,0,0,0,0,1+128)
goto FlashAura
}
}

actor Clownman_W2 : Clownman_W
{
tag "$TAGC_8D2"
Inventory.Pickupmessage "How did you get this?! This isn't a joking matter!"
inventory.icon "ClowIcon"
Weapon.AmmoUse 150
states
{
Deselect:
CLWH B 0
goto DeselectSwap
Select:
CLWH B 0
goto SelectSwap

Ready:
CLWH B 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_CLOWNMAN)
CLWH B 0 A_GunFlash("Flash",1)
Ready2:
CLWH B 0 A_JumpIfInventory("ThunderClawCooldown",1,"HandGone")
CLWH B 0 A_JumpIfInventory("ClownShockUp",1,"HandGone")
CLWH B 0 A_JumpIfInventory("ClownShockUpPeg",1,"HandGone")
CLWH B 0 A_JumpIfInventory("ClownShockUpPeg2",1,"HandGone")
CLWH B 0 A_JumpIfInventory("YoGeekyAmmo",150,"Ready3")
CLWH B 1 A_WeaponReady(WRF_NOPRIMARY)
CLWH B 0 A_GiveInventory("YoGeekyAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
loop
Ready3:
CLWH B 1 A_WeaponReady
CLWH B 0 A_GiveInventory("YoGeekyAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
loop

Fire:
TNT1 A 0 A_JumpIfNoAmmo("NoAmmo")
TNT1 A 0 A_GiveInventory("Clownman_Fire2_P")
goto HandGone
HandGone:
TNT1 A 1 A_WeaponReady(WRF_NOPRIMARY)
TNT1 A 0 A_GiveInventory("YoGeekyAmmo",1+CallACS("core_checkrune",RUNE_RAGE))
goto Ready2

AltFire:
CLWH B 0 A_GiveInventory("ClownAltFlag",1)
goto Ready2
NoAmmo:
CLWH B 0
goto Ready2
}
}


actor YoGeekyAmmo : Ammo
{
+INVENTORY.IGNORESKILL
inventory.amount 1
inventory.maxamount 375
}

actor ClownMainFiredF : OnceC{}
actor ClownAltFlag : OnceC{}

actor ThunderClawCooldown : Powerup
{
+INVENTORY.ADDITIVETIME
powerup.duration 15
}

actor ClownShockInterval : Powerup
{
powerup.duration 7
}
actor ClownShockIntervalR : Powerup
{
powerup.duration 4
}

actor ClownShockUp : Powerup
{
powerup.duration 5
}
actor ClownShockUpPeg : Powerup
{
powerup.duration 120
}
actor ClownShockUpPeg2 : Powerup
{
powerup.duration 15
}

actor GroundThunderClawOut : Powerup
{
powerup.duration 10
}
actor GroundThunderClawOut2 : GroundThunderClawOut{}



actor Clownman_Fire2_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_PlaySoundEx("weapon/thunderclaw","Weapon")
TNT1 A 0 A_GiveInventory("ThunderClawCooldown_RC",1)

TNT1 A 0 A_SpawnItemEx("ClownM_TClawPeg",cos(-pitch)*4,-8,32+sin(-pitch)*4,cos(-pitch)*33,0,sin(-pitch)*33,0,1+32)
TNT1 A 0 A_JumpIfInventory("PlayerPropertySpread",1,"Pickup_S")
stop
Pickup_S:
TNT1 A 0 A_SpawnItemEx("ClownM_TClaw",cos(-pitch)*4,-8,32+sin(-pitch)*4,cos(-pitch)*33,0,sin(-pitch)*33,15,1+32)
TNT1 A 0 A_SpawnItemEx("ClownM_TClaw",cos(-pitch)*4,-8,32+sin(-pitch)*4,cos(-pitch)*33,0,sin(-pitch)*33,-15,1+32)
stop
}
}

actor ThunderClawCooldown_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
TNT1 AA 0 A_GiveInventory("ThunderClawCooldown",1)
stop
}
}

actor ClownShockInterval_RC : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("PlayerPropertyRage",1,2)
TNT1 A 0 A_GiveInventory("ClownShockInterval",1)
stop
TNT1 A 0 A_GiveInventory("ClownShockIntervalR",2)
stop
}
}

actor ClownShockFX1 : BasicGraphicEffect
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
SpawnFrame:
TCRN A 1
stop
}
}

actor ClownShockFX2 : ClownShockFX1
{
States
{
SpawnFrame:
TCRN B 1
stop
}
}

actor ClownShockFX3 : ClownShockFX1
{
States
{
SpawnFrame:
TCRN C 1
stop
}
}

actor ClownSparkle : ClownShockFX1
{
ReactionTime 6
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 1 A_Jump(148,"F_1","F_2","F_3")
TNT1 A 1
stop
F_1:
TNT1 A 2 A_CountDown
TCRN G 2
loop
F_2:
TNT1 A 2 A_CountDown
TCRN H 2
loop
F_3:
TNT1 A 2 A_CountDown
TCRN I 2
loop
}
}

actor ClownShockRadius : BasicImplosion
{
Obituary "$OB_THUNDERCARNIVAL"
Damagetype "ClownM_Aura"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(80+CallACS("core_checkrune",RUNE_SPREAD,2)*160,100,0,0,12)
stop
}
}

actor ClownShockRadius2 : ClownShockRadius
{
Damagetype "ClownM_Aura2"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(350+CallACS("core_checkrune",RUNE_SPREAD,2)*700,140,0,0,24)
stop
}
}



actor ClownShockPickup : CustomInventory
{
states
{
Pickup:
TNT1 A 0 A_JumpIfInventory("ClownShockInterval",1,"No")
TNT1 A 0 A_JumpIfInventory("ClownShockIntervalR",1,"No")
TNT1 A 0 A_GiveInventory("ClownShockInterval_RC",1)
TNT1 A 0 A_JumpIfInventory("ClownShockUpPeg",1,"SwingShock")
TNT1 A 0 A_JumpIfInventory("ClownShockUpPeg2",1,"SwingShock")
TNT1 A 0 A_PlaySound("weapon/ClownBall",4,0.65)
TNT1 A 0 A_SpawnItemEx("ClownShockRadius",0,0,28,0,0,0,0,1)
stop
No:
TNT1 A 0
stop
SwingShock:
TNT1 A 0// A_PlaySoundEx("weapon/ClownBall","Body")
TNT1 A 0 A_PlaySound("weapon/ClownBall",4,0.95)
TNT1 A 0 A_SpawnItemEx("ClownShockRadius2",0,0,8,0,0,0,0,1)
stop
}
}

actor ClownM_TClaw : ProjSpawnFuncActor
{
PROJECTILE
damagetype "ClownM_Claw"
Obituary "$OB_THUNDERCLAW"
//+RIPPER
+FORCEXYBILLBOARD
+DONTREFLECT
+SKYEXPLODE
+EXPLODEONWATER
ReactionTime 16//20
damage (300)//400
height 12//8
radius 12//8
Speed 33//26
scale 2.5
states
{
Spawn:
TCLB T 0
TCLB T 0 A_SpawnItemEx("ClownM_TClawBitR",0,0,0,0,0,0,180)
TCLB T 0 A_GiveToTarget("ClownShockUp",1)
TCLB T 1
TCLB T 0 A_CountDown
loop
Death:
TNT1 A 0 A_SpawnItemEX("ElectrifyEffect")
TNT1 A 0 A_SpawnItemEX("ClownM_ClawPeg_H")
TNT1 A 0 A_FaceTarget
TNT1 A 1 A_SpawnItemEx("ClownM_TClawHandR")
stop
}
}

actor ClownM_TClaw_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_SpawnItemEx("ClownM_TClawBitR",0,0,0,0,0,0,180)
TNT1 A 0 A_GiveToTarget("ClownShockUp",1)
stop
}
}

actor ClownM_ClawPeg_H : BasicImplosion//ThunderClawPegHelper
{
+SERVERSIDEONLY
damagetype "ThunderClawPegHelp"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_Explode(1,64,0,0,64)
TNT1 A 1
stop
}
}

actor ClownM_ClawChainProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "ClownM_ClawChain", 0.0
}

actor ClownM_TClawDamager
{
PROJECTILE
damagetype "ClownM_ClawChain"
Obituary "$OB_THUNDERCLAW"
+DONTBLAST
+THRUGHOST
+SERVERSIDEONLY
RenderStyle "None"
Damage(20)//50
//Radius 20
//Height 16
States
{
Spawn:
TNT1 A 0
TNT1 A 2
stop
}
}

actor ClownM_TClawHandR : ClownM_TClaw
{
damagetype "ClownM_ClawChain"
+NOINTERACTION
+DONTBLAST
ReactionTime 30
Damage (0)
Speed 43
States
{
Spawn:
TCLB U 0
TCLB U 0 A_RearrangePointers(0,0,2)//Target >> Tracer

SpawnL:
TCLB U 0 A_GiveToTarget("ClownShockUp",1)
TCLB U 0 A_CountDown
TCLB U 0 A_JumpIfCloser(64,"DeathReturn")
TCLB U 0 A_SeekerMissile(90,90,2)//SMF_PRECISE
TCLB U 1 A_SpawnItemEx("ClownM_TClawDamager")
TCLB U 0 A_JumpIfCloser(64,"DeathReturn")
TCLB U 1 A_SpawnItemEx("ClownM_TClawDamager")
TCLB U 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
loop

DeathReturn:
TNT1 A 0 A_GiveToTarget("ClownShockUp",1)
TNT1 A 0 //A_TakeFromTarget("ClownShockUp")
stop

Death:
TNT1 A 0
stop
}
}

actor ClownM_TClawBitR : ClownM_TClawHandR
{
+FORCEXYBILLBOARD
+BRIGHT
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfCloser(64,"Death")
TNT1 A 0 A_RearrangePointers(0,0,2)
SpawnRNG:
TNT1 A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
TNT1 A 0 A_CountDown
TNT1 A 0 A_SeekerMissile(90,90,2)
TNT1 A 0 A_SpawnItemEx("ClownM_TClawDamager")
TNT1 A 0 A_Jump(256,"S_1","S_2","S_3","S_4","S_5","S_6")
S_1:
TCLB Q 1
TCLB R 0 A_JumpIfCloser(64,"Death")
TCLB R 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
S_2:
TCLB R 1
TCLB S 0 A_JumpIfCloser(64,"Death")
TCLB S 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
S_3:
TCLB S 1
TCLB Q 0 A_JumpIfCloser(64,"Death")
TCLB Q 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
S_4:
TCLB Q 1
TCLB Q 0 A_JumpIfCloser(64,"Death")
TCLB Q 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
S_5:
TCLB R 1
TCLB R 0 A_JumpIfCloser(64,"Death")
TCLB R 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
S_6:
TCLB S 1
TCLB S 0 A_JumpIfCloser(64,"Death")
TCLB S 1 A_SpawnItemEx("ClownM_TClawDamager")
goto SpawnRNG
Death:
TNT1 A 0
stop
}
}

actor ClownM_TClawPeg : ClownM_TClaw
{
Obituary "$OB_THUNDERCLAW"
damagetype "ClownM_Peg"
states
{
Spawn:
CLWH U 0
CLWH UUUUUUUUUUUUU 1 A_GiveInventory("ClownM_TClaw_P")
CLWH U 0 A_Stop
CLWH U 0 A_JumpIf(z-floorz<64,"Linger")
CLWH U 0 A_SpawnItemEx("ClownM_ThunderClawPeg")
goto SpawnTheClown
Linger:
TCLB TTTT 1 A_GiveInventory("ClownM_TClaw_P")
SpawnTheClown:
CLWH U 0 A_FaceTarget
CLWH U 0 A_SpawnItemEx("ClownM_TClawHandR")
stop
Death:
CLWH U 0 A_Stop
CLWH U 0 A_SpawnItemEX("ElectrifyEffect")
CLWH U 0 A_JumpIf(z-floorz<64,2)
CLWH U 0 A_SpawnItemEx("ClownM_ThunderClawPeg")
CLWH U 0
goto SpawnTheClown//stop
}
}

actor TCPeg_YoGeekyAmmo_P : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_JumpIfInventory("VivifyDelay5",1,"No")
//TNT1 A 0 A_GiveInventory("VivifyDelay5",1)//Was for Spread
TNT1 A 0 A_TakeInventory("YoGeekyAmmo",75)
TNT1 A 0 A_TakeInventory("YoGeekyAmmo",75,1)
TNT1 A 0 A_GiveInventory("CBM_BeatBoostRemoveCheck_P")
stop
No:
TNT1 A 0
stop
}
}

actor ClownM_PegHell_F : Inventory
{
inventory.maxamount 50
}

actor ClownM_ThunderClawPeg : ProjSpawnFuncActor
{
-SHOOTABLE
+NOTAUTOAIMED
+NODAMAGE
+NODAMAGETHRUST
+NOGRAVITY
+NOBLOOD
//+NORADIUSDMG
+QUICKTORETALIATE
+FORCEXYBILLBOARD
+CANTSEEK
//+DONTDRAIN//
Health 9999
Mass 99999
painchance 256
damagefactor "Normal", 0.0
damagefactor "ThunderClaw", 1.0
damagefactor "ThunderClawPegHelp", 1.0
damagefactor "ClownM_Claw", 1.0
Height 32
Radius 16
Speed 0
Scale 2.5
Args 400
States
{
Spawn:
CLWH V 0
CLWH V 0 A_GiveToTarget("TCPeg_YoGeekyAmmo_P",1)
CLWH V 0 A_SpawnItemEx("ClownM_PegChainTopFX",0,0,19,0,0,0,0,1)
CLWH V 0 A_JumpIf(ceilingz-z<16,2)
CLWH V 0 A_SpawnItemEx("ClownM_PegChain",0,0,9,0,0,20,0,1)
goto Pain.ThunderClaw+2
SpawnIdle:
CLWH V 1 A_CountDownArg(0)
loop
Pain.ThunderClaw:
Pain.ThunderClawPegHelp:
Pain.ClownM_Claw:
//CLWH V 0 A_JumpIfTargetInLOS("TargetFound")
CLWH V 0 A_ChangeFlag("SHOOTABLE",0)
CLWH V 0 A_CountDownArg(0)
//CLWH V 0 //A_Log("OUCH")
//CLWH V 1 ACS_NamedExecuteAlways("CBM_CLOWNHELL",0,70,1)
CLWH V 1 ACS_NamedExecuteAlways("cbm_thunderclawpeg",0,70,1)
CLWH V 1 A_CountDownArg(0)
CLWH V 0 A_ClearTarget
CLWH V 0 A_ChangeFlag("SHOOTABLE",1)
Goto SpawnIdle

Death:
CLWH V 0 A_JumpIfInventory("ClownM_PegHell_F",1,"DeathExist")
CLWH V 0
stop
DeathExist:
CLWH V 1
CLWH V 1 A_JumpIfInventory("ClownM_PegHell_F",1,"DeathExist")
stop
}
}

actor ClownM_PegChain
{
PROJECTILE
+THRUGHOST
+THRUACTORS
+DONTREFLECT
+DONTBLAST
+CLIENTSIDEONLY
Damage(0)
Height 8
Radius 8
Scale 2.5
States
{
Spawn:
TNT1 A 1
TNT1 A 0 A_GiveInventory("MM8BDMProjSpawnFuncClient")
TNT1 A 1 A_SpawnItemEx("ClownM_PegChainFX",0,0,0,0,0,0,0,1)
wait
}
}

actor ClownM_PegChainFX : BasicGraphicEffect
{
+FORCEYBILLBOARD
Reactiontime 41//400
Height 8
Radius 8
States
{
SpawnFrame:
CLWH W 10 A_CountDown
wait
}
}

actor ClownM_PegChainTopFX : ClownM_PegChainFX
{
States
{
SpawnFrame:
CLWH X 10 A_CountDown
wait
}
}


actor ClownM_FloorTClaw : ProjSpawnFuncActorFast
{
+DONTBLAST
+DONTREFLECT
+RIPPER
+THRUGHOST
+NOTARGETSWITCH
+EXPLODEONWATER
reactiontime 5
damage (0)
radius 8
height 16
speed 1000
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_CountDown
loop
Death:
TNT1 A 0 A_SpawnItemEx("ClownM_FloorTClaw2",0,0,floorz-z)
stop
}
}


actor ClownM_GroundProtect : Powerup
{
Powerup.Duration 6
}//Prevent A_Stop Pain while you have this

actor ClownM_FloorTClaw2 : ProjSpawnFuncActor
{
PROJECTILE
Obituary "$OB_THUNDERCLAW"
damagetype "ClownM_Ground"
//+NOINTERACTION
+DONTBLAST
+THRUACTORS
+THRUGHOST
+FLOORHUGGER
reactiontime 6
damage (0)
radius 8
height 16
scale 2.5
States
{
Spawn:
TNT1 A 0
TCLB A 0 A_GiveToTarget("GroundThunderClawOut2",1)
TCLB A 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB AA 1
TCLB B 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB BB 1
TCLB C 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB CC 1
TCLB C 0 A_SpawnItemEX("ElectrifyEffect")
Spawn2:
TCLB C 0 A_PlaySoundEx("weapon/ClownBall","Weapon")
TCLB C 0 A_Explode(50,88,0,0,8)
TCLB C 0 A_CountDown
TCLB C 0 A_GiveToTarget("GroundThunderClawOut2",1)
TCLB D 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB D 1 bright
TCLB I 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB I 1 bright
TCLB C 0 A_PlaySoundEx("weapon/ClownBall","Weapon")
TCLB C 0 A_Explode(50,88,0,0,8)
TCLB C 0 A_CountDown
TCLB G 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB G 1 bright
TCLB I 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB I 1 bright
TCLB C 0 A_PlaySoundEx("weapon/ClownBall","Weapon")
TCLB C 0 A_Explode(50,88,0,0,8)
TCLB C 0 A_CountDown
TCLB C 0 A_GiveToTarget("GroundThunderClawOut2",1)
TCLB E 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB E 1 bright
TCLB I 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB I 1 bright
TCLB C 0 A_PlaySoundEx("weapon/ClownBall","Weapon")
TCLB C 0 A_Explode(50,88,0,0,8)
TCLB C 0 A_CountDown
TCLB F 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB F 1 bright
TCLB I 1 bright A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB I 1 bright
loop
Death:
TCLB C 0 A_SpawnItemEX("ElectrifyEffect")
TCLB C 0 A_GiveToTarget("GroundThunderClawOut2",1)
TCLB C 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB C 1
TCLB B 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB B 1
TCLB A 1 A_JumpIfInTargetInventory("PlayerPropertyRage",1,1)
TCLB A 1
TNT1 A 5 A_GiveToTarget("GroundThunderClawOut2",1)
TNT1 A 1 A_TakeFromTarget("GroundThunderClawOut2",1)
stop
}
}

actor ThunderClawIntoGround : CustomInventory
{
States
{
Pickup:
//TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX2",0,24,36)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX1",0,24,36-(z+36-floorz)*1/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX2",0,24,36-(z+36-floorz)*2/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX1",0,24,36-(z+36-floorz)*3/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX2",0,24,36-(z+36-floorz)*4/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX1",0,24,36-(z+36-floorz)*5/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX2",0,24,36-(z+36-floorz)*6/7,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("ThunderClawIntoGroundFX1",0,24,36-(z+36-floorz),0,0,0,0,1)
stop
}
}

actor ThunderClawIntoGroundFX1
{
scale 2.5
-SOLID
+NOGRAVITY
+DONTSPLASH
+CLIENTSIDEONLY
Radius 6
Height 6
States
{
Spawn:
TCLB O 0
TCLB O 0 A_GiveInventory("MM8BDMProjSpawnFuncClient", 1)
TCLB O 1
stop
}
}

actor ThunderClawIntoGroundFX2 : ThunderClawIntoGroundFX1
{
States
{
Spawn:
TCLB O 0
TCLB P 0 A_GiveInventory("MM8BDMProjSpawnFuncClient", 1)
TCLB P 1
stop
}
}


actor Clownman_W_NormalBar : NormalBar {Args 192,220}
actor Clownman_W2_NormalBar : NormalBar {Args 192,220}