Removed Glacial State

Replaced all of its use cases with Frozen, which inherits exactly its old effects
This commit is contained in:
CongratsIsTrash committed 2026-03-17 21:28:44 -04:00
1 parent 757ba37f1e
commit ebc1efd30b
44 files changed
+51 -77

No files matched your search

+4
View File
@@ -156,6 +156,10 @@ namespace CalamityMod.Buffs
}
}
if (type == BuffID.Frozen)
{
npc.Calamity().frozen = true;
}
if (type == BuffID.Webbed)
{
npc.Calamity().webbed = true;
-26
View File
@@ -1,26 +0,0 @@
using CalamityMod.NPCs;
using CalamityMod.Systems.Collections;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.StatDebuffs
{
public class GlacialState : ModBuff
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = true;
BuffID.Sets.LongerExpertDebuff[Type] = true;
}
public override void Update(NPC npc, ref int buffIndex)
{
npc.Calamity().glacialState = true;
npc.DelBuff(buffIndex);
buffIndex--;
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 B

+1 -1
View File
@@ -2326,7 +2326,7 @@ namespace CalamityMod.CalPlayer
if (duration > 120)
duration = 120;
npc.AddBuff(ModContent.BuffType<GlacialState>(), (int)duration, false);
npc.AddBuff(BuffID.Frozen, (int)duration, false);
}
}
}
+2 -2
View File
@@ -2737,10 +2737,10 @@ namespace CalamityMod.CalPlayer
Player.buffImmune[BuffID.Chilled] = true;
}
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Glacial State debuff
// Cosmic Discharge Cosmic Freeze buff, gives surrounding enemies the Frozen debuff
if (cFreeze)
{
int buffType = ModContent.BuffType<GlacialState>();
int buffType = BuffID.Frozen;
float freezeDist = 200f;
if (Player.whoAmI == Main.myPlayer)
{
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee
public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
var source = player.GetSource_ItemUse(Item);
int p = Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType<DarkIceZero>(), Item.damage, 12f, player.whoAmI);
Main.projectile[p].Kill();
+1 -1
View File
@@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee
public const int TrueMeleeHitHeal = 4;
public const int TrueMeleeGlacialStateTime = 30;
public const int TrueMeleeFrozenTime = 30;
public const float SmallSlashDamageFactor = 0.4f;
@@ -1126,12 +1126,6 @@ GalvanicCorrosion: {
ItemTooltipEnemy: Slows enemies
}
GlacialState: {
DisplayName: Glacial State
Description: Cannot move
ItemTooltipEnemy: Freezes enemies
}
IcarusFolly: {
DisplayName: Icarus' Folly
Description:
@@ -192,7 +192,7 @@ AquaticHeart: {
Wow, you can swim now!
Being underwater increases max speed and acceleration by {0}%
Greatly reduces breath loss and reduces the darkness intensity in the abyss
Attackers are inflicted with [cbuff:CalamityMod/GlacialState]
Attackers are inflicted with [cbuff:Frozen]
Gain a fragile ice barrier that grants {1}% damage reduction for one hit
The ice shield regenerates after {2} seconds
'''
@@ -41,6 +41,7 @@ Slimed.ItemTooltipEnemy: Enhances Heat debuff damage
Wet.ItemTooltipEnemy: Enhances Electric debuff damage
Confused.ItemTooltipEnemy: Reverses movement
Webbed.ItemTooltipEnemy: Slows enemies
Frozen.ItemTooltipEnemy: Freezes enemies
Electrified: {
ItemTooltipPlayer: Electric - 4 DPS. Deals 5x damage to moving players
+7 -6
View File
@@ -255,7 +255,7 @@ namespace CalamityMod.NPCs
#region Debuffs
public bool vaporfied = false;
public bool timeDistortion = false;
public bool glacialState = false;
public bool frozen = false;
public bool galvanicCorrosion = false;
public bool temporalSadness = false;
public bool eutrophication = false;
@@ -547,7 +547,7 @@ namespace CalamityMod.NPCs
myClone.vaporfied = vaporfied;
myClone.timeDistortion = timeDistortion;
myClone.glacialState = glacialState;
myClone.frozen = frozen;
myClone.galvanicCorrosion = galvanicCorrosion;
myClone.temporalSadness = temporalSadness;
myClone.eutrophication = eutrophication;
@@ -746,7 +746,7 @@ namespace CalamityMod.NPCs
// Doze 2jun2025 - Moved here from PostAI so drawing can read the bools.
timeDistortion = false;
galvanicCorrosion = false;
glacialState = false;
frozen = false;
temporalSadness = false;
eutrophication = false;
webbed = false;
@@ -3375,7 +3375,7 @@ namespace CalamityMod.NPCs
if (webbed)
velocitySlownessFactor += 0.15f;
if (glacialState)
if (frozen)
{
float baseSlownessFactor = 0.1f;
if (VulnerableToCold.HasValue)
@@ -4867,7 +4867,7 @@ namespace CalamityMod.NPCs
// Calamity debuff coloring effects
// These are in order of precedence because they override each other.
if (glacialState)
if (frozen)
drawColor = Color.Cyan;
else if (auricRebuke)
@@ -4972,7 +4972,6 @@ namespace CalamityMod.NPCs
("CalamityMod/Buffs/StatDebuffs/Crumbling", NPC => NPC.Calamity().crumble),
("CalamityMod/Buffs/StatDebuffs/Eutrophication", NPC => NPC.Calamity().eutrophication),
("CalamityMod/Buffs/StatDebuffs/GalvanicCorrosion", NPC => NPC.Calamity().galvanicCorrosion),
("CalamityMod/Buffs/StatDebuffs/GlacialState", NPC => NPC.Calamity().glacialState),
("CalamityMod/Buffs/StatDebuffs/Irradiated", NPC => NPC.Calamity().irradiated),
("CalamityMod/Buffs/StatDebuffs/MarkedforDeath", NPC => NPC.Calamity().markedForDeath),
("CalamityMod/Buffs/StatDebuffs/PearlAura", NPC => NPC.Calamity().pearlAura),
@@ -5063,6 +5062,8 @@ namespace CalamityMod.NPCs
currentDebuffs.Add(TextureAssets.Buff[BuffID.Confused].Value);
if (npc.ichor)
currentDebuffs.Add(TextureAssets.Buff[BuffID.Ichor].Value);
if (frozen)
currentDebuffs.Add(TextureAssets.Buff[BuffID.Frozen].Value);
if (webbed)
currentDebuffs.Add(TextureAssets.Buff[BuffID.Webbed].Value);
if (npc.midas)
+1 -1
View File
@@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override Color? GetAlpha(Color lightColor)
+1 -1
View File
@@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
target.AddBuff(BuffID.Frostburn2, 180);
}
}
+1 -1
View File
@@ -132,6 +132,6 @@ namespace CalamityMod.Projectiles.Magic
}
public override bool? CanDamage() => Timer == 140f ? null : false;
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frozen, 60);
}
}
+1 -1
View File
@@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
if (Projectile.damage > 10)
{
+1 -1
View File
@@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override Color? GetAlpha(Color lightColor)
+1 -1
View File
@@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Magic
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn, 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
}
}
@@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee
{
base.OnHitNPC(target, hit, damageDone);
if (SwingMode == 2)
target.AddBuff(BuffType<GlacialState>(), 20);
target.AddBuff(BuffID.Frozen, 20);
}
public override void AI()
+1 -1
View File
@@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee
{
Player player = Main.player[Projectile.owner];
target.AddBuff(ModContent.BuffType<Nightwither>(), 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
if (Projectile.localAI[1] <= 0f && Projectile.owner == Main.myPlayer)
{
Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center.X, target.Center.Y, 0f, 0f, ModContent.ProjectileType<CosmicIceBurst>(), Projectile.damage, 10f, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f);
+1 -1
View File
@@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override Color? GetAlpha(Color lightColor)
+1 -1
View File
@@ -616,7 +616,7 @@ namespace CalamityMod.Projectiles.Melee
}
// Freeze the target briefly, to allow the player to more easily perform a powerful slash.
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
}
if (State == SwingState.Swinging && PerformingPowerfulSlash && Owner.ownedProjectileCounts[ModContent.ProjectileType<Exoboom>()] < 1)
+1 -1
View File
@@ -116,7 +116,7 @@ namespace CalamityMod.Projectiles.Melee
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.IceRod, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frozen, 30);
public override bool PreDraw(ref Color lightColor)
{
@@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Melee
{
base.OnHitNPC(target, hit, damageDone);
if (SwingMode == 2)
target.AddBuff(BuffType<GlacialState>(), 40);
target.AddBuff(BuffID.Frozen, 40);
}
public override void AI()
+1 -1
View File
@@ -285,7 +285,7 @@ namespace CalamityMod.Projectiles.Melee
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), Terratomere.TrueMeleeGlacialStateTime);
target.AddBuff(BuffID.Frozen, Terratomere.TrueMeleeFrozenTime);
Owner.DoLifestealDirect(target, (int)Math.Round(hit.Damage * 0.025), 0.75f);
// Create a slash creator on top of the hit target.
@@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee
}
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType<GlacialState>(), 100);
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frozen, 100);
public override void OnKill(int timeLeft)
{
SoundEngine.PlaySound(SoundID.Item105, Projectile.Center);
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override void OnKill(int timeLeft)
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn, 120);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override void OnKill(int timeLeft)
+1 -1
View File
@@ -78,7 +78,7 @@ namespace CalamityMod.Projectiles.Ranged
SoundEngine.PlaySound(crit with { Volume = 0.35f, Pitch = 1f }, Projectile.Center);
if (!target.boss)
target.AddBuff(ModContent.BuffType<GlacialState>(), 120);
target.AddBuff(BuffID.Frozen, 120);
int points = 6;
float radians = MathHelper.TwoPi / points;
+1 -1
View File
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
}
}
}
+1 -1
View File
@@ -86,7 +86,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
Projectile.ai[0] = 1f;
Projectile.ai[1] = target.whoAmI;
Projectile.velocity = target.Center - Projectile.Center;
+1 -1
View File
@@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
Projectile.ai[0] = 1f;
Projectile.ai[1] = target.whoAmI;
Projectile.velocity = target.Center - Projectile.Center;
+1 -1
View File
@@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<Nightwither>(), 300);
target.AddBuff(ModContent.BuffType<GlacialState>(), 150);
target.AddBuff(BuffID.Frozen, 150);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
+1 -1
View File
@@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue
explosionCount++;
}
int buffType = ModContent.BuffType<GlacialState>();
int buffType = BuffID.Frozen;
float radius = 112f; // 7 blocks
foreach (NPC nPC in Main.ActiveNPCs)
+1 -1
View File
@@ -187,7 +187,7 @@ namespace CalamityMod.Projectiles.Rogue
OnHitEffects(target);
target.AddBuff(BuffID.Frostburn2, 120);
if (Projectile.Calamity().stealthStrike)
target.AddBuff(ModContent.BuffType<GlacialState>(), 45);
target.AddBuff(BuffID.Frozen, 45);
}
+1 -1
View File
@@ -355,7 +355,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
+1 -1
View File
@@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
+1 -1
View File
@@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
+1 -1
View File
@@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 60);
target.AddBuff(BuffID.Frozen, 60);
target.AddBuff(ModContent.BuffType<Voidfrost>(), 180);
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Turret
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
target.AddBuff(BuffID.Frostburn2, 180);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
+1 -1
View File
@@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Turret
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
target.AddBuff(BuffID.Frostburn2, 180);
}
public override void OnHitPlayer(Player target, Player.HurtInfo info)
+1 -1
View File
@@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Typeless
if (!player.Calamity().CryoStoneVanity)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
}
// CIT 2MAY2025: Replaced old manual knockback code with setting HitDirectionOverride
+1 -1
View File
@@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Typeless
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone)
{
target.AddBuff(BuffID.Frostburn2, 180);
target.AddBuff(ModContent.BuffType<GlacialState>(), 30);
target.AddBuff(BuffID.Frozen, 30);
}
public override Color? GetAlpha(Color lightColor)
+1 -1
View File
@@ -61,7 +61,7 @@ namespace CalamityMod.Systems.Collections
BuffID.Silenced, BuffID.BrokenArmor, BuffID.CursedInferno, BuffID.Frostburn, BuffID.Chilled, BuffID.Frozen, BuffID.Burning, BuffID.Suffocation, BuffID.Ichor,
BuffID.Venom, BuffID.Blackout, BuffID.Electrified, BuffID.Rabies, BuffID.Webbed, BuffID.Stoned, BuffID.Dazed, BuffID.VortexDebuff, BuffID.WitheredArmor, BuffID.WitheredWeapon, BuffID.ShadowFlame,
BuffID.OgreSpit, BuffID.BetsysCurse, BuffID.Wet, BuffID.Slimed, BuffID.OnFire3, BuffID.Frostburn2, BuffType<SulphuricPoisoning>(), BuffType<Shadowflame>(), BuffType<Daybroken>(), BuffType<BrimstoneFlames>(), BuffType<BurningBlood>(),
BuffType<BrainRot>(), BuffType<ElementalMix>(), BuffType<GlacialState>(), BuffType<GodSlayerInferno>(), BuffType<AstralInfectionDebuff>(), BuffType<HolyFlames>(),
BuffType<BrainRot>(), BuffType<ElementalMix>(), BuffType<GodSlayerInferno>(), BuffType<AstralInfectionDebuff>(), BuffType<HolyFlames>(),
BuffType<Irradiated>(), BuffType<Plague>(), BuffType<CrushDepth>(), BuffType<HadopelagicPressure>(), BuffType<RiptideDebuff>(), BuffType<MarkedforDeath>(),
BuffType<HeavyBleeding>(), BuffType<Laceration>(), BuffType<AbsorberAffliction>(), BuffType<ArmorCrunch>(), BuffType<Crumbling>(), BuffType<Vaporfied>(), BuffType<Eutrophication>(),
BuffType<Dragonfire>(), BuffType<VermillionFlux>(), BuffType<AuricRebuke>(), BuffType<StaticDischarge>(), BuffType<Nightwither>(), BuffType<Voidfrost>(),
+1 -1
View File
@@ -136,7 +136,7 @@ namespace CalamityMod
#region Standard Enemy Immunity Sets
private static readonly int[] slimeEnemyImmunities = new int[1] { BuffID.Poisoned };
private static readonly int[] iceEnemyImmunities = new int[3] { BuffID.Frostburn, BuffID.Frostburn2, ModContent.BuffType<GlacialState>() };
private static readonly int[] iceEnemyImmunities = new int[3] { BuffID.Frostburn, BuffID.Frostburn2, BuffID.Frozen };
private static readonly int[] sulphurEnemyImmunities = new int[4] { BuffID.Poisoned, BuffID.Venom, ModContent.BuffType<SulphuricPoisoning>(), ModContent.BuffType<Irradiated>() };
private static readonly int[] sunkenSeaEnemyImmunities = new int[2] { ModContent.BuffType<Eutrophication>(), ModContent.BuffType<PearlAura>() };
private static readonly int[] abyssEnemyImmunities = new int[2] { ModContent.BuffType<CrushDepth>(), ModContent.BuffType<RiptideDebuff>() };