actor TundraStormBoss : BaseMM8BDMWep_CBM
{
tag "$TAGC_11E"
dropitem "TundraStormWepCDropped"
Weapon.AmmoUse 16
Weapon.AmmoGive 28
Weapon.AmmoUse2 28
Obituary "$OB_TUNDRASPIN"
weapon.ammotype "IcyWindAmmo"
weapon.ammotype2 "FeelFreezeAmmo"
Inventory.Pickupmessage "eats frosty goodness like a boss"
//inventory.icon "CHILWEP1"
States
{
Spawn:
C_10 D 1
loop
Ready:
TUND A 0 ACS_ExecuteAlways(998,0,DYE_TUNDRAMAN)
TUND A 0 A_GunFlash
TUND A 5
goto Ready1

Ready1:
TUND A 2 A_WeaponReady
TUND C 0 A_JumpIfInventory("FeelFreezeAmmo",84,"Ready2")
TUND C 0 A_GiveInventory("IcyWindAmmo",6)
TUND A 0 A_GiveInventory("TripleLutzAmmo",1)
loop
Ready2:
TUND A 2 A_WeaponReady(WRF_ALLOWRELOAD)
TUND A 0 A_GiveInventory("TripleLutzAmmo",1)
TUND C 0 A_GiveInventory("IcyWindAmmo",6)
loop
Deselect:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Lower
TUND A 1 A_Lower
Loop
Select:
TNT1 AAAAAAAAAAAAAAAAAAAAAA 0 A_Raise
TUND A 1 A_Raise
Loop

Fire:
TUND BC 2
TUND C 0 A_PlaySoundEx("weapon/TundraManGlacierWind","Body",1)
FireAmmoC:
TUND C 0 A_JumpIfInventory("IcyWindAmmo",1,2)
TUND B 25 A_Jump(256,"FireEnd")
goto FireEnd
TUND D 0 
FireWind:
TUND C 0 A_GiveInventory("TundraPassingGasFlag")
TUND D 0 A_TakeInventory("IcyWindAmmo",1)
TUND D 1 A_GiveInventory("TripleLutzAmmo",3)
TUND D 0 A_GiveInventory("TundraMainWind_CI")
TUND C 0 A_TakeInventory("IcyWindAmmo",1)
TUND C 1 A_GiveInventory("TripleLutzAmmo",3)
TUND C 0 A_GiveInventory("TundraMainWind_CI")
TUND D 0 A_TakeInventory("IcyWindAmmo",1)
TUND D 1 A_GiveInventory("TripleLutzAmmo",3)
TUND D 0 A_GiveInventory("TundraMainWind_CI")
TUND C 0 A_TakeInventory("IcyWindAmmo",1)
TUND C 1 A_GiveInventory("TripleLutzAmmo",3)
TUND C 0 A_GiveInventory("TundraMainWind_CI")
TUND C 0 A_Refire("FireAmmoC")
FireEnd:
TUND C 0 A_TakeInventory("TundraPassingGasFlag")
TUND C 0 A_GiveInventory("TundraMainWind_CI")
TUND C 1 A_StopSoundEx("Body")
TUND CBAAAA 3
goto Ready1


Altfire:
TUND E 0 A_JumpIfInventory("TundraDelayA",1,"NoAmmo")
TUND N 0 A_JumpIfInventory("StaminaFlag",10,1)
goto Ready1
TUND A 1 A_PlaySoundEx("weapon/TundraManDash","Weapon")
TUND E 0 A_JumpIf(z-floorz==0,"LeapGround")
TUND E 0 A_ChangeVelocity(50*cos(pitch), 0, 25*sin(-pitch), CVF_RELATIVE|CVF_REPLACE)
goto LiftOff
LeapGround:
TUND E 0 A_ChangeVelocity(Cos(pitch)*50,0,sin(pitch)*-10,CVF_RELATIVE|CVF_REPLACE)
TUND E 0 ThrustThingZ(0,30,0,1)
goto LiftOff
LiftOff:
TUND E 0 A_PlaySoundEx("weapon/TundraManSpin","SoundSlot7",1)
TUND E 0 A_GiveInventory("TundraIsBouncingFlag",1)
CMDH C 0 A_TakeInventory("UnSolid",99)
CMDH C 0 A_ChangeFlag("SOLID",0)
CMDH C 0 A_ChangeFlag("THRUSPECIES",1)
TUND NOPNOP 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
goto Slam
Slam:
TUND J 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND K 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND L 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND L 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND M 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND M 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TNT1 A 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TNT1 A 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TNT1 A 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TNT1 A 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
goto Slam
SlamEnd:
TUND E 0 A_TakeInventory("StaminaFlag",10)
TUND N 0 A_StopSound("Weapon")
TUND E 0 A_PlaySound("weapon/TundraManStylishLand","Weapon")
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,1)
goto SlamEnd2
TUND NOP 1 A_TakeInventory("TundraHasBouncedFlag",1)
TUND E 0 A_JumpIf(z-floorz>0, "ContinuedAirSlam")
SlamEnd2:
TUND E 0 A_StopSoundEx("SoundSlot7")
TUND E 0 A_TakeInventory("TundraIsBouncingFlag",1)
TUND E 0 A_TakeInventory("TundraHasBouncedFlag",1)
TUND A 1 Offset(-25, 61)
TUND A 1 Offset(-24, 59)
TUND A 1 Offset(-21, 56)
TUND A 1 Offset(-17, 53)
TUND A 1 Offset(-13, 51)
TUND A 1 Offset(-9, 49)
TUND A 1 Offset(-5, 46)
CMDH C 0 A_ChangeFlag("THRUSPECIES",0)
CMDH C 0 A_SpawnItemEx("ResolidifyPlayer_H")
TUND A 1 A_GiveInventory("TundraDelayA",70)
TUND A 0 A_SpawnItemEx("TundraDelayHelper")
goto Ready1
ContinuedAirSlam:
TUND NOPNOP 1 A_GiveInventory("FeelFreezeAmmo",2)
ContinuedAirSlam2:
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND I 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND J 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND K 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND L 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TUND M 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TNT1 A 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TNT1 A 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
TNT1 A 1 A_SpawnItemEX("TundraLeapCheck",0,0,-8,momx,momy,momz,0,8,0)
TUND A 0 A_GiveInventory("FeelFreezeAmmo",2)
TUND E 0 A_JumpIf(z-floorz==0,"SlamEnd")
TUND A 0 A_GiveInventory("SGStall_P")
TUND E 0 A_WeaponReady(WRF_NOPRIMARY|WRF_ALLOWRELOAD)
TUND E 0 A_JumpIfInventory("TundraHasBouncedFlag",1,"SlamEnd")
goto ContinuedAirSlam2

Reload:
TUND A 1 A_JumpIfInventory("FeelFreezeAmmo",84,"Reaload")
goto NoAmmo
Reaload:
CMDH C 0 A_TakeInventory("UnSolid",99)
CMDH C 0 A_ChangeFlag("SOLID",0)
CMDH C 0 A_ChangeFlag("THRUSPECIES",1)
TUND E 0 A_StopSoundEx("SoundSlot7")
TUND E 0 A_PlaySound("weapon/TundraManGear","Weapon")
TUND E 0 A_PlaySound("weapon/TundraManGearLoop","SoundSlot7")
TUND E 0 A_SpawnItemEx("TundraLutzFX",0,0,0,0,0,0,0,1)
TUND NOP 1
ReloadSpin:
TUND N 1 A_TakeInventory("FeelFreezeAmmo",3) 
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"ReloadStorm")
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ALTATTACK) == True,"ReloadStorm")
//TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_RELOAD) == True,"ReloadStorm")
TNT1 A 0 A_Recoil(-0.5)
TNT1 AAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX",frandom(50,150),0,32+random(-16,16),frandom(-10,-5),0,frandom(-2.5,-1),frandom(0,359),1,96)
TNT1 A 0 A_SpawnItemEx("TundraSpeedGearSpin",0,0,28,momx,momy,momz,0,11,0)
TNT1 A 0 A_GiveInventory("ObligatorySpeedGear",1)
TNT1 A 0 A_GiveInventory("TundraIsBouncingFlag",1)
TUND O 1 A_TakeInventory("FeelFreezeAmmo",3)
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"ReloadStorm")
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ALTATTACK) == True,"ReloadStorm")
//TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_RELOAD) == True,"ReloadStorm")
TNT1 A 0 A_Recoil(-0.5)
TNT1 AAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX",frandom(50,150),0,32+random(-16,16),frandom(-10,-5),0,frandom(-2.5,-1),frandom(0,359),1,96)
TNT1 A 0 A_SpawnItemEx("TundraSpeedGearSpin",0,0,28,momx,momy,momz,0,11,0)
TNT1 A 0 A_GiveInventory("ObligatorySpeedGear",1)
TNT1 A 0 A_GiveInventory("TundraIsBouncingFlag",1)
TUND P 1 A_TakeInventory("FeelFreezeAmmo",3)
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ATTACK) == True,"ReloadStorm")
TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ALTATTACK) == True,"ReloadStorm")
//TNT1 A 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_RELOAD) == True,"ReloadStorm")
TNT1 A 0 A_Recoil(-0.5)
TNT1 AAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX",frandom(50,100),0,32+random(-16,16),frandom(-10,-5),0,frandom(-2.5,-1),frandom(0,359),1,96)
TNT1 A 0 A_SpawnItemEx("TundraSpeedGearSpin",0,0,28,momx,momy,momz,0,11,0)
TNT1 A 0 A_GiveInventory("ObligatorySpeedGear",1)
TNT1 A 0 A_GiveInventory("TundraIsBouncingFlag",1)
TUND A 0 A_JumpIfInventory("FeelFreezeAmmo",1,"ReloadSpin")
goto ReloadStorm
ReloadStorm:
TUND O 0 A_TakeInventory("FeelFreezeAmmo",999)
TCCC B 0 A_PlaySoundEx("weapon/superboost","SoundSlot7")
TNT1 F 0 A_TakeInventory("TundraIsBouncingFlag",1)
TNT1 F 0 A_TakeInventory("TundraHasBouncedFlag",1)
TUND F 0 ThrustThingZ(0,80,0,0)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 1 Offset(-2,80)
TUND Q 1 Offset(2,80)
TUND Q 0 A_Stop
TUND Q 0 A_WeaponReady(WRF_NOFIRE)
TUND F 0 A_PlaySoundEx("weapon/TundraManStorm","SoundSlot7")
TUND F 0 A_GiveInventory("TundraStorm_CI",1)
TUND QSU 1 A_Stop
ReadyFreeze:
TNT1 A 1 A_JumpIf(z-floorz==0,"FreezeFall")
goto ReadyFreeze
FreezeFall:
CMDH C 0 A_ChangeFlag("THRUSPECIES",0)
CMDH C 0 A_SpawnItemEx("ResolidifyPlayer_H")
TUND A 1 OffSet(1,92)
TUND A 1 OffSet(1,72)
TUND A 1 OffSet(1,62)
TUND A 1 OffSet(1,52)
goto Ready1

