actor BlizzardAttackBoss : BaseMM8BDMWep_CBM
{
dropitem "BlizzardAttackWepCDropped"
Weapon.AmmoUse1 2
Weapon.AmmoUse2 100
Weapon.AmmoGive 0
Weapon.SlotNumber 1
Obituary "$OB_BLIZZARDBOWL"
weapon.ammotype1 "BallAmmo"
weapon.ammotype2 "BallAmmo"
+WEAPON.ALT_AMMO_OPTIONAL
+WEAPON.NOAUTOAIM
inventory.icon "BSKIY"
States
{
Spawn:
C_06 A 1
loop
Ready:
BSKI E 0 ACS_ExecuteAlways(998,0,820)
BSKI E 0 A_JumpIfInventory("BallAmmo",112,"Ready2")
BSKI E 2 A_WeaponReady(WRF_NOSECONDARY)
BSKI E 0 A_GiveInventory("BallAmmo",1)
Goto Ready+1
Ready2:
BSKI E 1 A_WeaponReady
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BSKI E 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BSKI E 1 A_Raise
Loop
Fire:
BSKI E 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
BSKI E 0 A_GiveInventory("BlizzardmanMain_CI",1)
BSKI FGHIJKKJIHGF 2
BSKI E 12 A_GiveInventory("BallAmmo",1)
BSKI E 0 A_GiveInventory("BallAmmo",1)
Goto Ready+1

Altfire:
BSKI E 0 A_JumpIfInventory("BallAmmo",112,"Checking")
goto Ready+1
Checking:
BSKI E 0 A_PlaySoundEx("weapon/blizzstyle","Weapon")
BSKI E 0 A_GiveInventory("SelfTotallyFrozen",1)
BSKI E 1 OffSet(0,42)
BSKI E 1 OffSet(0,52)
BSKI E 1 OffSet(0,62)
BSKI E 1 OffSet(0,72)
BSKI E 1 OffSet(0,82)
BSKI E 1 OffSet(0,92)
BSKI E 1 OffSet(0,102)
BSKI E 1 OffSet(0,112)
BSKI E 1 OffSet(0,122)
goto RollingPrepare
RollingPrepare:
TNT1 A 1 A_TakeInventory("CrackFlag",9)
TNT1 A 0 A_TakeInventory("BallAmmo",112)
TNT1 A 0 A_GiveInventory("BlizzardmanFlag",1)
TNT1 A 0 A_TakeInventory("UnSolid",1)
TNT1 A 0 A_ChangeFlag("SOLID",0)
TNT1 A 0 A_ChangeFlag("THRUACTORS",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
TNT1 A 0 A_GiveInventory("IsInvunFlag",1)
goto Rolling
Rolling:
TNT1 A 0 A_PlaySoundEx("weapon/blizzbowl","Body")
TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX1",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")

TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")

TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX3",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)

TNT1 A 0 A_GiveInventory("BallTimer",1)
TNT1 A 0 A_JumpIfInventory("BallTimer",40,"RollingStop")
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")
loop
RollingSlam:
TNT1 A 0 A_GiveInventory("SelfTotallyUnfrozen",1)
TNT1 A 0 A_Stop
TNT1 A 0 ThrustThingZ(0,70,0,0)
TNT1 A 0 ThrustThing(angle*256/360+128,40,1,0)
TNT1 A 0 A_PlaySoundEx("weapon/blizzstrike","Body")
TNT1 A 0 A_TakeInventory("CrackFlag",999)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_TakeInventory("IsInvunFlag",999)
TNT1 A 2 A_TakeInventory("BallTimer",999)
goto RollEnd
RollingStop:
TNT1 A 0 A_GiveInventory("SelfTotallyUnfrozen",1)
TNT1 A 0 A_TakeInventory("CrackFlag",999)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_TakeInventory("IsInvunFlag",999)
TNT1 A 2 A_TakeInventory("BallTimer",999)
goto RollEnd
RollEnd:
BSKI E 1 OffSet(0,122)
BSKI E 1 OffSet(0,107)
BSKI E 1 OffSet(0,92)
BSKI E 1 OffSet(0,77)A_TakeInventory("BlizzardmanFlag",1)
BSKI E 1 OffSet(0,62)
BSKI E 0 A_ChangeFlag("THRUACTORS",0)
BSKI E 0 A_SpawnItemEx("ReSolidifier")
BSKI E 1 OffSet(0,47)
Goto Ready+1
NoAmmo:
BSKI E 1
Goto Ready+1
}
}


