actor Coldman_W : BaseMM8BDMWep_CBM
{
tag "$TAGC_BB"
dropitem "IceWallWep"
Weapon.AmmoUse 40
Weapon.AmmoGive 240
Inventory.Pickupmessage "THE FRIDGE IS RUNNING. To save the fridge, annihilate oven-lovers."
Obituary "$OB_ICEWALL"
weapon.ammotype "KickleCubicleAmmo"
weapon.ammotype2 "RunningFridgeAmmo"
States
{
Spawn:
C_0B B 1
loop

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

Ready:
CLDH A 0 ACS_NamedExecuteWithResult("core_weaponcolor",DYE_COLDMAN,0,CBM_TCLR_DEFAULT)
CLDH A 0 A_GunFlash
goto Ready1
Ready1:
CLDH A 0 A_JumpIfInventory("IsBot",1,"BotAmmo")
CLDH A 0 A_JumpIfInventory("KickleCubicleAmmo",40,"Ready2")
CLDH A 0 A_JumpIfInventory("PlayerPropertyRage",1,3)
CLDH A 0 A_JumpIfInventory("DinoDNAFlag",1,"ColdGroundFreeze")
CLDH A 1 A_WeaponReady(4)
CLDH A 0 A_JumpIfInventory("DinoDNAFlag",1,"ColdGroundFreeze")
CLDH A 1 A_WeaponReady(4)
CLDH A 0 A_GiveInventory("KickleCubicleAmmo",2)
goto Ready1+1
Ready2:
CLDH A 0 A_JumpIfInventory("PlayerPropertyRage",1,3)
CLDH A 0 A_JumpIfInventory("DinoDNAFlag",1,"ColdGroundFreeze")
CLDH A 1 A_WeaponReady
CLDH A 0 A_JumpIfInventory("DinoDNAFlag",1,"ColdGroundFreeze")
CLDH A 1 A_WeaponReady
CLDH A 0 A_GiveInventory("KickleCubicleAmmo",2)
goto Ready2

Fire:
CLDH A 0 A_JumpIfInventory("IsBot",1,"BotFire")
CLDH A 0 A_GiveInventory("VivifyFlag1",1)
CLDH A 0
CLDH B 1 offset(0,36)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH B 1 offset(0,40)
CLDH C 1 offset(0,44)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 1 offset(0,48)
CLDH A 0 A_PlaySoundEx("weapon/icewallspawn","Weapon")
CLDH A 0 A_TakeInventory("KickleCubicleAmmo",20)
CLDH A 0 A_TakeInventory("KickleCubicleAmmo",20,1)//A_Stop
CLDH A 0 A_SpawnItemEx("BossIceWallSpawner",64,0,0)
CLDH A 0
CLDH A 0 A_JumpIfInventory("IsBot",1,"BotFire2")
CLDH A 0//Fire+12
CLDH DE 2//3
CLDH F 10
CLDH ED 2 A_TakeInventory("VivifyFlag1",99)
CLDH A 2 offset(0,88)A_GiveInventory("ColdCombo_Flag",1)
CLDH A 2 offset(0,80)A_WeaponReady(5)
CLDH A 2 offset(0,72)A_WeaponReady(5)
CLDH A 2 offset(0,64)A_WeaponReady(5)
CLDH A 2 offset(0,56)A_WeaponReady(5)
CLDH A 2 offset(0,48)A_WeaponReady(5)
CLDH A 2 offset(0,40)A_WeaponReady(5)
CLDH A 0 A_TakeInventory("ColdCombo_Flag")
CLDH A 0 A_TakeInventory("DinoDNAFlag")
goto Ready1
Altfire:
CLDH A 0 A_WeaponReady(14)
CLDH A 0 A_GiveInventory("ColdPunch_P",1)
CLDH A 0 A_PlaySoundEx("weapon/needleWham","Body")
CLDH H 8 A_GiveInventory("ColdmanPunchCheck_P",1)
CLDH G 4
CLDH G 2 A_TakeInventory("ColdCombo_Flag")
CLDH A 8
CLDH A 0 A_TakeInventory("DinoDNAFlag")
goto Ready1
ColdGroundFreeze:
CLDH C 0 A_PlaySoundEx("weapon/adapterreturn","Body")
CLDH C 0 A_GunFlash
CLDH C 1 offset(0,36)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 1 offset(0,40)A_TakeInventory("DinoDNAFlag",999)
CLDH C 1 offset(0,44)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 0 A_TakeInventory("RunningFridgeAmmo",14)
CLDH C 0 A_TakeInventory("RunningFridgeAmmo",14,1)
CLDH C 1 offset(0,48)A_FireCustomMissile("GroundColdFreeze",0,0,0,0)
CLDH C 1 offset(0,52)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 1 offset(0,56)A_TakeInventory("DinoDNAFlag",999)
CLDH C 1 offset(0,52)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 1 offset(0,48)
CLDH C 1 offset(0,44)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 1 offset(0,40)
CLDH C 1 offset(0,36)A_JumpIfInventory("PlayerPropertyRage",1,1)
CLDH C 0
goto Ready1

Flash:
TNT1 AAAAA 2 A_RailWait
TNT1 A 1 A_GiveInventory("RunningFridgeAmmo",1)
loop

BotFire:
CLDH A 0 A_JumpIfInventory("RunningFridgeAmmo",28,1)
goto Fire+1
CLDH A 0 A_Jump(128,"ColdGroundFreeze")
goto Fire+1
BotFire2:
CLDH A 0 A_Jump(128,1)
goto Fire+13
CLDH D 0 A_Stop
CLDH D 0 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
CLDH DEFFF 3
CLDH ED 3 A_TakeInventory("VivifyFlag1",99)
CLDH A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
goto Altfire
BotAmmo:
CLDH A 0 A_JumpIfInventory("KickleCubicleAmmo",40,"Ready2")
CLDH A 0 A_GiveInventory("KickleCubicleAmmo",120)
CLDH A 20 ACS_NamedExecuteWithResult("core_stopplayer",0,1)
CLDH A 0 ACS_NamedExecuteWithResult("core_stopplayer",0,0)
goto Ready1+1

}
}