NoAmmo:
TNT1 A 0 A_JumpIfInventory("TundraIsBouncingFlag",1,"ContinuedAirSlam2Delay")
TUND A 2 A_StopSoundEx("SoundSlot7")
Goto Ready1
ContinuedAirSlam2Delay:
TUND E 0 A_StopSoundEx("SoundSlot7")
TUND IJKLM 1 A_GiveInventory("FeelFreezeAmmo",2)
goto ContinuedAirSlam2

Flash:
TNT1 A 1 //
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("TundraPassingGasFlag",1,"Fire.ShotButtonCheck")
TNT1 A 0 A_JumpIfInventory("ObligatorySpeedGear",1,"Flash.Spinning")
TNT1 A 0 A_JumpIf(z-floorz>0, "Flash2")
TNT1 A 0 A_TakeInventory("TundraHasBouncedFlag",1)
TNT1 A 0 A_GiveInventory("StaminaFlag",4)
Flash2:
TNT1 A 0 A_JumpIfInventory("TripleLutzAmmo",105,"FlashFX")
TNT1 A 0 A_JumpIfInventory("TundraIsBouncingFlag",1,"Flash.Spinning")
TNT1 A 0 A_TakeInventory("TundraHasBouncedFlag",1)
goto Flash
FlashFX:
TNT1 A 0 A_SpawnItemEx("MrFreezemanWalkFX",random(12,32),0,12+random(-12,12),0,0,0,frandom(0,359),1,96)//TNT1 A 1 A_SpawnItemEx("MrFreezemanWalkFX",random(12,32),0,32+random(-12,12),0,0,0,frandom(0,359),1,96)
goto Flash
Fire.ShotButtonCheck:
DKN2 J 0 A_Jumpif(CallACS("CCBM_ButtonCheck",BT_ALTATTACK) == True,"Fire.ShotAmmoCheck")
goto Flash
Fire.ShotAmmoCheck:
TUND C 0 A_JumpIfInventory("TripleLutzAmmo",105,"Flash.Shot")
goto Flash
Flash.Shot:
TUND D 0 A_PlaySoundEx("weapon/TundraManSpear","Weapon")
XH0L A 0 A_GiveInventory("TundraMain_CI")
XH0L A 0 A_GiveInventory("TundraMainWind_CI")
TUND C 0 A_TakeInventory("TripleLutzAmmo",999)
TUND EFGGHHGGFE 1 
goto Flash
Flash.Spinning:
TNT1 A 1 //
TNT1 A 0 A_GiveInventory("TundraFXKeeper",1)
TNT1 A 0 A_JumpIfInventory("IsDead",1,"NoFlash")
TNT1 A 0 A_JumpIfInventory("TundraIsBouncingFlag",1,"Flash.Spinning")
goto Flash
PauseFlash:
TNT1 A 1
goto Flash
}
}

