actor FreezeCrackerBoss : BaseMM8BDMWep_CBM
{
dropitem "FreezeCrackerWepCDropped"
Weapon.AmmoUse 2
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_FREEZECRACKER"
weapon.ammotype "MrFreezeAmmo"
States
{
Spawn:
C_07 A 1
loop
Ready:
MRFA A 0 ACS_ExecuteAlways(998,0,840)
MRFA A 0 A_JumpIfInventory("MrFreezeAmmo",2,"Ready2")
MRFA A 7 A_WeaponReady(WRF_NOFIRE)
MRFA A 0 A_GiveInventory("MrFreezeAmmo",2)
Goto Ready+1
Ready2:
MRFA A 0 A_JumpIfInventory("MrFreezeAmmo",28,"Ready3")
MRFA A 7 A_WeaponReady(WRF_NOSECONDARY)
MRFA A 0 A_GiveInventory("MrFreezeAmmo",2)
loop
Ready3:
MRFA A 1 A_WeaponReady
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
MRFA A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
MRFA A 1 A_Raise
Loop
Fire:
MRFA A 0 A_JumpIfNoAmmo("NoAmmo")
MRFA B 3
Hold:
MRFA A 0 A_JumpIfNoAmmo("NoAmmo")
MRFA A 0 A_PlaySoundEx("weapon/freezecracker","Weapon")
MRFA A 0 A_SpawnItemEx("FreezeFXB",-1/*20*/,8,32,0,0,0,0,1)
MRFA A 0 A_GiveInventory("FreezemanMain_CI",1)
MRFA C 17
MRFA A 0 A_Refire
MRFA B 5
Goto Ready+1
AltFire:
MRFA A 0 A_JumpIfInventory("MrFreezeAmmo",28,1)
goto NoAmmo
MRFA A 0 ACS_ExecuteAlways(648,0,1)
MRFA A 0 SetPlayerProperty(0,1,0)
MRFA A 0 A_GiveInventory("FreezeFireHold",1)
goto AltCharge

AltCharge:
MRFA B 0 A_GiveInventory("MrFreezeAltCharge",1)
MRFA BBB 1 A_SpawnItemEx ("FreezeFXB1",cos(-pitch)*20,8,32+(sin(-pitch)*20),cos(-pitch)*momx,momy,sin(-pitch)*momz,0,553,0)
MRFA BBB 1 A_SpawnItemEx ("FreezeFXB2",cos(-pitch)*20,8,32+(sin(-pitch)*20),cos(-pitch)*momx,momy,sin(-pitch)*momz,0,553,0)
MRFA A 0 A_JumpIfInventory("MrFreezeAltCharge",5,"AltfireAltfire")
MRFA A 0 A_JumpIfInventory("MrFreezeAltCharge",1,"AltCharge")
goto AltfireAltfire
AltfireAltfire:
MRFA A 0 A_TakeInventory("MrFreezeAltCharge",99)
MRFA A 0 A_TakeInventory("FreezeFireHold",99)
MRFA A 0 A_PlaySoundEx("weapon/freezecracker","Weapon")
MRFA A 0 A_SpawnItemEx("FreezeFXB",-1/*20*/,8,32,0,0,0,0,1)
MRFA A 0 A_TakeInventory("MrFreezeAmmo",28)
MRFA A 0 A_GiveInventory("FreezemanAlt_CI",1)
MRFA C 25
MRFA A 0 ACS_ExecuteAlways(648,0,0)
MRFA A 0 SetPlayerProperty(0,0,0)
MRFA B 10
Goto Ready+1
NoAmmo:
MRFA B 5
//MRFA A 1 ACS_Execute(979,0)
Goto Ready+1
}
}

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

actor FreezeFireHold : OnceC{}

actor MrFreezeAltCharge : Inventory
{
inventory.amount 1
inventory.maxamount 5
}

actor MrFreezeCracker : FreezeCracker
{
translation "192:192=4:4", "198:198=69:69"
damage (20)//18
States
{
Spawn:
MRFP A 2
MRFP B 0 A_SpawnItemEx("FreezeCrackerFX2",-8,Random(-16, 16),random(0,-8),0,0,0,0,1)
MRFP B 2 A_SpawnItemEx("FreezeCrackerFX1",-8,Random(-16, 16),random(0,-8),0,0,0,0,1)
goto Spawn+1
Death:
TNT1 A 0 A_JumpIf(z-floorz<5, "Floor")
TNT1 A 0 A_JumpIf(z-ceilingz==0-10, "Ceiling")
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,-60,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,-120,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,0,1)
TNT1 A 1 A_PlaySoundEx("weapon/freezecrackerhit","Weapon")
stop
Floor:
//MRFP A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
MRFF A 0 A_SpawnItemEx("FloorSpike",0,0,0,0,0,0,0,1)
stop
Ceiling:
//MRFP A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
MRFF A 0 A_SpawnItemEx("CeilingSpike",0,0,0,0,0,0,0,1)
stop
XDeath:
TNT1 A 1
stop
}
}