actor KickleCubicleAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 240
+INVENTORY.IGNORESKILL
}

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

actor ColdCombo_Flag :OnceC{}

actor DinoDNAFlag :OnceC{}

actor ColdmanPunchFlag : Powerup
{
Powerup.Duration 8
}
actor ColdmanPunchFlagA : ColdmanPunchFlag{}

actor ColdmanUseItem : BasicClassItem
{
inventory.icon "ColdIcon"
inventory.pickupmessage "Don't eat what you find in this fridge."
Tag "Perform Cold Field"
states
{
Spawn:
CLDH Z 1
loop
UseCBM:
TNT1 A 0 A_JumpIfInventory("DinoDNAFlag",1,"No")
TNT1 A 0 A_JumpIfInventory("RunningFridgeAmmo",28,"Success")
fail
Success:
TNT1 A 0 A_GiveInventory("DinoDNAFlag",1)
fail
}
}

actor ColdmanPunchCheck_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
goto Air
Ground:
TNT1 A 0 A_GiveInventory("ColdmanPunchFlag")
stop
Air:
TNT1 A 0 A_GiveInventory("ColdmanPunchFlagA")
stop
}
}

actor BossIceWallSpawner : BasicHelper
{
//Translation "192:192=96:96","198:198=116:116"
Translation "1:1=1:1"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BossIceWallSpawnerX",0,0,0,0,0,0,0,1)
TNT1 A 0 A_JumpIfInTargetInventory("PlayerPropertySpread",1,1)
stop
TNT1 A 0 A_SpawnItemEx("BossIceWallSpawnerX",0,70,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("BossIceWallSpawnerX",0,-70,0,0,0,0,0,1)
stop
}
}