actor IcyWindAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 180
+INVENTORY.IGNORESKILL
}

actor TripleLutzAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 105
+INVENTORY.IGNORESKILL
}

actor FeelFreezeAmmo : Ammo
{
inventory.amount 1
inventory.maxamount 252
+INVENTORY.IGNORESKILL
}

actor ObligatorySpeedGear : PowerSpeed
{
powerup.duration 5
Speed 2.0
}

actor TundraFXKeeper : PowerUp
{
powerup.duration 5
}

actor TundraDelayHelper : BasicHelper
{
reactiontime 71
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_TakeFromTarget("TundraDelayA",1)
TNT1 A 1 A_Countdown
loop
}
}

actor TundraDelayA : Inventory
{
inventory.amount 1
inventory.maxamount 70
}

actor CoolingDownFlag : OnceC {}

actor TundraPassingGasFlag : OnceC {}

actor SGStall_P : Powerup//not commented out in case its needed
{
Powerup.Duration 105
}

actor TundraGlacierWind
{
Translation "192:192=196:196", "198:198=58:58", "202:202=196:196", "199:199=58:58"
PROJECTILE
renderstyle translucent
alpha .5
+RIPPER
+FORCEXYBILLBOARD
damagetype "TundraM_Wind"
Obituary "$OB_ICYWIND"
damage (0)
radius 10
height 5
speed 45
scale 1.5
reactiontime 4
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
SpawnLOOP:
TNST A 1 A_Explode(2,26,0,0,48)
TNT1 A 0 A_SpawnItemEx("TundraGlacierWindFX",0,0,0,0,0,0,0,SXF_ABSOLUTEPOSITION|SXF_TRANSFERTRANSLATION)
TNST B 1 A_Explode(2,26,0,0,48)
TNT1 A 0 A_SpawnItemEx("TundraGlacierWindFX",0,0,0,0,0,0,0,SXF_ABSOLUTEPOSITION|SXF_TRANSFERTRANSLATION)
TNST C 1 A_Explode(2,26,0,0,48)
TNT1 A 0 A_SpawnItemEx("TundraGlacierWindFX",0,0,0,0,0,0,0,SXF_ABSOLUTEPOSITION|SXF_TRANSFERTRANSLATION)
TNST D 1 A_Explode(2,26,0,0,48)
TNT1 A 0 A_SpawnItemEx("TundraGlacierWindFX",0,0,0,0,0,0,0,SXF_ABSOLUTEPOSITION|SXF_TRANSFERTRANSLATION)
TNT1 A 0 A_Countdown
loop
Death:
TNST A 0 A_Stop
TNST A 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST A 1 A_SetScale(scalex+.35)
TNST A 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST A 1 A_SetScale(scalex+.35)
TNST B 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST B 1 A_SetScale(scalex+.35)
TNST B 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST B 1 A_SetScale(scalex+.35)
TNST C 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST C 1 A_SetScale(scalex+.35)
TNST C 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST C 1 A_SetScale(scalex+.35)
TNST D 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST D 1 A_SetScale(scalex+.35)
TNST D 0 A_FadeOut(0.1)
TNST A 0 A_Recoil(1)
TNST D 1 A_SetScale(scalex+.35)
loop
}
}