actor BlizzardAttackerBoss : BaseMM8BDMWep_CBM
{
dropitem "BlizzardAttackWepCDropped"
Weapon.AmmoUse1 2
Weapon.AmmoUse2 100
Weapon.AmmoGive 0
Weapon.SlotNumber 2
Obituary "$OB_BLIZZARDATTACK"
weapon.ammotype1 "BallAmmo"
weapon.ammotype2 "BallAmmo"
+WEAPON.ALT_AMMO_OPTIONAL
+WEAPON.NOAUTOAIM
inventory.icon "BSKIX"
States
{
Ready:
BSKI A 0 ACS_ExecuteAlways(998,0,820)
BSKI A 0 A_JumpIfInventory("BallAmmo",112,"Ready2")
BSKI A 2 A_WeaponReady(WRF_NOSECONDARY)
BSKI A 0 A_GiveInventory("BallAmmo",1)
Goto Ready+1
Ready2:
BSKI A 1 A_WeaponReady
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
BSKI A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
BSKI A 1 A_Raise
Loop
Fire:
BSKI A 0 A_PlaySoundEx("weapon/blizzboss","Weapon")
BSKI A 0 A_JumpIfInventory("BlizFireFlag",1,"Fire2")
BSKI A 0 A_GiveInventory("BlizFireFlag",1)
BSKI A 0 A_GiveInventory("BlizzardmanMain2_CI",1)
BSKI B 2 OffSet(4,32)
BSKI B 2 OffSet(8,32)
BSKI B 2 OffSet(12,32)
BSKI B 2 OffSet(12,32)
BSKI B 2 OffSet(8,32)
BSKI A 2 OffSet(4,32)
BSKI A 0 A_GiveInventory("BallAmmo",1)
BSKI A 0 A_ReFire
Goto Ready+1
Fire2:
BSKI A 0 A_TakeInventory("BlizFireFlag",1)
BSKI A 0 A_GiveInventory("BlizzardmanMain3_CI",1)
BSKI C 2 OffSet(-4,32)
BSKI C 2 OffSet(-8,32)
BSKI C 2 OffSet(-12,32)
BSKI C 2 OffSet(-12,32)
BSKI C 2 OffSet(-8,32)
BSKI A 2 OffSet(-4,32)
//BSKI BCDE 3
//BSKI A 16
BSKI A 0 A_GiveInventory("BallAmmo",1)
BSKI A 0 A_ReFire
Goto Ready+1

Altfire:
BSKI A 0 A_JumpIfInventory("BallAmmo",112,"Checking")
goto Ready+1
Checking:
BSKI A 0 A_PlaySoundEx("weapon/blizzstyle","Weapon")
BSKI A 0 A_GiveInventory("SelfTotallyFrozen",1)
BSKI A 1 OffSet(0,42)
BSKI A 1 OffSet(0,52)
BSKI A 1 OffSet(0,62)
BSKI A 1 OffSet(0,72)
BSKI A 1 OffSet(0,82)
BSKI A 1 OffSet(0,92)
BSKI A 1 OffSet(0,102)
BSKI A 1 OffSet(0,112)
BSKI A 1 OffSet(0,122)
goto RollingPrepare
RollingPrepare:
TNT1 A 1 A_TakeInventory("CrackFlag",9)
TNT1 A 0 A_TakeInventory("BallAmmo",112)
TNT1 A 0 A_GiveInventory("BlizzardmanFlag",1)
TNT1 A 0 A_TakeInventory("UnSolid",1)
TNT1 A 0 A_ChangeFlag("SOLID",0)
TNT1 A 0 A_ChangeFlag("THRUACTORS",1)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",1)
TNT1 A 0 A_GiveInventory("IsInvunFlag",1)
goto Rolling
Rolling:
TNT1 A 0 A_PlaySoundEx("weapon/blizzbowl","Body")
TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX1",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")

TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX2",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")

TNT1 A 0 A_GiveInventory("BowlRecoilPickup")
TNT1 A 0 A_SpawnItemEX("BlizzardBallFX3",0,0,0,0,0,0,0,1)
TNT1 A 0 A_SpawnItemEX("BlizzardBallCheck",0,0,8,momx,momy,momz,0,8)
TNT1 A 1 A_SpawnItemEX("BlizzardBallBox",0,0,8,momx,momy,momz,0,8,0)