actor BossIceWallSpawnerX : ProjSpawnFuncActor
{
DamageType "ColdM_Wall"
Obituary "$OB_ICEWALL"
+MISSILE
+RIPPER
+NOGRAVITY
+DONTBLAST
+DONTREFLECT
+NOBLOOD
+NOCLIP
+NOEXPLODEFLOOR
+SOLID
Species "DUMBICEWALL"
Mass 9999999
ReactionTime 60
Damage (0)
Radius 24
Height 64
Speed 0
scale 2.5
States
{
Spawn:
CLDW J 0
CLDW J 0 A_SpawnItemEX("IcePitFreeze")
CLDW J 0 A_ChangeFlag("RIPPER",0)
CLDW J 0 A_ChangeFlag("NOCLIP",0)
CLDW J 0 A_GiveInventory("CutterFlag",1)
CLDW J 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)//A_Explode(8,64,0,0,8)
CLDW K 0 A_GiveInventory("CutterFlag",1)
CLDW K 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW L 0 A_GiveInventory("CutterFlag",1)
CLDW L 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW A 0 A_GiveInventory("CutterFlag",1)
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
//CLDW A 1 //A_ChangeFlag("NOGRAVITY",0)
goto DeathD

DeathD:
CLDW A 0 ThrustThingZ(0,0,0,1)
CLDW A 0 A_SetGravity(0.0)
CLDW A 0 A_ChangeFlag("NOINTERACTION",1)
CLDW A 0 A_ChangeFlag("SOLID",0)
CLDW A 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,64,0,0,0,0,1)
CLDW A 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,48,0,0,0,0,1)
CLDW A 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,32,0,0,0,0,1)
CLDW A 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,16,0,0,0,0,1)
CLDW A 0 A_SpawnItemEx("BossIceWall",0,0,0,0,0,0,0,1)
TNT1 A 1
stop

Death:
CLDW A 0 A_ChangeFlag("SOLID",0)
CLDW J 0 A_SetGravity(0.0)
CLDW J 0 A_JumpIfInventory("CutterFlag",1,2)
CLDW J 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW J 0 A_JumpIfInventory("CutterFlag",2,3)
CLDW K 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW L 0 A_JumpIfInventory("CutterFlag",3,2)
CLDW L 2 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW B 0 A_JumpIfInventory("CutterFlag",4,2)
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomS",0,0,32)
CLDW B 2 A_Stop
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomD",0,0,32)
CLDW B 0 A_SpawnItemEx("BossIceWallDeathFX",0,0,0,0,0,0,0,1)
TNT1 A 1
stop
}
}

actor BossIceWallSpawnerFX : BasicGraphicEffect
{
States
{
SpawnFrame:
CLDW QRSTU 2
stop
}
}

actor ColdWallTimer : Inventory
{
inventory.amount 1
inventory.maxamount 200
}