actor TundraGlacierWindB : TundraGlacierWind{translation "202:202=196:196", "199:199=76:76", "192:192=196:196", "198:198=76:76"}
actor TundraGlacierWindR : TundraGlacierWind{translation "202:202=170:170", "199:199=191:191", "192:192=171:171", "198:198=41:41"}
actor TundraGlacierWindO : TundraGlacierWind{translation "202:202=100:100", "199:199=123:123", "192:192=104:104", "198:198=128:128"}
actor TundraGlacierWindP : TundraGlacierWind{translation "202:202=160:160", "199:199=229:229", "192:192=214:214", "198:198=229:229"}

actor TundraGlacierWindFX
{
+CLIENTSIDEONLY
+NOGRAVITY
renderstyle translucent
+FORCEXYBILLBOARD
+NOINTERACTION
+THRUGHOST
scale 2
alpha .15
+BRIGHT
states
{
Spawn:
TNST A 1 A_Fadeout(0.03)
TNST A 0 A_ScaleVelocity(0.75)
TNST B 1 A_Fadeout(0.03)
TNST B 0 A_ScaleVelocity(0.75)
TNST C 1 A_Fadeout(0.03)
TNST C 0 A_ScaleVelocity(0.75)
TNST D 1 A_Fadeout(0.03)
TNST D 0 A_ScaleVelocity(0.75)
loop
}
}