actor MrFreezeCrackerB : MrFreezeCracker{translation "192:192=205:205","198:198=74:74"}
actor MrFreezeCrackerR : MrFreezeCracker{translation "192:192=171:171","198:198=41:41"}
actor MrFreezeCrackerO : MrFreezeCracker{translation "192:192=104:104","198:198=128:128"}
actor MrFreezeCrackerP : MrFreezeCracker{translation "192:192=229:229","198:198=232:232"}

actor GroundFreezeCracker : MrFreezeCracker
{
Damage (5)
+RIPPER
+SKYEXPLODE
States
{
Spawn:
MRFP A 0
MRFP A 1 A_SpawnItemEx("FreezeTrail",0,0,0,0,0,0,0,1)
MRFP A 0 A_SpawnItemEx("FreezeCrackerFX1",-8,Random(-24, 24),random(4,-8),0,0,0,0,1)
MRFP A 0 A_SpawnItemEx("FreezeCrackerFX2",-8,Random(-24, 24),random(4,-8),0,0,0,0,1)
loop
Death:
TNT1 A 0 A_PlaySoundEx("weapon/centaurflash","Item")
TNT1 A 0 A_PlaySoundEx("weapon/freezefloor","Weapon")
TNT1 A 0 A_JumpIf(z-floorz<0-z+ceilingz, "Floor")
TNT1 A 0 A_JumpIf(z-ceilingz<-10, 2)
TNT1 A 0 A_SpawnItemEx("CeilingSpike",0,0,0,0,0,0,0,1)

TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,-60,1)
TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,-120,1)
TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("CeilingFreezeWave",35,0,0,14,0,0,0,1)
TNT1 A 1
stop
Floor:
TNT1 A 0 A_JumpIf(z-floorz>=5, 2)//5
TNT1 A 0 A_SpawnItemEx("FloorSpike",0,0,0,0,0,0,0,1)

TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,0,1)
TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,-60,1)
TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,-120,1)
TNT1 A 0 A_SpawnItemEx("GroundFreezeWave",35,0,0,14,0,0,180,1)

TNT1 A 1
stop
}
}

actor GroundFreezeCrackerB : GroundFreezeCracker{translation "192:192=205:205","198:198=74:74"}
actor GroundFreezeCrackerR : GroundFreezeCracker{translation "192:192=171:171","198:198=41:41"}
actor GroundFreezeCrackerO : GroundFreezeCracker{translation "192:192=104:104","198:198=128:128"}
actor GroundFreezeCrackerP : GroundFreezeCracker{translation "192:192=229:229","198:198=232:232"}

actor FreezeBitB : FreezeBit
{
states
{
Spawn:
MRFP D 2
MRFP D 0 A_ChangeFlag(THRUACTORS,0)
MRFP D 4
wait
}
}

actor FreezeFXB : FreezeFX
{
states
{
Spawn:
MRFP CDE 4
stop
}
}

actor GroundFreezeWave
{
Obituary "$OB_FREEZECRACKER"
damagetype "FreezeCrackerB"
PROJECTILE
+FLOORHUGGER
+RIPPER
+HEXENBOUNCE
WallBounceFactor 1.0
Damage (5)
Height 10
Radius 10
Scale 2.5
reactiontime 5
Bouncecount 4
States
{
Spawn:
MRFP I 0
MRFP IIIIIIIIII 1 ThrustThing(angle*256/360,0)//A_PlaySoundEx("weapon/freezefloor","Weapon")
MRFP H 0 A_SpawnItemEx("FloorSpike",0,0,0,0,0,0,0,1)
MRFP HHHHHHHHHH 1 ThrustThing(angle*256/360,0)
MRFP H 0 A_CountDown
MRFP I 0 A_SpawnItemEx("FloorSpike",0,0,0,0,0,0,0,1)
MRFP IIIIIIIIII 1 ThrustThing(angle*256/360,0)
MRFP I 0 A_CountDown
goto Spawn+11
}
}