actor BossIceWall : CBM_ShootableActor//ProjSpawnFuncActor
{
//var int user_translateLikePlayer;
var int user_P;
+USEDAMAGEEVENTSCRIPT
var int user_NoOwnerDamage;
DamageType "ColdM_Wall"
Obituary "$OB_ICEWALL"
+MISSILE
+SHOOTABLE
+DONTDRAIN
+SOLID
+NODAMAGETHRUST
+NOTARGETSWITCH
+NOBLOOD
+MOVEWITHSECTOR
+CANBOUNCEWATER
+DONTSPLASH
+DONTREFLECT
+NOTAUTOAIMED
+DONTRIP
+DONTREFLECT
+SKYEXPLODE

+STEPMISSILE
maxstepheight 8
+BOUNCEONWALLS
+BOUNCEONCEILINGS
+NOEXPLODEFLOOR

//+THRUSPECIES
Species "DUMBICEWALL"
PainChance "Normal", 256
DamageFactor "ColdM_Wall", 0.0
DamageFactor "ColdM_WallAir", 0.0
DamageFactor "ColdM_WallFloor", 0.0
DamageFactor "ColdM_Punch", 0.0

Health 950
Stamina 350
BounceFactor 1.0
WallBounceFactor 1.0
Bouncecount 7
Mass 9999999
Damage (0)
Radius 24
Height 64
scale 2.5
States
{
Spawn:
CLDW A 0
CLDW A 0 A_SpawnItemEX("IcePitFreeze")
CLDW A 0 A_Stop
CLDW A 0 ThrustThingZ(0,0,0,0)
//CLDW A 1 A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
//CLDW A 0 A_ChangeFlag("RIPPER",1)
goto PreSpawn2

PreSpawn1:
CLDW A 0
CLDW A 0 A_JumpIfHealthLower(Stamina,"PreSpawn3")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"PreBashGo1")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"PreBashGoA1")
CLDW A 1
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW A 0 A_CheckFloor("SpawnStart2")
goto PreSpawn2
PreSpawn2:
CLDW A 0
CLDW A 0 A_JumpIfHealthLower(Stamina,"PreSpawn4")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"PreBashGo2")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"PreBashGoA2")
CLDW A 1
CLDW A 0 //A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW A 0 A_CheckFloor("SpawnStart1")
goto PreSpawn1


PreSpawn3:
CLDW B 0
CLDW B 0
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"PreBashGo3")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"PreBashGoA3")
CLDW B 1
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW B 0 A_CheckFloor("SpawnStart4")
goto PreSpawn4
PreSpawn4:
CLDW B 0
CLDW B 0
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"PreBashGo4")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"PreBashGoA4")
CLDW B 1
CLDW B 0 //A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW B 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW B 0 A_CheckFloor("SpawnStart3")
goto PreSpawn3

PreBashGo1:
CLDW A 0 A_JumpIfCloser(108,"BashBoost")
goto PreSpawn1+4
PreBashGoA1:
CLDW A 0 A_JumpIfCloser(108,"BashBoostA")
goto PreSpawn1+4
PreBashGo2:
CLDW A 0 A_JumpIfCloser(108,"BashBoost")
goto PreSpawn2+4
PreBashGoA2:
CLDW A 0 A_JumpIfCloser(108,"BashBoostA")
goto PreSpawn2+4

PreBashGo3:
CLDW B 0 A_JumpIfCloser(108,"BashBoost2")
goto PreSpawn3+4
PreBashGoA3:
CLDW B 0 A_JumpIfCloser(108,"BashBoostA2")
goto PreSpawn3+4
PreBashGo4:
CLDW B 0 A_JumpIfCloser(108,"BashBoost2")
goto PreSpawn4+4
PreBashGoA4:
CLDW B 0 A_JumpIfCloser(108,"BashBoostA2")
goto PreSpawn4+4

BashGo1:
CLDW A 0 A_JumpIfCloser(108,"BashBoost")
goto Spawn1+4
BashGoA1:
CLDW A 0 A_JumpIfCloser(108,"BashBoostA")
goto Spawn1+4
BashGo2:
CLDW A 0 A_JumpIfCloser(108,"BashBoost")
goto Spawn2+4
BashGoA2:
CLDW A 0 A_JumpIfCloser(108,"BashBoostA")
goto Spawn2+4

BashGo3:
CLDW B 0 A_JumpIfCloser(108,"BashBoost2")
goto Spawn3+4
BashGoA3:
CLDW B 0 A_JumpIfCloser(108,"BashBoostA2")
goto Spawn3+4
BashGo4:
CLDW B 0 A_JumpIfCloser(108,"BashBoost2")
goto Spawn4+4
BashGoA4:
CLDW B 0 A_JumpIfCloser(108,"BashBoostA2")
goto Spawn4+4