actor TundraGlacier //this might actually be the best projectile in the game, next to heatman's atomic fire. seriously, this thing is fucking CRACKED.
{//lol nerd
Translation "202:202=196:196", "199:199=58:58"
PROJECTILE
damagetype "TundraM_Glacier"
Obituary "$OB_TUNDRACICLE"
damage (14)
radius 15
speed 42
height 15
scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 ACS_NamedExecuteAlways("BULL_Tidifier", 0)
TNT1 A 0 A_TakeFromTarget("TripleLutzAmmo",999)
SpawnLOOP:
TNDR ABC 2 A_SpawnItemEx("MrFreezemanWalkFX",0,random(-24,24),random(-8,8),0,0,0,0,1)
TNDR ABC 1 A_SpawnItemEx("MrFreezemanWalkFX",0,random(-24,24),random(-8,8),0,0,0,0,1)
loop
Death:
TNT1 A 0 A_CheckCeiling("Death.Ceiling")
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(1,7),0,random(2,6),random(0,359),1)
TNT1 A 0 A_PlaySoundEX("weapon/TundraManBreak","Weapon")
TNT1 A 35
stop
Death.Ceiling:
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX1",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX2",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_SpawnItemEx("IceBaFIcicleFX3",random(0,6),0,random(2,32),random(-2,-6),0,random(-2,-6),random(0,359),1)
TNT1 A 0 A_PlaySoundEX("weapon/TundraManBreak","Weapon")
TNT1 A 35
stop
}
}

