//|***********************************|
//| Ice Boss made by kuchikitaichou   |
//| Modified by Alterz                |
//|***********************************|


actor IceBoss : IceGuy 20000
{
	monster
	+fireresist
	+boss
	+floorclip
	+noradiusdmg
	+dontmorph
	+dontblast
	+notarget
	+missilemore
        +missileevenmore
	+QUICKTORETALIATE
	health 10000
	obituary "%o was iced by Ice Boss."
	mass 10000
	scale 1.5
	speed 10
	radius 64
	height 100
        painchance 25
	missiletype BigIceBall
	missileheight 40
	seesound "iceboss/see"
	activesound "iceboss/active"
	deathsound "misc/icebreak"
	states
	{
	spawn:
		ICEY H 1 A_look
		loop
	see:
		ICEY ABCD 6 A_chase
		loop
	missile:
		ICEY E 6 A_facetarget
		ICEY E 0 A_jump(85,5)
		ICEY E 0 A_jump(85,14)
		ICEY F 12
		ICEY G 12 A_missileattack
		ICEY F 12
		goto see
		ICEY F 0
		ICEY F 12
		ICEY G 0 A_custommissile("SmallIceBall",40,0,0,0,0)
		ICEY G 0 A_custommissile("SmallIceBall",40,0,16,0,0)
		ICEY G 6 A_custommissile("SmallIceBall",40,0,-16,0,0)
		ICEY G 0 A_custommissile("SmallIceBall",40,0,8,0,0)
		ICEY G 0 A_custommissile("SmallIceBall",40,0,-8,0,0)
		ICEY G 0 A_custommissile("SmallIceBall",40,0,24,0,0)
		ICEY G 6 A_custommissile("SmallIceBall",40,0,-24,0,0)
		ICEY F 12
		goto see
		ICEY F 0
		ICEY F 12
		ICEY G 12 A_custommissile("HomingMissile",0,0,0,0,0)
		ICEY F 12
		goto see
        death:
		ICEY A 1 A_Iceguydie
                stop
	}
}
actor HomingMissile
{
	projectile
	+randomize
	+floorhugger
	+seekermissile
	+extremedeath
	-nogravity
	+float
	-floorclip
	radius 16
	height 16
	speed 14
	damage 10
	scale 2
	seesound "baron/attack"
	deathsound "weapons/rocklx"
	states
	{
	spawn:	
		SBS4 ABCABCABCABCABCABC 4 bright A_seekermissile(30,60)
                SBS4 ABC 4 bright
		loop
	death:
		SBS4 D 4 bright A_explode(40,128,0)
		SBS4 EF 4 bright
		SBS4 GH 4 bright
		stop
	}
}
actor SmallIceBall : BaronBall
{
	deathsound "iceboss/boom"
	states
	{
	spawn:
		ICPR ABC 4 bright
		loop
	death:
		ICPR DEFGH 4 bright
		stop
	}
}
actor BigIceBall : SmallIceBall
{
	scale 1.5
	radius 50
	damage 50
        renderstyle Normal
        speed 32
	states
	{
        spawn:
                SNW1 ABCDE 4 bright
                loop
	death:
		SNW1 A 1 bright A_spawndebris("icedebris",1)
		stop
	}
}

actor icedebris
{
 scale 0.2
        health 64
speed .1
+MISSILE
+FLOORCLIP
        radius 1
        height 1
 states
 {
  		SNW1 A -1
                SNW1 B -1
                SNW1 C -1
                SNW1 D -1
                SNW1 E -1
stop
 }
}

Actor IceGuySpawner : CustomMonsterInvasionSpot 30123
{
	DropItem IceBoss
}