SpawnStart1:
CLDW A 0 A_JumpIf(CallACS("core_checkPit",0),"Death")//Bad floor check, such as pits
CLDW A 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,8,0,0,0,0,1)
CLDW A 0 A_ChangeFlag("RIPPER",1)
goto Spawn1
SpawnStart2:
CLDW B 0 A_JumpIf(CallACS("core_checkPit",0),"Death")
CLDW B 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,8,0,0,0,0,1)
CLDW B 0 A_ChangeFlag("RIPPER",1)
goto Spawn2
SpawnStart3:
CLDW B 0 A_JumpIf(CallACS("core_checkPit",0),"Death")
CLDW B 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,8,0,0,0,0,1)
CLDW B 0 A_ChangeFlag("RIPPER",1)
goto Spawn3
SpawnStart4:
CLDW B 0 A_JumpIf(CallACS("core_checkPit",0),"Death")
CLDW B 0 A_SpawnItemEx("BossIceWallSpawnerFX",0,0,8,0,0,0,0,1)
CLDW B 0 A_ChangeFlag("RIPPER",1)
goto Spawn4

Spawn1:
CLDW A 0 A_JumpIfInventory("ColdWallTimer",125,"Spawn3")
CLDW A 0 A_JumpIfHealthLower(Stamina,"Spawn3")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"BashGo1")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"BashGoA1")
CLDW A 1 A_GiveInventory("ColdWallTimer",1)//Thing_Damage(0, 1)
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
goto Spawn2
Spawn2:
CLDW A 0 A_JumpIfInventory("ColdWallTimer",125,"Spawn4")
CLDW A 0 A_JumpIfHealthLower(Stamina,"Spawn4")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"BashGo2")
CLDW A 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"BashGoA2")
CLDW A 1 A_GiveInventory("ColdWallTimer",1)
CLDW A 0 //A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
goto Spawn1

Spawn3:
CLDW B 0
CLDW B 0 A_JumpIfInventory("ColdWallTimer",200,"Death")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"BashGo3")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"BashGoA3")
CLDW B 1 A_GiveInventory("ColdWallTimer",1)
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
goto Spawn4
Spawn4:
CLDW B 0
CLDW B 0 A_JumpIfInventory("ColdWallTimer",200,"Death")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlag",1,"BashGo4")
CLDW B 0 A_JumpIfInTargetInventory("ColdmanPunchFlagA",1,"BashGoA4")
CLDW B 1 A_GiveInventory("ColdWallTimer",1)
CLDW B 0 //A_SpawnItemEx("BossIceWall_BoomI",0,0,32)
CLDW B 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
goto Spawn3

BashBoost://
CLDW A 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)//Turns IceWall
CLDW A 0 A_ChangeVelocity(24*cos(pitch),0,30*abs(sin(pitch)),3)
CLDW A 0 ACS_NamedExecuteAlways("cbm_StickyColdWall",0,38,10,64)
CLDW A 0 A_ChangeFlag("THRUACTORS",1)
CLDW A 0 A_ChangeFlag("NORADIUSDMG",1)
Goto Moving+3
BashBoostA:
CLDW A 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
CLDW A 0 A_ChangeVelocity(22*cos(pitch),0,30*abs(sin(pitch)),3)//A_ChangeVelocity(20,0,0,3)
CLDW A 0 ACS_NamedExecuteAlways("cbm_StickyColdWall",0,38,10,64)
CLDW A 0 A_ChangeFlag("THRUACTORS",1)
CLDW A 0 A_ChangeFlag("NORADIUSDMG",1)
Goto Moving+3