TNT1 A 0 A_GiveInventory("BallTimer",1)
TNT1 A 0 A_JumpIfInventory("BallTimer",40,"RollingStop")
TNT1 A 0 A_JumpIfInventory("CrackFlag",1,"RollingSlam")
loop
RollingSlam:
TNT1 A 0 A_GiveInventory("SelfTotallyUnfrozen",1)
TNT1 A 0 A_Stop
TNT1 A 0 ThrustThingZ(0,70,0,0)
TNT1 A 0 ThrustThing(angle*256/360+128,40,1,0)
TNT1 A 0 A_PlaySoundEx("weapon/blizzstrike","Body")
TNT1 A 0 A_TakeInventory("CrackFlag",999)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_TakeInventory("IsInvunFlag",999)
TNT1 A 2 A_TakeInventory("BallTimer",999)
goto RollEnd
RollingStop:
TNT1 A 0 A_GiveInventory("SelfTotallyUnfrozen",1)
TNT1 A 0 A_TakeInventory("CrackFlag",999)
TNT1 A 0 A_ChangeFlag("INVULNERABLE",0)
TNT1 A 0 A_TakeInventory("IsInvunFlag",999)
TNT1 A 2 A_TakeInventory("BallTimer",999)
goto RollEnd
RollEnd:
BSKI A 1 OffSet(0,122)
BSKI A 1 OffSet(0,107)
BSKI A 1 OffSet(0,92)
BSKI A 1 OffSet(0,77)A_TakeInventory("BlizzardmanFlag",1)
BSKI A 1 OffSet(0,62)
BSKI A 0 A_ChangeFlag("THRUACTORS",0)
BSKI A 0 A_SpawnItemEx("ReSolidifier")
BSKI A 1 OffSet(0,47)
Goto Ready+1
NoAmmo:
BSKI A 1
Goto Ready+1
}
}

actor BallAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 112
+INVENTORY.IGNORESKILL
}


actor BlizzardmanFlag : OnceC{}
actor BlizFireFlag : OnceC{}

actor CrackFlag : OnceC{}

actor BallTimer : Inventory
{
inventory.amount 1
inventory.maxamount 999
}

actor BowlRecoilPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_JumpIf(z-floorz==0,"Ground")
goto Air
Air:
TNT1 A 0 A_Recoil(-2.5)
stop
Ground:
TNT1 A 0 A_Recoil(-7)
stop
}
}


actor BlizzardAttackAim
{
Translation "198:198=193:193"
PROJECTILE
+DONTSEEKINVISIBLE//
+SEEKERMISSILE
+SCREENSEEKER
Radius 8
Height 8
scale 2.5
damage (6)
Obituary "$OB_BLIZZARDATTACK"
damagetype "BlizzardAttack"
speed 32
States
{
Spawn:
ICEB XXXXXX 1 A_SeekerMissile(2,10,3,72,6)
ICEB X 3
ICEB Y 10
Fly:
ICEB Z 1
loop
Death:
TNT1 A 0
stop
}
}

actor BlizzardAttackAimB : BlizzardAttackAim{translation "198:198=74:74"}
actor BlizzardAttackAimR : BlizzardAttackAim{translation "198:198=41:41"}
actor BlizzardAttackAimO : BlizzardAttackAim{translation "198:198=128:128"}
actor BlizzardAttackAimP : BlizzardAttackAim{translation "198:198=232:232"}

actor BlizzardBossAttack
{
Translation "198:198=193:193"
PROJECTILE
damagetype "BlizzardAttack"
Obituary "$OB_BLIZZARDATTACK"
Damage (7)//10//Legacy
Height 12//10
Radius 12//10
Speed 1
Scale 3.0
States
{
Spawn:
ICEB X 0
ICEB X 0 A_ScaleVelocity(0.25)
ICEB XYZ 4
ICEB Z 0 A_ScaleVelocity(160)
Spawn2:
ICEB Z 1
loop
}
}

actor BlizzardBossAttackB : BlizzardBossAttack{translation "198:198=74:74"}
actor BlizzardBossAttackR : BlizzardBossAttack{translation "198:198=41:41"}
actor BlizzardBossAttackO : BlizzardBossAttack{translation "198:198=128:128"}
actor BlizzardBossAttackP : BlizzardBossAttack{translation "198:198=232:232"}