actor TundraGlacierB : TundraGlacier{translation "202:202=196:196", "199:199=76:76", "192:192=196:196", "198:198=76:76"}
actor TundraGlacierR : TundraGlacier{translation "202:202=170:170", "199:199=191:191", "192:192=171:171", "198:198=41:41"}
actor TundraGlacierO : TundraGlacier{translation "202:202=100:100", "199:199=123:123", "192:192=104:104", "198:198=128:128"}
actor TundraGlacierP : TundraGlacier{translation "202:202=160:160", "199:199=229:229", "192:192=214:214", "198:198=229:229"}

actor TundraMainWind_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TundraGlacierWind",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TundraGlacierWindB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TundraGlacierWindR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TundraGlacierWindO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TundraGlacierWindP",0,0,0,0)
goto Done
}
}

actor TundraMain_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_FireCustomMissile("TundraGlacier",0,0,0,0)
goto Done
FireB:
TNT1 A 0 A_FireCustomMissile("TundraGlacierB",0,0,0,0)
goto Done
FireR:
TNT1 A 0 A_FireCustomMissile("TundraGlacierR",0,0,0,0)
goto Done
FireO:
TNT1 A 0 A_FireCustomMissile("TundraGlacierO",0,0,0,0)
goto Done
FireP:
TNT1 A 0 A_FireCustomMissile("TundraGlacierP",0,0,0,0)
goto Done
}
}

actor TundraNado
{
PROJECTILE
translation "192:192=196:196", "198:198=76:76"
Obituary "$OB_TUNDRASTORMBOSS"
damagetype "TundraM_Tornado"
renderstyle add
alpha 0.5
+THRUACTORS
+BRIGHT
+THRUSPECIES
+THRUGHOST
+FLOORHUGGER
+DONTBLAST
+DONTREFLECT
damage (0)
Radius 1
reactiontime 11
Height 1
scale 8.25
speed 0
States
{
Spawn:
TNT1 AA 0
TNST L 1
SpawnLoop:
TNST M 1 A_Countdown
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX2",150,0,-(z-floorz),0,0,50,frandom(0,12)*30,1)
TNT1 A 0 A_SpawnItemEx("TundraTornadoDamager",0,0,0,0,0,0,0)
TNST N 1 A_Countdown
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX2",150,0,-(z-floorz),0,0,50,frandom(0,12)*30,1)
TNT1 A 0 A_SpawnItemEx("TundraTornadoDamager",0,0,0,0,0,0,0)
TNST O 1 A_Countdown
TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MrFreezemanWalkFX2",150,0,-(z-floorz),0,0,50,frandom(0,12)*30,1)
TNT1 A 0 A_SpawnItemEx("TundraTornadoDamager",0,0,0,0,0,0,0)
loop
Death:
TNST PQ 1 A_SetScale(scalex+1,scaley+.1)
DeathLOOP:
TNST R 0 A_Fadeout(.2)
TNST R 1 A_SetScale(scalex+1,scaley+.1)
loop
}
}

actor TundraNadoB : TundraNado{translation "192:192=196:196", "198:198=76:76"}
actor TundraNadoR : TundraNado{translation "192:192=171:171", "198:198=41:41"}
actor TundraNadoO : TundraNado{translation "192:192=104:104", "198:198=128:128"}
actor TundraNadoP : TundraNado{translation "192:192=214:214", "198:198=229:229"}