BashBoost2:
CLDW B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)
CLDW B 0 A_ChangeVelocity(36*cos(pitch),0,40*abs(sin(pitch)),3)
CLDW B 0 ACS_NamedExecuteAlways("cbm_StickyColdWall",0,44,12,64)
CLDW B 0 A_ChangeFlag("THRUACTORS",1)
CLDW B 0 A_ChangeFlag("NORADIUSDMG",1)
Goto MovingLow+3
BashBoostA2:
CLDW B 0 ACS_NamedExecuteWithResult("cbm_CopyPointerAnglePitch",2,1)//159
CLDW B 0 A_ChangeVelocity(32*cos(pitch),0,40*abs(sin(pitch)),3)//A_ChangeVelocity(30,0,0,3)
CLDW B 0 ACS_NamedExecuteAlways("cbm_StickyColdWall",0,44,12,64)
CLDW B 0 A_ChangeFlag("THRUACTORS",1)
CLDW B 0 A_ChangeFlag("NORADIUSDMG",1)
Goto MovingLow+3

Moving:
CLDW AAA 0 A_SpawnItemEx("BossIceWallFX",0,random(-16,16)+random2(1)*10,frandom(8,-4),0,0,0,0,1)
CLDW A 0 A_GiveInventory("ResyncPickup",1)
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomF",0,0,32)
CLDW A 1 A_GiveInventory("ColdWallTimer",1)
CLDW A 0 A_JumpIfHealthLower(Stamina,"MovingLow")
CLDW A 0 A_JumpIfInventory("ColdWallTimer",125,"MovingLow")
CLDW A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW A 0 A_CheckFloor("Moving")
Goto Air
MovingLow:
CLDW BBB 0 A_SpawnItemEx("BossIceWallFX",0,random(-16,16)+random2(1)*10,frandom(8,-4),0,0,0,0,1)
CLDW B 0 A_GiveInventory("ResyncPickup",1)
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomF",0,0,32)
CLDW B 1 A_GiveInventory("ColdWallTimer",1)
CLDW B 0 A_JumpIfInventory("ColdWallTimer",200,"Death")
CLDW B 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW B 0 A_CheckFloor("MovingLow")
Goto AirLow
Air:
CLDW A 0 A_GiveInventory("ResyncPickup",1)//ACS_ExecuteAlways(994, 0)//Old core icewall angle from pushing
CLDW A 0 A_JumpIfHealthLower(Stamina,"AirLow")
CLDW A 0 A_JumpIfInventory("ColdWallTimer",125,"AirLow")
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomA",0,0,32)
CLDW A 0 A_GiveInventory("ColdWallTimer",1)
CLDW A 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW A 1 A_CheckFloor("Continue")
Goto Air+1
AirLow:
CLDW B 0 A_GiveInventory("ResyncPickup",1)
CLDW B 0 A_JumpIfInventory("ColdWallTimer",200,"Death")
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomA",0,0,32)
CLDW B 0 A_GiveInventory("ColdWallTimer",1)
CLDW B 0 A_JumpIf(!CallACS("cbm_PointerExists",AAPTR_TARGET),"Death")
CLDW B 1 A_CheckFloor("ContinueLow")
Goto AirLow+1
Continue:
CLDW A 0 ThrustThing(angle*256/360,0,1,0)
CLDW A 0 A_SpawnItemEx("BossIceWall_BoomF",0,0,32)
CLDW A 1 ThrustThingZ(0,0,0,0)//A_TakeInventory("IceWallFlag", 1)
Goto Moving
ContinueLow:
CLDW B 0 ThrustThing(angle*256/360,0,1,0)
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomF",0,0,32)
CLDW B 1 ThrustThingZ(0,0,0,0)
Goto MovingLow

Death:
CLDW B 0
CLDW B 0 A_SetGravity(0.0)
CLDW B 0 A_ChangeFlag("SOLID",0)
CLDW B 0 A_SpawnItemEx("BossIceWall_BoomD",0,0,32)
CLDW B 0 A_SpawnItemEx("BossIceWallDeathFX",0,0,0,0,0,0,0,1)
TNT1 A 1
stop
}
}


actor BossIceWall_BoomD : BasicImplosion
{
DamageType "ColdM_Wall"
Obituary "$OB_ICEWALL"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("KirbyNES/IcePain",1)
TNT1 A 0 A_Explode(80,42,0,0,42)
TNT1 A 4
stop
}
}