actor CeilingFreezeWave : GroundFreezeWave
{
damagetype "FreezeCracker"
-FLOORHUGGER
+CEILINGHUGGER
reactiontime 4
States
{
Spawn:
MRFP I 0
MRFP IIIIIIIIII 1 ThrustThing(angle*256/360,0)//A_PlaySoundEx("weapon/freezefloor","Weapon")
MRFP H 0 A_SpawnItemEx("CeilingSpike",0,0,0,0,0,0,0,1)
MRFP HHHHHHHHHH 1 ThrustThing(angle*256/360,0)
MRFP H 0 A_CountDown
MRFP I 0 A_SpawnItemEx("CeilingSpike",0,0,0,0,0,0,0,1)
MRFP IIIIIIIIII 1 ThrustThing(angle*256/360,0)
MRFP I 0 A_CountDown
goto Spawn+11
}
}

actor FreezeFXB1 : FreezeFXB
{
states
{
Spawn:
MRFP F 0
MRFP F 1
stop
}
}

actor FreezeFXB2 : FreezeFXB
{
states
{
Spawn:
MRFP G 0
MRFP G 1
stop
}
}

/*
actor FreezeBitter : FreezeBitB
{
-NOGRAVITY
}
*/

actor Floorspike
{
PROJECTILE
+DONTBLAST
+FLOORHUGGER
Radius 9
Height 9
scale 2.5
damage (25)
Obituary "$OB_FREEZECRACKER"
damagetype "FreezeCracker"
speed 26
states
{
Spawn:
MRFP A 0
MRFP A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
MRFF ABC 4
MRFF CCCCCCCCCCCCCC 5
MRFF CBA 4
stop
}
}

actor Ceilingspike : Floorspike
{
damage (40)
-DONTBLAST
-FLOORHUGGER
+NOGRAVITY
states
{
Spawn:
MRFC A 0
MRFC A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
MRFC ABCCC 4
MRFC C 0 A_ChangeFlag("NOGRAVITY",0)//ThrustThingZ(0,-6,0,1)
MRFC C 1
goto Spawn+8
Death:
//TNT1 A 0 A_PlaySoundEx("weapon/centaurflash","Weapon")
TNT1 A 0 A_PlaySoundEx("weapon/freezecrackerhit","Weapon")
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,60,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,-60,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,120,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,-120,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,180,1)
TNT1 A 0 A_SpawnItemEx("FreezeBitB",0,0,0,28,0,0,0,1)
stop
}
}

actor GroundIce : BasicHelper
{
reactiontime 60
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_JumpIfInTargetInventory("IsDead",1,"Death")
TNT1 A 1 A_GiveToTarget("GroundIceStop",1)
TNT1 A 0 A_CountDown
loop
Death:
TNT1 A 1 A_TakeFromTarget("GroundIceFlag",99)
stop
}
}

actor GroundIceFlag : OnceC{}

actor GroundIceStop : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_Stop
TNT1 A 0 A_GiveInventory("GroundIceFlag",1)
TNT1 A 0 A_SpawnItemEx("GroundIceFX",0,0,0,0,0,0,0,1)
stop
}
}

actor GroundIceFX
{
scale 2.5
- SOLID
+NOGRAVITY
+CLIENTSIDEONLY
States
{
Spawn:
MRFF D 0
MRFF D 1
stop
}
}

actor FreezeTrail
{
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
//+FORCEXYBILLBOARD
-SOLID
scale 2.5
height 0
radius 0
RenderStyle "Translucent"
Alpha 0.75
States
{
Spawn:
MRFP A 6
stop
}
}

actor FreezeCrackerFX1:FreezeCrackerFX{States{Spawn:
FCRA M 4
FCRA N 15
FCRA N 1 A_Fadeout
wait}}
actor FreezeCrackerFX2:FreezeCrackerFX{States{Spawn:
FCRA K 4
FCRA L 15
FCRA L 1 A_Fadeout
wait}}
actor FreezeCrackerFXX:FreezeCrackerFX1{+NOINTERACTION}
actor FreezeCrackerFXX2:FreezeCrackerFX2{+NOINTERACTION}


actor FreezemanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("MrFreezeCracker",0,1,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("MrFreezeCrackerB",0,1,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("MrFreezeCrackerR",0,1,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("MrFreezeCrackerO",0,1,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("MrFreezeCrackerP",0,1,8,0)
goto Done
}
}

actor FreezemanAlt_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("GroundFreezeCracker",0,0,8,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("GroundFreezeCrackerB",0,0,8,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("GroundFreezeCrackerR",0,0,8,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("GroundFreezeCrackerO",0,0,8,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("GroundFreezeCrackerP",0,0,8,0)
goto Done
}
}