actor MrFreezemanWalkFX2
{
+MISSILE
+NOGRAVITY
+THRUACTORS
+DONTBLAST
+NOINTERACTION
+BRIGHT
+CLIENTSIDEONLY
renderstyle translucent
alpha 0.25
damage 0
Radius 2
Height 2
scale 2.5
States
{
Spawn:
TNST GEFGEFGEFGEF 1
SpawnLOOP:
TNST GEF 1 A_Fadeout(0.025)
loop
Death:
TNT1 A 0 
stop
}
}

actor TundraStorm_CI : TeamColor_CI
{
states
{
FireX:
TNT1 A 0 A_SpawnItemEx("TundraNado",0,0,0,0,0,0,0,1)
goto Done
FireB:
TNT1 A 0 A_SpawnItemEx("TundraNadoB",0,0,0,0,0,0,0,1)
goto Done
FireR:
TNT1 A 0 A_SpawnItemEx("TundraNadoR",0,0,0,0,0,0,0,1)
goto Done
FireO:
TNT1 A 0 A_SpawnItemEx("TundraNadoO",0,0,0,0,0,0,0,1)
goto Done
FireP:
TNT1 A 0 A_SpawnItemEx("TundraNadoP",0,0,0,0,0,0,0,1)
goto Done
}
}

actor TundraTornadoDamager
{
PROJECTILE
Obituary "$OB_TUNDRASTORMBOSS"
damagetype "TundraM_Tornado"
+FLOORHUGGER
+DONTSPLASH
+DONTBLAST
+DONTREFLECT
+DOOMBOUNCE
+RIPPER
Damage (27)
Radius 150
Height 1350
Speed 0
States
{
Spawn:
TNT1 AA 0 
TNT1 A 1
stop
}
}


//IMPORTED FROM MY BOMBTASTIC CODE --- MegaVile//
//And yes, he is meant to bounce on other objects.//

//well technically for a long period of time he could but ever since he got SG from airtime off an M2
//this wasnt so balanced or feasible so unfortunately he loses this fun mechanic sorry
//-pr. fly 2024
actor TundraLeapCheck
{
PROJECTILE
Damagetype "TundraM_Leap"
Obituary "$OB_TUNDRASPIN"
+NOGRAVITY
+SKYEXPLODE
+DONTSPLASH
+DONTBLAST
+THRUGHOST
+DONTREFLECT
+NOEXPLODEFLOOR
+HITTRACER
damage (16)
Radius 44
Height 63
States
{
Spawn:
TNT1 A 0
TNT1 A 1
TNT1 A 0
stop
XDeath:
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("cbm_istracerally")==1,"Death")
TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("cbm_istracerplayer")==0,"Death")
TNT1 A 0 A_GiveToTarget("TundraHasBouncedFlag")
TNT1 A 0 A_GiveToTarget("TundraLeap_P",1)
Stop
Death:
TNT1 A 0
Stop
}
}

actor TundraM_LeapProtect : PowerProtection
{
Powerup.Duration 12
DamageFactor "TundraM_Leap", 0.0
}

actor TundraM_WindProtect : PowerProtection
{
Powerup.Duration 12
DamageFactor "TundraM_Wind", 0.0
}

actor TundraM_TornadoProtect : PowerProtection
{
Powerup.Duration 35
DamageFactor "TundraM_Tornado", 0.0
}

actor TundraStormableFlag : Powerup
{
Powerup.Duration 20
}

actor TundraSlowFXStopper : Powerup
{
Powerup.Duration 10
}

actor TundraLeap_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 ThrustThingZ(0,60,0,0)
TNT1 A 0
stop
}
}

actor TundraEncore_P : CustomInventory
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("FeelFreezeAmmo",30)
TNT1 A 0
stop
No:
TNT1 A 0
stop
}
}

actor TundraIsBouncingFlag : Inventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.IGNORESKILL
}

actor TundraHasBouncedFlag : Inventory
{
inventory.amount 1
inventory.maxamount 1
+INVENTORY.IGNORESKILL
}

actor PowerTundraGiver : BasicPowerupGiver
{
Powerup.Type "PowerTundra"
}