actor BossIceWallDeathFX : BasicGraphicEffect
{
States
{
SpawnFrame:
CLDW B 0
CLDW B 2
CLDW CD 4
stop
}
}

actor BossIceWallFX : BasicGraphicEffect
{
States
{
SpawnFrame:
TNT1 A 0
TNT1 A 0 A_Jump(256,"S1","S2","S3")

S1:
CLDW V 4
CLDW W 15
stop
S2:
CLDW W 4
CLDW X 15
stop
S3:
CLDW X 4
CLDW X 15
stop

Spawn1:
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX1",0,-3*ScaleX, 3*ScaleX,0,0,0,0,1)
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX2",0, 1*ScaleX,-6*ScaleX,0,0,0,0,1)
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX3",0, 6*ScaleX, 2*ScaleX,0,0,0,0,1)
stop
Spawn2:
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX1",0, 3*ScaleX, 3*ScaleX,0,0,0,0,1)
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX2",0,-1*ScaleX,-6*ScaleX,0,0,0,0,1)
TNT1 A 0 //A_SpawnItemEx("BossIceWallFX3",0,-6*ScaleX, 2*ScaleX,0,0,0,0,1)
stop
}
}

actor ColdM_WallMoveProtect : PowerProtection
{
Powerup.Duration 17
DamageFactor "ColdM_WallFloor", 0.135
DamageFactor "ColdM_WallAir", 0.135
}

actor ColdM_WallMoveProtect0 : PowerProtection
{
Powerup.Duration 3
DamageFactor "ColdM_WallFloor", 0.0
DamageFactor "ColdM_WallAir", 0.0
}

actor BossIceWall_BoomF : BasicImplosion//Floor move
{
DamageType "ColdM_WallFloor"
Obituary "$OB_ICEWALL"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(180,42,0,0,42)
stop
}
}
actor BossIceWall_BoomA : BossIceWall_BoomF//Air move
{
DamageType "ColdM_WallAir"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(230,42,0,0,42)
stop
}
}
actor BossIceWall_BoomI : BossIceWall_BoomF//Idle
{
DamageType "ColdM_Wall"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(20,42,0,0,42)
stop
}
}
actor BossIceWall_BoomS : BossIceWall_BoomF//Spawn
{
DamageType "ColdM_Wall"
States
{
Spawn:
TNT1 A 0
TNT1 A 2 A_Explode(40,42,0,0,42)//60
stop
}
}

actor ColdPunch : GutPunch
{
DamageType "ColdM_Punch"
Obituary "$OB_COLDPUNCH"
damage (300)
States
{
Death:
OMFX B 0 A_Explode(300,64,0)
goto XDeath
XDeath:
OMFX B 0 A_SpawnItemEX("IcePitFreeze")
OMFX BOBC 2
stop
}
}

actor ColdPunch_W : ColdPunch
{
damage (250)
States
{
Death:
OMFX B 0 A_Explode(250,64,0)
goto XDeath
}
}

actor ColdPunch_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("ColdCombo_Flag",1,"Pickup2")
goto Pickup1
Pickup1:
TNT1 A 0 A_FireCustomMissile("ColdPunch",0,0,8,0)
stop
Pickup2:
TNT1 A 0 A_FireCustomMissile("ColdPunch_W",0,0,8,0)
stop
}
}

actor GroundColdFreeze : ProjSpawnFuncActor//Fast
{
Translation "192:192=96:96", "198:198=116:116"
PROJECTILE
DamageType "ColdM_Down"
Obituary "$OB_ICEWALLFREEZE"
+DONTBLAST
+THRUGHOST
+SKYEXPLODE
+EXPLODEONWATER
+DONTREFLECT
+HITTRACER
+THRUSPECIES
Species "DUMBICEWALL"
//MissileHeight 8
//MissileType "GroundColdFreezeFX"
//reactiontime 5
damage (20)
radius 8
height 16
speed 60//800
States
{
Spawn:
TNT1 A 0
TNT1 AAAAAA 0 A_SpawnItemEx("BossIceWallFX",random(-16,16),random(-16,16)+random2(1)*10,random(-20,20),0,0,0,0,1)
TNT1 A 1 //A_CountDown
loop
Death:
TNT1 A 1 A_SpawnItemEx("GroundColdFreeze2")
stop
XDeath:
TNT1 A 0 A_Warp(8)
TNT1 A 1 A_SpawnItemEx("GroundColdFreeze3")
stop
}
}