actor BlizzardBowlProtectC : PowerProtection
{
Powerup.Duration 3
DamageFactor "BlizzardBowl", 0.0
}

actor BlizzardBallBox
{
PROJECTILE
Damagetype "BlizzardBowl"
Obituary "$OB_BLIZZARDBOWL"
+DONTSPLASH
+DONTBLAST
+NOEXPLODEFLOOR
+THRUGHOST
+DONTREFLECT
damage (40)
Radius 76
Height 76
scale 2.5
States
{
Spawn:
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 1 //A_GiveToTarget("CrackFlag",1)
stop
Death:
TNT1 A 1
Stop
}
}

actor BlizzardBallCheck
{
PROJECTILE
Damagetype "BlizzardBowl"
Obituary "$OB_BLIZZARDBOWL"
+DONTSPLASH
+DONTBLAST
+DONTREFLECT
+NOEXPLODEFLOOR
+THRUGHOST
+DONTREFLECT
+SKYEXPLODE
+STEPMISSILE
maxstepheight 22
Damage (0)
radius 14//18
height 48//58
Speed 2
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 1
stop
Crash:
XDeath:
TNT1 A 1
stop
Death:
TNT1 A 1 A_GiveToTarget("CrackFlag",1)
stop
}
}

actor BlizzardBallFX1 : BasicExplosion
{
Scale 2.5
States
{
Spawn:
BALL D 2
stop
}
}

actor BlizzardBallFX2 : BasicExplosion{Scale 2.5 States{Spawn:BALL E 2
stop}}
actor BlizzardBallFX3 : BasicExplosion{Scale 2.5 States{Spawn:BALL F 2
stop}}


actor BounceRangeChecker : BasicHelper
{
States
{
Spawn:
TNT1 A 0
TNT1 A 2
TNT1 A 1 A_JumpIfCloser(30,"Stopped")
stop
Stopped:
TNT1 A 1 A_GiveToTarget("BallTimer",99)
stop
}
}

actor BlizzardmanMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAim",random(-6,-12),0,random(26,52),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAim",random(0,-6),0,random(0,26),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAim",random(6,0),0,random(-26,0),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAim",random(12,6),0,random(-52,-26),random(-2,6))
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimB",random(-6,-12),0,random(26,52),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimB",random(0,-6),0,random(0,26),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimB",random(6,0),0,random(-26,0),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimB",random(12,6),0,random(-52,-26),random(-2,6))
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimR",random(-6,-12),0,random(26,52),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimR",random(0,-6),0,random(0,26),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimR",random(6,0),0,random(-26,0),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimR",random(12,6),0,random(-52,-26),random(-2,6))
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimO",random(-6,-12),0,random(26,52),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimO",random(0,-6),0,random(0,26),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimO",random(6,0),0,random(-26,0),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimO",random(12,6),0,random(-52,-26),random(-2,6))
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimP",random(-6,-12),0,random(26,52),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimP",random(0,-6),0,random(0,26),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimP",random(6,0),0,random(-26,0),random(-2,6))
TNT1 A 0 A_FireCustomMissile("BlizzardAttackAimP",random(12,6),0,random(-52,-26),random(-2,6))
goto Done
}
}

actor BlizzardmanMain2_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttack",random(10,8),0,random(48,30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttack",random(2,0),0,random(28,20),0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackB",random(10,8),0,random(48,30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackB",random(2,0),0,random(28,20),0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackR",random(10,8),0,random(48,30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackR",random(2,0),0,random(28,20),0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackO",random(10,8),0,random(48,30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackO",random(2,0),0,random(28,20),0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackP",random(10,8),0,random(48,30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackP",random(2,0),0,random(28,20),0)
goto Done
}
}

actor BlizzardmanMain3_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttack",random(-10,-8),0,random(-48,-30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttack",random(-2,0),0,random(-28,-20),0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackB",random(-10,-8),0,random(-48,-30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackB",random(-2,0),0,random(-28,-20),0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackR",random(-10,-8),0,random(-48,-30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackR",random(-2,0),0,random(-28,-20),0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackO",random(-10,-8),0,random(-48,-30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackO",random(-2,0),0,random(-28,-20),0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackP",random(-10,-8),0,random(-48,-30),0)
TNT1 A 0 A_FireCustomMissile("BlizzardBossAttackP",random(-2,0),0,random(-28,-20),0)
goto Done
}
}