actor PowerTundra : PowerSpeed
{
Speed 0.65
powerup.duration 70
}

actor TundraFrostbite : BasePowerWeak
{
powerup.duration 70
damagefactor "TundraM_Leap",1.25
}

actor TundramanSlowPickup : CustomInventory
{
States
{
Pickup:
TNT1 A 0
//TNT1 A 0 A_JumpIfInventory("PowerTundra",1,3)
TNT1 A 0 A_SpawnItemEx("TundraSlowWatcher")
TNT1 A 0 A_GiveInventory("PowerTundraGiver",1)
TNT1 A 0 A_GiveInventory("TundraFrostbite",1)
TNT1 A 0
stop
}
}

actor TundraSlowWatcher : BasicHelper
{
States
{
Spawn:
TNT1 A 0 
TNT1 A 0 A_JumpIfInTargetInventory("TundraSlowFXStopper",1,"Waiting")
TNT1 A 0 A_GiveToTarget("TundraSlowFX",1)
Waiting:
TNT1 A 1 A_GiveToTarget("TundraSlowFXStopper",1)
TNT1 A 0 A_JumpIfInTargetInventory("PowerTundra",1,"Waiting")
stop
}
}

actor TundraSlowFX : CustomInventory
{
States
{
Pickup:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("TundraSlowGFX", 0, 0, 28, 0, 0, 0, 0,1)
stop
Stopper:
TNT1 A 0
stop
}
}

actor TundraSlowGFX
{
+NOGRAVITY
+THRUACTORS
+CLIENTSIDEONLY
+NOINTERACTION
+MISSILE
Damage(0)
Scale 2.25
renderstyle translucent
alpha 0.75
Height 0
Radius 0
States
{
Spawn:
TNST E 1 A_Warp(AAPTR_TARGET,0,0,28,0,0)
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"Death")
TNST F 1 A_Warp(AAPTR_TARGET,0,0,28,0,0)
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"Death")
TNST G 1 A_Warp(AAPTR_TARGET,0,0,28,0,0)
//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TRACER_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("PowerTundra",1,"Spawn")
Death:
TNST EFG 1 A_Fadeout
loop
}
}

actor TundraLutzFX
{
+THRUACTORS
+NOINTERACTION
PROJECTILE
Damage(0)
Scale 2
renderstyle translucent
alpha 0.75
Height 1
Radius 1
States
{
Spawn:
TNT1 AA 0
SpawnLoop:
TNST H 1 A_Warp(AAPTR_Target,0,0,0,0,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNST I 1 A_Warp(AAPTR_Target,0,0,0,0,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNST J 1 A_Warp(AAPTR_Target,0,0,0,0,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNST K 1 A_Warp(AAPTR_Target,0,0,0,0,0)
TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(C_CHECK_TARGET_OOC)==0,"Death")
TNT1 A 0 A_JumpIfInTargetInventory("FeelFreezeAmmo",1,"SpawnLoop")
Death:
TNST H 1 A_Warp(AAPTR_TARGET,0,0,0,0,0)
TNT1 A 0 A_FadeOut
TNST I 1 A_Warp(AAPTR_TARGET,0,0,0,0,0)
TNT1 A 0 A_FadeOut
TNST J 1 A_Warp(AAPTR_TARGET,0,0,0,0,0)
TNT1 A 0 A_FadeOut
TNST K 1 A_Warp(AAPTR_TARGET,0,0,0,0,0)
TNT1 A 0 A_FadeOut
stop
}
}

actor TundraM_GearProtect : PowerProtection
{
Powerup.Duration 3
DamageFactor "TundraM_Gear", 0.0
}

actor TundraSpeedGearSpin : BasicExplosion
{
Obituary "$OB_TUNDRAKICK"
damagetype "TundraM_Gear"
Scale 2.5
States
{
Spawn:
TNT1 A 0
TOPX D 2 A_Explode(3,88,0,0,32)
stop
}
}