actor ColdM_FreezeProtect : PowerProtection
{
Powerup.Duration 8
DamageFactor "ColdM_Wall", 0.425
DamageFactor "ColdM_WallFloor", 0.75
DamageFactor "ColdM_WallAir", 0.75
DamageFactor "ColdM_Punch", 0.425
}
actor ColdM_FreezeProtect2 : ColdM_FreezeProtect
{
Powerup.Duration 20
}


actor PainColdM_Freeze_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIfInventory("ColdM_FreezeProtect",1,5)
TNT1 A 0 A_GiveInventory("ColdM_FreezeProtect",1)
TNT1 A 0 A_PlaySound("weapon/ColdFrozen",5,1.0)
TNT1 A 0 A_SpawnItemEx("GroundIce_Cold")
TNT1 A 0 ACS_NamedExecuteWithResult("core_groundplayer",0,1)
TNT1 A 0
stop
}
}

actor GroundIce_Cold : BasicPain_GroundedHit
{
reactiontime 45
States
{
Spawn:
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 1 A_GiveToTarget("GroundIce_Cold_P",1)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 0 A_GiveToTarget("ColdM_FreezeProtect2")
TNT1 A 0 A_TakeFromTarget("ColdM_FreezeProtect")
goto DeathEnd
}
}

actor GroundIce_Cold_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("DashingStraitjacket_F",1)
TNT1 A 0 A_GiveInventory("ColdM_FreezeProtect",1)
TNT1 A 0 A_SpawnItemEx("GroundIce_ColdFX")
stop
}
}

actor GroundIce_ColdFX : BasicGraphicEffect
{
Translation "192:192=96:96", "198:198=116:116"
States
{
Spawn:
MRFA F 0
MRFA F 1
stop
}
}

actor GroundColdFreezeFX : BasicClientSide
{
Translation "192:192=96:96", "198:198=116:116"
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("BossIceWallFX",random(-16,32),random(-16,16),random(-16,16),0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("BossIceWallFX",random(-16,16),random(-16,16),random(-16,16),0,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("BossIceWallFX",random(16,-32),random(-16,16),random(-16,16),0,0,0,0,1)
stop
}
}


actor GroundColdFreeze2 : ProjSpawnFuncActor
{
PROJECTILE
DamageType "ColdM_Freeze"
Obituary "$OB_ICEWALLFREEZE"
//+NOINTERACTION
+DONTBLAST
+DONTREFLECT
+THRUACTORS
+THRUGHOST
+FLOORHUGGER
reactiontime 1
damage (0)
radius 8
height 16
scale 3.0
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SpawnItemEX("IcePitFreeze")
TNT1 A 0 A_PlaySound("weapon/ColdField",1,1.0)
goto SpawnX
SpawnX:
CLDW FGEFG 3 A_Explode(20,80,0,0,80)
CLDW E 0 A_Explode(20,80,0,0,80)
CLDW E 1 A_CountDown
wait
Death:
CLDW E 0 A_SpawnItemEX("IcePitFreeze")
CLDW EEEFFFEEEFFF 1 A_FadeOut(0.1)
stop
}
}

actor GroundColdFreeze3 : GroundColdFreeze2
{
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_PlaySound("weapon/ColdField",1,1.0)
goto SpawnX
}
}

actor Coldman_W_NormalBar : NormalBar {Args 200,75}
actor Coldman_W_SecondBar : SecondBar {Args 201,194}