From d07c7993fddca7e0837a784b87be8f7513d3f07b Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Sat, 26 Apr 2025 15:26:20 -0700 Subject: [PATCH 01/78] Flesh Totem Start --- Buffs/Summon/FleshTotemBuff.cs | 17 +++ Buffs/Summon/FleshTotemBuff.png | Bin 0 -> 528 bytes CalPlayer/CalamityPlayer.cs | 14 +++ CalPlayer/CalamityPlayerHitHurt.cs | 27 +++-- .../{FleshTotem.cs => FleshTotemStorage.cs} | 11 +- Items/Accessories/FleshTotem.cs | 29 ++++- .../en-US/Mods.CalamityMod.Buffs.hjson | 5 + .../Mods.CalamityMod.Items.Accessories.hjson | 8 +- .../Mods.CalamityMod.Projectiles.Magic.hjson | 1 + Projectiles/Magic/FleshTotemMinion.cs | 104 ++++++++++++++++++ Projectiles/Magic/VoidVortexProj.cs | 1 - 11 files changed, 202 insertions(+), 15 deletions(-) create mode 100644 Buffs/Summon/FleshTotemBuff.cs create mode 100644 Buffs/Summon/FleshTotemBuff.png rename Cooldowns/{FleshTotem.cs => FleshTotemStorage.cs} (57%) create mode 100644 Projectiles/Magic/FleshTotemMinion.cs diff --git a/Buffs/Summon/FleshTotemBuff.cs b/Buffs/Summon/FleshTotemBuff.cs new file mode 100644 index 0000000000..524cc6f2a1 --- /dev/null +++ b/Buffs/Summon/FleshTotemBuff.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Projectiles.Magic; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Summon +{ + public class FleshTotemBuff : BaseSummonBuff + { + protected override int MinionProjectileType => ModContent.ProjectileType(); + + protected override ref bool MinionBool => ref BuffModdedOwner.fleshTotem; + } +} diff --git a/Buffs/Summon/FleshTotemBuff.png b/Buffs/Summon/FleshTotemBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..d99a0b8a1997505a85a348639385441d163053be GIT binary patch literal 528 zcmV+r0`L8aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA0i{VqK~z{r<(Ium z13?spcefD?DU{VhG)W_F6j5vh!7hqbULe?|@ELp(i*(`(Scqsk!BVu)2o{<|EOgN# zM6g+9&&&~Wm+=QAnZ>U;H=AX4?wPrFXWd|C*#U2_?<(jML&I(?9)1iEHz>@j%*P54 zlJx@}{SBS)T1T3vJBWP_c#*cmWxnQ+iyUB?1Ua?;0`1v5NFQp`++@sfNRG!CvxrcxmoD+NC+i2FFv%{ zx`KYU7p&O>2?u0-6X}rb52k97$miJWfUNW5bG*Eq_Ua0h{emEzo0 literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 35a842eb61..e97bb0adc3 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -852,6 +852,7 @@ namespace CalamityMod.CalPlayer public bool community = false; public bool shatteredCommunity = false; public bool fleshTotem = false; + public int fleshTotemManaStorage = 0; public bool bloodPact = false; public bool bloodPactBoost = false; public bool bloodflareCore = false; @@ -5599,6 +5600,19 @@ namespace CalamityMod.CalPlayer life.noGravity = true; } } + + if (modPlayer.fleshTotem) + { + if (Main.myPlayer == Player.whoAmI) + { + //Main.NewText(fleshTotemManaStorage); + fleshTotemManaStorage += manaConsumed; + if (fleshTotemManaStorage >= FleshTotem.manaStorageMax) + { + fleshTotemManaStorage = FleshTotem.manaStorageMax; + } + } + } } #endregion } diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 32dc6b33e5..15fd719931 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -14,6 +14,7 @@ using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Armor.Aerospec; +using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Demonshade; using CalamityMod.Items.Armor.LunicCorps; using CalamityMod.Items.Armor.Silva; @@ -32,6 +33,7 @@ using CalamityMod.NPCs.ProfanedGuardians; using CalamityMod.NPCs.Providence; using CalamityMod.NPCs.SupremeCalamitas; using CalamityMod.Particles; +using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Ranged; using CalamityMod.Projectiles.Rogue; using CalamityMod.Projectiles.Typeless; @@ -794,10 +796,6 @@ namespace CalamityMod.CalPlayer // The amount of damage that will be dealt is yet to be determined. // - // Can't have any cooldowns here because dodges grrrrr.... - if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && TotalEnergyShielding <= 0) - contactDamageReduction += 0.5; - if (tarragonCloak && tarraMelee && !Player.HasCooldown(Cooldowns.TarragonCloak.ID)) contactDamageReduction += Buffs.StatBuffs.TarragonCloak.ContactDamageReduction; @@ -1165,10 +1163,9 @@ namespace CalamityMod.CalPlayer if (!hasIFrames && !Player.creativeGodMode) nextHitDealsDefenseDamage |= npc.Calamity().canBreakPlayerDefense; - // ModifyHit (Flesh Totem effect happens here) -> Hurt (includes dodges) -> OnHit + // ModifyHit -> Hurt (includes dodges) -> OnHit // As such, to avoid cooldowns proccing from dodge hits, do it here - if (fleshTotem && !Player.HasCooldown(Cooldowns.FleshTotem.ID) && hurtInfo.Damage > 0) - Player.AddCooldown(Cooldowns.FleshTotem.ID, CalamityUtils.SecondsToFrames(20)); + if (NPC.AnyNPCs(ModContent.NPCType())) Player.AddBuff(ModContent.BuffType(), 15, true); @@ -2482,6 +2479,22 @@ namespace CalamityMod.CalPlayer } } + if (fleshTotem && hurtInfo.Damage > 0) + { + if (fleshTotemManaStorage >= 25) + SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center); + int lostSoulAmount = fleshTotemManaStorage / 25; + if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) + { + for (int k = 0; k < lostSoulAmount; k++) + { + Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + } + } + + fleshTotemManaStorage = 0; + } + // By setting brainOfConfusionItem, these accessories have this code already, // but doing it again allows for increased duration + The Amalgam's other buffs, // and also doesn't have random chance (why does Brain of Confusion not guarantee confusion on hit) diff --git a/Cooldowns/FleshTotem.cs b/Cooldowns/FleshTotemStorage.cs similarity index 57% rename from Cooldowns/FleshTotem.cs rename to Cooldowns/FleshTotemStorage.cs index 8b1fe7812f..1f5140dfaa 100644 --- a/Cooldowns/FleshTotem.cs +++ b/Cooldowns/FleshTotemStorage.cs @@ -1,13 +1,16 @@ -using Microsoft.Xna.Framework; +using CalamityMod.CalPlayer; +using CalamityMod.Items.Accessories; +using Microsoft.Xna.Framework; using Terraria.Localization; namespace CalamityMod.Cooldowns { - public class FleshTotem : CooldownHandler + public class FleshTotemStorage : CooldownHandler { - public static new string ID => "FleshTotem"; + public static new string ID => "FleshTotemStorage"; - public override bool ShouldDisplay => true; + private CalamityPlayer CalPlayer => instance.player.Calamity(); + public override bool ShouldDisplay => CalPlayer.fleshTotem; public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); public override string Texture => "CalamityMod/Cooldowns/FleshTotem"; public override Color OutlineColor => new Color(157, 248, 234); diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index 43a6d21ea8..a9fdee5bdd 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -1,4 +1,9 @@ -using CalamityMod.CalPlayer; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.Cooldowns; +using CalamityMod.Projectiles.Magic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,6 +13,10 @@ namespace CalamityMod.Items.Accessories public class FleshTotem : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int manaStorageMax = 600; + public const int lostSoulDamage = 200; + public override void SetDefaults() { Item.width = 26; @@ -21,6 +30,24 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.fleshTotem = true; + player.statManaMax2 += 30; + player.GetCritChance() += 5; + if (player.whoAmI == Main.myPlayer) + { + var source = player.GetSource_Accessory(Item); + if (player.FindBuffIndex(ModContent.BuffType()) == -1) + { + player.AddBuff(ModContent.BuffType(), 3600, true); + } + if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) + { + int damage = (int)player.GetTotalDamage().ApplyTo(lostSoulDamage); + + int effigy = Projectile.NewProjectile(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), damage, 2f, Main.myPlayer); + if (Main.projectile.IndexInRange(effigy)) + Main.projectile[effigy].originalDamage = lostSoulDamage; + } + } } } } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 8c05baf6a7..35b35901e1 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1603,3 +1603,8 @@ PopoNoselessBuff: { DisplayName: Noseless Popo Description: Your nose has been stolen! } + +FleshTotemBuff: { + DisplayName: Flesh Totem Buff + Description: Mods.CalamityMod.Buffs.FleshTotemBuff.Description +} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ce837a0f34..7bae0e6b06 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -770,8 +770,12 @@ FleshTotem: { DisplayName: Flesh Totem Tooltip: ''' - Halves enemy contact damage - When you take contact damage this effect has a 20 second cooldown + 5% increased magic critical strike chance + +30 max mana + Summons an effigy above your head that stores mana as you use it + The effigy occasionally pulses, restoring 30 mana + Pulses appear more frequently the more mana is stored + Upon being struck, the effigy unleashes all stored up mana as vengeful souls that chase your enemies ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index 9e64da189d..1d4c3faa63 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -262,3 +262,4 @@ WyvernFeatherPurple.DisplayName: Feather WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal +FleshTotemMinion.DisplayName: Flesh Totem Minion diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs new file mode 100644 index 0000000000..dca4e0dcb5 --- /dev/null +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.CalPlayer; +using CalamityMod.NPCs.BrimstoneElemental; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class FleshTotemMinion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Magic"; + public override string Texture => "CalamityMod/Items/Accessories/FleshTotem"; + + public int pulseTimer = 0; + public override void SetDefaults() + { + Projectile.width = 30; + Projectile.height = 26; + Projectile.netImportant = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.timeLeft = 18000; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.timeLeft *= 5; + Projectile.DamageType = DamageClass.Magic; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (!modPlayer.fleshTotem) + { + Projectile.active = false; + return; + } + if (player.dead) + { + modPlayer.fleshTotem = false; + } + if (modPlayer.fleshTotem) + { + Projectile.timeLeft = 2; + } + Lighting.AddLight(Projectile.Center, 0f, 0.25f, 1.5f); + Projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 85f); + if (player.gravDir == -1f) + { + Projectile.position.Y += 170f; + Projectile.rotation = MathHelper.Pi; + } + else + { + Projectile.rotation = 0f; + } + for (int i = 0; i < 2; i++) + { + int dustType = Main.rand.NextBool() ? 66 : 247; + float rotMulti = Main.rand.NextFloat(0.3f, 1f); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Vector2.UnitY / 65f, dustType); + dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (modPlayer.fleshTotemManaStorage * 0.0009f) - rotMulti * 0.1f; + dust.noGravity = true; + dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (modPlayer.fleshTotemManaStorage * 0.0009f); + dust.alpha = 1; + dust.color = Color.Cyan; + } + int pulseMax = 360; + if (modPlayer.fleshTotemManaStorage == 0) + pulseMax = 360; + else + { + pulseMax = 360 - (modPlayer.fleshTotemManaStorage / 2); + + if (pulseMax < 60) + { + pulseMax = 60; + } + } + if (pulseTimer >= pulseMax) + { + //Main.NewText(pulseMax); + SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound, Projectile.Center); + int manaGained = 30; + player.statMana += manaGained; + if (Main.myPlayer == player.whoAmI) + player.ManaEffect(manaGained); + + if (player.statMana > player.statManaMax2) + player.statMana = player.statManaMax2; + pulseTimer = 0; + } + pulseTimer++; + } + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Magic/VoidVortexProj.cs b/Projectiles/Magic/VoidVortexProj.cs index c0a5cfbf3f..435863a8cc 100644 --- a/Projectiles/Magic/VoidVortexProj.cs +++ b/Projectiles/Magic/VoidVortexProj.cs @@ -172,7 +172,6 @@ namespace CalamityMod.Projectiles.Magic } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); if (hit.Damage > 1 && Projectile.ai[2] == 3) Projectile.Kill(); } From 33c2564269e765c35870da6f792784ac112e8793 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sat, 24 May 2025 02:36:28 -0700 Subject: [PATCH 02/78] aura edits and updated minion sprite --- CalPlayer/CalamityPlayer.cs | 2 + Items/Accessories/FleshTotem.cs | 1 + Projectiles/Magic/FleshTotemMinion.cs | 66 ++++++++++++++++++------- Projectiles/Magic/FleshTotemMinion.png | Bin 0 -> 1289 bytes 4 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 Projectiles/Magic/FleshTotemMinion.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2415ed6bfd..46444fdd99 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -878,6 +878,7 @@ namespace CalamityMod.CalPlayer public bool community = false; public bool shatteredCommunity = false; public bool fleshTotem = false; + public bool fleshTotemMinion = false; public int fleshTotemManaStorage = 0; public bool bloodPact = false; public bool bloodPactBoost = false; @@ -2263,6 +2264,7 @@ namespace CalamityMod.CalPlayer stressPills = false; laudanum = false; fleshTotem = false; + fleshTotemMinion = false; bloodPact = false; bloodflareCore = false; chaliceOfTheBloodGod = false; diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index a9fdee5bdd..5222cdea01 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.fleshTotem = true; + modPlayer.fleshTotemMinion = true; player.statManaMax2 += 30; player.GetCritChance() += 5; if (player.whoAmI == Main.myPlayer) diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index dca4e0dcb5..1d3cdd5129 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -4,11 +4,14 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using CalamityMod.CalPlayer; +using CalamityMod.Items.Accessories; using CalamityMod.NPCs.BrimstoneElemental; using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic @@ -16,7 +19,6 @@ namespace CalamityMod.Projectiles.Magic public class FleshTotemMinion : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; - public override string Texture => "CalamityMod/Items/Accessories/FleshTotem"; public int pulseTimer = 0; public override void SetDefaults() @@ -35,20 +37,24 @@ namespace CalamityMod.Projectiles.Magic public override void AI() { + bool isActive = Projectile.type == ModContent.ProjectileType(); Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.fleshTotem) + if (!modPlayer.fleshTotemMinion) { Projectile.active = false; return; } - if (player.dead) + if (isActive) { - modPlayer.fleshTotem = false; - } - if (modPlayer.fleshTotem) - { - Projectile.timeLeft = 2; + if (player.dead) + { + modPlayer.fleshTotemMinion = false; + } + if (modPlayer.fleshTotemMinion) + { + Projectile.timeLeft = 2; + } } Lighting.AddLight(Projectile.Center, 0f, 0.25f, 1.5f); Projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 85f); @@ -61,17 +67,6 @@ namespace CalamityMod.Projectiles.Magic { Projectile.rotation = 0f; } - for (int i = 0; i < 2; i++) - { - int dustType = Main.rand.NextBool() ? 66 : 247; - float rotMulti = Main.rand.NextFloat(0.3f, 1f); - Dust dust = Dust.NewDustPerfect(Projectile.Center + Vector2.UnitY / 65f, dustType); - dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (modPlayer.fleshTotemManaStorage * 0.0009f) - rotMulti * 0.1f; - dust.noGravity = true; - dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (modPlayer.fleshTotemManaStorage * 0.0009f); - dust.alpha = 1; - dust.color = Color.Cyan; - } int pulseMax = 360; if (modPlayer.fleshTotemManaStorage == 0) pulseMax = 360; @@ -88,6 +83,12 @@ namespace CalamityMod.Projectiles.Magic { //Main.NewText(pulseMax); SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound, Projectile.Center); + for (int k = 0; k < 30; k++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.IceTorch, new Vector2(9, 9).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.5f, 0.8f), 0, Color.LightSkyBlue, Main.rand.NextFloat(1.2f, 1.4f)); + dust.noGravity = true; + dust.alpha = Main.rand.Next(70, 90 + 1); + } int manaGained = 30; player.statMana += manaGained; if (Main.myPlayer == player.whoAmI) @@ -99,6 +100,33 @@ namespace CalamityMod.Projectiles.Magic } pulseTimer++; } + public override bool PreDraw(ref Color lightColor) + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 drawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -67f; + Vector2 origin = texture.Size() * 0.5f; + + float fade = Utils.GetLerpValue(0, modPlayer.fleshTotemManaStorage, FleshTotem.manaStorageMax, true); + for (int i = 0; i < 10; i++) + { + Main.spriteBatch.Draw(texture, drawPosition + Vector2.UnitY * -1.5f, null, Color.Cyan with { A = 0 } * fade, Projectile.rotation, origin, Projectile.scale * (Main.rand.NextFloat(0.0016f, 0.002f) * modPlayer.fleshTotemManaStorage), SpriteEffects.None, 0f); + } + for (int i = 0; i < 1; i++) + { + int dustType = Main.rand.NextBool() ? 66 : 247; + float rotMulti = Main.rand.NextFloat(0.3f, 1f); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Vector2.UnitY / 75f, dustType); + dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (modPlayer.fleshTotemManaStorage * 0.0009f) - rotMulti * 0.1f; + dust.noGravity = true; + dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (modPlayer.fleshTotemManaStorage * 0.0009f); + dust.alpha = 1; + dust.color = Color.Cyan; + } + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } public override bool? CanDamage() => false; } } diff --git a/Projectiles/Magic/FleshTotemMinion.png b/Projectiles/Magic/FleshTotemMinion.png new file mode 100644 index 0000000000000000000000000000000000000000..3d5cb92fcf7cf11124910210737c24371c1a2341 GIT binary patch literal 1289 zcmV+k1@`)hP)Px#1ZP1_K>z@;j|==^1poj9nMp)JR9HvVmtAaBMHI(px=XWnw;$VzEwmtE!H9fV zH3}}q5EG40MtQ+EbO;rroBb^WuT1M?HD>0U!W z-VYzX)o)tiz_&MZZ^rKJ`P=S>+PWtQ zZ#&s%Z|o8$o*xtABhQfS92_O<1lrXmeR`VQYvT}6{OTa7+8k1?6SeEjTadtd8Du*3 z2sN;w%-RP0DQK6+W{jW+2wRuQm|ufnjIZMdU5KR7HanaXq(%B`;ohj##0Pu!Qm63F zN2K|a?~)!lGr==qoefd`Vl#eps80;_W=$_1T#I|+2(0nbuRaD58#6lCsZ;t{pRCtO zH?AEdy?W?#($S;)NiR>ANdHKuN%!r`kzTG5)_A!HWbA*3tL0hJ%C#xd z16wzd`uX(YCDQE3FlpaFFDY}Sc-^#CQO0zvnG;4maS#2*Yg?%3%$a;vXB722uXVLN zN2+{F<(t~=jM0EK8v3H;0KPd6u->_`wVOrjzj?~|?Jf4Fk#{Zc>bO4h@uWUX5?$T$ z-1I-x2G$y@pr*C-_?gJ^oO5F554d#>GyyBP3m9srfiy) zkiV9$nr4Szr==t;u#~Qpcv4u>kz~lkpN$tD=j-`?_)^2x%mOPgrUK?ln(ZY4zSysq z*s1Pu95M!L$?FOHegE}Qtk@a{<{o%=_qqZ5y{weDUolad3P8;x#d#9R=%W+`=& zDdRqm^YtNEaRO8A^mdExWOOyzDewiKe%gUiYrz_`^KLSkaxpz&Q#4hslA)%8ao-Q$ z4`1-f{+Siq)!1CLuCKpoZ!)e9i$Cg3GCZJ5R?d#ANUlQt7s>V9AUpiHOrdVllV1SyF9EIw#p zMd)WSHn5+)`Q4^vGf_BeS^*x??=gcZg`NNT0vY!^W#vvTqZZyZ9^1YP(q?Fr{$drr zJ42d(c@OE$OH@3xIrsYo(|Xv}7^Mu1D~u?3oUe~#Rc0)ciG;+N>?z!0;p=g)>W1zi z5E>Yp0d}X=GQV^V?qxq=L_QHPyIW*3X;G`yLr*e4>RPF;rFK+MuwY Date: Tue, 3 Jun 2025 22:52:19 -0700 Subject: [PATCH 03/78] Visual updates --- Projectiles/Magic/FleshTotemEyes.png | Bin 0 -> 191 bytes Projectiles/Magic/FleshTotemMinion.cs | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 Projectiles/Magic/FleshTotemEyes.png diff --git a/Projectiles/Magic/FleshTotemEyes.png b/Projectiles/Magic/FleshTotemEyes.png new file mode 100644 index 0000000000000000000000000000000000000000..22d855200da70db63721197e334e8053ee59f888 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^N("CalamityMod/Projectiles/Magic/FleshTotemEyes").Value; + Vector2 eyesDrawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -69f; Vector2 drawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -67f; Vector2 origin = texture.Size() * 0.5f; @@ -125,6 +144,8 @@ namespace CalamityMod.Projectiles.Magic dust.color = Color.Cyan; } Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + if (modPlayer.fleshTotemManaStorage == 600) + Main.EntitySpriteDraw(totemEyes, eyesDrawPosition + Vector2.UnitX * -2f, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; } public override bool? CanDamage() => false; From 171e8c5a046430874dccc6823cc00b897d668d76 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 23 Jun 2025 21:08:38 -0700 Subject: [PATCH 04/78] no more void vortex projectiles --- CalPlayer/CalamityPlayerHitHurt.cs | 14 ++- .../Mods.CalamityMod.Projectiles.Magic.hjson | 1 + Projectiles/Magic/FleshTotemMinion.cs | 13 +-- Projectiles/Magic/FleshTotemSoul.cs | 106 ++++++++++++++++++ Projectiles/Magic/VoidVortexProj.cs | 1 + 5 files changed, 123 insertions(+), 12 deletions(-) create mode 100644 Projectiles/Magic/FleshTotemSoul.cs diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 31111a3de1..1b7904ff71 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2528,14 +2528,22 @@ namespace CalamityMod.CalPlayer if (fleshTotem && hurtInfo.Damage > 0) { - if (fleshTotemManaStorage >= 25) + if (fleshTotemManaStorage >= 100) SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center); int lostSoulAmount = fleshTotemManaStorage / 25; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { - for (int k = 0; k < lostSoulAmount; k++) + for (int i = 0; i < Main.maxProjectiles; i++) { - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + Projectile proj = Main.projectile[i]; + if (proj.active && proj.owner == Player.whoAmI && proj.type == ModContent.ProjectileType()) + { + for (int k = 0; k < lostSoulAmount; k++) + { + Projectile.NewProjectile(Player.GetSource_FromThis(), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + } + break; + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index 53377a6efc..2405ed6d23 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -264,3 +264,4 @@ YharimsCrystalPrism.DisplayName: Yermes Christal FleshTotemMinion.DisplayName: Flesh Totem Minion SylvBolt.DisplayName: Sylv Bolt SylvRay.DisplayName: Sylv Ray +FleshTotemSoul.DisplayName: Flesh Totem Soul diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 567d6d647f..106579d284 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -68,16 +68,11 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation = 0f; } int pulseMax = 360; - if (modPlayer.fleshTotemManaStorage == 0) - pulseMax = 360; - else - { - pulseMax = 360 - (modPlayer.fleshTotemManaStorage / 2); + pulseMax = 360 - (modPlayer.fleshTotemManaStorage / 2); - if (pulseMax < 60) - { - pulseMax = 60; - } + if (pulseMax < 60) + { + pulseMax = 60; } if (pulseTimer >= pulseMax) { diff --git a/Projectiles/Magic/FleshTotemSoul.cs b/Projectiles/Magic/FleshTotemSoul.cs new file mode 100644 index 0000000000..7bcb48165f --- /dev/null +++ b/Projectiles/Magic/FleshTotemSoul.cs @@ -0,0 +1,106 @@ +using System; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; + +using Terraria.ID; +using Terraria.ModLoader; +using static CalamityMod.Systems.LavaRenderingSystem; + +namespace CalamityMod.Projectiles.Magic +{ + public class FleshTotemSoul : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Magic"; + public override string Texture => "CalamityMod/Projectiles/Rogue/PhantasmalSoulBlue"; + public ref float Time => ref Projectile.ai[0]; + public float dustRotation = 0; + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 4; + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 22; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.penetrate = 1; + Projectile.timeLeft = 240; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; + Projectile.scale = 0.5f; + } + + public override void AI() + { + Time++; + // Handle animation + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 3) + Projectile.frame = 0; + if (Time >= 45f) + { + CalamityUtils.HomeInOnNPC(Projectile, true, 1200f, 30f, 40f); + } + //Welcome back to Sunny tries to smash 5 different visual effects together in the effort to get something to look good + float squash = Utils.GetLerpValue(1, 3, Projectile.velocity.Length(), true); + if (squash > 0.15f) + { + Particle fadeInfx = new CustomSpark(Projectile.Center, Projectile.velocity * 0.01f, "CalamityMod/Particles/BloomCircle", false, 15, 0.5f * Projectile.scale, Color.SkyBlue * 0.4f * squash, new Vector2(1 - 0.15f * squash, 1f), true, false, shrinkSpeed: 0.3f * squash); + GeneralParticleHandler.SpawnParticle(fadeInfx); + } + Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(-0.2f, -0.6f), Color.SkyBlue, 3, Main.rand.NextFloat(0.25f, 0.3f), 1f, Main.rand.NextFloat(-0.2f, 0.2f), false); + GeneralParticleHandler.SpawnParticle(smoke); + if (Time > 5) + { + for (int i = 0; i < 3; i++) + { + dustRotation += 0.12f; + Vector2 dustPos = Projectile.Center + (MathHelper.Pi + dustRotation + MathHelper.PiOver2).ToRotationVector2() * 10f * Projectile.scale; + Dust dust = Dust.NewDustPerfect(dustPos, 175, (MathHelper.Pi + dustRotation * Math.Sign(Projectile.velocity.Length())).ToRotationVector2() * 2); + dust.noGravity = false; + dust.scale = Main.rand.NextFloat(0.75f, 1.2f); + dust.alpha = Main.rand.Next(100, 170 + 1); + dust.velocity = dust.velocity.RotatedByRandom(0f); + } + } + Projectile.rotation = Projectile.velocity.ToRotation() + -MathHelper.PiOver2; + // Blue light + Lighting.AddLight(Projectile.Center, 0.2f, 0.2f, 0.7f); + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D Texture = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; + Rectangle frame = Texture.Frame(1, Main.projFrames[Projectile.type], 0, Projectile.frame); + Vector2 drawPosition; + Vector2 origin = frame.Size() * 0.5f; + + drawPosition = Projectile.Center - Main.screenPosition; + Main.EntitySpriteDraw(Texture, drawPosition, frame, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + public override bool? CanDamage() => Time >= 15f; + + public override void OnKill(int timeLeft) + { + for (int i = 0; i < 2; i++) + { + Vector2 sparkVel = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedByRandom(MathHelper.ToRadians(24f)) * Main.rand.NextFloat(6f, 10f); + Color color = Main.hslToRgb(Main.rand.NextFloat(0.3f, 0.5f), 1f, 0.8f); + SparkParticle spark = new(Projectile.Center, sparkVel, false, 30, 1.3f, color); + GeneralParticleHandler.SpawnParticle(spark); + } + } + } +} diff --git a/Projectiles/Magic/VoidVortexProj.cs b/Projectiles/Magic/VoidVortexProj.cs index 4d74c2f4b1..314b58ac56 100644 --- a/Projectiles/Magic/VoidVortexProj.cs +++ b/Projectiles/Magic/VoidVortexProj.cs @@ -175,6 +175,7 @@ namespace CalamityMod.Projectiles.Magic } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + target.AddBuff(ModContent.BuffType(), 180); if (hit.Damage > 1 && Projectile.ai[2] == 3) Projectile.Kill(); } From 39ef5e6809ca413bbc6244a3df54b2246ace03b2 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 30 Sep 2025 17:43:08 -0700 Subject: [PATCH 05/78] Start of Crowns --- CalPlayer/CalamityPlayer.cs | 19 ++- CalPlayer/CalamityPlayerMiscEffects.cs | 44 +++++- CalPlayer/CalamityPlayerOnHit.cs | 57 +------ Items/Accessories/FeatherCrown.cs | 8 +- Items/Accessories/MoonstoneCrown.cs | 15 +- Items/CalamityGlobalItem.cs | 10 ++ .../Mods.CalamityMod.Items.Accessories.hjson | 11 +- .../Mods.CalamityMod.Projectiles.Magic.hjson | 3 +- Projectiles/Magic/SpectralFeather.cs | 148 ++++++++++++++++++ Projectiles/Rogue/MoonSigil.cs | 127 +++++++++++---- 10 files changed, 347 insertions(+), 95 deletions(-) create mode 100644 Projectiles/Magic/SpectralFeather.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 315b13e0cc..fcb81154e4 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1032,7 +1032,8 @@ namespace CalamityMod.CalPlayer public bool eclipseMirror = false; public bool featherCrown = false; public bool moonCrown = false; - public int rogueCrownCooldown = 0; + public int mageCrownTimer = 0; + public int mageCrownCount = 0; public bool dragonScales = false; public bool gloveOfPrecision = false; public bool gloveOfRecklessness = false; @@ -2937,7 +2938,7 @@ namespace CalamityMod.CalPlayer andromedaCripple = 0; theBeeCooldown = 0; scuttlerCooldown = 0; - rogueCrownCooldown = 0; + mageCrownTimer = 0; wingProjectileCooldown = 0; hallowedRuneCooldown = 0; sulphurBubbleCooldown = 0; @@ -5733,6 +5734,20 @@ namespace CalamityMod.CalPlayer } } } + //For when the player runs out of mana + if (Player.statMana <= manaConsumed || Player.statMana <= 6) + { + if (moonCrown && mageCrownCount > 0) + { + SoundStyle fire = new("CalamityMod/Sounds/Item/CursedDaggerThrow"); + SoundEngine.PlaySound(fire with { Volume = 0.9f, Pitch = 0.9f, PitchVariance = 0.2f, MaxInstances = -1 }, Player.Center); + mageCrownCount -= 5; + if (mageCrownCount < 0) + { + mageCrownCount = 0; + } + } + } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f2b3cace1c..65c6beeadc 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -74,6 +74,7 @@ using CalamityMod.World; using Microsoft.CodeAnalysis; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using Mono.Cecil; using ReLogic.Content; using Terraria; using Terraria.Audio; @@ -1962,6 +1963,46 @@ namespace CalamityMod.CalPlayer if (Player.velocity.Length() < 6) hookPullVisuals = 0; } + if (featherCrown && !moonCrown) + { + int SpawnTimer = 120; + int MaxSigils = 4; + if (mageCrownTimer >= SpawnTimer) + { + if (mageCrownCount <= MaxSigils) + { + Main.NewText(mageCrownCount); + mageCrownCount += 1; + float start = 360f / mageCrownCount; + Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); + } + mageCrownTimer = 0; + } + else if (!Player.dead) + { + mageCrownTimer++; + } + } + if (moonCrown) + { + int SpawnTimer = 120; + int MaxSigils = 9; //Starts at 0, so cap is 10 + if (mageCrownTimer >= SpawnTimer) + { + if (mageCrownCount <= MaxSigils) + { + Main.NewText(mageCrownCount); + mageCrownCount += 1; + float start = 360f / mageCrownCount; + Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); + } + mageCrownTimer = 0; + } + else if (!Player.dead) + { + mageCrownTimer++; + } + } if (unstableGraniteCore) { @@ -2157,8 +2198,6 @@ namespace CalamityMod.CalPlayer silvaMageCooldown--; if (scuttlerCooldown > 0) scuttlerCooldown--; - if (rogueCrownCooldown > 0) - rogueCrownCooldown--; if (spectralVeilImmunity > 0) spectralVeilImmunity--; if (jetPackDash > 0) @@ -4501,7 +4540,6 @@ namespace CalamityMod.CalPlayer } #endregion - #region Energy Shields private void EnergyShields() { diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 9a5dbf505b..756f1b49d6 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1062,56 +1062,6 @@ namespace CalamityMod.CalPlayer } } - if (modProj.stealthStrike && rogueCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 3) - { - bool spawnedFeathers = false; - if (nanotech) - { - for (int i = 0; i < 3; i++) - { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - Vector2 velocity = (position - source) / 40f; - int damage = (int)Player.GetTotalDamage().ApplyTo(110); - Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), damage, 3f, proj.owner); - } - } - else if (moonCrown) - { - int lunarFlareDamage = (int)Player.GetTotalDamage().ApplyTo(MoonstoneCrown.BaseDamage); - float lunarFlareKB = 3f; - - for (int i = 0; i < 3; i++) - { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - Vector2 velocity = (position - source) / 10f; - int flare = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); - if (flare.WithinBounds(Main.maxProjectiles)) - Main.projectile[flare].DamageType = DamageClass.Generic; - } - } - else if (featherCrown) - { - for (int i = 0; i < 3; i++) - { - Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); - float speedX = (position.X - source.X) / 30f; - float speedY = (position.Y - source.Y) * 8; - Vector2 velocity = new Vector2(speedX, speedY); - - int featherDamage = (int)Player.GetTotalDamage().ApplyTo(25); - - int feather = Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), featherDamage, 3f, proj.owner); - if (feather.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[feather].DamageType = DamageClass.Generic; - Main.projectile[feather].extraUpdates += 3; - } - } - spawnedFeathers = true; - } - rogueCrownCooldown = spawnedFeathers ? 15 : 60; - } - if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3) { int damage = (int)Player.GetTotalDamage().ApplyTo(TitanHeartMask.ExplosionDamage); @@ -1224,6 +1174,13 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), TitanHeartMask.OnHitDebuffDuration); } } + if (magic) + { + if (moonCrown && mageCrownCount >= 10) + { + target.AddBuff(BuffType(), 360); + } + } if (summon) { if (pSoulArtifact && !profanedCrystal) diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 01132959e8..e940d508c5 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -32,8 +32,14 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.rogueVelocity += 0.15f; modPlayer.featherCrown = true; + player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per feather, up to 10% + player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per feather, up to 5% + if (modPlayer.mageCrownCount == 5) + { + player.manaCost -= 0.05f; + player.GetCritChance() += 5; + } } public override void AddRecipes() diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 56872a2ae0..035395144d 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -10,12 +10,9 @@ namespace CalamityMod.Items.Accessories public class MoonstoneCrown : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - // Base damage of lunar flares on stealth strikes. Increased by rogue damage stats, but not stealth damage. - internal static int BaseDamage = 75; public override void SetStaticDefaults() { - if (!Main.dedServ) { int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face); @@ -35,8 +32,18 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.rogueVelocity += 0.15f; modPlayer.moonCrown = true; + player.statManaMax2 += 70; + player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per moon sigil, up to 20% + player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per moon sigil, up to 10% + if (modPlayer.mageCrownCount >= 4) //I know this looks weird but the count starts at 0 + { + player.manaRegenBonus += 10; + } + if (modPlayer.mageCrownCount == 9) + { + player.GetCritChance() += 10; + } } public override void AddRecipes() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 655834a6a5..290b28d680 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -696,6 +696,16 @@ namespace CalamityMod.Items } } + //Mana Potion interactions + if (item.healMana > 0) + { + //If mana potion used, kill + if (modPlayer.moonCrown || modPlayer.featherCrown) + { + //modPlayer.mageCrownCount = 0; + } + } + // Staff/Axe of Regrowth growing Calamity grass if (item.type == ItemID.StaffofRegrowth || item.type == ItemID.AcornAxe) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 683f151f0a..e3abeedb95 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1112,7 +1112,7 @@ ManaPolarizer: { DisplayName: Mana Polarizer Tooltip: ''' - Increases max mana by 50 + Increases maximum mana by 50 Provides life regeneration and magic damage that scales based on how much mana you have Lower mana means more life regeneration, but less magic damage These scale from -2 to 2 HP/sec, and 5% to 15% damage @@ -1144,9 +1144,12 @@ MoonstoneCrown: { DisplayName: Moonstone Crown Tooltip: ''' - 15% increased rogue projectile velocity - Stealth strikes release lunar flares on enemy hits - Rogue projectiles summon homing moon sigils as they travel + +70 max mana + Summons a Lunar Sigil every 2 seconds, up to a maximum of 10 + Each Lunar Sigil increases magic damage by 2% and reduces mana cost by 1% + Having 5 sigils increases mana regeneration by +5 MP/s + Having 10 sigils increases magic critical strike chance by 10% and all magic attacks inflict Nightwither + Running out of mana removes 5 sigils ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index be3d133c79..b3fafa246c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -263,6 +263,5 @@ WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal FleshTotemMinion.DisplayName: Flesh Totem Minion -SylvBolt.DisplayName: Sylv Bolt -SylvRay.DisplayName: Sylv Ray FleshTotemSoul.DisplayName: Flesh Totem Soul +SpectralFeather.DisplayName: Spectral Feather diff --git a/Projectiles/Magic/SpectralFeather.cs b/Projectiles/Magic/SpectralFeather.cs new file mode 100644 index 0000000000..b17ceba93f --- /dev/null +++ b/Projectiles/Magic/SpectralFeather.cs @@ -0,0 +1,148 @@ +using System; +using System.Collections.Generic; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Magic +{ + public class SpectralFeather : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Magic"; + public override string Texture => "CalamityMod/Projectiles/Magic/StickyFeather"; + public override void SetDefaults() + { + Projectile.width = 10; + Projectile.height = 10; + Projectile.scale = 0.8f; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.ignoreWater = true; + Projectile.timeLeft = 18000; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; + } + + public override void AI() + { + bool isActive = Projectile.type == ModContent.ProjectileType(); + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (!modPlayer.featherCrown) + { + Projectile.active = false; + modPlayer.mageCrownTimer = 0; + modPlayer.mageCrownCount = 0; + return; + } + if (isActive) + { + if (player.dead) + { + modPlayer.featherCrown = false; + } + if (modPlayer.featherCrown) + { + Projectile.timeLeft = 2; + } + } + Projectile.rotation += MathHelper.ToRadians(1.3f); + + int cap = modPlayer.mageCrownCount; + int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; + if (excessCount > cap) + { + Projectile.Kill(); + } + int feathers = 0; + int featherAmt = 0; + for (int i = 0; i < Main.maxProjectiles; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == Projectile.type) + { + if (Main.projectile[i] == Projectile) + { + feathers = featherAmt; + } + featherAmt++; + } + } + float f = ((float)feathers / (float)featherAmt + player.miscCounterNormalized * 2f) * ((float)Math.PI * 2f); + float num = 18f + (float)featherAmt; + Vector2 vector = player.position - player.oldPosition; + base.Projectile.Center += vector; + Vector2 vector2 = f.ToRotationVector2(); + Projectile.localAI[0] = vector2.Y; + Vector2 value = (player.Center + new Vector2(0f, -25f)) + vector2 * new Vector2(1f, 0.05f) * num; + base.Projectile.Center = value; + + if (!Projectile.FinalExtraUpdate()) + return; + + // Give off some light + float lightScalar = Main.rand.NextFloat(0.9f, 1.1f) * Main.essScale; + Lighting.AddLight(Projectile.Center, 0.3f * lightScalar, 0.26f * lightScalar, 0.15f * lightScalar); + + Vector2 direction = player.Center - Projectile.Center; + direction.Normalize(); + direction *= 6f; + if (direction.X >= 0.25f) + { + Projectile.direction = -1; + } + else if (direction.X < -0.25f) + { + Projectile.direction = 1; + } + Projectile.spriteDirection = Projectile.direction; + + } + public override void OnKill(int timeLeft) + { + float dustSp = 0.2f; + int dustD = 0; + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 5; j++) + { + Vector2 dustspeed = new Vector2(dustSp, dustSp).RotatedBy(MathHelper.ToRadians(dustD)); + int d = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, DustID.Smoke, dustspeed.X, dustspeed.Y, 200, new Color(213, 242, 232, 200), 1f); + Main.dust[d].noGravity = true; + Main.dust[d].position = Projectile.Center; + Main.dust[d].velocity = dustspeed; + dustSp += 0.2f; + } + dustD += 90; + dustSp = 0.2f; + } + } + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + if (Projectile.localAI[0] < 0) + { + overPlayers.Add(index); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (modPlayer.mageCrownCount == 5) + { + for (int i = 0; i < 6; i++) + { + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, (Color.Teal * 0.5f) with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 1.01f, SpriteEffects.None, 0f); + } + } + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); + return false; + } + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Rogue/MoonSigil.cs b/Projectiles/Rogue/MoonSigil.cs index 1e519983af..902caf23e5 100644 --- a/Projectiles/Rogue/MoonSigil.cs +++ b/Projectiles/Rogue/MoonSigil.cs @@ -1,4 +1,7 @@ -using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using CalamityMod.CalPlayer; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -9,46 +12,93 @@ namespace CalamityMod.Projectiles.Rogue public class MoonSigil : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; public override void SetDefaults() { Projectile.width = 20; Projectile.height = 20; + Projectile.scale = 0.9f; Projectile.friendly = true; - Projectile.penetrate = 2; + Projectile.penetrate = -1; Projectile.ignoreWater = true; - Projectile.timeLeft = 250; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.DamageType = RogueDamageClass.Instance; + Projectile.timeLeft = 18000; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.extraUpdates = 1; } public override void AI() { - if (Projectile.timeLeft < 52) + bool isActive = Projectile.type == ModContent.ProjectileType(); + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (!modPlayer.moonCrown) { - Projectile.alpha += 5; - Projectile.scale -= 0.013f; - } - if (Projectile.alpha >= 255) - { - Projectile.alpha = 255; - Projectile.Kill(); + Projectile.active = false; + modPlayer.mageCrownCount = 0; return; } + if (isActive) + { + if (player.dead) + { + modPlayer.moonCrown = false; + } + if (modPlayer.moonCrown) + { + Projectile.timeLeft = 2; + } + } + Projectile.rotation += MathHelper.ToRadians(1.3f); - CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 300f, 8f, 20f); - } - - // Reduce damage of projectiles if more than the cap are active - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - int cap = 5; - float capDamageFactor = 0.05f; + int cap = modPlayer.mageCrownCount; int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; - modifiers.SourceDamage *= MathHelper.Clamp(1f - (capDamageFactor * excessCount), 0f, 1f); - } + if (excessCount > cap) + { + Projectile.Kill(); + } + int sigils = 0; + int sigilAmt = 0; + for (int i = 0; i < Main.maxProjectiles; i++) + { + if (Main.projectile[i].active && Main.projectile[i].owner == Projectile.owner && Main.projectile[i].type == Projectile.type) + { + if (Main.projectile[i] == Projectile) + { + sigils = sigilAmt; + } + sigilAmt++; + } + } + float f = ((float)sigils / (float)sigilAmt + player.miscCounterNormalized * 2f) * ((float)Math.PI * 2f); + float num = 24f + (float)sigilAmt * 4.5f; + Vector2 vector = player.position - player.oldPosition; + base.Projectile.Center += vector; + Vector2 vector2 = f.ToRotationVector2(); + Projectile.localAI[0] = vector2.Y; + Vector2 value = (player.Center + new Vector2(0f, 5f)) + vector2 * new Vector2(1f, 0.05f) * num; + base.Projectile.Center = value; + if (!Projectile.FinalExtraUpdate()) + return; + + // Give off some light + float lightScalar = Main.rand.NextFloat(0.9f, 1.1f) * Main.essScale; + Lighting.AddLight(Projectile.Center, 0.3f * lightScalar, 0.26f * lightScalar, 0.15f * lightScalar); + + Vector2 direction = player.Center - Projectile.Center; + direction.Normalize(); + direction *= 6f; + if (direction.X >= 0.25f) + { + Projectile.direction = -1; + } + else if (direction.X < -0.25f) + { + Projectile.direction = 1; + } + Projectile.spriteDirection = Projectile.direction; + + } public override void OnKill(int timeLeft) { float dustSp = 0.2f; @@ -68,10 +118,27 @@ namespace CalamityMod.Projectiles.Rogue dustSp = 0.2f; } } - - public override void PostDraw(Color lightColor) + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) { - Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Rogue/MoonSigil").Value; + if (Projectile.localAI[0] < 0) + { + overPlayers.Add(index); + } + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request(Texture).Value; + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (modPlayer.mageCrownCount >= 10) + { + for (int i = 0; i < 6; i++) + { + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, (Color.Teal * 0.5f) with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 1.1f, SpriteEffects.None, 0f); + } + } + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); Main.spriteBatch.Draw ( texture, @@ -84,10 +151,12 @@ namespace CalamityMod.Projectiles.Rogue Color.White, Projectile.rotation, new Vector2(10, 10), - Projectile.scale, + Projectile.scale * 0.9f, SpriteEffects.None, 0f ); + return false; } + public override bool? CanDamage() => false; } } From 115ce9be2c54e86397e3e2a85e01e146cea90b87 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 9 Feb 2026 19:25:02 -0800 Subject: [PATCH 06/78] flesh totem finish --- Buffs/Summon/FleshTotemBuff.cs | 17 --- Buffs/Summon/FleshTotemBuff.png | Bin 528 -> 0 bytes CalPlayer/CalamityPlayer.cs | 45 +++++--- CalPlayer/CalamityPlayerMiscEffects.cs | 14 ++- CalPlayer/CalamityPlayerOnHit.cs | 7 +- Items/Accessories/FeatherCrown.cs | 1 - Items/Accessories/FleshTotem.cs | 9 +- Items/Accessories/MoonstoneCrown.cs | 2 +- Items/CalamityGlobalItem.cs | 9 +- .../Mods.CalamityMod.Items.Accessories.hjson | 14 +-- .../Mods.CalamityMod.Projectiles.Magic.hjson | 1 + .../Mods.CalamityMod.Projectiles.Rogue.hjson | 1 - Projectiles/CalamityGlobalProjectile.cs | 14 --- Projectiles/Magic/FleshTotemMinion.cs | 98 +++++++++++------- Projectiles/Magic/FleshTotemSoul.cs | 3 - Projectiles/{Rogue => Magic}/MoonSigil.cs | 52 ++++++++-- Projectiles/{Rogue => Magic}/MoonSigil.png | Bin Projectiles/Magic/SpectralFeather.cs | 1 - 18 files changed, 165 insertions(+), 123 deletions(-) delete mode 100644 Buffs/Summon/FleshTotemBuff.cs delete mode 100644 Buffs/Summon/FleshTotemBuff.png rename Projectiles/{Rogue => Magic}/MoonSigil.cs (72%) rename Projectiles/{Rogue => Magic}/MoonSigil.png (100%) diff --git a/Buffs/Summon/FleshTotemBuff.cs b/Buffs/Summon/FleshTotemBuff.cs deleted file mode 100644 index 524cc6f2a1..0000000000 --- a/Buffs/Summon/FleshTotemBuff.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CalamityMod.Projectiles.Magic; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.Summon -{ - public class FleshTotemBuff : BaseSummonBuff - { - protected override int MinionProjectileType => ModContent.ProjectileType(); - - protected override ref bool MinionBool => ref BuffModdedOwner.fleshTotem; - } -} diff --git a/Buffs/Summon/FleshTotemBuff.png b/Buffs/Summon/FleshTotemBuff.png deleted file mode 100644 index d99a0b8a1997505a85a348639385441d163053be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 528 zcmV+r0`L8aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf6951U69E94oEQKA0i{VqK~z{r<(Ium z13?spcefD?DU{VhG)W_F6j5vh!7hqbULe?|@ELp(i*(`(Scqsk!BVu)2o{<|EOgN# zM6g+9&&&~Wm+=QAnZ>U;H=AX4?wPrFXWd|C*#U2_?<(jML&I(?9)1iEHz>@j%*P54 zlJx@}{SBS)T1T3vJBWP_c#*cmWxnQ+iyUB?1Ua?;0`1v5NFQp`++@sfNRG!CvxrcxmoD+NC+i2FFv%{ zx`KYU7p&O>2?u0-6X}rb52k97$miJWfUNW5bG*Eq_Ua0h{emEzo0 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index cdf0d505c9..7654efd948 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -954,6 +954,7 @@ namespace CalamityMod.CalPlayer public bool shatteredCommunity = false; public bool fleshTotem = false; public bool fleshTotemMinion = false; + public bool fleshTotemVisual = false; public int fleshTotemManaStorage = 0; public bool bloodPact = false; public bool bloodflareCore = false; @@ -1079,6 +1080,7 @@ namespace CalamityMod.CalPlayer public bool moonCrown = false; public int mageCrownTimer = 0; public int mageCrownCount = 0; + public int crownShatterTimer = 0; public bool dragonScales = false; public bool gloveOfPrecision = false; public bool gloveOfRecklessness = false; @@ -2410,6 +2412,7 @@ namespace CalamityMod.CalPlayer stressPills = false; laudanum = false; fleshTotem = false; + fleshTotemVisual = false; fleshTotemMinion = false; bloodPact = false; bloodflareCore = false; @@ -3079,6 +3082,7 @@ namespace CalamityMod.CalPlayer theBeeCooldown = 0; scuttlerCooldown = 0; mageCrownTimer = 0; + crownShatterTimer = 0; wingProjectileCooldown = 0; hallowedRuneCooldown = 0; sulphurBubbleCooldown = 0; @@ -4768,6 +4772,31 @@ namespace CalamityMod.CalPlayer } #endregion + #region PreItemChecks + public override bool PreItemCheck() + { + //For use when the player runs out of mana. Currently only used for Feather and Moonstone Crown + if (Player.HeldItem.mana > 0 && Player.controlUseItem && Player.itemAnimation == 0) + { + int manaCost = Player.GetManaCost(Player.HeldItem); + if (Player.statMana < manaCost) + { + if (moonCrown) + { + if (mageCrownCount > 0 && crownShatterTimer == 0) + { + mageCrownCount = -5; + mageCrownTimer = 300; + crownShatterTimer = 45; + } + if (mageCrownCount < 0) mageCrownCount = 0; + } + } + } + return true; + } + #endregion + #region PostUpdateEquips public override void PostUpdateEquips() { @@ -6194,7 +6223,7 @@ namespace CalamityMod.CalPlayer life.noGravity = true; } } - + if (modPlayer.fleshTotem) { if (Main.myPlayer == Player.whoAmI) @@ -6207,20 +6236,6 @@ namespace CalamityMod.CalPlayer } } } - //For when the player runs out of mana - if (Player.statMana <= manaConsumed || Player.statMana <= 6) - { - if (moonCrown && mageCrownCount > 0) - { - SoundStyle fire = new("CalamityMod/Sounds/Item/CursedDaggerThrow"); - SoundEngine.PlaySound(fire with { Volume = 0.9f, Pitch = 0.9f, PitchVariance = 0.2f, MaxInstances = -1 }, Player.Center); - mageCrownCount -= 5; - if (mageCrownCount < 0) - { - mageCrownCount = 0; - } - } - } } #endregion diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 648543a232..1c44b9825b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2088,22 +2088,26 @@ namespace CalamityMod.CalPlayer } if (moonCrown) { - int SpawnTimer = 120; int MaxSigils = 9; //Starts at 0, so cap is 10 - if (mageCrownTimer >= SpawnTimer) + if (mageCrownTimer == 0) { if (mageCrownCount <= MaxSigils) { - Main.NewText(mageCrownCount); + SoundEngine.PlaySound(SoundID.Item20, Player.Center); mageCrownCount += 1; float start = 360f / mageCrownCount; Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); } - mageCrownTimer = 0; + mageCrownTimer = 120; } else if (!Player.dead) { - mageCrownTimer++; + mageCrownTimer--; + if (crownShatterTimer > 0) + { + crownShatterTimer--; + } +; } } diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index d45858ad40..99f81602ac 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1187,10 +1187,14 @@ namespace CalamityMod.CalPlayer } if (magic) { - if (moonCrown && mageCrownCount >= 10) + if (moonCrown && mageCrownCount == 10) { target.AddBuff(BuffType(), 360); } + if(featherCrown && mageCrownCount == 5) + { + target.AddBuff(BuffID.Frostburn, 180); + } } if (summon) { @@ -1200,6 +1204,7 @@ namespace CalamityMod.CalPlayer if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)) { target.AddBuff(BuffType(), 600); + } else if (pSoulArtifact) target.AddBuff(BuffType(), 300); diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index e940d508c5..334d2f6315 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -37,7 +37,6 @@ namespace CalamityMod.Items.Accessories player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per feather, up to 5% if (modPlayer.mageCrownCount == 5) { - player.manaCost -= 0.05f; player.GetCritChance() += 5; } } diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index 5222cdea01..5685935916 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -1,9 +1,6 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.CalPlayer; -using CalamityMod.Cooldowns; +using CalamityMod.CalPlayer; using CalamityMod.Projectiles.Magic; using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -36,10 +33,6 @@ namespace CalamityMod.Items.Accessories if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); - if (player.FindBuffIndex(ModContent.BuffType()) == -1) - { - player.AddBuff(ModContent.BuffType(), 3600, true); - } if (player.ownedProjectileCounts[ModContent.ProjectileType()] < 1) { int damage = (int)player.GetTotalDamage().ApplyTo(lostSoulDamage); diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 035395144d..9445a14380 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Accessories { player.manaRegenBonus += 10; } - if (modPlayer.mageCrownCount == 9) + if (modPlayer.mageCrownCount == 10) //I don't know why it's like this { player.GetCritChance() += 10; } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 787b1cf861..3a9852bc9d 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -626,10 +626,11 @@ namespace CalamityMod.Items //Mana Potion interactions if (item.healMana > 0) { - //If mana potion used, kill - if (modPlayer.moonCrown || modPlayer.featherCrown) + //If mana potion used, kill all active Crown projectiles + if ((modPlayer.moonCrown || modPlayer.featherCrown) && modPlayer.mageCrownCount > 0) { - //modPlayer.mageCrownCount = 0; + modPlayer.mageCrownTimer = 300; + modPlayer.mageCrownCount = 0; } } @@ -1541,7 +1542,7 @@ namespace CalamityMod.Items return false; } - #endregion + #endregion #region On Create private static int cachedForgeID = -1; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b79acfb13e..8987298478 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -769,8 +769,10 @@ FeatherCrown: { DisplayName: Feather Crown Tooltip: ''' - 15% increased rogue projectile velocity - Stealth strikes cause feathers to fall from the sky on enemy hits + Summons a Skyline Feather every 2 seconds, up to a maximum of 5 + Each Skyline Feather increases magic damage by 2% and decreases mana cost by 1% + With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict Frostburn + Running out of mana sheds 3 feathers, drinking a mana potion sheds all feathers ''' } @@ -798,7 +800,7 @@ FleshTotem: { ''' 5% increased magic critical strike chance +30 max mana - Summons an effigy above your head that stores mana as you use it + Summons an effigy above your head that stores mana as you use it, up to 600 mana The effigy occasionally pulses, restoring 30 mana Pulses appear more frequently the more mana is stored Upon being struck, the effigy unleashes all stored up mana as vengeful souls that chase your enemies @@ -1150,9 +1152,9 @@ MoonstoneCrown: { +70 max mana Summons a Lunar Sigil every 2 seconds, up to a maximum of 10 Each Lunar Sigil increases magic damage by 2% and reduces mana cost by 1% - Having 5 sigils increases mana regeneration by +5 MP/s - Having 10 sigils increases magic critical strike chance by 10% and all magic attacks inflict Nightwither - Running out of mana removes 5 sigils + With 5 sigils, increases mana regeneration by +5 MP/s + With 10 sigils, increases magic critical strike chance by 10% and all magic attacks inflict Nightwither + Running out of mana shatters 5 sigils, drinking a mana potion shatters all sigils ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index b15d3e716e..460f796ac8 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -291,3 +291,4 @@ YharimsCrystalPrism.DisplayName: Yermes Christal FleshTotemMinion.DisplayName: Flesh Totem Minion FleshTotemSoul.DisplayName: Flesh Totem Soul SpectralFeather.DisplayName: Spectral Feather +MoonSigil.DisplayName: Moon Sigil diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index d14ff208af..2b9cc5c063 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -176,7 +176,6 @@ MetalShard.DisplayName: Metal Shard MeteorFistProj.DisplayName: Meteor Fist Gud For A Lot Of Shtuff MeteorFistMeteorite.DisplayName: Meteorite REALLY Gud For A Lot Of Shtuff MoltenAmputatorProj.DisplayName: Molten Amputator -MoonSigil.DisplayName: Moon Sigil MycorootProj.DisplayName: Mycoroot MythrilKnifeProjectile.DisplayName: Mythril Knife NanoblackMain.DisplayName: Nanoblack Reaper diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 2425fef8d8..f90b528002 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4054,20 +4054,6 @@ namespace CalamityMod.Projectiles } } } - else if (modPlayer.moonCrown) - { - if (Main.player[projectile.owner].miscCounter % 120 == 0 && projectile.FinalExtraUpdate()) - { - if (projectile.owner == Main.myPlayer && player.ownedProjectileCounts[ProjectileType()] < 5) - { - int damage = (int)player.GetTotalDamage().ApplyTo(42); - - int proj = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, 0f, projectile.owner); - if (proj.WithinBounds(Main.maxProjectiles)) - Main.projectile[proj].DamageType = DamageClass.Generic; - } - } - } if (modPlayer.dragonScales) { diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 106579d284..add718b0bc 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -11,6 +11,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -21,6 +22,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public int pulseTimer = 0; + public Player Owner => Main.player[Projectile.owner]; + public bool visuals => Owner.Calamity().fleshTotemVisual; // Enables/disables visuals and sounds based on accessory visibility public override void SetDefaults() { Projectile.width = 30; @@ -40,11 +43,13 @@ namespace CalamityMod.Projectiles.Magic bool isActive = Projectile.type == ModContent.ProjectileType(); Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); + //If the player takes off the accessory, kill the projectile if (!modPlayer.fleshTotemMinion) { Projectile.active = false; return; } + //Constantly ensure the projectile stays activem unless the player dies if (isActive) { if (player.dead) @@ -57,7 +62,9 @@ namespace CalamityMod.Projectiles.Magic } } Lighting.AddLight(Projectile.Center, 0f, 0.25f, 1.5f); + //The totem hovers above the player's head... Projectile.Center = player.Center + Vector2.UnitY * (player.gfxOffY - 85f); + //Unless gravity is flipped, in which case it's below the player and flipped if (player.gravDir == -1f) { Projectile.position.Y += 170f; @@ -67,38 +74,43 @@ namespace CalamityMod.Projectiles.Magic { Projectile.rotation = 0f; } + //Pulses happen every 6 seconds, divided by how much mana the totem has stored int pulseMax = 360; pulseMax = 360 - (modPlayer.fleshTotemManaStorage / 2); - + //Ensure the pulse timer can never go below 1 second if (pulseMax < 60) { pulseMax = 60; } + //When the timer reaches max, pulse and restore 30 mana if (pulseTimer >= pulseMax) { //Main.NewText(pulseMax); - SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound, Projectile.Center); - for (int k = 0; k < 30; k++) + if (visuals) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.IceTorch, new Vector2(9, 9).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.5f, 0.8f), 0, Color.LightSkyBlue, Main.rand.NextFloat(1.2f, 1.4f)); - dust.noGravity = true; - dust.alpha = Main.rand.Next(70, 90 + 1); - } - if (modPlayer.fleshTotemManaStorage == 600) - { - int Dusts = 8; - float radians = MathHelper.TwoPi / Dusts; - Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f)); - for (int i = 0; i < Dusts; i++) + SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound, Projectile.Center); + for (int k = 0; k < 30; k++) { - Vector2 dustVelocity = spinningPoint.RotatedBy(radians * i) * 12.5f; - GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center, dustVelocity * 0.7f, false, 12, 0.009f, Color.Cyan, new Vector2(3.5f, 1.3f), true); - GeneralParticleHandler.SpawnParticle(spark); - - Dust dust = Dust.NewDustPerfect(Projectile.Center, 59, dustVelocity.RotatedBy(MathHelper.ToRadians(22.5f)), 0, default, 0.9f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.IceTorch, new Vector2(9, 9).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.5f, 0.8f), 0, Color.LightSkyBlue, Main.rand.NextFloat(1.2f, 1.4f)); dust.noGravity = true; - Dust dust2 = Dust.NewDustPerfect(Projectile.Center, 59, dustVelocity.RotatedBy(MathHelper.ToRadians(22.5f)) * 0.4f, 0, default, 1.2f); - dust2.noGravity = true; + dust.alpha = Main.rand.Next(70, 90 + 1); + } + if (modPlayer.fleshTotemManaStorage == 600) + { + int Dusts = 8; + float radians = MathHelper.TwoPi / Dusts; + Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f)); + for (int i = 0; i < Dusts; i++) + { + Vector2 dustVelocity = spinningPoint.RotatedBy(radians * i) * 12.5f; + GlowSparkParticle spark = new GlowSparkParticle(Projectile.Center, dustVelocity * 0.7f, false, 12, 0.009f, Color.Cyan, new Vector2(3.5f, 1.3f), true); + GeneralParticleHandler.SpawnParticle(spark); + + Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.BlueTorch, dustVelocity.RotatedBy(MathHelper.ToRadians(22.5f)), 0, default, 0.9f); + dust.noGravity = true; + Dust dust2 = Dust.NewDustPerfect(Projectile.Center, DustID.BlueTorch, dustVelocity.RotatedBy(MathHelper.ToRadians(22.5f)) * 0.4f, 0, default, 1.2f); + dust2.noGravity = true; + } } } int manaGained = 30; @@ -112,6 +124,14 @@ namespace CalamityMod.Projectiles.Magic } pulseTimer++; } + //Set the player's mana storage to 0 when equipping the accessory + public override void OnSpawn(IEntitySource source) + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.fleshTotemManaStorage = 0; + + } public override bool PreDraw(ref Color lightColor) { Player player = Main.player[Projectile.owner]; @@ -122,25 +142,29 @@ namespace CalamityMod.Projectiles.Magic Vector2 drawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -67f; Vector2 origin = texture.Size() * 0.5f; - float fade = Utils.GetLerpValue(0, modPlayer.fleshTotemManaStorage, FleshTotem.manaStorageMax, true); - for (int i = 0; i < 10; i++) + if (visuals) { - Main.spriteBatch.Draw(texture, drawPosition + Vector2.UnitY * -1.5f, null, Color.Cyan with { A = 0 } * fade, Projectile.rotation, origin, Projectile.scale * (Main.rand.NextFloat(0.0016f, 0.002f) * modPlayer.fleshTotemManaStorage), SpriteEffects.None, 0f); + float fade = Utils.GetLerpValue(0, modPlayer.fleshTotemManaStorage, FleshTotem.manaStorageMax, true); + for (int i = 0; i < 10; i++) + { + Main.spriteBatch.Draw(texture, drawPosition + Vector2.UnitY * -1.5f, null, Color.Cyan with { A = 0 } * fade, Projectile.rotation, origin, Projectile.scale * (Main.rand.NextFloat(0.0016f, 0.002f) * modPlayer.fleshTotemManaStorage), SpriteEffects.None, 0f); + } + for (int i = 0; i < 1; i++) + { + int dustType = Main.rand.NextBool() ? 66 : 247; + float rotMulti = Main.rand.NextFloat(0.3f, 1f); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Vector2.UnitY / 75f, dustType); + dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (modPlayer.fleshTotemManaStorage * 0.0009f) - rotMulti * 0.1f; + dust.noGravity = true; + dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (modPlayer.fleshTotemManaStorage * 0.0009f); + dust.alpha = 1; + dust.color = Color.Cyan; + } + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); + //When at max, draw glowing eyes on the totem + if (modPlayer.fleshTotemManaStorage == 600) + Main.EntitySpriteDraw(totemEyes, eyesDrawPosition + Vector2.UnitX * -2f, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); } - for (int i = 0; i < 1; i++) - { - int dustType = Main.rand.NextBool() ? 66 : 247; - float rotMulti = Main.rand.NextFloat(0.3f, 1f); - Dust dust = Dust.NewDustPerfect(Projectile.Center + Vector2.UnitY / 75f, dustType); - dust.scale = Main.rand.NextFloat(1.2f, 1.8f) * (modPlayer.fleshTotemManaStorage * 0.0009f) - rotMulti * 0.1f; - dust.noGravity = true; - dust.velocity = new Vector2(0, -2).RotatedByRandom(rotMulti * 0.3f) * (Main.rand.NextFloat(1f, 3.2f) - rotMulti) * (modPlayer.fleshTotemManaStorage * 0.0009f); - dust.alpha = 1; - dust.color = Color.Cyan; - } - Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); - if (modPlayer.fleshTotemManaStorage == 600) - Main.EntitySpriteDraw(totemEyes, eyesDrawPosition + Vector2.UnitX * -2f, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; } public override bool? CanDamage() => false; diff --git a/Projectiles/Magic/FleshTotemSoul.cs b/Projectiles/Magic/FleshTotemSoul.cs index 7bcb48165f..32582c64aa 100644 --- a/Projectiles/Magic/FleshTotemSoul.cs +++ b/Projectiles/Magic/FleshTotemSoul.cs @@ -2,12 +2,9 @@ using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; - using Terraria.ID; using Terraria.ModLoader; -using static CalamityMod.Systems.LavaRenderingSystem; namespace CalamityMod.Projectiles.Magic { diff --git a/Projectiles/Rogue/MoonSigil.cs b/Projectiles/Magic/MoonSigil.cs similarity index 72% rename from Projectiles/Rogue/MoonSigil.cs rename to Projectiles/Magic/MoonSigil.cs index 902caf23e5..df3a4103aa 100644 --- a/Projectiles/Rogue/MoonSigil.cs +++ b/Projectiles/Magic/MoonSigil.cs @@ -1,24 +1,27 @@ using System; using System.Collections.Generic; using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Rogue +namespace CalamityMod.Projectiles.Mage { public class MoonSigil : ModProjectile, ILocalizedModType { - public new string LocalizationCategory => "Projectiles.Rogue"; + public new string LocalizationCategory => "Projectiles.Mage"; public override void SetDefaults() { Projectile.width = 20; Projectile.height = 20; Projectile.scale = 0.9f; Projectile.friendly = true; - Projectile.penetrate = -1; Projectile.ignoreWater = true; Projectile.timeLeft = 18000; Projectile.penetrate = -1; @@ -33,7 +36,6 @@ namespace CalamityMod.Projectiles.Rogue CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.moonCrown) { - Projectile.active = false; modPlayer.mageCrownCount = 0; return; } @@ -81,7 +83,6 @@ namespace CalamityMod.Projectiles.Rogue if (!Projectile.FinalExtraUpdate()) return; - // Give off some light float lightScalar = Main.rand.NextFloat(0.9f, 1.1f) * Main.essScale; Lighting.AddLight(Projectile.Center, 0.3f * lightScalar, 0.26f * lightScalar, 0.15f * lightScalar); @@ -99,9 +100,27 @@ namespace CalamityMod.Projectiles.Rogue Projectile.spriteDirection = Projectile.direction; } + public override void OnSpawn(IEntitySource source) + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (modPlayer.mageCrownCount == 10) + { + SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact with { Volume = 1.3f }, player.Center); + } + + } public override void OnKill(int timeLeft) { - float dustSp = 0.2f; + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + //Ensures the breaking sound doesn't play when the player removes the accessory + if (modPlayer.moonCrown) + { + SoundEngine.PlaySound(SoundID.DeerclopsIceAttack with { Volume = 0.4f, Pitch = 0.3f, MaxInstances = 1 }, player.Center); + SoundEngine.PlaySound(Exoblade.BeamHitSound with { MaxInstances = 1 }, player.Center); + } + float dustSp = 0.9f; int dustD = 0; for (int i = 0; i < 4; i++) { @@ -112,10 +131,25 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[d].noGravity = true; Main.dust[d].position = Projectile.Center; Main.dust[d].velocity = dustspeed; - dustSp += 0.2f; } dustD += 90; - dustSp = 0.2f; + } + for (int i = 0; i < 4; i++) + { + Color colorAccent = Main.rand.NextBool() ? Color.PaleTurquoise : Color.SeaGreen; + + Dust shatter = Dust.NewDustPerfect(Projectile.Center, DustID.PortalBoltTrail); + shatter.velocity = Main.rand.NextVector2Circular(4.6f, 4.6f) + Projectile.velocity * 0.5f; + shatter.color = Color.Lerp(Color.Turquoise, colorAccent, Main.rand.NextFloat(0.23f)); + shatter.scale *= 1.1f; + shatter.fadeIn = 0.75f; + shatter.noGravity = true; + } + int shardsplash = 0; + while (shardsplash < 4) + { + GeneralParticleHandler.SpawnParticle(new PointParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Projectile.ai[0] == 0.6f ? 0.8f : 0.6f, Projectile.ai[0] == 1 ? Color.Turquoise : Color.LightSeaGreen, true, false)); + shardsplash += 1; } } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) @@ -133,7 +167,7 @@ namespace CalamityMod.Projectiles.Rogue CalamityPlayer modPlayer = player.Calamity(); if (modPlayer.mageCrownCount >= 10) { - for (int i = 0; i < 6; i++) + for (int i = 0; i < 4; i++) { Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, (Color.Teal * 0.5f) with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 1.1f, SpriteEffects.None, 0f); } diff --git a/Projectiles/Rogue/MoonSigil.png b/Projectiles/Magic/MoonSigil.png similarity index 100% rename from Projectiles/Rogue/MoonSigil.png rename to Projectiles/Magic/MoonSigil.png diff --git a/Projectiles/Magic/SpectralFeather.cs b/Projectiles/Magic/SpectralFeather.cs index b17ceba93f..69b0d472d4 100644 --- a/Projectiles/Magic/SpectralFeather.cs +++ b/Projectiles/Magic/SpectralFeather.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Projectiles.Magic CalamityPlayer modPlayer = player.Calamity(); if (!modPlayer.featherCrown) { - Projectile.active = false; modPlayer.mageCrownTimer = 0; modPlayer.mageCrownCount = 0; return; From 00e4dcf03313fc65617d0fe9a08751edc7d3dbb6 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 9 Feb 2026 19:28:09 -0800 Subject: [PATCH 07/78] oops --- CalPlayer/CalamityPlayerMiscEffects.cs | 1 + Projectiles/Magic/FleshTotemMinion.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index b317b3fac5..37436c3066 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -55,6 +55,7 @@ using CalamityMod.NPCs.PlagueEnemies; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Packets; using CalamityMod.Particles; +using CalamityMod.Projectiles.Mage; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Pets; diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index add718b0bc..5263aff461 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -142,6 +142,8 @@ namespace CalamityMod.Projectiles.Magic Vector2 drawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -67f; Vector2 origin = texture.Size() * 0.5f; + + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor) * (visuals ? 1f : 0.5f), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); if (visuals) { float fade = Utils.GetLerpValue(0, modPlayer.fleshTotemManaStorage, FleshTotem.manaStorageMax, true); From 493791c23b2df130cb315f3f69c01b4d8fa0c828 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 9 Feb 2026 23:11:40 -0800 Subject: [PATCH 08/78] accessory visuals --- CalPlayer/CalamityPlayerHitHurt.cs | 6 ++++-- CalPlayer/CalamityPlayerMiscEffects.cs | 1 - Items/Accessories/FleshTotem.cs | 1 + Projectiles/Magic/FleshTotemMinion.cs | 8 ++++---- Projectiles/Magic/FleshTotemSoul.cs | 21 +++++++++++++-------- Projectiles/Magic/MoonSigil.cs | 4 ++-- 6 files changed, 24 insertions(+), 17 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 431d44547b..00e47e524d 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -60,6 +60,7 @@ using Terraria.Localization; using Terraria.ModLoader; using CalamityMod.Projectiles.Melee; using CalamityMod.Items.Tools; +using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses.BrainOfCthulhu; namespace CalamityMod.CalPlayer { @@ -2353,8 +2354,9 @@ namespace CalamityMod.CalPlayer if (fleshTotem && hurtInfo.Damage > 0) { - if (fleshTotemManaStorage >= 100) - SoundEngine.PlaySound(BloodflareHeadRanged.ActivationSound, Player.Center); + SoundStyle Counter = new SoundStyle("CalamityMod/Sounds/Custom/BrainOfCthulhu/BoC_Rev_Shield_Down"); + if (fleshTotemManaStorage >= 100 && fleshTotemVisual) + SoundEngine.PlaySound(Counter with { Volume = 0.75f}, Player.Center); int lostSoulAmount = fleshTotemManaStorage / 25; if (Player.ownedProjectileCounts[ModContent.ProjectileType()] != 0) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 37436c3066..b317b3fac5 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -55,7 +55,6 @@ using CalamityMod.NPCs.PlagueEnemies; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Packets; using CalamityMod.Particles; -using CalamityMod.Projectiles.Mage; using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Melee; using CalamityMod.Projectiles.Pets; diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index 5685935916..0d19323f73 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -28,6 +28,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.fleshTotem = true; modPlayer.fleshTotemMinion = true; + modPlayer.fleshTotemVisual = !hideVisual; player.statManaMax2 += 30; player.GetCritChance() += 5; if (player.whoAmI == Main.myPlayer) diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 5263aff461..0b9af6471a 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.Magic //Main.NewText(pulseMax); if (visuals) { - SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound, Projectile.Center); + SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound with { Volume = 0.65f }, Projectile.Center); for (int k = 0; k < 30; k++) { Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.IceTorch, new Vector2(9, 9).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(0.5f, 0.8f), 0, Color.LightSkyBlue, Main.rand.NextFloat(1.2f, 1.4f)); @@ -163,10 +163,10 @@ namespace CalamityMod.Projectiles.Magic dust.color = Color.Cyan; } Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); - //When at max, draw glowing eyes on the totem - if (modPlayer.fleshTotemManaStorage == 600) - Main.EntitySpriteDraw(totemEyes, eyesDrawPosition + Vector2.UnitX * -2f, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); } + //When at max, draw glowing eyes on the totem + if (modPlayer.fleshTotemManaStorage == 600) + Main.EntitySpriteDraw(totemEyes, eyesDrawPosition + Vector2.UnitX * -2f, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); return false; } public override bool? CanDamage() => false; diff --git a/Projectiles/Magic/FleshTotemSoul.cs b/Projectiles/Magic/FleshTotemSoul.cs index 32582c64aa..5efaa323c3 100644 --- a/Projectiles/Magic/FleshTotemSoul.cs +++ b/Projectiles/Magic/FleshTotemSoul.cs @@ -14,6 +14,8 @@ namespace CalamityMod.Projectiles.Magic public override string Texture => "CalamityMod/Projectiles/Rogue/PhantasmalSoulBlue"; public ref float Time => ref Projectile.ai[0]; public float dustRotation = 0; + public Player Owner => Main.player[Projectile.owner]; + public bool visuals => Owner.Calamity().fleshTotemVisual; // Enables/disables visuals and sounds based on accessory visibility public override void SetStaticDefaults() { @@ -53,18 +55,18 @@ namespace CalamityMod.Projectiles.Magic float squash = Utils.GetLerpValue(1, 3, Projectile.velocity.Length(), true); if (squash > 0.15f) { - Particle fadeInfx = new CustomSpark(Projectile.Center, Projectile.velocity * 0.01f, "CalamityMod/Particles/BloomCircle", false, 15, 0.5f * Projectile.scale, Color.SkyBlue * 0.4f * squash, new Vector2(1 - 0.15f * squash, 1f), true, false, shrinkSpeed: 0.3f * squash); + Particle fadeInfx = new CustomSpark(Projectile.Center, Projectile.velocity * 0.01f, "CalamityMod/Particles/BloomCircle", false, 15, 0.5f * Projectile.scale, Color.SkyBlue * 0.4f * squash, new Vector2(1 - 0.15f * squash, 1f), true, false, shrinkSpeed: 0.1f * squash); GeneralParticleHandler.SpawnParticle(fadeInfx); } Particle smoke = new HeavySmokeParticle(Projectile.Center, Projectile.velocity * Main.rand.NextFloat(-0.2f, -0.6f), Color.SkyBlue, 3, Main.rand.NextFloat(0.25f, 0.3f), 1f, Main.rand.NextFloat(-0.2f, 0.2f), false); GeneralParticleHandler.SpawnParticle(smoke); - if (Time > 5) + if (Time > 5 && visuals) { for (int i = 0; i < 3; i++) { dustRotation += 0.12f; Vector2 dustPos = Projectile.Center + (MathHelper.Pi + dustRotation + MathHelper.PiOver2).ToRotationVector2() * 10f * Projectile.scale; - Dust dust = Dust.NewDustPerfect(dustPos, 175, (MathHelper.Pi + dustRotation * Math.Sign(Projectile.velocity.Length())).ToRotationVector2() * 2); + Dust dust = Dust.NewDustPerfect(dustPos, DustID.SpectreStaff, (MathHelper.Pi + dustRotation * Math.Sign(Projectile.velocity.Length())).ToRotationVector2() * 2); dust.noGravity = false; dust.scale = Main.rand.NextFloat(0.75f, 1.2f); dust.alpha = Main.rand.Next(100, 170 + 1); @@ -91,12 +93,15 @@ namespace CalamityMod.Projectiles.Magic public override void OnKill(int timeLeft) { - for (int i = 0; i < 2; i++) + if (visuals) { - Vector2 sparkVel = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedByRandom(MathHelper.ToRadians(24f)) * Main.rand.NextFloat(6f, 10f); - Color color = Main.hslToRgb(Main.rand.NextFloat(0.3f, 0.5f), 1f, 0.8f); - SparkParticle spark = new(Projectile.Center, sparkVel, false, 30, 1.3f, color); - GeneralParticleHandler.SpawnParticle(spark); + for (int i = 0; i < 2; i++) + { + Vector2 sparkVel = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedByRandom(MathHelper.ToRadians(24f)) * Main.rand.NextFloat(6f, 10f); + Color color = Main.hslToRgb(Main.rand.NextFloat(0.3f, 0.5f), 1f, 0.8f); + SparkParticle spark = new(Projectile.Center, sparkVel, false, 30, 1.3f, color); + GeneralParticleHandler.SpawnParticle(spark); + } } } } diff --git a/Projectiles/Magic/MoonSigil.cs b/Projectiles/Magic/MoonSigil.cs index df3a4103aa..baf115d44b 100644 --- a/Projectiles/Magic/MoonSigil.cs +++ b/Projectiles/Magic/MoonSigil.cs @@ -11,11 +11,11 @@ using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Mage +namespace CalamityMod.Projectiles.Magic { public class MoonSigil : ModProjectile, ILocalizedModType { - public new string LocalizationCategory => "Projectiles.Mage"; + public new string LocalizationCategory => "Projectiles.Magic"; public override void SetDefaults() { Projectile.width = 20; From 1b57c3b050b3392a91a718b49b061799e1c5091f Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 23 Feb 2026 14:02:10 -0800 Subject: [PATCH 09/78] Visibility toggles and sound polish --- CalPlayer/CalamityPlayer.cs | 11 +++---- CalPlayer/CalamityPlayerMiscEffects.cs | 16 +++------ CalPlayer/CalamityPlayerOnHit.cs | 2 +- Items/Accessories/FeatherCrown.cs | 1 + Items/Accessories/MoonstoneCrown.cs | 1 + .../Mods.CalamityMod.Items.Accessories.hjson | 20 ++++++----- Projectiles/Magic/MoonSigil.cs | 27 +++++---------- Projectiles/Magic/SpectralFeather.cs | 33 +++++++++++++++++-- 8 files changed, 62 insertions(+), 49 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 32eced86b8..7942c3e49b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1095,9 +1095,9 @@ namespace CalamityMod.CalPlayer public bool eclipseMirror = false; public bool featherCrown = false; public bool moonCrown = false; + public bool mageCrownVisibility = false; public int mageCrownTimer = 0; public int mageCrownCount = 0; - public int crownShatterTimer = 0; public bool dragonScales = false; public bool gloveOfPrecision = false; public bool gloveOfRecklessness = false; @@ -2631,6 +2631,7 @@ namespace CalamityMod.CalPlayer eclipseMirror = false; featherCrown = false; moonCrown = false; + mageCrownVisibility = false; dragonScales = false; gloveOfPrecision = false; gloveOfRecklessness = false; @@ -3125,7 +3126,6 @@ namespace CalamityMod.CalPlayer theBeeCooldown = 0; scuttlerCooldown = 0; mageCrownTimer = 0; - crownShatterTimer = 0; wingProjectileCooldown = 0; hallowedRuneCooldown = 0; sulphurBubbleCooldown = 0; @@ -4855,13 +4855,12 @@ namespace CalamityMod.CalPlayer int manaCost = Player.GetManaCost(Player.HeldItem); if (Player.statMana < manaCost) { - if (moonCrown) + if (moonCrown || featherCrown) { - if (mageCrownCount > 0 && crownShatterTimer == 0) + if (mageCrownCount > 0) { - mageCrownCount = -5; + mageCrownCount = 0; mageCrownTimer = 300; - crownShatterTimer = 45; } if (mageCrownCount < 0) mageCrownCount = 0; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ee7799ea16..459c931b63 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2072,32 +2072,29 @@ namespace CalamityMod.CalPlayer } if (featherCrown && !moonCrown) { - int SpawnTimer = 120; int MaxSigils = 4; - if (mageCrownTimer >= SpawnTimer) + if (mageCrownTimer == 0) { if (mageCrownCount <= MaxSigils) { - Main.NewText(mageCrownCount); mageCrownCount += 1; float start = 360f / mageCrownCount; Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); } - mageCrownTimer = 0; + mageCrownTimer = 120; } else if (!Player.dead) { - mageCrownTimer++; + mageCrownTimer--; } } - if (moonCrown) + if (moonCrown && !featherCrown ) { int MaxSigils = 9; //Starts at 0, so cap is 10 if (mageCrownTimer == 0) { if (mageCrownCount <= MaxSigils) { - SoundEngine.PlaySound(SoundID.Item20, Player.Center); mageCrownCount += 1; float start = 360f / mageCrownCount; Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); @@ -2107,11 +2104,6 @@ namespace CalamityMod.CalPlayer else if (!Player.dead) { mageCrownTimer--; - if (crownShatterTimer > 0) - { - crownShatterTimer--; - } -; } } diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 2d58819db4..5e20890ef0 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1193,7 +1193,7 @@ namespace CalamityMod.CalPlayer } if(featherCrown && mageCrownCount == 5) { - target.AddBuff(BuffID.Frostburn, 180); + target.AddBuff(BuffType(), 120); } } if (summon) diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 334d2f6315..2a8407fa50 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.featherCrown = true; + modPlayer.mageCrownVisibility = !hideVisual; player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per feather, up to 10% player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per feather, up to 5% if (modPlayer.mageCrownCount == 5) diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 9445a14380..746ced0de4 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.moonCrown = true; + modPlayer.mageCrownVisibility = !hideVisual; player.statManaMax2 += 70; player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per moon sigil, up to 20% player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per moon sigil, up to 10% diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 99d4affdb6..7cce48f53f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -744,10 +744,11 @@ FeatherCrown: { DisplayName: Feather Crown Tooltip: ''' - Summons a Skyline Feather every 2 seconds, up to a maximum of 5 - Each Skyline Feather increases magic damage by 2% and decreases mana cost by 1% - With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict Frostburn - Running out of mana sheds 3 feathers, drinking a mana potion sheds all feathers + Summons a [c/81B7F7:Skyline Feather] every 2 seconds, up to a maximum of 5 + Each [c/81B7F7:Skyline Feather] increases magic damage by 2% and decreases mana cost by 1% + With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict Static Discharge + Running out of mana or drinking a mana potion sheds all feathers + Upon shedding a feather, no new feathers can be gained for 5 seconds ''' } @@ -1125,11 +1126,12 @@ MoonstoneCrown: { Tooltip: ''' +70 max mana - Summons a Lunar Sigil every 2 seconds, up to a maximum of 10 - Each Lunar Sigil increases magic damage by 2% and reduces mana cost by 1% - With 5 sigils, increases mana regeneration by +5 MP/s - With 10 sigils, increases magic critical strike chance by 10% and all magic attacks inflict Nightwither - Running out of mana shatters 5 sigils, drinking a mana potion shatters all sigils + Summons a [c/27F5E0:Lunar Sigil] every 2 seconds, up to a maximum of 10 + Each [c/27F5E0:Lunar Sigil] increases magic damage by 2% and reduces mana cost by 1% + [c/8CBEFF: With 5 sigils, increases mana regeneration by +5 MP/s] + [c/8CBEFF: With 10 sigils, increases magic critical strike chance by 10% and all magic attacks inflict Nightwither] + Running out of mana or using a mana potion shatters all sigils + Upon shattering a sigil, no new sigils can appear for 5 seconds ''' } diff --git a/Projectiles/Magic/MoonSigil.cs b/Projectiles/Magic/MoonSigil.cs index baf115d44b..562142360e 100644 --- a/Projectiles/Magic/MoonSigil.cs +++ b/Projectiles/Magic/MoonSigil.cs @@ -16,6 +16,8 @@ namespace CalamityMod.Projectiles.Magic public class MoonSigil : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; + public Player Owner => Main.player[Projectile.owner]; + public bool visuals => Owner.Calamity().mageCrownVisibility; // Enables/disables visuals and sounds based on accessory visibility public override void SetDefaults() { Projectile.width = 20; @@ -104,11 +106,14 @@ namespace CalamityMod.Projectiles.Magic { Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); + if (visuals) + { + SoundEngine.PlaySound(SoundID.Item8, player.Center); + } if (modPlayer.mageCrownCount == 10) { SoundEngine.PlaySound(SoundID.DD2_DarkMageHealImpact with { Volume = 1.3f }, player.Center); } - } public override void OnKill(int timeLeft) { @@ -165,30 +170,14 @@ namespace CalamityMod.Projectiles.Magic Texture2D texture = ModContent.Request(Texture).Value; Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.mageCrownCount >= 10) + if (modPlayer.mageCrownCount >= 10 && visuals) { for (int i = 0; i < 4; i++) { Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, (Color.Teal * 0.5f) with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 1.1f, SpriteEffects.None, 0f); } } - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); - Main.spriteBatch.Draw - ( - texture, - new Vector2 - ( - Projectile.position.X - Main.screenPosition.X + Projectile.width * 0.5f, - Projectile.position.Y - Main.screenPosition.Y + Projectile.height - 20 * 0.5f - ), - new Rectangle(0, 0, 20, 20), - Color.White, - Projectile.rotation, - new Vector2(10, 10), - Projectile.scale * 0.9f, - SpriteEffects.None, - 0f - ); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * (visuals ? 1f : 0.5f), Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); return false; } public override bool? CanDamage() => false; diff --git a/Projectiles/Magic/SpectralFeather.cs b/Projectiles/Magic/SpectralFeather.cs index 69b0d472d4..516e2a6350 100644 --- a/Projectiles/Magic/SpectralFeather.cs +++ b/Projectiles/Magic/SpectralFeather.cs @@ -1,9 +1,12 @@ using System; using System.Collections.Generic; using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -13,6 +16,8 @@ namespace CalamityMod.Projectiles.Magic { public new string LocalizationCategory => "Projectiles.Magic"; public override string Texture => "CalamityMod/Projectiles/Magic/StickyFeather"; + public Player Owner => Main.player[Projectile.owner]; + public bool visuals => Owner.Calamity().mageCrownVisibility; // Enables/disables visuals and sounds based on accessory visibility public override void SetDefaults() { Projectile.width = 10; @@ -100,6 +105,21 @@ namespace CalamityMod.Projectiles.Magic Projectile.spriteDirection = Projectile.direction; } + public override void OnSpawn(IEntitySource source) + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (visuals) + { + SoundEngine.PlaySound(SoundID.Item20, player.Center); + } + if (modPlayer.mageCrownCount == 5) + { + SoundStyle max = new("CalamityMod/Sounds/Item/AscendantOff"); + SoundEngine.PlaySound(max with { volume = 0.6f }, player.Center); + } + } + public override void OnKill(int timeLeft) { float dustSp = 0.2f; @@ -118,6 +138,15 @@ namespace CalamityMod.Projectiles.Magic dustD += 90; dustSp = 0.2f; } + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + //Ensures the breaking sound doesn't play when the player removes the accessory + if (modPlayer.featherCrown) + { + SoundEngine.PlaySound(SoundID.Item109); + SoundStyle aud = new("CalamityMod/Sounds/Item/MittFail"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) { @@ -132,14 +161,14 @@ namespace CalamityMod.Projectiles.Magic Texture2D texture = ModContent.Request(Texture).Value; Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); - if (modPlayer.mageCrownCount == 5) + if (modPlayer.mageCrownCount == 5 && visuals) { for (int i = 0; i < 6; i++) { Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, (Color.Teal * 0.5f) with { A = 0 }, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 1.01f, SpriteEffects.None, 0f); } } - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * (visuals ? 1f : 0.5f), Projectile.rotation, texture.Size() * 0.5f, Projectile.scale * 0.9f, SpriteEffects.None, 0); return false; } public override bool? CanDamage() => false; From 21d076bd3a30c1aba059a0fef733ac7ab8ba0b9d Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 8 Mar 2026 19:20:53 -0700 Subject: [PATCH 10/78] final touchups p1 --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Cooldowns/FleshTotem.png | Bin 441 -> 0 bytes Cooldowns/FleshTotemOutline.png | Bin 217 -> 0 bytes Cooldowns/FleshTotemOverlay.png | Bin 167 -> 0 bytes Cooldowns/FleshTotemStorage.cs | 20 --------------- Items/Accessories/FeatherCrown.cs | 2 +- Items/Accessories/MoonstoneCrown.cs | 4 +-- .../Mods.CalamityMod.Items.Accessories.hjson | 6 ++--- Projectiles/Magic/FleshTotemMinion.cs | 1 - Projectiles/Magic/MoonSigil.cs | 4 +-- Projectiles/Magic/SpectralFeather.cs | 24 +++++++++++++----- Sounds/Item/FeatherBreak.ogg | Bin 0 -> 31486 bytes 12 files changed, 26 insertions(+), 37 deletions(-) delete mode 100644 Cooldowns/FleshTotem.png delete mode 100644 Cooldowns/FleshTotemOutline.png delete mode 100644 Cooldowns/FleshTotemOverlay.png delete mode 100644 Cooldowns/FleshTotemStorage.cs create mode 100644 Sounds/Item/FeatherBreak.ogg diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4d00de783f..ece576441c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1997,7 +1997,7 @@ namespace CalamityMod.CalPlayer } if (featherCrown && !moonCrown) { - int MaxSigils = 4; + int MaxSigils = 4; //Starts at 0, so cap is 5 if (mageCrownTimer == 0) { if (mageCrownCount <= MaxSigils) diff --git a/Cooldowns/FleshTotem.png b/Cooldowns/FleshTotem.png deleted file mode 100644 index 02416e8b00ff475a65e2fe08c7eed91e471d35a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 441 zcmV;q0Y?6bP)Px$b4f%&R5*>blub(lQ51%s2@|c*Ni#E%Knx;63?j5_(W(|f(4uwQh!*{gKwR`M z`U4TIBFd;mP@5oW(FYbnj)Na%i)nG^mRD@&ysNoq-uK?;o;i%RkzE16n@9uDEM8i) zsV}ys0k}NV7C`G^zx_4dL|U_R!cULoB9cRtd0`_2)MRrCzFzO>1(@@I1DG@e8~x&8&f$@ZNR z^xHm}lX8ym=C%yLY%&DEbu9-#emvJTxENeka*h#d*|?ZP!zfz-W5WT(5ROEZ^?T`6 zS-(|20MPZ2Lvv^tq6fOqr`abeq@xqTu7tm2c24f&+*dYC(*jt?%mYxbHWg#tXaIjb zjZY;2xF}r7zmr2f>?}Oq7ZnnzL481w+T_yLsou}wOhAwfdAtDhyWId(%&PTo3K;hJ jHGuC{3xL{Z(;31ah81@(5rsj100000NkvXXu0mjf>o~l_ diff --git a/Cooldowns/FleshTotemOutline.png b/Cooldowns/FleshTotemOutline.png deleted file mode 100644 index 19a1f705ebc638bc679d761f71aead02976bc55b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|CVRR#hIn+I z4ZA4Rpuiy=`~UyxZvj>Jm@fKl+}rsi*T>*s^AsTt83E;UzrQ=Zdzz@?-)u6&JAKd2 z{V@k$8m?GyZO1BxY88hG>{_4CY!II|eW4tKMEbe=8z)t;&OFG%&%jdtY5DCZzD)uA zSNvoS{7;|QZoB!#Rd$}$`fIAs-}tp?s?77Aw0~8st!=Tv>u;<&v|)c2H*1BBcGR*% R*MZJs@O1TaS?83{1OUuxSy})9 diff --git a/Cooldowns/FleshTotemOverlay.png b/Cooldowns/FleshTotemOverlay.png deleted file mode 100644 index 7bb57aee7740a2aeaf41424eb67624576b9a0430..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1IgL{AsT5R2Zo zlMiw=81Oj9r~dzc`m0LDh7v7D{(YA{yv28^8VNhLYLu*H-XP+;U2=Ev(*>8d$|V%t zu$-ZK@WBW9A9Eb%w?x+b|4_hueeS;bPxgTe~DWM4f6vI9E diff --git a/Cooldowns/FleshTotemStorage.cs b/Cooldowns/FleshTotemStorage.cs deleted file mode 100644 index 1f5140dfaa..0000000000 --- a/Cooldowns/FleshTotemStorage.cs +++ /dev/null @@ -1,20 +0,0 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Items.Accessories; -using Microsoft.Xna.Framework; -using Terraria.Localization; - -namespace CalamityMod.Cooldowns -{ - public class FleshTotemStorage : CooldownHandler - { - public static new string ID => "FleshTotemStorage"; - - private CalamityPlayer CalPlayer => instance.player.Calamity(); - public override bool ShouldDisplay => CalPlayer.fleshTotem; - public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); - public override string Texture => "CalamityMod/Cooldowns/FleshTotem"; - public override Color OutlineColor => new Color(157, 248, 234); - public override Color CooldownStartColor => new Color(111, 169, 241); - public override Color CooldownEndColor => new Color(111, 169, 241); - } -} diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 2a8407fa50..1f04195026 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories modPlayer.mageCrownVisibility = !hideVisual; player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per feather, up to 10% player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per feather, up to 5% - if (modPlayer.mageCrownCount == 5) + if (modPlayer.mageCrownCount >= 5) //At 5 feathers, grant 5% crit. Static Discharge infliction is handed in CalPlayerOnHit { player.GetCritChance() += 5; } diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 746ced0de4..f2963a967d 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -37,11 +37,11 @@ namespace CalamityMod.Items.Accessories player.statManaMax2 += 70; player.GetDamage() += (0.02f * modPlayer.mageCrownCount); //2% per moon sigil, up to 20% player.manaCost -= (0.01f * modPlayer.mageCrownCount); //1% per moon sigil, up to 10% - if (modPlayer.mageCrownCount >= 4) //I know this looks weird but the count starts at 0 + if (modPlayer.mageCrownCount >= 5) //At 5 sigils, grant a mana regen bonus { player.manaRegenBonus += 10; } - if (modPlayer.mageCrownCount == 10) //I don't know why it's like this + if (modPlayer.mageCrownCount >= 10) //At 10 sigils, grant 10% crit. Nightwither infliction is handed in CalPlayerOnHit { player.GetCritChance() += 10; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index a973770e0c..1350a24497 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -757,7 +757,7 @@ FeatherCrown: { ''' Summons a [c/81B7F7:Skyline Feather] every 2 seconds, up to a maximum of 5 Each [c/81B7F7:Skyline Feather] increases magic damage by 2% and decreases mana cost by 1% - With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict Static Discharge + With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict [cbuff:CalamityMod/StaticDischarge] Running out of mana or drinking a mana potion sheds all feathers Upon shedding a feather, no new feathers can be gained for 5 seconds ''' @@ -1139,8 +1139,8 @@ MoonstoneCrown: { +70 max mana Summons a [c/27F5E0:Lunar Sigil] every 2 seconds, up to a maximum of 10 Each [c/27F5E0:Lunar Sigil] increases magic damage by 2% and reduces mana cost by 1% - [c/8CBEFF: With 5 sigils, increases mana regeneration by +5 MP/s] - [c/8CBEFF: With 10 sigils, increases magic critical strike chance by 10% and all magic attacks inflict Nightwither] + With 5 sigils, increases mana regeneration by +5 MP/s + With 10 sigils, increases magic critical strike chance by 10% and all magic attacks inflict [cbuff:CalamityMod/Nightwither] Running out of mana or using a mana potion shatters all sigils Upon shattering a sigil, no new sigils can appear for 5 seconds ''' diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 0b9af6471a..c9df910765 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 18000; Projectile.penetrate = -1; Projectile.tileCollide = false; - Projectile.timeLeft *= 5; Projectile.DamageType = DamageClass.Magic; } diff --git a/Projectiles/Magic/MoonSigil.cs b/Projectiles/Magic/MoonSigil.cs index 562142360e..60a6503f4d 100644 --- a/Projectiles/Magic/MoonSigil.cs +++ b/Projectiles/Magic/MoonSigil.cs @@ -55,10 +55,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation += MathHelper.ToRadians(1.3f); int cap = modPlayer.mageCrownCount; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; - if (excessCount > cap) + if (Owner.ownedProjectileCounts[Type] > cap) { Projectile.Kill(); + return; } int sigils = 0; int sigilAmt = 0; diff --git a/Projectiles/Magic/SpectralFeather.cs b/Projectiles/Magic/SpectralFeather.cs index 516e2a6350..1949f0703d 100644 --- a/Projectiles/Magic/SpectralFeather.cs +++ b/Projectiles/Magic/SpectralFeather.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using CalamityMod.CalPlayer; -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -24,7 +24,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.height = 10; Projectile.scale = 0.8f; Projectile.friendly = true; - Projectile.penetrate = -1; Projectile.ignoreWater = true; Projectile.timeLeft = 18000; Projectile.penetrate = -1; @@ -57,10 +56,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation += MathHelper.ToRadians(1.3f); int cap = modPlayer.mageCrownCount; - int excessCount = Main.player[Projectile.owner].ownedProjectileCounts[Type] - cap; - if (excessCount > cap) + if (Owner.ownedProjectileCounts[Type] > cap) { Projectile.Kill(); + return; } int feathers = 0; int featherAmt = 0; @@ -111,7 +110,7 @@ namespace CalamityMod.Projectiles.Magic CalamityPlayer modPlayer = player.Calamity(); if (visuals) { - SoundEngine.PlaySound(SoundID.Item20, player.Center); + SoundEngine.PlaySound(SoundID.Item20 with { volume = 0.6f }, player.Center); } if (modPlayer.mageCrownCount == 5) { @@ -138,14 +137,25 @@ namespace CalamityMod.Projectiles.Magic dustD += 90; dustSp = 0.2f; } + if (!Main.dedServ) + { + for (int i = 0; i < 4; i++) + { + Particle dust = new GlowOrbParticle(Projectile.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(2.5f, 3), false, 20, Main.rand.NextFloat(0.5f, 0.65f), Main.rand.NextBool(5) ? Color.AliceBlue : Color.DodgerBlue, true, false, false); + GeneralParticleHandler.SpawnParticle(dust); + } + } Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); //Ensures the breaking sound doesn't play when the player removes the accessory if (modPlayer.featherCrown) { - SoundEngine.PlaySound(SoundID.Item109); + SoundStyle f = new("CalamityMod/Sounds/Item/MeldShoot"); + SoundEngine.PlaySound(f with { Volume = 0.35f, Pitch = 0.95f }, Projectile.Center); SoundStyle aud = new("CalamityMod/Sounds/Item/MittFail"); - SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + SoundEngine.PlaySound(aud with { Volume = 0.6f, Pitch = 0 }, Projectile.Center); + SoundStyle shed = new("CalamityMod/Sounds/Item/FeatherBreak"); + SoundEngine.PlaySound(shed with { Volume = 1f, Pitch = 0 }, Projectile.Center); } } public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) diff --git a/Sounds/Item/FeatherBreak.ogg b/Sounds/Item/FeatherBreak.ogg new file mode 100644 index 0000000000000000000000000000000000000000..7f03b0062ea7a8a5406316acf3f545d1a52a6c0f GIT binary patch literal 31486 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 Date: Sun, 8 Mar 2026 19:26:42 -0700 Subject: [PATCH 11/78] i changed the polarizer tooltip for some reason --- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 1350a24497..53555e7661 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1104,7 +1104,7 @@ ManaPolarizer: { DisplayName: Mana Polarizer Tooltip: ''' - Increases maximum mana by 50 + Increases max mana by 50 Provides life regeneration and magic damage that scales based on how much mana you have Lower mana means more life regeneration, but less magic damage These scale from -2 to +2 HP/s, and 15% to 5% damage From 15fcf45ccf4ba0a59151aadf97cce967e9176a15 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 8 Mar 2026 19:55:14 -0700 Subject: [PATCH 12/78] Nanotech probably shouldn't use a mage accessory --- Items/Accessories/Nanotech.cs | 1 - Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 844359471b..270d1bbe1c 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -35,7 +35,6 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). - AddIngredient(). AddIngredient(). AddIngredient(4). AddTile(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 53555e7661..18f5310d14 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1151,7 +1151,7 @@ Nanotech: { Tooltip: ''' Rogue projectiles create nanoblades as they travel - Stealth strikes summon nanobeams and sparks on enemy hits + Stealth strikes summon sparks on enemy hits Stealth strikes have +15 armor penetration, deal 5% more damage, and heal for 2 HP 15% increased rogue damage and 15% increased rogue velocity Stealth strikes grant 10% critical strike chance to non-stealth strikes for 5 seconds From 790ae662db89a40670f587bcdd4831c380d361b2 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 8 Mar 2026 20:32:18 -0700 Subject: [PATCH 13/78] i knew this would happen --- CalPlayer/CalamityPlayerOnHit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 3d37a6278c..2d763e4ddf 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1182,7 +1182,7 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 120); } } - if (summon) + if (summon && !whip) { if (pSoulArtifact && !profanedCrystal) target.AddBuff(BuffType(), 300); From 8f0f3d9732ac61af1d5f25e7922ab559e72712cc Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 8 Mar 2026 21:04:46 -0700 Subject: [PATCH 14/78] Readded Nanotech flares --- CalPlayer/CalamityPlayer.cs | 2 ++ CalPlayer/CalamityPlayerMiscEffects.cs | 2 ++ CalPlayer/CalamityPlayerOnHit.cs | 15 +++++++++++++++ .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 9197d23b6d..948788c4c1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -948,6 +948,7 @@ namespace CalamityMod.CalPlayer public bool evolution = false; public bool procDodgeEffects = true; public bool nanotech = false; + public int nanotechHitCooldown = 0; public bool deadshotBrooch = false; public bool shadowMinions = false; public bool holyMinions = false; @@ -2412,6 +2413,7 @@ namespace CalamityMod.CalPlayer frostFlare = false; evolution = false; nanotech = false; + nanotechHitCooldown = 0; deadshotBrooch = false; tesla = false; teslaVisuals = true; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ece576441c..2a65a9eb1b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2219,6 +2219,8 @@ namespace CalamityMod.CalPlayer silvaMageCooldown--; if (scuttlerCooldown > 0) scuttlerCooldown--; + if (nanotechHitCooldown > 0) + nanotechHitCooldown--; if (spectralVeilImmunity > 0) spectralVeilImmunity--; if (jetPackDash > 0) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 2d763e4ddf..d3b1baf2f2 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1058,6 +1058,21 @@ namespace CalamityMod.CalPlayer break; } } + if (modProj.stealthStrike && nanotechHitCooldown <= 0 && modProj.stealthStrikeHitCount < 3) + { + bool spawnedFlares = false; + if (nanotech) + { + for (int i = 0; i < 3; i++) + { + Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); + Vector2 velocity = (position - source) / 40f; + int damage = (int)Player.GetTotalDamage().ApplyTo(110); + Projectile.NewProjectile(spawnSource, source, velocity, ProjectileType(), damage, 3f, proj.owner); + } + } + nanotechHitCooldown = spawnedFlares ? 15 : 60; + } if (titanHeartSet && modProj.stealthStrike && titanCooldown <= 0 && modProj.stealthStrikeHitCount < 3) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 18f5310d14..53555e7661 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1151,7 +1151,7 @@ Nanotech: { Tooltip: ''' Rogue projectiles create nanoblades as they travel - Stealth strikes summon sparks on enemy hits + Stealth strikes summon nanobeams and sparks on enemy hits Stealth strikes have +15 armor penetration, deal 5% more damage, and heal for 2 HP 15% increased rogue damage and 15% increased rogue velocity Stealth strikes grant 10% critical strike chance to non-stealth strikes for 5 seconds From 0e8ff954b93ab33209e92670b0a7b6fb8063ba08 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 13 Mar 2026 12:07:33 -0500 Subject: [PATCH 15/78] fixed autopause auric tesla null ref --- Items/Armor/Auric/AuricTeslaBodyArmor.cs | 2 +- Items/Armor/Auric/AuricTeslaCuisses.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Armor/Auric/AuricTeslaBodyArmor.cs b/Items/Armor/Auric/AuricTeslaBodyArmor.cs index 85a854995b..4b2eae5319 100644 --- a/Items/Armor/Auric/AuricTeslaBodyArmor.cs +++ b/Items/Armor/Auric/AuricTeslaBodyArmor.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Items.Armor.Auric //Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type. if (Main.LocalPlayer.Calamity().auricSet) { - Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips); + Main.LocalPlayer.armor[0].ModItem?.ModifyTooltips(tooltips); } } diff --git a/Items/Armor/Auric/AuricTeslaCuisses.cs b/Items/Armor/Auric/AuricTeslaCuisses.cs index 82d63d49bb..1ff610bc08 100644 --- a/Items/Armor/Auric/AuricTeslaCuisses.cs +++ b/Items/Armor/Auric/AuricTeslaCuisses.cs @@ -89,7 +89,7 @@ namespace CalamityMod.Items.Armor.Auric //Alternatively, their ModifyTooltips could simply return early if the item ID doesn't match the helmet type. if (Main.LocalPlayer.Calamity().auricSet) { - Main.LocalPlayer.armor[0].ModItem.ModifyTooltips(tooltips); + Main.LocalPlayer.armor[0].ModItem?.ModifyTooltips(tooltips); } if (!toggleEnabled) From 81e924876171241e5432a4e9a1d690d8b7964e0b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 16 Mar 2026 18:42:23 -0700 Subject: [PATCH 16/78] flesh totem nerf --- Projectiles/Magic/FleshTotemMinion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index c9df910765..05b80fac97 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Magic } } } - int manaGained = 30; + int manaGained = 20; player.statMana += manaGained; if (Main.myPlayer == player.whoAmI) player.ManaEffect(manaGained); From 059904de1ed9177def0730a9cbea792a99fd7b07 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 16 Mar 2026 18:44:35 -0700 Subject: [PATCH 17/78] oops --- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 481e89c5f1..04a7a2f418 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -792,7 +792,7 @@ FleshTotem: { 5% increased magic critical strike chance +30 max mana Summons an effigy above your head that stores mana as you use it, up to 600 mana - The effigy occasionally pulses, restoring 30 mana + The effigy occasionally pulses, restoring 20 mana Pulses appear more frequently the more mana is stored Upon being struck, the effigy unleashes all stored up mana as vengeful souls that chase your enemies ''' From 757ba37f1e157a9a71c01b85568a9173b286e8ae Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 17 Mar 2026 21:09:07 -0400 Subject: [PATCH 18/78] Slowing debuffs no longer affect bosses, period --- Buffs/CalamityGlobalBuff.cs | 2 -- Buffs/DamageOverTime/TrueVulnerabilityHex.cs | 3 --- Buffs/DamageOverTime/Vaporfied.cs | 2 -- Buffs/DamageOverTime/VulnerabilityHex.cs | 4 ---- Buffs/StatDebuffs/Eutrophication.cs | 2 -- Buffs/StatDebuffs/GalvanicCorrosion.cs | 2 -- Buffs/StatDebuffs/GlacialState.cs | 2 -- Buffs/StatDebuffs/TemporalSadness.cs | 2 -- Buffs/StatDebuffs/TimeDistortion.cs | 2 -- NPCs/AquaticScourge/AquaticScourgeBody.cs | 10 ---------- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 10 ---------- NPCs/AquaticScourge/AquaticScourgeHead.cs | 10 ---------- NPCs/AquaticScourge/AquaticScourgeTail.cs | 10 ---------- NPCs/Bumblebirb/Dragonfolly.cs | 10 ---------- NPCs/CalamityGlobalNPC.cs | 20 +++---------------- NPCs/Leviathan/Leviathan.cs | 10 ---------- .../PlaguebringerGoliath.cs | 10 ---------- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 10 ---------- .../Bosses/EaterOfWorldsAI.cs | 4 ---- .../Bosses/QueenBeeAI.cs | 10 ---------- .../Bosses/SkeletronPrimeAI.cs | 10 ---------- Systems/Collections/CalamityNPCSets.cs | 4 ++-- 22 files changed, 5 insertions(+), 144 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 9b1f59e913..cd2cab3adf 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -159,8 +159,6 @@ namespace CalamityMod.Buffs if (type == BuffID.Webbed) { npc.Calamity().webbed = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; } if (type == BuffID.Electrified) { diff --git a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs index cfeafcdb55..377e36e361 100644 --- a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs +++ b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs @@ -41,9 +41,6 @@ namespace CalamityMod.Buffs.DamageOverTime cgn.trueVulnerabilityHex = true; if (cgn.VulnerabilityHexFireDrawer != null) cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex]; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0) - cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; - } internal static void DrawEffects(NPC npc, ref Color drawColor) diff --git a/Buffs/DamageOverTime/Vaporfied.cs b/Buffs/DamageOverTime/Vaporfied.cs index e10223020b..87e8b8d1b7 100644 --- a/Buffs/DamageOverTime/Vaporfied.cs +++ b/Buffs/DamageOverTime/Vaporfied.cs @@ -34,8 +34,6 @@ namespace CalamityMod.Buffs.DamageOverTime public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().vaporfied = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin +npc.buffTime[buffIndex]; } internal static void DrawEffects(PlayerDrawSet drawInfo) diff --git a/Buffs/DamageOverTime/VulnerabilityHex.cs b/Buffs/DamageOverTime/VulnerabilityHex.cs index fcde0194fb..d1275f89ae 100644 --- a/Buffs/DamageOverTime/VulnerabilityHex.cs +++ b/Buffs/DamageOverTime/VulnerabilityHex.cs @@ -46,10 +46,6 @@ namespace CalamityMod.Buffs.DamageOverTime // Set the remaining time of the fire drawer to be exactly right. if (cgn.VulnerabilityHexFireDrawer != null) cgn.VulnerabilityHexFireDrawer.SetLifetime = cgn.VulnerabilityHexFireDrawer.LocalTimer + npc.buffTime[buffIndex]; - - // Apply immunity timer. - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && cgn.debuffResistanceTimer <= 0) - cgn.debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + +npc.buffTime[buffIndex]; } internal static void DrawEffects(PlayerDrawSet drawInfo) { diff --git a/Buffs/StatDebuffs/Eutrophication.cs b/Buffs/StatDebuffs/Eutrophication.cs index eca32f09f7..0074bd591e 100644 --- a/Buffs/StatDebuffs/Eutrophication.cs +++ b/Buffs/StatDebuffs/Eutrophication.cs @@ -26,8 +26,6 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().eutrophication = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; } internal static void DrawEffects(PlayerDrawSet drawInfo) diff --git a/Buffs/StatDebuffs/GalvanicCorrosion.cs b/Buffs/StatDebuffs/GalvanicCorrosion.cs index 204c4884d9..512476ef2d 100644 --- a/Buffs/StatDebuffs/GalvanicCorrosion.cs +++ b/Buffs/StatDebuffs/GalvanicCorrosion.cs @@ -26,8 +26,6 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().galvanicCorrosion = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs index dc312681fa..c5a3fc7e58 100644 --- a/Buffs/StatDebuffs/GlacialState.cs +++ b/Buffs/StatDebuffs/GlacialState.cs @@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().glacialState = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; npc.DelBuff(buffIndex); buffIndex--; } diff --git a/Buffs/StatDebuffs/TemporalSadness.cs b/Buffs/StatDebuffs/TemporalSadness.cs index 943fefca48..cb132c8399 100644 --- a/Buffs/StatDebuffs/TemporalSadness.cs +++ b/Buffs/StatDebuffs/TemporalSadness.cs @@ -17,8 +17,6 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().temporalSadness = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; } } } diff --git a/Buffs/StatDebuffs/TimeDistortion.cs b/Buffs/StatDebuffs/TimeDistortion.cs index 3f84b4677e..bd6dd3e8a1 100644 --- a/Buffs/StatDebuffs/TimeDistortion.cs +++ b/Buffs/StatDebuffs/TimeDistortion.cs @@ -19,8 +19,6 @@ namespace CalamityMod.Buffs.StatDebuffs public override void Update(NPC npc, ref int buffIndex) { npc.Calamity().timeDistortion = true; - if ((CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[npc.type] || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.buffTime[buffIndex]; } } } diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index b9f91cbcc0..6204ae467e 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -155,16 +155,6 @@ namespace CalamityMod.NPCs.AquaticScourge enrageScale += 2f; } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = getFuckedAI; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Fire teeth if (calamityGlobalNPC.newAI[0] == 1f && (!phase3 || phase4)) { diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 56a6c7432c..cec29d817c 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -151,16 +151,6 @@ namespace CalamityMod.NPCs.AquaticScourge enrageScale += 2f; } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = getFuckedAI; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Kill body and tail bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 28db71c293..9b0e5564aa 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -291,16 +291,6 @@ namespace CalamityMod.NPCs.AquaticScourge } } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = doSpiral || getFuckedAI; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Spawn segments if (calamityGlobalNPC.newAI[2] == 0f && NPC.ai[0] == 0f) { diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 75935256b7..66538d7824 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -150,16 +150,6 @@ namespace CalamityMod.NPCs.AquaticScourge enrageScale += 2f; } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = getFuckedAI; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Kill body and tail bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs index 51810443f1..db966cd60c 100644 --- a/NPCs/Bumblebirb/Dragonfolly.cs +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -139,16 +139,6 @@ namespace CalamityMod.NPCs.Bumblebirb bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[0] == 3f || NPC.ai[0] == 3.1f || NPC.ai[0] == 3.2f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // If target is outside the jungle for more than 5 seconds, enrage if (!player.ZoneJungle && !BossRushEvent.BossRushActive) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 163b7a2a5b..bf8718274f 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -252,11 +252,6 @@ namespace CalamityMod.NPCs /// If set to true, allows for manually disabling this NPC's Boss Health Bar, even if they are still active. public bool ShouldCloseHPBar = false; - /// Constant representing the cooldown, in frames, before a boss can be affected by a slowing debuff. - public const int slowingDebuffResistanceMin = 1800; - /// Tracks the current slowing debuff cooldown for this NPC. - public int debuffResistanceTimer = 0; - #region Debuffs public bool vaporfied = false; public bool timeDistortion = false; @@ -550,8 +545,6 @@ namespace CalamityMod.NPCs myClone.CanHaveBossHealthBar = CanHaveBossHealthBar; myClone.ShouldCloseHPBar = ShouldCloseHPBar; - myClone.debuffResistanceTimer = debuffResistanceTimer; - myClone.vaporfied = vaporfied; myClone.timeDistortion = timeDistortion; myClone.glacialState = glacialState; @@ -751,9 +744,6 @@ namespace CalamityMod.NPCs //Debuff Bool clearing. // Doze 2jun2025 - Moved here from PostAI so drawing can read the bools. - if (debuffResistanceTimer > 0) - debuffResistanceTimer--; - timeDistortion = false; galvanicCorrosion = false; glacialState = false; @@ -3324,10 +3314,6 @@ namespace CalamityMod.NPCs laserBurnDamage = 0; } - // Queen Bee is completely immune to having her movement impaired if not in a high difficulty mode. - if (npc.type == NPCID.QueenBee && !CalamityWorld.revenge && !BossRushEvent.BossRushActive) - return; - // Pearl Aura shard spawning // Slowing is handled in the general slowing code below if (pearlAura) @@ -3369,8 +3355,8 @@ namespace CalamityMod.NPCs } impalePacketTimer++; - // Apply slowing debuff effects - if (debuffResistanceTimer <= 0 || (debuffResistanceTimer > slowingDebuffResistanceMin)) + // Apply slowing debuff effects, will not apply to bosses + if (!(CalamityNPCSets.ImmuneToSlowsAndOtherSpecialEffects[npc.type] || npc.boss)) { // Slowing debuffs which set a velocity hard cap take priority first. if (vulnerabilityHex) @@ -5487,7 +5473,7 @@ namespace CalamityMod.NPCs if (target.damage > 0 && !target.boss && !target.friendly && !target.dontTakeDamage && target.type != NPCID.Creeper && target.type != NPCType() && target.type != NPCID.MourningWood && target.type != NPCID.Everscream && target.type != NPCID.SantaNK1 && target.type != NPCType() && target.type != NPCType() && target.type != NPCType() && target.type != NPCType() && target.type != NPCID.GolemFistLeft && target.type != NPCID.GolemFistRight && - target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityNPCSets.ResistSlowingDebuffsAndOtherSpecialEffects[target.type] && !AcidRainEvent.AllMinibosses.Contains(target.type)) + target.type != NPCType() && target.type != NPCType() && target.type != NPCID.DD2Betsy && !CalamityNPCSets.ImmuneToSlowsAndOtherSpecialEffects[target.type] && !AcidRainEvent.AllMinibosses.Contains(target.type)) { return true; } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index e25f31ae91..8f7a674da0 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -218,16 +218,6 @@ namespace CalamityMod.NPCs.Leviathan NPC.dontTakeDamage = spawnAnimation; - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[0] == 2f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Despawn if (!player.active || player.dead || Vector2.Distance(player.Center, npcCenter) > 5600f) { diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 47724c6a71..94f631a449 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -180,16 +180,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath nukeBarrageChallengeAmt *= 1.5f; } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[0] == 0f || NPC.ai[0] == 4f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Light Lighting.AddLight((int)(NPC.Center.X / 16f), (int)(NPC.Center.Y / 16f), 0.3f, 0.7f, 0f); diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 32adbb354a..0b932099d2 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -341,16 +341,6 @@ namespace CalamityMod.NPCs.PrimordialWyrm iceMistDuration *= 0.5f; } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = AIState == (float)Phase.FinalPhase || AIState == (float)Phase.ShadowFireballSpin; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Adjust opacity bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (AIState == (float)Phase.ChargeOne || AIState == (float)Phase.ChargeTwo || AIState == (float)Phase.FastCharge); bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && AIState == (float)Phase.LightningCharge; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs index 71945eabe4..9af1bd482c 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs @@ -243,7 +243,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int whoAmI = NPC.whoAmI; float ai0Holdover = NPC.ai[0]; float newAI1Holdover = calamityGlobalNPC.newAI[1]; - int slowingDebuffResistTimer = calamityGlobalNPC.debuffResistanceTimer; // Actually transform the body segment into a head segment. NPC.SetDefaultsKeepPlayerInteraction(NPC.type); @@ -253,7 +252,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Heads spawned mid fight by splitting do not get reset spawn invincibility. CalamityGlobalNPC newCGN = NPC.Calamity(); newCGN.newAI[1] = newAI1Holdover; - newCGN.debuffResistanceTimer = slowingDebuffResistTimer; CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults); @@ -268,14 +266,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float segmentLifeRatio = MathHelper.Lerp(0.5f, 1f, NPC.life / (float)NPC.lifeMax); int whoAmI = NPC.whoAmI; float ai1Holdover = NPC.ai[1]; - int slowingDebuffResistTimer = calamityGlobalNPC.debuffResistanceTimer; // Actually transform the body segment into a tail segment. NPC.SetDefaultsKeepPlayerInteraction(NPC.type); NPC.life = (int)(NPC.lifeMax * segmentLifeRatio); NPC.whoAmI = whoAmI; NPC.ai[1] = ai1Holdover; - NPC.Calamity().debuffResistanceTimer = slowingDebuffResistTimer; CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults); diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 8c3203650f..437d1b4969 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -136,16 +136,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.player[NPC.target].dead) NPC.ai[0] = 7f; - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[0] == 0f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - // Always start in enemy spawning phase if (calamityGlobalNPC.newAI[3] == 0f) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index da0d5b69d4..870dd18391 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -147,16 +147,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); } - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[1] == 5f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - bool normalLaserRotation = NPC.localAI[1] % 2f == 0f; // Float near player diff --git a/Systems/Collections/CalamityNPCSets.cs b/Systems/Collections/CalamityNPCSets.cs index 5a234bd2a8..b6d5a71376 100644 --- a/Systems/Collections/CalamityNPCSets.cs +++ b/Systems/Collections/CalamityNPCSets.cs @@ -177,11 +177,11 @@ namespace CalamityMod.Systems.Collections NPCID.MothronEgg, NPCID.MothronSpawn); /// - /// If for an NPC type, then the NPC will receive a 30 second global cooldown to slowing debuffs after being inflicted by one.
+ /// If for an NPC type, then the NPC will not be affected by slowing debuffs.
/// Also used to prevent weapon pulling effects and Anarchy Blade's ability to instantly kill enemies that are below 50% health.
/// Defaults to . ///
- public static bool[] ResistSlowingDebuffsAndOtherSpecialEffects = Factory.CreateBoolSet(NPCID.KingSlime, NPCType(), + public static bool[] ImmuneToSlowsAndOtherSpecialEffects = Factory.CreateBoolSet(NPCID.KingSlime, NPCType(), NPCID.EyeofCthulhu, NPCID.EaterofWorldsHead, NPCID.EaterofWorldsBody, NPCID.EaterofWorldsTail, NPCID.BrainofCthulhu, NPCID.Creeper, NPCID.QueenBee, NPCID.Deerclops, NPCID.SkeletronHead, NPCID.SkeletronHand, NPCID.WallofFlesh, NPCID.WallofFleshEye, NPCID.PirateShipCannon, NPCID.QueenSlimeBoss, NPCID.Probe, NPCID.Retinazer, NPCID.Spazmatism, NPCID.SkeletronPrime, NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeLaser, NPCID.PrimeVice, NPCID.Plantera, From ebc1efd30b2f9ad2abfefe4bd0ca8448f4099de2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 17 Mar 2026 21:28:44 -0400 Subject: [PATCH 19/78] Removed Glacial State Replaced all of its use cases with Frozen, which inherits exactly its old effects --- Buffs/CalamityGlobalBuff.cs | 4 +++ Buffs/StatDebuffs/GlacialState.cs | 26 ------------------ Buffs/StatDebuffs/GlacialState.png | Bin 611 -> 0 bytes CalPlayer/CalamityPlayerHitHurt.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 4 +-- Items/Weapons/Melee/AbsoluteZero.cs | 2 +- Items/Weapons/Melee/Terratomere.cs | 2 +- .../en-US/Mods.CalamityMod.Buffs.hjson | 6 ---- .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- Localization/en-US/Mods.Terraria.Buffs.hjson | 1 + NPCs/CalamityGlobalNPC.cs | 13 +++++---- Projectiles/Magic/ArcticBearPawProj.cs | 2 +- Projectiles/Magic/CryoBlast.cs | 2 +- Projectiles/Magic/IceBarrageMain.cs | 2 +- Projectiles/Magic/IceCluster.cs | 2 +- Projectiles/Magic/Snowball.cs | 2 +- Projectiles/Magic/VeeringWindFrostWave.cs | 2 +- .../Melee/BrokenBiomeBlade_BitingEmbrace.cs | 2 +- Projectiles/Melee/CosmicDischargeFlail.cs | 2 +- Projectiles/Melee/DarkIceZero.cs | 2 +- Projectiles/Melee/ExobladeProj.cs | 2 +- Projectiles/Melee/IceBombFriendly.cs | 2 +- .../MendedBiomeBlade_TrueBitingEmbrace.cs | 2 +- Projectiles/Melee/TerratomereHoldoutProj.cs | 2 +- .../Melee/TrueBiomeBlade_ChainedMeatHook.cs | 2 +- Projectiles/Ranged/FlurrystormIceChunk.cs | 2 +- Projectiles/Ranged/FlurrystormIceShard.cs | 2 +- Projectiles/Ranged/HailstormBulletProj.cs | 2 +- Projectiles/Ranged/MistArrow.cs | 2 +- Projectiles/Rogue/FrostyFlareProj.cs | 2 +- Projectiles/Rogue/FrostyFlareStealth.cs | 2 +- Projectiles/Rogue/HypothermiaChunk.cs | 2 +- Projectiles/Rogue/IcebreakerHammer.cs | 2 +- Projectiles/Rogue/ValariBoomerang.cs | 2 +- Projectiles/Summon/EndoCooperBody.cs | 2 +- Projectiles/Summon/EndoCooperLimbs.cs | 2 +- Projectiles/Summon/EndoFire.cs | 2 +- Projectiles/Summon/EndoIceShard.cs | 2 +- Projectiles/Turret/IceExplosion.cs | 2 +- Projectiles/Turret/IceShot.cs | 2 +- Projectiles/Typeless/CryonicShield.cs | 2 +- Projectiles/Typeless/DarkIce.cs | 2 +- Systems/Collections/CalamityBuffSets.cs | 2 +- Utilities/NPCDebuffs.cs | 2 +- 44 files changed, 51 insertions(+), 77 deletions(-) delete mode 100644 Buffs/StatDebuffs/GlacialState.cs delete mode 100644 Buffs/StatDebuffs/GlacialState.png diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index cd2cab3adf..816051bcf7 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -156,6 +156,10 @@ namespace CalamityMod.Buffs } } + if (type == BuffID.Frozen) + { + npc.Calamity().frozen = true; + } if (type == BuffID.Webbed) { npc.Calamity().webbed = true; diff --git a/Buffs/StatDebuffs/GlacialState.cs b/Buffs/StatDebuffs/GlacialState.cs deleted file mode 100644 index c5a3fc7e58..0000000000 --- a/Buffs/StatDebuffs/GlacialState.cs +++ /dev/null @@ -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--; - } - } -} diff --git a/Buffs/StatDebuffs/GlacialState.png b/Buffs/StatDebuffs/GlacialState.png deleted file mode 100644 index 9513cc9d37b02fbdda0d62ef179a501afe3ba9de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 611 zcmV-p0-XJcP)I}6vlsJfdrOFJ<^Cm(T#!03k+=Yh|q|jNCFi>C`C)$h#Orb{-H%YXc4sO54daT zLIQ)r78Sa9$rIfui4kc$T3As$QEV}Dn0Kz@n`b26Z!`1VdpI-SckexC#=*xHIlysp ziGr>0Yz{zPZt3<84x;>Iotmh*avgx_mtz1#4qO1BsnW4&<`} zK-!D5#{p4Zf4N2ll-5UpOy$3`CVVlusCaUIS@AR_-rX!Z*cdAh95*3rFR*V9?1Xc98;ZZ5SyH^9J_;nNzhy$(ploAbChVJesIT2$!f?H_om=IwDH z3{v^bT5mcb5Xa>DbJhK}Tv*qd?R8+MwNHHhu6Xp+Q2^4%&IZPZ!5# 120) duration = 120; - npc.AddBuff(ModContent.BuffType(), (int)duration, false); + npc.AddBuff(BuffID.Frozen, (int)duration, false); } } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e300e7b368..71cc144ec1 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -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(); + int buffType = BuffID.Frozen; float freezeDist = 200f; if (Player.whoAmI == Main.myPlayer) { diff --git a/Items/Weapons/Melee/AbsoluteZero.cs b/Items/Weapons/Melee/AbsoluteZero.cs index 1b9615ad9c..4fac11427b 100644 --- a/Items/Weapons/Melee/AbsoluteZero.cs +++ b/Items/Weapons/Melee/AbsoluteZero.cs @@ -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(), 60); + target.AddBuff(BuffID.Frozen, 60); var source = player.GetSource_ItemUse(Item); int p = Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), Item.damage, 12f, player.whoAmI); Main.projectile[p].Kill(); diff --git a/Items/Weapons/Melee/Terratomere.cs b/Items/Weapons/Melee/Terratomere.cs index b8b499265d..f2abc131a5 100644 --- a/Items/Weapons/Melee/Terratomere.cs +++ b/Items/Weapons/Melee/Terratomere.cs @@ -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; diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 7c6c20ee1b..4077fa63f0 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1126,12 +1126,6 @@ GalvanicCorrosion: { ItemTooltipEnemy: Slows enemies } -GlacialState: { - DisplayName: Glacial State - Description: Cannot move - ItemTooltipEnemy: Freezes enemies -} - IcarusFolly: { DisplayName: Icarus' Folly Description: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 6aa3b7186e..37f4433014 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -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 ''' diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index d3195fabe8..aaf2511da3 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -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 diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index bf8718274f..c004125ac2 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -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) diff --git a/Projectiles/Magic/ArcticBearPawProj.cs b/Projectiles/Magic/ArcticBearPawProj.cs index 900684983b..0caa6c9a1b 100644 --- a/Projectiles/Magic/ArcticBearPawProj.cs +++ b/Projectiles/Magic/ArcticBearPawProj.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Magic/CryoBlast.cs b/Projectiles/Magic/CryoBlast.cs index a25787701b..9c249aed59 100644 --- a/Projectiles/Magic/CryoBlast.cs +++ b/Projectiles/Magic/CryoBlast.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); target.AddBuff(BuffID.Frostburn2, 180); } } diff --git a/Projectiles/Magic/IceBarrageMain.cs b/Projectiles/Magic/IceBarrageMain.cs index b0bdd946ac..2337b0b96e 100644 --- a/Projectiles/Magic/IceBarrageMain.cs +++ b/Projectiles/Magic/IceBarrageMain.cs @@ -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(), 60); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frozen, 60); } } diff --git a/Projectiles/Magic/IceCluster.cs b/Projectiles/Magic/IceCluster.cs index 4ce8847842..860cb394ed 100644 --- a/Projectiles/Magic/IceCluster.cs +++ b/Projectiles/Magic/IceCluster.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); if (Projectile.damage > 10) { diff --git a/Projectiles/Magic/Snowball.cs b/Projectiles/Magic/Snowball.cs index e62ac2ff5b..5431ead7f9 100644 --- a/Projectiles/Magic/Snowball.cs +++ b/Projectiles/Magic/Snowball.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Magic/VeeringWindFrostWave.cs b/Projectiles/Magic/VeeringWindFrostWave.cs index 5a0b2b5596..ee7a6c11d8 100644 --- a/Projectiles/Magic/VeeringWindFrostWave.cs +++ b/Projectiles/Magic/VeeringWindFrostWave.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } } } diff --git a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs index f8d4d6935c..eb67acd237 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_BitingEmbrace.cs @@ -102,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee { base.OnHitNPC(target, hit, damageDone); if (SwingMode == 2) - target.AddBuff(BuffType(), 20); + target.AddBuff(BuffID.Frozen, 20); } public override void AI() diff --git a/Projectiles/Melee/CosmicDischargeFlail.cs b/Projectiles/Melee/CosmicDischargeFlail.cs index 5eaf0a592f..40d16b3e2b 100644 --- a/Projectiles/Melee/CosmicDischargeFlail.cs +++ b/Projectiles/Melee/CosmicDischargeFlail.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee { Player player = Main.player[Projectile.owner]; target.AddBuff(ModContent.BuffType(), 180); - target.AddBuff(ModContent.BuffType(), 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(), Projectile.damage, 10f, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); diff --git a/Projectiles/Melee/DarkIceZero.cs b/Projectiles/Melee/DarkIceZero.cs index 4c06f168f6..267c30d1d3 100644 --- a/Projectiles/Melee/DarkIceZero.cs +++ b/Projectiles/Melee/DarkIceZero.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override Color? GetAlpha(Color lightColor) diff --git a/Projectiles/Melee/ExobladeProj.cs b/Projectiles/Melee/ExobladeProj.cs index 0c11323fc6..4eeb944925 100644 --- a/Projectiles/Melee/ExobladeProj.cs +++ b/Projectiles/Melee/ExobladeProj.cs @@ -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(), 60); + target.AddBuff(BuffID.Frozen, 60); } if (State == SwingState.Swinging && PerformingPowerfulSlash && Owner.ownedProjectileCounts[ModContent.ProjectileType()] < 1) diff --git a/Projectiles/Melee/IceBombFriendly.cs b/Projectiles/Melee/IceBombFriendly.cs index d858ee8cdb..3d69d25e66 100644 --- a/Projectiles/Melee/IceBombFriendly.cs +++ b/Projectiles/Melee/IceBombFriendly.cs @@ -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(), 30); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Frozen, 30); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs index b05763bebb..2d198d7b21 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueBitingEmbrace.cs @@ -99,7 +99,7 @@ namespace CalamityMod.Projectiles.Melee { base.OnHitNPC(target, hit, damageDone); if (SwingMode == 2) - target.AddBuff(BuffType(), 40); + target.AddBuff(BuffID.Frozen, 40); } public override void AI() diff --git a/Projectiles/Melee/TerratomereHoldoutProj.cs b/Projectiles/Melee/TerratomereHoldoutProj.cs index 7a8fd9c7e1..6152096f2e 100644 --- a/Projectiles/Melee/TerratomereHoldoutProj.cs +++ b/Projectiles/Melee/TerratomereHoldoutProj.cs @@ -285,7 +285,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 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. diff --git a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs index 70f8077503..49f6e7f207 100644 --- a/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs +++ b/Projectiles/Melee/TrueBiomeBlade_ChainedMeatHook.cs @@ -110,7 +110,7 @@ namespace CalamityMod.Projectiles.Melee } } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType(), 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); diff --git a/Projectiles/Ranged/FlurrystormIceChunk.cs b/Projectiles/Ranged/FlurrystormIceChunk.cs index 39b2db16d6..5b221afcc8 100644 --- a/Projectiles/Ranged/FlurrystormIceChunk.cs +++ b/Projectiles/Ranged/FlurrystormIceChunk.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Ranged/FlurrystormIceShard.cs b/Projectiles/Ranged/FlurrystormIceShard.cs index 343a0ebc35..977a176d83 100644 --- a/Projectiles/Ranged/FlurrystormIceShard.cs +++ b/Projectiles/Ranged/FlurrystormIceShard.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Ranged/HailstormBulletProj.cs b/Projectiles/Ranged/HailstormBulletProj.cs index 7b111a00ae..4800aa818b 100644 --- a/Projectiles/Ranged/HailstormBulletProj.cs +++ b/Projectiles/Ranged/HailstormBulletProj.cs @@ -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(), 120); + target.AddBuff(BuffID.Frozen, 120); int points = 6; float radians = MathHelper.TwoPi / points; diff --git a/Projectiles/Ranged/MistArrow.cs b/Projectiles/Ranged/MistArrow.cs index 30bacffc92..23b6229b73 100644 --- a/Projectiles/Ranged/MistArrow.cs +++ b/Projectiles/Ranged/MistArrow.cs @@ -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(), 60); + target.AddBuff(BuffID.Frozen, 60); } } } diff --git a/Projectiles/Rogue/FrostyFlareProj.cs b/Projectiles/Rogue/FrostyFlareProj.cs index 2f812635cf..910f00defe 100644 --- a/Projectiles/Rogue/FrostyFlareProj.cs +++ b/Projectiles/Rogue/FrostyFlareProj.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); Projectile.ai[0] = 1f; Projectile.ai[1] = target.whoAmI; Projectile.velocity = target.Center - Projectile.Center; diff --git a/Projectiles/Rogue/FrostyFlareStealth.cs b/Projectiles/Rogue/FrostyFlareStealth.cs index 09d88e9a77..a9abc5f43b 100644 --- a/Projectiles/Rogue/FrostyFlareStealth.cs +++ b/Projectiles/Rogue/FrostyFlareStealth.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); Projectile.ai[0] = 1f; Projectile.ai[1] = target.whoAmI; Projectile.velocity = target.Center - Projectile.Center; diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index 20e1a7a0df..eb0ba1a84b 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300); - target.AddBuff(ModContent.BuffType(), 150); + target.AddBuff(BuffID.Frozen, 150); } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Rogue/IcebreakerHammer.cs b/Projectiles/Rogue/IcebreakerHammer.cs index e079d036ad..4f835dfe1a 100644 --- a/Projectiles/Rogue/IcebreakerHammer.cs +++ b/Projectiles/Rogue/IcebreakerHammer.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue explosionCount++; } - int buffType = ModContent.BuffType(); + int buffType = BuffID.Frozen; float radius = 112f; // 7 blocks foreach (NPC nPC in Main.ActiveNPCs) diff --git a/Projectiles/Rogue/ValariBoomerang.cs b/Projectiles/Rogue/ValariBoomerang.cs index 40790b782c..f045cf6b42 100644 --- a/Projectiles/Rogue/ValariBoomerang.cs +++ b/Projectiles/Rogue/ValariBoomerang.cs @@ -187,7 +187,7 @@ namespace CalamityMod.Projectiles.Rogue OnHitEffects(target); target.AddBuff(BuffID.Frostburn2, 120); if (Projectile.Calamity().stealthStrike) - target.AddBuff(ModContent.BuffType(), 45); + target.AddBuff(BuffID.Frozen, 45); } diff --git a/Projectiles/Summon/EndoCooperBody.cs b/Projectiles/Summon/EndoCooperBody.cs index 487ec89ec1..2e682efb19 100644 --- a/Projectiles/Summon/EndoCooperBody.cs +++ b/Projectiles/Summon/EndoCooperBody.cs @@ -355,7 +355,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Frozen, 60); target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Summon/EndoCooperLimbs.cs b/Projectiles/Summon/EndoCooperLimbs.cs index 80b5efc46f..113c58e57b 100644 --- a/Projectiles/Summon/EndoCooperLimbs.cs +++ b/Projectiles/Summon/EndoCooperLimbs.cs @@ -147,7 +147,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Frozen, 60); target.AddBuff(ModContent.BuffType(), 180); } diff --git a/Projectiles/Summon/EndoFire.cs b/Projectiles/Summon/EndoFire.cs index ae049ace55..82e4fffb97 100644 --- a/Projectiles/Summon/EndoFire.cs +++ b/Projectiles/Summon/EndoFire.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Frozen, 60); target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Summon/EndoIceShard.cs b/Projectiles/Summon/EndoIceShard.cs index eb4dab939e..653b0cfecc 100644 --- a/Projectiles/Summon/EndoIceShard.cs +++ b/Projectiles/Summon/EndoIceShard.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(BuffID.Frozen, 60); target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Turret/IceExplosion.cs b/Projectiles/Turret/IceExplosion.cs index ea15cffab2..edaa97a1d8 100644 --- a/Projectiles/Turret/IceExplosion.cs +++ b/Projectiles/Turret/IceExplosion.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Turret } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); target.AddBuff(BuffID.Frostburn2, 180); } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Turret/IceShot.cs b/Projectiles/Turret/IceShot.cs index 8f970f9d8e..3f8f9ced72 100644 --- a/Projectiles/Turret/IceShot.cs +++ b/Projectiles/Turret/IceShot.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Turret } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); target.AddBuff(BuffID.Frostburn2, 180); } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Typeless/CryonicShield.cs b/Projectiles/Typeless/CryonicShield.cs index c07289dd98..b3ee8b3aac 100644 --- a/Projectiles/Typeless/CryonicShield.cs +++ b/Projectiles/Typeless/CryonicShield.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Typeless if (!player.Calamity().CryoStoneVanity) { target.AddBuff(BuffID.Frostburn2, 180); - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frozen, 30); } } // CIT 2MAY2025: Replaced old manual knockback code with setting HitDirectionOverride diff --git a/Projectiles/Typeless/DarkIce.cs b/Projectiles/Typeless/DarkIce.cs index b601c92938..aae5d31743 100644 --- a/Projectiles/Typeless/DarkIce.cs +++ b/Projectiles/Typeless/DarkIce.cs @@ -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(), 30); + target.AddBuff(BuffID.Frozen, 30); } public override Color? GetAlpha(Color lightColor) diff --git a/Systems/Collections/CalamityBuffSets.cs b/Systems/Collections/CalamityBuffSets.cs index 48c092ed60..54496b4e70 100644 --- a/Systems/Collections/CalamityBuffSets.cs +++ b/Systems/Collections/CalamityBuffSets.cs @@ -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(), BuffType(), BuffType(), BuffType(), BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index bc6f2278bd..aacef829b0 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -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() }; + 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(), ModContent.BuffType() }; private static readonly int[] sunkenSeaEnemyImmunities = new int[2] { ModContent.BuffType(), ModContent.BuffType() }; private static readonly int[] abyssEnemyImmunities = new int[2] { ModContent.BuffType(), ModContent.BuffType() }; From ccd207511280e2187ebf4b5ca0d8dceabd4ec70f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 17 Mar 2026 22:27:28 -0500 Subject: [PATCH 20/78] Sage Poison adjustments - Now counts ALL player's minions in multiplayer & supports viral+virid mixes - Now does one DoT tick per second per sprout --- Buffs/DamageOverTime/SagePoison.cs | 19 +++++++++++++++---- NPCs/CalamityGlobalNPC.cs | 3 --- Projectiles/Summon/SageNeedle.cs | 2 -- Projectiles/Summon/ViridVanguardBlade.cs | 3 +-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Buffs/DamageOverTime/SagePoison.cs b/Buffs/DamageOverTime/SagePoison.cs index 27cbd603f0..5065122406 100644 --- a/Buffs/DamageOverTime/SagePoison.cs +++ b/Buffs/DamageOverTime/SagePoison.cs @@ -1,4 +1,5 @@ using CalamityMod.DataStructures; +using CalamityMod.Projectiles.Summon; using CalamityMod.Systems.Collections; using Terraria; using Terraria.ModLoader; @@ -17,8 +18,17 @@ namespace CalamityMod.Buffs.DamageOverTime public static float ViridVanguardPoisonMultiplier => 2; public static void SagePoisonPower(NPC npc, int buffType, ref int buffIndex, ref int damage) { - // The base DoT is multiplied by the amount of Viral Sprouts you have when applied - // See SageNeedle.cs for details + int viralCount = 0; + int viridCount = 0; + foreach (var item in Main.ActiveProjectiles) + { + if (item.type == ModContent.ProjectileType()) + viralCount++; + if (item.type == ModContent.ProjectileType()) + viridCount++; + } + if ((viralCount + viridCount) <= 0) + return; //Reduce power of weakness/resistances but leave sickness debuff boosters at full power //We first need to apply Irradiated as that isn't included in SicknessDebuffMultiplier due to needing to dynamically update if Irradiated is applied @@ -39,8 +49,9 @@ namespace CalamityMod.Buffs.DamageOverTime multiplier *= NewResistanceEffectiveness; //Apply the DOT - int baseSagePoisonDoTValue = (int)multiplier.ApplyTo(npc.Calamity().sagePoisonDamage); - npc.Calamity().ApplyDPSDebuff(baseSagePoisonDoTValue, baseSagePoisonDoTValue / 5, ref npc.lifeRegen, ref damage); + float SagePoisonRegen = (viralCount + ViridVanguardPoisonMultiplier * viridCount) * debuffData.EnemyLostRegen; + int totalDoT = (int)multiplier.ApplyTo(SagePoisonRegen); + npc.Calamity().ApplyDPSDebuff(totalDoT, totalDoT/(2*(viridCount+viralCount)), ref npc.lifeRegen, ref damage); } public override void SetStaticDefaults() { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 163b7a2a5b..2d3fd08e0a 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -387,7 +387,6 @@ namespace CalamityMod.NPCs public int ladHearts = 0; public bool relicOfResilienceWeakness = false; public bool sagePoison = false; - public int sagePoisonDamage = 0; public bool vulnerabilityHex = false; public bool trueVulnerabilityHex = false; public bool banishingFire = false; @@ -636,7 +635,6 @@ namespace CalamityMod.NPCs myClone.ladHearts = ladHearts; myClone.relicOfResilienceWeakness = relicOfResilienceWeakness; myClone.sagePoison = sagePoison; - myClone.sagePoisonDamage = sagePoisonDamage; myClone.vulnerabilityHex = vulnerabilityHex; myClone.trueVulnerabilityHex = trueVulnerabilityHex; myClone.banishingFire = banishingFire; @@ -1217,7 +1215,6 @@ namespace CalamityMod.NPCs if (npc.type == NPCID.WallofFleshEye) npc.netAlways = true; - sagePoisonDamage = 0; if (npc.type == NPCID.Golem && (CalamityWorld.revenge || BossRushEvent.BossRushActive)) npc.noGravity = true; diff --git a/Projectiles/Summon/SageNeedle.cs b/Projectiles/Summon/SageNeedle.cs index 1de448a053..cb40b2194f 100644 --- a/Projectiles/Summon/SageNeedle.cs +++ b/Projectiles/Summon/SageNeedle.cs @@ -35,9 +35,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - int sagePoisonDamage = (int)(SagePoison.debuffData.EnemyLostRegen * Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()]); target.AddBuff(ModContent.BuffType(), 300); - target.Calamity().sagePoisonDamage = sagePoisonDamage; } public override void OnKill(int timeLeft) diff --git a/Projectiles/Summon/ViridVanguardBlade.cs b/Projectiles/Summon/ViridVanguardBlade.cs index 12833d3ce9..e2f58e969a 100644 --- a/Projectiles/Summon/ViridVanguardBlade.cs +++ b/Projectiles/Summon/ViridVanguardBlade.cs @@ -559,8 +559,7 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.Calamity().sagePoisonDamage = (int)(SagePoison.debuffData.EnemyLostRegen * SagePoison.ViridVanguardPoisonMultiplier * CurrentViridCount); - target.AddBuff(ModContent.BuffType(), 60); + target.AddBuff(ModContent.BuffType(), 300); if (ActiveAttacking) { Vector2 vel = new Vector2(0.1f, 0.1f).RotatedByRandom(100); From debd2d92073960aba86ab79a8ade0323f715e51e Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 17 Mar 2026 22:27:59 -0500 Subject: [PATCH 21/78] Galileo Gladius nerf Every hit enemy after the first only gives 0.25 starburst instead of 1 --- Projectiles/Melee/Shortswords/GalileoGladiusProj.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs index 4ef4e0f9b3..4f12c74fe9 100644 --- a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs +++ b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs @@ -102,7 +102,11 @@ namespace CalamityMod.Projectiles.Melee.Shortswords } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - Owner.Calamity().StratusStarburst++; + if (Projectile.numHits == 0) + Owner.Calamity().StratusStarburst++; + else + Owner.Calamity().StarburstSpawnFrameCounter += 0.25f; + } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { From e83135fd6dd3517cc618210abb5d662cef0c2760 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 19 Mar 2026 18:38:38 -0400 Subject: [PATCH 22/78] Two Brain of Cthulhu tweaks 1 - Decreased spawn animation length by ~2.5 seconds when summoned via item 2 - Decreased Creeper amount in each phase by 3, increased Creeper health to compensate --- NPCs/CalamityGlobalNPC.cs | 3 +++ .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 8 +++++--- .../Bosses/BrainOfCthulhu/CreeperAI.cs | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 163b7a2a5b..cb4ef52c26 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1303,6 +1303,9 @@ namespace CalamityMod.NPCs case NPCID.BrainofCthulhu: npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.75); break; + case NPCID.Creeper: + npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.175); + break; case NPCID.QueenBee: npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.8); break; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index 35fc92c954..a41c9c6511 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -569,7 +569,9 @@ public class BrainOfCthulhuAI : VanillaAIOverride if (d > 592900) //770^2 distanceScaleFactor = 1 / (1 + (((float)Math.Sqrt(d) - 770) / 32f)); - float spawnCounter = Time - Math.Abs(SpawnTime); + // Time spent in the spawn animation is shortened when summoned via item + float spawnAnimTimeReduction = (SummonedViaItem || BossRushEvent.BossRushActive) ? 120 : 0; + float spawnCounter = Time - Math.Abs(SpawnTime) + spawnAnimTimeReduction; if (spawnCounter < 180) { @@ -686,7 +688,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride AttackCounter++; if (SummonedViaItem || BossRushEvent.BossRushActive) - SpawnDelay = 2; + SpawnDelay = 1; else SpawnDelay = AttackCounter switch { @@ -3096,7 +3098,7 @@ public class BrainOfCthulhuAI : VanillaAIOverride return false; } - public static int GetBrainOfCthuluCreepersCountRevDeath() => CalamityWorld.death ? 30 : 21; + public static int GetBrainOfCthuluCreepersCountRevDeath() => CalamityWorld.death ? 27 : 18; public static List GetAllValidTargets(Vector2 brainPosition) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/CreeperAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/CreeperAI.cs index 8ad34c50b4..72043d55fa 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/CreeperAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/CreeperAI.cs @@ -177,7 +177,8 @@ public class CreeperAI : VanillaAIOverride if (bocAI.SpawnTime != 0 && Time >= 0) //Brain has appeared { - float brainTime = bossCounter - Math.Abs(bocAI.SpawnTime); + float spawnAnimTimeReduction = (SummonedViaItem || BossRushEvent.BossRushActive) ? 120 : 0; + float brainTime = bossCounter - Math.Abs(bocAI.SpawnTime) + spawnAnimTimeReduction; if (brainTime < 180) { From b570efd6075eadc326a37d4d9690b9cda2b5ee99 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 19 Mar 2026 22:48:15 -0400 Subject: [PATCH 23/78] Several changes to EoL lance walls * Lance walls are now given a random rotation * Lance wall attack no longer has a chance to end early * Grid lance walls have shorter delay, converging lance walls have longer delay * Death Mode now makes grid lance walls have even shorter delay and 2 extra walls, but wider spacing --- .../Bosses/EmpressofLightAI.cs | 73 +++---------------- 1 file changed, 10 insertions(+), 63 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index e7c56ef885..97d72394fd 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -744,8 +744,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Expert attack or not. bool expertAttack = calamityGlobalNPC.newAI[2] == 0f; - int numLanceWalls = expertAttack ? 6 : 4; - float lanceWallSpawnGateValue = expertAttack ? (death ? 42f : 36f) : 54f; + int numLanceWalls = (death && !expertAttack) ? 8 : 6; + float lanceWallSpawnGateValue = expertAttack ? 50f : (death ? 34f : 45f); if (dayTimeEnrage) lanceWallSpawnGateValue -= expertAttack ? 4f : 6f; @@ -760,8 +760,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { SoundEngine.PlaySound(SoundID.Item162, NPC.Center); - float totalProjectiles = death ? 18f : 15f; - float lanceSpacing = death ? 150f : 175f; + float totalProjectiles = death ? 19f : 15f; + float lanceSpacing = death ? (expertAttack ? 150f : 200f) : 175f; float lanceWallSize = totalProjectiles * lanceSpacing; Vector2 lanceSpawnOffset = targetData9.Center; @@ -769,64 +769,21 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { Vector2 lanceWallStartingPosition = Vector2.Zero; Vector2 lanceWallDirection = Vector2.UnitY; - float lanceWallConvergence = 0.4f; - float lanceWallSizeMult = 1.4f; totalProjectiles += 5f; lanceSpacing += 50f; - lanceWallSize *= (death ? 0.7f : 0.5f); - float direction = 1f; - - int randomLanceWallType; - do randomLanceWallType = Main.rand.Next(numLanceWalls); - while (randomLanceWallType == calamityGlobalNPC.newAI[3]); - - // This is set so that Empress doesn't use the same wall type twice in a row. - calamityGlobalNPC.newAI[3] = randomLanceWallType; + lanceWallSize *= (death && expertAttack) ? 0.7f : 0.5f; + // Used to give the lance walls a random rotation. + calamityGlobalNPC.newAI[3] = Main.rand.NextFloat(MathHelper.TwoPi); // Keeps track of the total number of lance walls used. calamityGlobalNPC.newAI[1] += 1f; // Sync the Calamity AI variables. NPC.SyncExtraAI(); - switch (randomLanceWallType) - { - case 0: - lanceSpawnOffset += new Vector2((0f - lanceWallSize) / 2f, 0f) * direction; - lanceWallStartingPosition = new Vector2(0f, lanceWallSize); - lanceWallDirection = Vector2.UnitX; - break; - - case 1: - lanceSpawnOffset += new Vector2(lanceWallSize / 2f, lanceSpacing / 2f) * direction; - lanceWallStartingPosition = new Vector2(0f, lanceWallSize); - lanceWallDirection = -Vector2.UnitX; - break; - - case 2: - lanceSpawnOffset += new Vector2(0f - lanceWallSize, 0f - lanceWallSize) * lanceWallConvergence * direction; - lanceWallStartingPosition = new Vector2(lanceWallSize * lanceWallSizeMult, 0f); - lanceWallDirection = new Vector2(1f, 1f); - break; - - case 3: - lanceSpawnOffset += new Vector2(lanceWallSize * lanceWallConvergence + lanceSpacing / 2f, (0f - lanceWallSize) * lanceWallConvergence) * direction; - lanceWallStartingPosition = new Vector2((0f - lanceWallSize) * lanceWallSizeMult, 0f); - lanceWallDirection = new Vector2(-1f, 1f); - break; - - case 4: - lanceSpawnOffset += new Vector2(0f - lanceWallSize, lanceWallSize) * lanceWallConvergence * direction; - lanceWallStartingPosition = new Vector2(lanceWallSize * lanceWallSizeMult, 0f); - lanceWallDirection = lanceSpawnOffset.DirectionTo(targetData9.Center); - break; - - case 5: - lanceSpawnOffset += new Vector2(lanceWallSize * lanceWallConvergence + lanceSpacing / 2f, lanceWallSize * lanceWallConvergence) * direction; - lanceWallStartingPosition = new Vector2((0f - lanceWallSize) * lanceWallSizeMult, 0f); - lanceWallDirection = lanceSpawnOffset.DirectionTo(targetData9.Center); - break; - } + lanceSpawnOffset += -Vector2.UnitX.RotatedBy(calamityGlobalNPC.newAI[3]) * (lanceWallSize / 2f); + lanceWallStartingPosition = Vector2.UnitY.RotatedBy(calamityGlobalNPC.newAI[3]) * lanceWallSize; + lanceWallDirection = calamityGlobalNPC.newAI[3].ToRotationVector2(); int projectileType = ProjectileID.FairyQueenLance; int projectileDamage = lanceDamage; @@ -846,16 +803,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnLocation, Vector2.Zero, projectileType, projectileDamage, 0f, Main.myPlayer, v2.ToRotation(), i); } } - - // Chance to stop using the lance walls and switch to a different attack after 3 lance walls are used. - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (Main.rand.NextBool(5 - ((int)calamityGlobalNPC.newAI[1] - 2)) && calamityGlobalNPC.newAI[1] >= 2f) - { - NPC.ai[1] = lanceWallPhaseTime; - NPC.netUpdate = true; - } - } } NPC.ai[1] += 1f; From 515ce39c9721fa4bed64f9ad8b6f22457a44770b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 19 Mar 2026 22:50:22 -0400 Subject: [PATCH 24/78] Malice EoL no longer gives specific rainbow bolts an extra update --- NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index 97d72394fd..72611bc33b 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -877,9 +877,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, rainbowStreakVelocity, projectileType, projectileDamage, 0f, Main.myPlayer, NPC.target, ai3); - if (Main.getGoodWorld) - Main.projectile[proj].extraUpdates += 1; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, rainbowStreakVelocity, projectileType, projectileDamage, 0f, Main.myPlayer, NPC.target, ai3); } // Spawn extra homing Rainbow Streaks per player. @@ -1113,12 +1111,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projRandomOffset, vector, projectileType, projectileDamage, 0f, Main.myPlayer, NPC.target, streakHomeTime); if (phase3) { - int proj2 = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projRandomOffset, -vector, projectileType, projectileDamage, 0f, Main.myPlayer, NPC.target, 1f - streakHomeTime); - if (Main.getGoodWorld) - { - Main.projectile[proj2].extraUpdates += 1; - Main.projectile[proj2].netUpdate = true; - } + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projRandomOffset, -vector, projectileType, projectileDamage, 0f, Main.myPlayer, NPC.target, 1f - streakHomeTime); } } From 433786000fa7c113ca2fd4e83d6e09a29084792b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 20 Mar 2026 12:15:54 -0400 Subject: [PATCH 25/78] Death Mode Queen Slime nerfs * No longer spawns gel projectiles when teleporting * No longer gets X velocity mult when jumping on top of already getting a velocity boost * Decreased number of smashes spawned and increased delay between smashes * No longer flies lower over the player in phase 2 * Crystal spike burst from phase 2 slams no longer has increased velocity * Decreased number of extra crystal spikes spawned in phase 2 slams when below 25% HP * Now stops spawning minions below 25% HP * Minions have slightly slower projectiles and significantly longer delay between firing projectiles --- .../Bosses/QueenSlimeAI.cs | 75 +++++-------------- 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs index 04e40a86a0..0412e9874e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs @@ -326,38 +326,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Spawn crown gore if (NPC.ai[1] == teleportTime) - { Gore.NewGore(NPC.GetSource_FromAI(), NPC.Center + new Vector2(-40f, -NPC.height / 2), NPC.velocity, GoreID.QueenSlimeCrown); - // Spawn spread of projectiles in Master Mode - if (death) - { - int numGelProjectiles = 12; - if (Main.getGoodWorld) - numGelProjectiles = 15; - - float gelVelocity = death ? 20f : 16f; - int type = ProjectileID.QueenSlimeGelAttack; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int j = 0; j < numGelProjectiles; j++) - { - Vector2 spinningpoint = new Vector2(gelVelocity, 0f); - - if (Main.getGoodWorld) - spinningpoint *= Main.rand.NextFloat() + 0.5f; - - spinningpoint = spinningpoint.RotatedBy((float)(-j) * MathHelper.TwoPi / (float)numGelProjectiles, Vector2.Zero); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, spinningpoint, type, LargeGelDamage, 0f, Main.myPlayer, 0f, -2f); - Main.projectile[proj].timeLeft = 900; - } - } - - SoundEngine.PlaySound(SoundID.Item155, NPC.Center); - } - } - if (NPC.ai[1] >= teleportTime && Main.netMode != NetmodeID.MultiplayerClient) { NPC.Bottom = new Vector2(NPC.localAI[1], NPC.localAI[2]); @@ -459,9 +429,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.ai[2] += 1f; } - if (death) - NPC.velocity.X *= (death ? 1.4f : 1.2f); - NPC.noTileCollide = true; } else @@ -527,15 +494,15 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int type = ProjectileID.QueenSlimeSmash; Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Bottom, Vector2.Zero, type, SlamDamage, 0f, Main.myPlayer); - // Line of explosions in Master Mode + // Line of explosions in Death Mode if (death) { float expandDelay = 0f; - int maxSmashes = death ? 22 : 16; + int maxSmashes = 16; float maxSmashOffset = maxSmashes * 100f; Vector2 extraSmashPosition = NPC.Bottom + Vector2.UnitX * maxSmashOffset; int maxSmashesPerSide = maxSmashes / 2; - float maxExpandDelay = (death ? 10f : 15f) * maxSmashesPerSide; + float maxExpandDelay = 15f * maxSmashesPerSide; float smashSpawnDistanceOffset = 200f; for (int i = 0; i < maxSmashes + 1; i++) { @@ -550,7 +517,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Eruption of crystals in phase 3 if (NPC.ai[0] == 6f && phase3) { - float projectileVelocity = death ? 18f : 12f; + float projectileVelocity = 12f; type = ProjectileID.QueenSlimeMinionBlueSpike; Vector2 destination = (new Vector2(NPC.Center.X, NPC.Center.Y - 100f) - NPC.Center).SafeNormalize(Vector2.UnitY); destination *= projectileVelocity; @@ -564,7 +531,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (phase5) { - numProj = 15; + numProj = 12; destination *= 0.65f; for (int i = 0; i < numProj; i++) { @@ -853,7 +820,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Spawn small slimes // Don't spawn any slimes in final phase - if (NPC.life <= 0 || (phase4 && !death)) + if (NPC.life <= 0 || (phase4 && !death) || phase5) return false; if (Main.netMode == NetmodeID.MultiplayerClient) @@ -926,7 +893,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float flyVelocity = death ? 19f : 16f; float flyAcceleration = death ? 0.15f : 0.12f; - float flyDistanceY = death ? 350f : 450f; + float flyDistanceY = 450f; Vector2 desiredVelocity = npc.Center; @@ -1005,7 +972,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float num20 = obj.Center.Y - center.Y; float num21 = (float)Math.Sqrt(num19 * num19 + num20 * num20); int num22 = NPC.CountNPCS(NPCID.QueenSlimeMinionBlue); - if (Main.expertMode && num22 < 5 && Math.Abs(num19) < 500f && Math.Abs(num20) < 550f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) + if (num22 < 5 && Math.Abs(num19) < 500f && Math.Abs(num20) < 550f && Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height) && NPC.velocity.Y == 0f) { NPC.ai[0] = -40f; if (NPC.velocity.Y == 0f) @@ -1026,8 +993,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses vector6 *= 1.5f; int type = ProjectileID.QueenSlimeMinionBlueSpike; - Projectile.NewProjectile(NPC.GetSource_FromAI(), center, vector6 * (death ? 0.8f : 0.5f), type, SpikeDamage, 0f, Main.myPlayer); - NPC.localAI[0] = 25f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), center, vector6 * (death ? 0.7f : 0.5f), type, SpikeDamage, 0f, Main.myPlayer); + NPC.localAI[0] = death ? 50f : 25f; if (num22 > 4) break; } @@ -1053,9 +1020,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses num19 *= num21; num20 *= num21; - NPC.localAI[0] = 50f; + NPC.localAI[0] = death ? 100f : 50f; int type = ProjectileID.QueenSlimeMinionBlueSpike; - Vector2 spikeVelocity = new Vector2(num19, num20) * (death ? 0.8f : 0.5f); + Vector2 spikeVelocity = new Vector2(num19, num20) * (death ? 0.7f : 0.5f); Projectile.NewProjectile(NPC.GetSource_FromAI(), center, spikeVelocity, type, SpikeDamage, 0f, Main.myPlayer); } } @@ -1113,7 +1080,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((double)NPC.velocity.X > -0.1 && (double)NPC.velocity.X < 0.1) NPC.velocity.X = 0f; - NPC.ai[0] += (death ? 16f : Main.expertMode ? 10f : 7f); + NPC.ai[0] += death ? 16f : 10f; float num33 = -1000f; @@ -1136,14 +1103,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (num34 == 3) { NPC.velocity.Y = -8f; - NPC.velocity.X += (death ? 9 : Main.expertMode ? 6 : 3) * NPC.direction; + NPC.velocity.X += (death ? 9 : 6) * NPC.direction; NPC.ai[0] = -200f; NPC.ai[3] = NPC.position.X; } else { NPC.velocity.Y = -6f; - NPC.velocity.X += (death ? 6 : Main.expertMode ? 4 : 2) * NPC.direction; + NPC.velocity.X += (death ? 6 : 4) * NPC.direction; NPC.ai[0] = -120f; if (num34 == 1) NPC.ai[0] += num33; @@ -1208,12 +1175,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses num24 *= num26; num25 *= num26; - NPC.localAI[0] = 40f; - if (Main.expertMode) - NPC.localAI[0] = 30f; + NPC.localAI[0] = death ? 60f : 30f; int type = ProjectileID.QueenSlimeMinionPinkBall; - Vector2 pinkBallVelocity = new Vector2(num24, num25) * (death ? 0.8f : 0.5f); + Vector2 pinkBallVelocity = new Vector2(num24, num25) * (death ? 0.7f : 0.5f); Projectile.NewProjectile(NPC.GetSource_FromAI(), center2, pinkBallVelocity, type, SmallGelDamage, 0f, Main.myPlayer); } } @@ -1271,7 +1236,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((double)NPC.velocity.X > -0.1 && (double)NPC.velocity.X < 0.1) NPC.velocity.X = 0f; - NPC.ai[0] += (death ? 11f : Main.expertMode ? 7f : 5f); + NPC.ai[0] += death ? 11f : 7f; float num33 = -500f; @@ -1294,14 +1259,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (num34 == 3) { NPC.velocity.Y = -8f; - NPC.velocity.X += (death ? 9 : Main.expertMode ? 6 : 3) * NPC.direction; + NPC.velocity.X += (death ? 9 : 6) * NPC.direction; NPC.ai[0] = -200f; NPC.ai[3] = NPC.position.X; } else { NPC.velocity.Y = -6f; - NPC.velocity.X += (death ? 6 : Main.expertMode ? 4 : 2) * NPC.direction; + NPC.velocity.X += (death ? 6 : 4) * NPC.direction; NPC.ai[0] = -120f; if (num34 == 1) NPC.ai[0] += num33; From c3be6815087ad1be0f40c9f6ad95f438a5bee818 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 20 Mar 2026 15:35:25 -0400 Subject: [PATCH 26/78] Slight tweaking to Death EoL grid lance walls --- .../VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index 72611bc33b..93f63dd357 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -744,8 +744,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Expert attack or not. bool expertAttack = calamityGlobalNPC.newAI[2] == 0f; - int numLanceWalls = (death && !expertAttack) ? 8 : 6; - float lanceWallSpawnGateValue = expertAttack ? 50f : (death ? 34f : 45f); + int numLanceWalls = (death && !expertAttack) ? 9 : 6; + float lanceWallSpawnGateValue = expertAttack ? 50f : (death ? 32f : 45f); if (dayTimeEnrage) lanceWallSpawnGateValue -= expertAttack ? 4f : 6f; @@ -767,23 +767,19 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 lanceSpawnOffset = targetData9.Center; if (NPC.Distance(lanceSpawnOffset) <= 3200f) { - Vector2 lanceWallStartingPosition = Vector2.Zero; - Vector2 lanceWallDirection = Vector2.UnitY; totalProjectiles += 5f; - lanceSpacing += 50f; lanceWallSize *= (death && expertAttack) ? 0.7f : 0.5f; // Used to give the lance walls a random rotation. calamityGlobalNPC.newAI[3] = Main.rand.NextFloat(MathHelper.TwoPi); // Keeps track of the total number of lance walls used. calamityGlobalNPC.newAI[1] += 1f; - // Sync the Calamity AI variables. NPC.SyncExtraAI(); lanceSpawnOffset += -Vector2.UnitX.RotatedBy(calamityGlobalNPC.newAI[3]) * (lanceWallSize / 2f); - lanceWallStartingPosition = Vector2.UnitY.RotatedBy(calamityGlobalNPC.newAI[3]) * lanceWallSize; - lanceWallDirection = calamityGlobalNPC.newAI[3].ToRotationVector2(); + Vector2 lanceWallStartingPosition = Vector2.UnitY.RotatedBy(calamityGlobalNPC.newAI[3]) * lanceWallSize; + Vector2 lanceWallDirection = calamityGlobalNPC.newAI[3].ToRotationVector2(); int projectileType = ProjectileID.FairyQueenLance; int projectileDamage = lanceDamage; From d7115fbad21a1ce7f7ed60120f3838f6ea05b9c9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 21 Mar 2026 11:14:17 -0400 Subject: [PATCH 27/78] Perforators tweaks * Decreased medium Perforator health * All Perforator worms no longer get increased segment count in Rev, instead using Expert segment count (Death still has its current segment counts) * Shortened range at which Perforator worms are forced to turn towards the player --- NPCs/Perforator/PerforatorBodyMedium.cs | 2 +- NPCs/Perforator/PerforatorHeadLarge.cs | 4 ++-- NPCs/Perforator/PerforatorHeadMedium.cs | 6 +++--- NPCs/Perforator/PerforatorHeadSmall.cs | 4 ++-- NPCs/Perforator/PerforatorTailMedium.cs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NPCs/Perforator/PerforatorBodyMedium.cs b/NPCs/Perforator/PerforatorBodyMedium.cs index 4494237d73..c7411a4d2a 100644 --- a/NPCs/Perforator/PerforatorBodyMedium.cs +++ b/NPCs/Perforator/PerforatorBodyMedium.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 40; NPC.defense = 6; - NPC.LifeMaxNERB(130, 170, 7000); + NPC.LifeMaxNERB(120, 150, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index 9b872ecaba..b35bc6f9c9 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.Perforator if (!TailSpawned) { int Previous = NPC.whoAmI; - int maxLength = death ? 27 : revenge ? 24 : expertMode ? 21 : 15; + int maxLength = death ? 27 : expertMode ? 21 : 15; for (int segments = 0; segments < maxLength; segments++) { int lol; @@ -509,7 +509,7 @@ namespace CalamityMod.NPCs.Perforator } } - if (NPC.Distance(player.Center) > 1280f) + if (NPC.Distance(player.Center) > 1120f) NPC.velocity += (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; NPC.rotation = (float)Math.Atan2((double)NPC.velocity.Y, (double)NPC.velocity.X) + MathHelper.PiOver2; diff --git a/NPCs/Perforator/PerforatorHeadMedium.cs b/NPCs/Perforator/PerforatorHeadMedium.cs index 033cd052fa..2d80c05878 100644 --- a/NPCs/Perforator/PerforatorHeadMedium.cs +++ b/NPCs/Perforator/PerforatorHeadMedium.cs @@ -53,7 +53,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 68; NPC.defense = 2; - NPC.LifeMaxNERB(130, 170, 7000); + NPC.LifeMaxNERB(120, 150, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; @@ -422,7 +422,7 @@ namespace CalamityMod.NPCs.Perforator } } - if (NPC.Distance(player.Center) > 1280f) + if (NPC.Distance(player.Center) > 1120f) NPC.velocity += (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; @@ -465,7 +465,7 @@ namespace CalamityMod.NPCs.Perforator public static int GetMediumPerforatorSegmentsCount() { - return Main.getGoodWorld ? 20 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 14 : CalamityWorld.revenge ? 13 : Main.expertMode ? 12 : 10; + return Main.getGoodWorld ? 20 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 14 : Main.expertMode ? 12 : 10; } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/Perforator/PerforatorHeadSmall.cs b/NPCs/Perforator/PerforatorHeadSmall.cs index 8b6fbc6406..bd7536b1d2 100644 --- a/NPCs/Perforator/PerforatorHeadSmall.cs +++ b/NPCs/Perforator/PerforatorHeadSmall.cs @@ -132,7 +132,7 @@ namespace CalamityMod.NPCs.Perforator if (!TailSpawned) { int Previous = NPC.whoAmI; - int maxLength = death ? 9 : revenge ? 8 : expertMode ? 7 : 5; + int maxLength = death ? 9 : expertMode ? 7 : 5; for (int segments = 0; segments < maxLength; segments++) { int lol; @@ -413,7 +413,7 @@ namespace CalamityMod.NPCs.Perforator } } - if (NPC.Distance(player.Center) > 1280f) + if (NPC.Distance(player.Center) > 1120f) NPC.velocity += (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; NPC.rotation = (float)Math.Atan2((double)NPC.velocity.Y, (double)NPC.velocity.X) + MathHelper.PiOver2; diff --git a/NPCs/Perforator/PerforatorTailMedium.cs b/NPCs/Perforator/PerforatorTailMedium.cs index b7401df0b0..9419c0346b 100644 --- a/NPCs/Perforator/PerforatorTailMedium.cs +++ b/NPCs/Perforator/PerforatorTailMedium.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Perforator NPC.height = 50; NPC.defense = 10; - NPC.LifeMaxNERB(130, 170, 7000); + NPC.LifeMaxNERB(120, 150, 7000); if (Main.zenithWorld) NPC.lifeMax *= 4; From 309a85d9732f02ddbf76b116b9ded3b0c0a5e20f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 21 Mar 2026 16:17:54 -0500 Subject: [PATCH 28/78] Lacerator & Orderbringer Balace - Lacerator now does a reasonable amount of damage and healing - Lacerator sawblade has pierce damage falloff - Orderbringer true melee beams have pierce falloff --- Items/Weapons/Melee/Lacerator.cs | 2 +- Projectiles/Melee/OrderbringerBeam.cs | 2 ++ Projectiles/Melee/Yoyos/LaceratorYoyo.cs | 8 +++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/Lacerator.cs b/Items/Weapons/Melee/Lacerator.cs index 53d2f6cc00..27700e8c12 100644 --- a/Items/Weapons/Melee/Lacerator.cs +++ b/Items/Weapons/Melee/Lacerator.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 30; Item.height = 26; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 115; + Item.damage = 222; Item.knockBack = 7f; Item.useTime = 20; Item.useAnimation = 20; diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 2fc3736a21..c184e5faaf 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -60,6 +60,8 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 180); + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.8f); if (Projectile.numHits < 1) { Particle orb = new GlowSparkParticle(target.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY), false, 12, 0.07f, mainColor, new Vector2(1.5f, 0.8f), true); diff --git a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs index 96c173fec5..fe2ae8174c 100644 --- a/Projectiles/Melee/Yoyos/LaceratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/LaceratorYoyo.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.height = 196; Projectile.Center = Projectile.position; Projectile.originalDamage = Projectile.damage; - Projectile.damage = (int)(Projectile.damage * MathHelper.Lerp(0, 0.75f, chargeProgress)); + Projectile.damage = (int)(Projectile.damage * MathHelper.Lerp(0, 1f, chargeProgress)); sawHit = true; Projectile.usesIDStaticNPCImmunity = true; Projectile.aiStyle = -1; @@ -113,10 +113,12 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { if (sawHit) { + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.85f); Vector2 bloodpos = Projectile.Center + Projectile.DirectionTo(target.Center) * 84; - if (!spawnedBlood && Main.rand.NextBool() && chargeProgress > 0.2f && target.Hitbox.Contains(bloodpos.ToPoint())) + if (!spawnedBlood && chargeProgress > Main.rand.NextFloat() && target.Hitbox.Contains(bloodpos.ToPoint())) { - Projectile.NewProjectile(Projectile.GetSource_OnHit(target), bloodpos, Projectile.DirectionTo(target.Center).RotatedBy(sawDir * MathHelper.PiOver2 * 0.9f).RotatedByRandom(0.1f) * Main.rand.NextFloat(3f, 5f), ModContent.ProjectileType(), 4, 0f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_OnHit(target), bloodpos, Projectile.DirectionTo(target.Center).RotatedBy(sawDir * MathHelper.PiOver2 * 0.9f).RotatedByRandom(0.1f) * Main.rand.NextFloat(3f, 5f), ModContent.ProjectileType(), 8, 0f, Projectile.owner); spawnedBlood = true; } return; From fc2b2239bf374dcc6ba063df01f36265174ec9be Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 21 Mar 2026 16:25:07 -0500 Subject: [PATCH 29/78] Mutilator smaller blorb circle --- Projectiles/Melee/TheMutilatorHoldoutProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Melee/TheMutilatorHoldoutProjectile.cs b/Projectiles/Melee/TheMutilatorHoldoutProjectile.cs index 13d64dee45..47ccb9bc7e 100644 --- a/Projectiles/Melee/TheMutilatorHoldoutProjectile.cs +++ b/Projectiles/Melee/TheMutilatorHoldoutProjectile.cs @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Melee float spreadAmount = MathHelper.ToRadians(360); for (var i = 0; i < orbAmount; i++) { - Projectile.NewProjectile(Projectile.GetSource_OnHit(target), target.Center, -angle.RotatedByRandom(spreadAmount) * 3.5f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType(), 20, 0f, player.whoAmI); + Projectile.NewProjectile(Projectile.GetSource_OnHit(target), target.Center, -angle.RotatedByRandom(spreadAmount) * 3f * Main.rand.NextFloat(0.75f, 1.25f), ModContent.ProjectileType(), 20, 0f, player.whoAmI); } Particle bloodsplosion2 = new CustomPulse(target.Center, Vector2.Zero, (!ChildSafety.Disabled ? Color.CornflowerBlue : new Color(255, 32, 32)) * 0.75f, "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0.03f, 0.155f, 40); From bdb696305147a91f510b09f9d01243e485f38988 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 21 Mar 2026 18:30:20 -0400 Subject: [PATCH 30/78] Fixed Duke Fishron still having later phase transitions in Death despite the phase 3 jumpscare getting removed --- NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs index 3f33e6802b..711da670b0 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs @@ -24,9 +24,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Variables bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - bool phase2 = lifeRatio < (death ? 0.6f : 0.7f); - bool phase3 = lifeRatio < (death ? 0.3f : 0.4f); - bool phase4 = lifeRatio < (death ? 0.1f : 0.2f); + bool phase2 = lifeRatio < 0.7f; + bool phase3 = lifeRatio < 0.4f; + bool phase4 = lifeRatio < 0.2f; bool phase2AI = NPC.ai[0] > 4f; bool phase3AI = NPC.ai[0] > 9f; bool charging = NPC.ai[3] < 10f; From bff80e33016df77cfd11fcb5d0f964a15a8256fd Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 21 Mar 2026 21:00:07 -0400 Subject: [PATCH 31/78] Astrum Deus spawn changes * Spawns much higher up * Is given fast downward velocity on spawn * Segments no longer spawn bunched up on each other --- NPCs/AstrumDeus/AstrumDeusHead.cs | 21 +++++++++++---------- Projectiles/Boss/DeusRitualDrama.cs | 10 ++++++++-- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index fe6991d43f..cb1e741b72 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -341,7 +341,7 @@ namespace CalamityMod.NPCs.AstrumDeus } } - SoundEngine.PlaySound(AstrumDeusHead.SplitSound, player.Center); + SoundEngine.PlaySound(SplitSound, player.Center); } return; } @@ -401,10 +401,18 @@ namespace CalamityMod.NPCs.AstrumDeus for (int segments = 0; segments < maxLength; segments++) { int lol; + + // Spawn offsets prevent the body segments from spawning bunched on top of each other, which is exploitable if (segments >= 0 && segments < maxLength - 1) - lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, bodyType, NPC.whoAmI); + { + Vector2 bodySpawnOffset = NPC.velocity.SafeNormalize(Vector2.UnitY) * NPC.height * (segments + 1) / 2; + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - bodySpawnOffset.X), (int)(NPC.Center.Y - bodySpawnOffset.Y), bodyType, NPC.whoAmI); + } else - lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, tailType, NPC.whoAmI); + { + Vector2 tailSpawnOffset = NPC.velocity.SafeNormalize(Vector2.UnitY) * NPC.height * maxLength / 2; + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - tailSpawnOffset.X), (int)(NPC.Center.Y - tailSpawnOffset.Y), tailType, NPC.whoAmI); + } if (segments % 2 == 0) Main.npc[lol].localAI[3] = 1f; @@ -761,13 +769,6 @@ namespace CalamityMod.NPCs.AstrumDeus NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; - // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer - if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) - { - SoundEngine.PlaySound(SpawnSound, NPC.Center); - calamityGlobalNPC.newAI[1] = 1f; - } - // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing if (calamityGlobalNPC.newAI[1] < resistanceTime && ((NPC.position - NPC.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) calamityGlobalNPC.newAI[1] += 1f; diff --git a/Projectiles/Boss/DeusRitualDrama.cs b/Projectiles/Boss/DeusRitualDrama.cs index 95812d46ba..9c2a1b7d4a 100644 --- a/Projectiles/Boss/DeusRitualDrama.cs +++ b/Projectiles/Boss/DeusRitualDrama.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Boss public const int TotalSinePeriods = 6; public const int PulseTime = 45; public const int TotalRitualTime = 420; - public const float MaxUpwardRise = 540f; + public const float MaxUpwardRise = 900f; public static readonly Point PulseSize = new(300, 300); public override void SetDefaults() { @@ -42,11 +42,17 @@ namespace CalamityMod.Projectiles.Boss Time++; if (Time == TotalRitualTime - PulseTime) { + SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, Projectile.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) { - int idx = NPC.NewNPC(Projectile.GetSource_FromThis(), (int)Projectile.Center.X, (int)Projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); + int idx = NPC.NewNPC(Projectile.GetSource_FromThis(), (int)Projectile.Center.X, (int)Projectile.Center.Y - (int)(MaxUpwardRise * 3f), ModContent.NPCType(), 1); if (idx != -1) + { CalamityUtils.BossAwakenMessage(idx); + Main.npc[idx].velocity = Vector2.UnitY * 20f; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); + } } } } From 2ce9ca1594f72b3de78f9cc7ca03400abefa651d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 22 Mar 2026 17:36:57 -0500 Subject: [PATCH 32/78] Added Crit Dmg & Minion Slot Tooltips - All items that need minion slots list their minion slot cost directly above "Uses X Mana" tooltip line - Adjusted logic for setting crit that scales dmg with crit chance to scale crit dmg stat, made into one extension that is used everywhere scaling force crit is used - Items that always use scaling force crit on all attacks now replace crit chance with crit dmg in tooltip - Omega Blue Tentacles now scaling force crit - Thread of Eradication now scaling force crits, rebalance to match --- Items/CalamityGlobalItemTooltip.cs | 14 +++++++++++ Items/Weapons/Melee/GildedProboscis.cs | 12 ++-------- Items/Weapons/Ranged/ThreadOfEradication.cs | 8 ++++++- .../Weapons/Summon/VoidConcentrationStaff.cs | 5 ---- Projectiles/DraedonsArsenal/AugerSlash.cs | 6 ++--- .../CountermeasurePalmBlast.cs | 7 +++--- .../DraedonsArsenal/NidhoggRailgunBigShot.cs | 11 +++++---- Projectiles/Melee/HellkiteHoldout.cs | 6 ++--- .../Melee/Spears/GildedProboscisProj.cs | 7 ++---- Projectiles/Ranged/NovaChargedShot.cs | 8 ++----- .../Ranged/OntoligicalDespoilerBurst.cs | 6 ++--- .../Ranged/OntologicalDespoilerBeam.cs | 6 ++--- .../Ranged/OntologicalDespoilerGrenade.cs | 8 ++----- .../Typeless/BatholithBangleProjectile.cs | 5 ++-- .../Typeless/BlackGlassBandProjectile.cs | 7 ++---- Projectiles/Typeless/FriendlyLaserWallBeam.cs | 7 ++++++ Projectiles/Typeless/OmegaBlueTentacle.cs | 3 ++- .../Typeless/ProtolithBangleProjectile.cs | 6 ++--- Systems/Collections/CalamityItemSets.cs | 5 ++++ Utilities/HitModiferUtils.cs | 23 +++++++++++++++++++ 20 files changed, 94 insertions(+), 66 deletions(-) create mode 100644 Utilities/HitModiferUtils.cs diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index ff3204552b..24735fca0a 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -163,6 +163,20 @@ namespace CalamityMod.Items } } + //Replace Crit Chance with Crit Damage on applicable tooltips + if (CalamityItemSets.ShowScalingCritDamageTooltip[item.type]) + { + float cdmg = 2f + Main.LocalPlayer.Calamity().critDamage + Main.LocalPlayer.GetTotalCritChance(TrueMeleeNoSpeedDamageClass.Instance) * 0.02f; + tooltips.FirstOrDefault(x => x.Name == "CritChance")!.Text = CalamityUtils.GetText("Common.CritDamageTootip").Format(cdmg.ToPercent()); + } + + //Add "Uses X Minion Slots right above "Uses X Mana" + if (ItemID.Sets.StaffMinionSlotsRequired[item.type] > 0) + { + tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback") + 1, new(Mod, "Minions", CalamityUtils.GetText("Common.MinionSlotCost").Format(ItemID.Sets.StaffMinionSlotsRequired[item.type]))); + } + + // Everything below this line can only apply to modded items. If the item is vanilla, stop here for efficiency. if (item.type < ItemID.Count) return; diff --git a/Items/Weapons/Melee/GildedProboscis.cs b/Items/Weapons/Melee/GildedProboscis.cs index 6fdeb93033..bae656ef03 100644 --- a/Items/Weapons/Melee/GildedProboscis.cs +++ b/Items/Weapons/Melee/GildedProboscis.cs @@ -1,11 +1,9 @@ using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Systems.Collections; using Terraria; using Terraria.ID; using Terraria.ModLoader; -using System.Collections.Generic; -using System.Linq; namespace CalamityMod.Items.Weapons.Melee { @@ -18,15 +16,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { base.SetStaticDefaults(); + CalamityItemSets.ShowScalingCritDamageTooltip[Type] = true; } public override bool SizeModifiers => false; - - public override void ModifyTooltips(List tooltips) - { - float cdmg = 2f + Main.LocalPlayer.Calamity().critDamage + Main.LocalPlayer.GetTotalCritChance(TrueMeleeNoSpeedDamageClass.Instance) * 0.02f; - tooltips.FirstOrDefault(x => x.Name == "CritChance")!.Text = CalamityUtils.GetText("Common.CritDamageTootip").Format(cdmg.ToPercent()); - - } public override void SetDefaults() { Item.width = 66; diff --git a/Items/Weapons/Ranged/ThreadOfEradication.cs b/Items/Weapons/Ranged/ThreadOfEradication.cs index e7b0499bac..722fb0535e 100644 --- a/Items/Weapons/Ranged/ThreadOfEradication.cs +++ b/Items/Weapons/Ranged/ThreadOfEradication.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Projectiles.Typeless; using CalamityMod.Rarities; +using CalamityMod.Systems.Collections; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -16,6 +17,11 @@ namespace CalamityMod.Items.Weapons.Ranged public class ThreadOfEradication : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public override void SetStaticDefaults() + { + CalamityItemSets.ShowScalingCritDamageTooltip[Type] = true; + } public override void ModifyTooltips(List tooltips) { tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); @@ -24,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 40; Item.height = 82; - Item.damage = 2570; + Item.damage = 1500; Item.DamageType = DamageClass.Ranged; Item.useTime = Item.useAnimation = 45; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 5ad1a5cec5..e71c91306d 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -93,11 +93,6 @@ namespace CalamityMod.Items.Weapons.Summon return false; } public override bool AltFunctionUse(Player player) => true; - - public override void ModifyTooltips(List tooltips) - { - tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback")+1,new(Mod,"Minions",CalamityUtils.GetText("Common.MinionSlotCost").Format(4))); - } } #endregion diff --git a/Projectiles/DraedonsArsenal/AugerSlash.cs b/Projectiles/DraedonsArsenal/AugerSlash.cs index dfe7bc00b1..8d57ef5c26 100644 --- a/Projectiles/DraedonsArsenal/AugerSlash.cs +++ b/Projectiles/DraedonsArsenal/AugerSlash.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Dusts; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -84,13 +85,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal target.MoveNPC(launchVel, launchPower, true, Owner); if (Projectile.ai[2] == 5) - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); float minMult = 0.3f; int hitsToMinMult = 7; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= (Projectile.ai[2] == 5 ? (1f + critDamage) : 1) * damageMult; + modifiers.SourceDamage *= damageMult; if (Projectile.numHits == 0) { diff --git a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs index 07263d5cca..b94a6f39b0 100644 --- a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs +++ b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -54,13 +55,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); + Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); float minMult = 0.25f; int hitsToMinMult = 7; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= damageMult + critDamage; + modifiers.SourceDamage *= damageMult; Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 40; diff --git a/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs b/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs index 7d14fdce6e..d3805014a1 100644 --- a/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs +++ b/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs @@ -1,8 +1,9 @@ -using CalamityMod.Dusts; +using System; +using CalamityMod.Dusts; using CalamityMod.Particles; using CalamityMod.Projectiles.Ranged; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; -using System; using Terraria; using Terraria.ModLoader; @@ -78,13 +79,13 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (onKill && Projectile.numHits > 0) Projectile.numHits--; - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); + Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); float minMult = 0.25f; int hitsToMinMult = 7; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= damageMult + critDamage; + modifiers.SourceDamage *= damageMult; Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 20; diff --git a/Projectiles/Melee/HellkiteHoldout.cs b/Projectiles/Melee/HellkiteHoldout.cs index f2595cf48f..7a185698b5 100644 --- a/Projectiles/Melee/HellkiteHoldout.cs +++ b/Projectiles/Melee/HellkiteHoldout.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -395,13 +396,12 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (chargedSwing) - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); float minMult = 0.25f; int hitsToMinMult = 10; float damageMult = Utils.Remap(pierceReduction, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= (chargedSwing ? (2.9f + critDamage) : 1) * damageMult; + modifiers.SourceDamage *= (chargedSwing ? 2.9f : 1) * damageMult; } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index b61bd6042b..993cb284c2 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -3,6 +3,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -265,10 +266,6 @@ namespace CalamityMod.Projectiles.Melee.Spears Projectile.damage = (int)(Projectile.damage * 0.925f); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.SetCrit(); - float critDamage = Main.player[Projectile.owner].GetTotalCritChance(Projectile.DamageType) * 0.02f; - modifiers.CritDamage += critDamage; - } + => modifiers.ApplyScalingForcedCrit(Projectile); } } diff --git a/Projectiles/Ranged/NovaChargedShot.cs b/Projectiles/Ranged/NovaChargedShot.cs index 63bb4b40ca..36aaa3e5a1 100644 --- a/Projectiles/Ranged/NovaChargedShot.cs +++ b/Projectiles/Ranged/NovaChargedShot.cs @@ -2,6 +2,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -107,12 +108,7 @@ namespace CalamityMod.Projectiles.Ranged } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.SetCrit(); - Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); - modifiers.SourceDamage *= 1 + critDamage; - } + => modifiers.ApplyScalingForcedCrit(Projectile); public override bool? CanDamage() => base.CanDamage(); } } diff --git a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs index 58d4c289ed..f68087abfd 100644 --- a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs +++ b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -29,13 +30,12 @@ namespace CalamityMod.Projectiles.Ranged } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); float minMult = 0.45f; int hitsToMinMult = 15; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= (damageMult + critDamage); + modifiers.SourceDamage *= (damageMult); Vector2 launchVel = Projectile.Center.DirectionTo(target.Center); float launchPower = 20; diff --git a/Projectiles/Ranged/OntologicalDespoilerBeam.cs b/Projectiles/Ranged/OntologicalDespoilerBeam.cs index 9e8d5a9584..4232afc346 100644 --- a/Projectiles/Ranged/OntologicalDespoilerBeam.cs +++ b/Projectiles/Ranged/OntologicalDespoilerBeam.cs @@ -1,6 +1,7 @@ using System; using CalamityMod.Dusts; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -127,11 +128,8 @@ namespace CalamityMod.Projectiles.Ranged } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); - modifiers.SourceDamage *= 1 + critDamage; - Vector2 launchVel = Projectile.velocity; float launchPower = 60; target.MoveNPC(launchVel, launchPower, true, Owner); diff --git a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs index fe4aa1371d..7c3c00796b 100644 --- a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs +++ b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using CalamityMod.Dusts; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -200,12 +201,7 @@ namespace CalamityMod.Projectiles.Ranged return useColor; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.SetCrit(); - Player Owner = Main.player[Projectile.owner]; - float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); - modifiers.SourceDamage *= 1 + critDamage; - } + => modifiers.ApplyScalingForcedCrit(Projectile); public override bool PreDraw(ref Color lightColor) { if (time < 2) diff --git a/Projectiles/Typeless/BatholithBangleProjectile.cs b/Projectiles/Typeless/BatholithBangleProjectile.cs index 85919f69ec..9b62683820 100644 --- a/Projectiles/Typeless/BatholithBangleProjectile.cs +++ b/Projectiles/Typeless/BatholithBangleProjectile.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -117,9 +118,7 @@ namespace CalamityMod.Projectiles.Typeless } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SetCrit(); - float critDamage = Math.Min(Owner.GetTotalCritChance(AverageDamageClass.Instance) * 0.01f, 1f); - modifiers.SourceDamage *= 1 + critDamage; + modifiers.ApplyScalingForcedCrit(Projectile); Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center) - Vector2.UnitY; float launchPower = 9; diff --git a/Projectiles/Typeless/BlackGlassBandProjectile.cs b/Projectiles/Typeless/BlackGlassBandProjectile.cs index b48eb8ccb2..688c5d7524 100644 --- a/Projectiles/Typeless/BlackGlassBandProjectile.cs +++ b/Projectiles/Typeless/BlackGlassBandProjectile.cs @@ -2,6 +2,7 @@ using CalamityMod.Cooldowns; using CalamityMod.Items.Accessories; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -61,11 +62,7 @@ namespace CalamityMod.Projectiles.Typeless time++; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.SetCrit(); - float critDamage = Math.Min(Owner.GetTotalCritChance(AverageDamageClass.Instance) * 0.01f, 1f); - modifiers.SourceDamage *= (1 + critDamage); - } + => modifiers.ApplyScalingForcedCrit(Projectile); public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { bool hasCD = Owner.Calamity().cooldowns.TryGetValue(GenericBandCooldown.ID, out CooldownInstance bandCD); diff --git a/Projectiles/Typeless/FriendlyLaserWallBeam.cs b/Projectiles/Typeless/FriendlyLaserWallBeam.cs index 95f8ae5d59..0227ecb343 100644 --- a/Projectiles/Typeless/FriendlyLaserWallBeam.cs +++ b/Projectiles/Typeless/FriendlyLaserWallBeam.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -130,6 +131,12 @@ namespace CalamityMod.Projectiles.Typeless return hitCheck; } } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Projectile.CountsAsClass(DamageClass.Ranged)) //Thread of Eradication + modifiers.ApplyScalingForcedCrit(Projectile); + } public override bool PreDraw(ref Color lightColor) { if (laserFX == 0) diff --git a/Projectiles/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index 2febbae82d..c012fe89c4 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -1,4 +1,5 @@ using CalamityMod.NPCs; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -171,7 +172,7 @@ namespace CalamityMod.Projectiles.Typeless public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.Calamity().omegaBlueAbyssalMadness) - modifiers.SetCrit(); + modifiers.ApplyScalingForcedCrit(Projectile); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Owner.DoLifestealDirect(target, 10 * hit.Damage / Projectile.damage, 0.5f); diff --git a/Projectiles/Typeless/ProtolithBangleProjectile.cs b/Projectiles/Typeless/ProtolithBangleProjectile.cs index fae2961e9b..eda80a8c8c 100644 --- a/Projectiles/Typeless/ProtolithBangleProjectile.cs +++ b/Projectiles/Typeless/ProtolithBangleProjectile.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using ReLogic.Utilities; using Terraria; @@ -101,13 +102,12 @@ namespace CalamityMod.Projectiles.Typeless } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SetCrit(); - float critDamage = Math.Min(Owner.GetTotalCritChance(AverageDamageClass.Instance) * 0.01f, 1f); + modifiers.ApplyScalingForcedCrit(Projectile); float minMult = 0.1f; int hitsToMinMult = 5; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); - modifiers.SourceDamage *= damageMult + critDamage; + modifiers.SourceDamage *= damageMult; Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center) - Vector2.UnitY; float launchPower = 6; diff --git a/Systems/Collections/CalamityItemSets.cs b/Systems/Collections/CalamityItemSets.cs index 5c01ead45c..7cd1742e0d 100644 --- a/Systems/Collections/CalamityItemSets.cs +++ b/Systems/Collections/CalamityItemSets.cs @@ -135,5 +135,10 @@ namespace CalamityMod.Systems.Collections /// public static bool[] RogueSpikyBall = Factory.CreateBoolSet(ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType()); + + public static bool[] ShowScalingCritDamageTooltip = Factory + .CreateNamedSet("ShowScalingCritDamageTooltip") + .Description("Replaces Crit Chance tooltip line with Crit Damage, getting 2% crit dmg per 1% crit chance") + .RegisterBoolSet(); } } diff --git a/Utilities/HitModiferUtils.cs b/Utilities/HitModiferUtils.cs new file mode 100644 index 0000000000..12c60828ef --- /dev/null +++ b/Utilities/HitModiferUtils.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Terraria; +using Terraria.WorldBuilding; + +namespace CalamityMod.Utilities +{ + internal static class HitModiferUtils + { + extension(NPC.HitModifiers modifiers) + { + internal void ApplyScalingForcedCrit(Projectile Projectile) + { + modifiers.SetCrit(); + float critDamage = Main.player[Projectile.owner].GetTotalCritChance(Projectile.DamageType) * 0.02f; + modifiers.CritDamage += critDamage; + } + } + } +} From 305dc854e96c43b2c6bb6f1e40bac9c7a46ce74d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 23 Mar 2026 18:53:52 -0400 Subject: [PATCH 33/78] Brain health reshuffling --- NPCs/CalamityGlobalNPC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index cb4ef52c26..7d23915c2b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1301,10 +1301,10 @@ namespace CalamityMod.NPCs npc.lifeMax *= 4; break; case NPCID.BrainofCthulhu: - npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.75); + npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.95); break; case NPCID.Creeper: - npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.175); + npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.1); break; case NPCID.QueenBee: npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.8); From 7f7d8d326fd70a27e507141e128dbe02d6dc8259 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 23 Mar 2026 22:00:49 -0700 Subject: [PATCH 34/78] The Rework Basic Burst can now crit --- .../en-US/Mods.CalamityMod.Items.Ammo.hjson | 8 +- .../Mods.CalamityMod.Projectiles.Ranged.hjson | 1 - Particles/CustomColorChangeSpark.cs | 141 ++++++ Projectiles/Ranged/DryadsTearMain.cs | 440 ++++++++++++++++-- Projectiles/Ranged/DryadsTearMain.png | Bin 135 -> 0 bytes Projectiles/Ranged/DryadsTearSplit.cs | 61 --- Projectiles/Ranged/DryadsTearSplit.png | Bin 115 -> 0 bytes Projectiles/Typeless/BasicBurst.cs | 8 + 8 files changed, 562 insertions(+), 97 deletions(-) create mode 100644 Particles/CustomColorChangeSpark.cs delete mode 100644 Projectiles/Ranged/DryadsTearMain.png delete mode 100644 Projectiles/Ranged/DryadsTearSplit.cs delete mode 100644 Projectiles/Ranged/DryadsTearSplit.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 0c6da2395a..814d89f209 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -48,7 +48,13 @@ CinderArrow: { DryadsTear: { DisplayName: Dryad's Tear - Tooltip: Splits into homing shards on impact which ignore 10 points of enemy defense + Tooltip: + ''' + An extremely powerful magic bullet blessed with nature's essence that becomes unstable when multiple are nearby + Carries a teardrop along with it which on impact will detach and crash down upon the hit enemy and burst + All bullet and teardrop hits have 18 armor penetration + [c/40E091:'Focus. Breathe. Just one more shot, and the violence will fade away...'] + ''' } ElysianArrow: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson index 7d68549da7..11c64b5d92 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Ranged.hjson @@ -67,7 +67,6 @@ DrizzlefishFire.DisplayName: Drizzlefish Flames DrizzlefishFireball.DisplayName: Drizzlefish Fireball DrizzlefishFireSplit.DisplayName: Drizzlefish Flames DryadsTearMain.DisplayName: Dryad's Tear -DryadsTearSplit.DisplayName: Dryad's Tear ElysianArrowProj.DisplayName: Elysian Arrow ElysianArrowRain.DisplayName: Elysian Light EmesisGore.DisplayName: Rotten Gore diff --git a/Particles/CustomColorChangeSpark.cs b/Particles/CustomColorChangeSpark.cs new file mode 100644 index 0000000000..d17c5d92ce --- /dev/null +++ b/Particles/CustomColorChangeSpark.cs @@ -0,0 +1,141 @@ +using System; +using CalamityMod.Systems.Graphic.PixelationSystem; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class CustomColorChangeSpark : Particle + { + public Color InitialColor; + public Color EndColor; + public bool AffectedByGravity; + public bool FadeIn = false; + public float FadeInScale = 0f; + public bool GlowCenter = false; + public float GlowCenterScale = 1; + public float GlowOpacity = 1; + public string NewTexture; + public float ExtraRotation; + public Vector2 Stretch = new Vector2(0.5f, 1.6f); + public float ShrinkSpeed = 0; + public bool FlipHorizontal = false; + public bool NoShrink = false; + public float Spin = 0; + public float ColorFadeSpeed = 0; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public bool AltVisual = true; + public override bool UseAdditiveBlend => AltVisual; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + + public CustomColorChangeSpark(Vector2 relativePosition, Vector2 velocity, string texture, bool affectedByGravity, int lifetime, float scale, Color startColor, Color endColor, Vector2 stretch, bool useAddativeBlend = true, bool glowCenter = false, float extraRotation = 0, bool fadeIn = false, bool affectedByLight = false, float shrinkSpeed = 0, float glowCenterScale = 1, float glowOpacity = 1, bool flipHorizontal = false, bool noShrink = false, float spin = 0, float colorFadeSpeed = 3) + { + Position = relativePosition; + Velocity = velocity; + NewTexture = texture; + ExtraRotation = extraRotation; + AffectedByGravity = affectedByGravity; + AffectedByLight = affectedByLight; + Scale = scale; + Stretch = stretch; + FadeInScale = scale; + Lifetime = lifetime; + Color = InitialColor = startColor; + EndColor = endColor; + ShrinkSpeed = shrinkSpeed; + + AltVisual = useAddativeBlend; + GlowCenter = glowCenter; + GlowCenterScale = glowCenterScale; + GlowOpacity = glowOpacity; + FlipHorizontal = flipHorizontal; + NoShrink = noShrink; + + FadeIn = fadeIn; + + if (FadeIn) + Scale = 0f; + Spin = spin; + ColorFadeSpeed = colorFadeSpeed; + } + + public override void Update() + { + if (!FadeIn) + { + if (!NoShrink) + Scale *= 0.95f; + Color = Color.Lerp(InitialColor, EndColor, LifetimeCompletion); + } + else + { + if ((float)Time / (float)Lifetime < 0.5f) + { + Scale = MathHelper.Lerp(Scale, FadeInScale, 0.2f); + } + else + { + Scale = MathHelper.Lerp(Scale, FadeInScale, -0.21f); + } + } + Velocity *= 0.95f; + if (Velocity.Length() < 12f && AffectedByGravity) + { + Velocity.X *= 0.94f; + Velocity.Y += 0.25f; + } + ExtraRotation += Spin; + Rotation = Velocity.ToRotation() + MathHelper.PiOver2 + ExtraRotation; + + Stretch.X *= (1 - 0.2f * ShrinkSpeed); + Stretch.Y *= (1 + 0.2f * ShrinkSpeed); + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + Vector2 scale = Stretch * Scale; + Texture2D texture = ModContent.Request(NewTexture).Value; + + float scaleMult = 1; + if (Main.zenithWorld) + { + DateTime day = DateTime.Now; + if (day.DayOfWeek == DayOfWeek.Tuesday) + { + Texture2D joke = ModContent.Request("CalamityMod/Particles/MammothParticle").Value; + scaleMult = (MathHelper.Lerp(texture.Size().X / joke.Size().X, texture.Size().Y / joke.Size().Y, 0.5f)); + texture = joke; + AltVisual = true; + } + } + + Color col = Color; + + if (AffectedByLight) + { + col = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGB(Color); + } + + if (Pixelate) + { + PixelationManager.AddPixelatedDrawer((_) => + { + float fadeOut = (1 - (float)Math.Pow(LifetimeCompletion, ColorFadeSpeed)); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, col * fadeOut, Rotation, texture.Size() * 0.5f, scale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f); + if (GlowCenter) + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.White, 0.8f) * fadeOut * GlowOpacity, Rotation, texture.Size() * 0.5f, scale * 0.8f * GlowCenterScale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + }, Enums.GeneralDrawLayer.AfterProjectiles, UseAdditiveBlend ? BlendState.Additive : null); + } + else + { + float fadeOut = (1 - (float)Math.Pow(LifetimeCompletion, ColorFadeSpeed)); + spriteBatch.Draw(texture, Position - Main.screenPosition, null, col * fadeOut, Rotation, texture.Size() * 0.5f, scale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f); + if (GlowCenter) + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.White, 0.8f) * fadeOut * GlowOpacity, Rotation, texture.Size() * 0.5f, scale * 0.8f * GlowCenterScale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + } + } + } +} diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index 48d0f4c787..e7cab20273 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -1,74 +1,446 @@ -using CalamityMod.Particles; +using System; +using System.Linq; +using System.Runtime.InteropServices.Marshalling; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Dusts; +using CalamityMod.Enums; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Typeless; +using CalamityMod.Systems.Graphic.PixelationSystem; +using Microsoft.Build.Construction; +using Microsoft.CodeAnalysis; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged { - public class DryadsTearMain : ModProjectile, ILocalizedModType + public class DryadsTearMain : ModProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer { public new string LocalizationCategory => "Projectiles.Ranged"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public ref float time => ref Projectile.localAI[1]; + public int turnDirection = 0; // Direction it will rotate + public int turnChange = 0; // Adds variance to multiple aspects of the bullet, including when it will change its turn direction + public float turnIntensity = 0; // Adds a bit more variance, this time to velocity + public float damageMult = 1; // Multiplier that updates instantly, used for most of the gameplay effects + public float visualMult = 0.75f;// Multiplier that updates over time, used for most of the visual effects + public Vector2 dropletPosition; // The position of the orbiting teardrop + public Vector2 lastDropletPosition; // The previous position of the orbiting teardroplet + public Vector2 dropletVel; // The velocity of the teardrop + public float orbitSine = 0; // A sine wave multiplier for the orbiting arc + public static int startingUpdates = 5; // The number of extra updates the projectile starts with + public bool dropletAttack = false; // If the bullet has begun sending it's droplet to attack + public float dropletAttackLerp = 1; // A lerp variable used for timing the droplet's attack + public int frameDelay = 0; // A few frames of delay after landing on the enemy before explosing, which improves the visuals + public bool detachEffects = true; // Used for the moment when the droplet detatched from the main bullet + public float finalEffectMult => Projectile.scale * visualMult; // Used for many but not all visual scaling effects + public NPC targeted; // The target being attacked by the droplet + public ref float trueLifetime => ref Projectile.ai[2]; // The lifetime of the projectile, used over vanilla lifetime because it can increment by decimals + + public int effectSpeedMod = 0; // Used to add variance to effects when firing rapidly + public int fadeLifetime => (int)(35 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time in which the projectile fades out and can no longer hit anything + public int extendedLifetime => (int)(85 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time after lifetime reaches zero where the droplet does its attack + public bool fading => trueLifetime <= fadeLifetime; // If the projectile is fading away + public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailCacheLength[Type] = 35; ProjectileID.Sets.TrailingMode[Type] = 2; } - public override void SetDefaults() { - Projectile.width = 4; - Projectile.height = 4; + Projectile.width = 20; + Projectile.height = 20; Projectile.aiStyle = ProjAIStyleID.Arrow; AIType = ProjectileID.Bullet; Projectile.friendly = true; Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 1; - Projectile.timeLeft = 600; - Projectile.extraUpdates = 5; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.timeLeft = 300; + Projectile.ArmorPenetration = 18; + Projectile.extraUpdates = startingUpdates; } public override void AI() { - Lighting.AddLight(Projectile.Center, Color.LimeGreen.ToVector3() * 0.25f); - - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) + if (dropletAttack && targeted != null && (targeted.life <= 0 || !targeted.active)) // If the chosen target becomes invalid, target a near enemy instead + targeted = Projectile.Center.ClosestNPCAt(1000); if (targeted == null) dropletAttack = false; // If that fails, cancel the teardrop effect + Projectile.timeLeft++; // Keep regular lifetime from going down, since it uses it's own lifetime timer + Projectile.scale = 1 - MathF.Pow(Utils.GetLerpValue(fadeLifetime, 0, trueLifetime, true), 3); // fade out the bullet scale when lifetime is at its end + + if (turnDirection == 0) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(5) ? 131 : 294, -Projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f)); + trueLifetime = fadeLifetime * 1.5f; + turnDirection = Main.rand.NextBool() ? -1 : 1; + turnChange = Main.rand.Next(30, 190 + 1); + turnIntensity = Main.rand.NextFloat(0.2f, 1.6f); + effectSpeedMod = Main.rand.Next(5, 35); + } + if (time % turnChange == 0 && !fading) + turnDirection *= -1; + + visualMult = MathHelper.Lerp(visualMult, damageMult, 0.1f / Projectile.MaxUpdates); + + float speed = 8 * MathF.Pow(visualMult, 0.3f) * Math.Max(MathF.Pow(Utils.GetLerpValue(0, fadeLifetime, trueLifetime, true), 2), 0.1f); + + bool chanceForDust = Main.rand.NextBool((int)Math.Clamp((fading ? 8 : 5) / finalEffectMult, 3, 60)); + if (time > 12 && chanceForDust && finalEffectMult > 0.1f) // Some dust effects + { + Dust dust = Dust.NewDustPerfect(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 5 + Main.rand.NextVector2CircularEdge(9, 9) * finalEffectMult, ModContent.DustType(), -Projectile.velocity * Main.rand.NextFloat(0.1f, 0.4f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.45f, 0.65f); - if (dust.type == 131) - dust.scale = Main.rand.NextFloat(0.35f, 0.55f); + dust.scale = Main.rand.NextFloat(0.85f, 1.0f) * finalEffectMult; + dust.color = Color.Aquamarine; + dust.noLight = true; + dust.fadeIn = 1; + } + Lighting.AddLight(Projectile.Center, Color.LimeGreen.ToVector3() * 0.4f * finalEffectMult); + + if (time > 0) // Reduce damage and visual intensity for every projectile of this type from the same player that are relativley close to each other + { + float damageReduction = 1; + int ownedProj = Owner.ownedProjectileCounts[Projectile.type]; + for (int x = 0; x < Main.maxProjectiles; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.owner == Projectile.owner && projectile.active && projectile.type == Projectile.type && projectile != Projectile) + damageReduction++; + } + float newDamageMult = MathF.Pow(1 / damageReduction, 0.25f); + if (newDamageMult < damageMult && !fading) + damageMult = newDamageMult; + } + + if (damageMult >= 1) + damageMult = 1.5f; + + if (true) // Adjust velocity to make innacurate if multiple bullets exist + { + float movement = Main.rand.NextFloat(0.009f, 0.0115f) * speed; + if (damageMult < 1) + Projectile.velocity += Vector2.Lerp(Projectile.velocity.RotatedBy(MathHelper.PiOver2 * turnDirection).SafeNormalize(Vector2.UnitX) * movement * turnIntensity, Projectile.velocity, MathF.Pow(Math.Min(damageMult + 0.15f, 1), 3.3f)); + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed; + } + float startDropAttackTime = 0; + if (dropletAttack && trueLifetime <= startDropAttackTime) + { + if (detachEffects) + { + Projectile.extraUpdates = startingUpdates; + float scale = 0.7f * damageMult; + SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact with { Volume = 0.9f * damageMult, Pitch = 0.3f }, Projectile.Center); + for (int i = 0; i <= 2; i++) + { + CustomColorChangeSpark detach = new CustomColorChangeSpark(dropletPosition, Vector2.UnitY * 0.1f, "CalamityMod/Particles/BloomCircle", false, 15, 0.45f * scale, Color.Lime, Color.Turquoise, new Vector2(1f, 1f), true, true, colorFadeSpeed: 5, shrinkSpeed: -0.25f, extraRotation: MathHelper.PiOver2); + GeneralParticleHandler.SpawnParticle(detach, true); + } + for (int i = -1; i <= 1; i += 2) + { + CustomColorChangeSpark detachWave = new CustomColorChangeSpark(dropletPosition, Vector2.UnitX * 1.5f * i * scale, "CalamityMod/Particles/ArchSmear", false, 15, 0.35f * scale, Color.Turquoise, Color.Lime, new Vector2(0.8f, 1.1f), colorFadeSpeed: 5, shrinkSpeed: 0.45f); + GeneralParticleHandler.SpawnParticle(detachWave, true); + } + for (int i = -2; i <= 2; i += 1) // 4 + { + float angle = MathHelper.PiOver4 / 2; + Vector2 vel = Vector2.UnitX.RotatedBy(Math.Abs(i) == 1 ? angle : -angle) * 2.2f * Math.Sign(i) * scale; + for (int t = -1; t <= 1; t++) // 3 + { + Dust dust = Dust.NewDustPerfect(dropletPosition, ModContent.DustType(), vel.RotatedBy(0.25f * t) * (2.5f - Math.Abs(t))); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.45f, 1.55f) * scale; + dust.color = t == 0 ? Color.Aquamarine : Color.Lime; + dust.noLight = true; + dust.fadeIn = 1 * scale; + dust.customData = new Vector2(0.6f, 3.5f); + } + if (i == -1) + i++; + } + detachEffects = false; + } + dropletAttackLerp = (1 - MathF.Pow(Utils.GetLerpValue(startDropAttackTime, -extendedLifetime, trueLifetime, true), 4)) * damageMult; + Vector2 Xoffset = Vector2.UnitX * (targeted.width * 0.5f * turnIntensity) * (1 - damageMult) * turnDirection; + Vector2 goalPosition = targeted.Center + Xoffset - (Vector2.UnitY * (targeted.height / 2 + (220 + turnChange))) * dropletAttackLerp; + Vector2 goalVel = (goalPosition - dropletPosition) / ((1 + 6 * dropletAttackLerp) * Projectile.MaxUpdates); + dropletVel = goalVel; + lastDropletPosition = dropletPosition; + dropletPosition += dropletVel; + } + else + { + float sineTimer = time + turnChange; + float sine = MathF.Sin((sineTimer / 0.5f) / MathHelper.Pi / startingUpdates); + float sine2 = MathF.Sin((sineTimer / 1f) / MathHelper.Pi / startingUpdates); + orbitSine = MathHelper.Lerp(Math.Abs(sine2), 0.1f, 1 - Math.Abs(sine2)); + float xOrbit = 35f * finalEffectMult; + float yOrbit = 25f * finalEffectMult; + if (finalEffectMult > 0.35f) + dropletPosition = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * xOrbit * sine + Projectile.velocity.SafeNormalize(Vector2.UnitX) * yOrbit * orbitSine; else - dust.fadeIn = 0.5f; + dropletPosition += (dropletVel * 3f + (Projectile.velocity.SafeNormalize(Vector2.UnitX) + dropletPosition.DirectionFrom(Projectile.Center)) * 0.75f) * finalEffectMult; + + } + + if (lastDropletPosition == Vector2.Zero) lastDropletPosition = dropletPosition; + bool lowLifetime = trueLifetime <= fadeLifetime / 5; + if (time > 1 * Projectile.MaxUpdates && (!lowLifetime || dropletAttack)) + { + if (!lowLifetime) + { + CustomColorChangeSpark trail = new CustomColorChangeSpark(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * (20 - Math.Min(9f / finalEffectMult, 40)), -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 0.1f, "CalamityMod/Particles/BloomCircle", false, + (int)(18 * finalEffectMult), 0.2f * finalEffectMult, Color.Turquoise, Color.Lime, new Vector2(0.25f, 2.25f * Utils.Remap(speed, 7, 0.5f, 1, 0.1f)), noShrink: true, colorFadeSpeed: 5); + GeneralParticleHandler.SpawnParticle(trail, true); + } + + bool falling = trueLifetime < -extendedLifetime * 0.65f; + float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp)) * damageMult : finalEffectMult); + if (dropletScaling > 0.35f && frameDelay < 2 && (trueLifetime > -extendedLifetime * 0.4f || falling)) + { + float dropLerp = MathF.Pow(Utils.GetLerpValue(startDropAttackTime, -extendedLifetime, trueLifetime, true), 2.5f); + if (lastDropletPosition != dropletPosition) + dropletVel = lastDropletPosition.DirectionTo(dropletPosition); + float speedMult = falling ? dropLerp * 0.5f : Utils.Remap(speed, 7, 0.5f, 1, 0.1f); + float colorMult = falling ? 1 - dropLerp * 0.35f : 1; + CustomColorChangeSpark dropTrail = new CustomColorChangeSpark(dropletPosition - dropletVel * 16.5f * speedMult * dropletScaling, falling ? dropletVel * 3 : dropletVel * 0.1f, "CalamityMod/Particles/BloomCircle", false, + falling ? (int)(10 * (1 - dropLerp * 0.6f)) : (int)(7 * dropletScaling), 0.135f * dropletScaling * (1 + dropLerp * 0.3f), Color.Turquoise * colorMult, falling ? Color.Lime * colorMult : Color.Teal * colorMult, new Vector2(0.25f * (falling ? 0.5f + dropLerp * 3 : 1), (Math.Max(0.15f * lastDropletPosition.Distance(dropletPosition), 0.25f) * (1 - dropLerp * 0.2f))), noShrink: true, colorFadeSpeed: 5, glowOpacity: colorMult, shrinkSpeed: falling ? 1.5f - dropLerp : 0); + GeneralParticleHandler.SpawnParticle(dropTrail, true); + + if (Main.rand.NextBool(3)) + { + Dust dust = Dust.NewDustPerfect(dropletPosition + Main.rand.NextVector2Circular(5 + 20 * (1 - dropletAttackLerp), 5 + 20 * (1 - dropletAttackLerp)), ModContent.DustType()); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.15f, 1.55f) * 0.5f * visualMult; + dust.velocity = dropletVel.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.3f, 0.9f); + dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Teal; + dust.noLight = true; + dust.fadeIn = Math.Max((Main.rand.NextFloat(-0.2f, -0.4f) - (Main.rand.NextBool(5) ? 0.4f : 0)) * visualMult, -0.85f); + dust.customData = new Vector2(1, 1); + } + } + } + + lastDropletPosition = dropletPosition; + if (trueLifetime <= 0 && (!dropletAttack || (frameDelay > 3 && trueLifetime <= -extendedLifetime))) + { + Splash(); + Projectile.Kill(); + return; + } + if (Projectile.FinalExtraUpdate()) + trueLifetime -= 1 / MathF.Pow(damageMult, 0.3f); + if (trueLifetime <= -extendedLifetime && Projectile.FinalExtraUpdate()) + frameDelay++; + time++; + } + public void Splash() + { + if (dropletAttack) + { + SoundStyle drop1 = new("CalamityMod/Sounds/Item/MittHit"); + SoundEngine.PlaySound(drop1 with { Volume = 0.8f * damageMult, Pitch = Main.rand.NextFloat(0.6f, 0.7f) }, dropletPosition); + SoundStyle drop2 = new("CalamityMod/Sounds/Item/WaterSplash", 2); + SoundEngine.PlaySound(drop2 with { Volume = 0.7f * damageMult, Pitch = Main.rand.NextFloat(1.4f, 1.5f) }, dropletPosition); + if (damageMult >= 1) + { + SoundStyle drop3 = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); + SoundEngine.PlaySound(drop3 with { Volume = 0.8f, Pitch = Main.rand.NextFloat(-0.5f, -0.6f) }, dropletPosition); + } + + float scale = (damageMult >= 1 ? 2f : 1.5f) * damageMult; + for (int i = 0; i <= 2; i++) + { + CustomColorChangeSpark bloomHit = new CustomColorChangeSpark(dropletPosition, Vector2.UnitY * 0.1f, "CalamityMod/Particles/BloomCircle", false, 10, 0.45f * scale, Color.Lime, Color.Turquoise, new Vector2(1f, 2f), true, true, colorFadeSpeed: 5, shrinkSpeed: 0.45f, extraRotation: MathHelper.PiOver2); + GeneralParticleHandler.SpawnParticle(bloomHit, true); + } + for (int i = -1; i <= 1; i += 2) + { + CustomColorChangeSpark wave = new CustomColorChangeSpark(dropletPosition, Vector2.UnitX * 7.5f * i * scale, "CalamityMod/Particles/ArchSmear", false, 12, 0.35f * scale, Color.Turquoise, Color.Lime, new Vector2(1f, 1.1f), colorFadeSpeed: 5, shrinkSpeed: 0.45f); + GeneralParticleHandler.SpawnParticle(wave, true); + CustomColorChangeSpark wave2 = new CustomColorChangeSpark(dropletPosition, Vector2.UnitX * 10.5f * i * scale, "CalamityMod/Particles/ArchSmear", false, 8, 0.35f * scale, Color.Lime, Color.Turquoise, new Vector2(0.8f, 1.1f), colorFadeSpeed: 5, shrinkSpeed: 0.55f); + GeneralParticleHandler.SpawnParticle(wave2, true); + } + for (int i = -2; i <= 2; i += 1) // 4 + { + float angle = MathHelper.PiOver4 / 2.5f; + Vector2 vel = Vector2.UnitX.RotatedBy(Math.Abs(i) == 1 ? angle : -angle) * 2.2f * Math.Sign(i) * scale; + for (int t = -1; t <= 1; t++) // 3 + { + Dust dust = Dust.NewDustPerfect(dropletPosition, ModContent.DustType(), vel.RotatedBy(0.25f * t) * (2.5f - Math.Abs(t)) * scale); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1.25f, 1.35f) * scale; + dust.color = t == 0 ? Color.Aquamarine : Color.Lime; + dust.noLight = true; + dust.fadeIn = 1.4f * scale; + dust.customData = new Vector2(0.6f, 3.5f); + } + if (i == -1) + i++; + } + for (int i = -10; i <= 10; i++) + { + Dust dust = Dust.NewDustPerfect(dropletPosition + Main.rand.NextVector2CircularEdge(10 - Math.Abs(i), 10 - Math.Abs(i)), ModContent.DustType(), Vector2.UnitX * 2f * i * scale); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.85f, 0.95f) * scale; + dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Lime; + dust.noLight = true; + dust.fadeIn = 0.45f * scale; + dust.customData = new Vector2(0.8f, 1.3f); + if (i == -1) + i++; + } + if (targeted != null) + { + float blastSize = 75 * scale; + float minMultiplier = 0.05f; + int hitsToMinMult = (int)(6 * damageMult); + int knockback = 0;// (int)(7 * damageMult * (damageMult >= 1 ? -1 : 1)); + int damage = (int)(Projectile.damage * 1.5f * damageMult); + Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); + blast.timeLeft = 8; + blast.DamageType = DamageClass.Ranged; + blast.ArmorPenetration = Projectile.ArmorPenetration; + } + if (damageMult >= 0.8f) + Owner.SetScreenshake(6f * damageMult); } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + Projectile.extraUpdates = 2; + int chanceReduction = (int)(2 / damageMult); + if (damageMult >= 1) + { + SoundStyle perfectHit = new("CalamityMod/Sounds/Item/LightMetal"); + for (int i = 0; i < 3; i++) + SoundEngine.PlaySound(perfectHit with { Volume = 0.85f, Pitch = Main.rand.NextFloat(-1.2f, -1.3f) + 0.6f * i, MaxInstances = 3 }, dropletPosition); + } + if (damageMult >= 0.8f) + { + Owner.SetScreenshake(4f * damageMult); + float angle = Main.rand.NextFloat(0, MathHelper.TwoPi); + for (int i = -6; i <= 6; i++) // 12 + { + float variance = Main.rand.NextFloat(-0.5f, 0.5f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(variance * 0.4f).RotatedByRandom(0.1f) * (Main.rand.NextFloat(5, 6) - Math.Abs(variance * 9)) * 5 * damageMult); + dust.noGravity = true; + dust.scale = (Main.rand.NextFloat(3.15f, 3.25f) - Math.Abs(variance * 0.5f)) * damageMult; + dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Lime; + dust.noLight = true; + dust.fadeIn = 1.65f * damageMult; + dust.customData = new Vector2(0.4f, 1.3f); + if (i == -1) + i++; + } + float spining = Main.rand.NextFloat(-0.15f, 0.15f); + for (int i = 0; i < 2; i++) + { + CustomColorChangeSpark hit = new CustomColorChangeSpark(Projectile.Center, Vector2.UnitX.RotatedBy(angle + MathHelper.PiOver2 * i) * 0.01f, "CalamityMod/Particles/FullStar", false, 9, 3.55f * damageMult, Color.Lime, Color.Turquoise, new Vector2(1f, 1f), true, true, colorFadeSpeed: 5, shrinkSpeed: 1f, extraRotation: MathHelper.PiOver2, spin: spining); + GeneralParticleHandler.SpawnParticle(hit, true); + } + } + dropletAttack = true; + targeted = target; + trueLifetime = fadeLifetime; + modifiers.SourceDamage *= damageMult; + } + public override bool? CanHitNPC(NPC target) => time > 1 && Projectile.numHits == 0; + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = 20 * Projectile.scale * damageMult; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); + Texture2D tex = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Texture2D shine = ModContent.Request("CalamityMod/Particles/GlowSpark").Value; + Vector2 drawPosition = dropletPosition - Main.screenPosition; + + float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp) * 0.7f) * damageMult : finalEffectMult); + PixelationManager.AddPixelatedDrawer((_) => + { + float dropLerp = MathF.Pow(Utils.GetLerpValue(0, -extendedLifetime, trueLifetime, true), 2.5f); ; + int draws = 3; + for (int i = 0; i < draws; i++) + { + float circlingScale = ((i == 0 ? 0.15f : 0.3f) - orbitSine * 0.1f); + Main.EntitySpriteDraw(tex, drawPosition, null, i == 0 ? Color.White * 0.8f : Color.Turquoise, 0, tex.Size() * 0.5f, dropletScaling * (circlingScale) * (0.8f + dropLerp * 0.2f), SpriteEffects.None); + } + + float fallTime = -extendedLifetime * 0.65f; + float shineMult = damageMult * MathF.Pow((trueLifetime > fallTime ? Utils.GetLerpValue(0, fallTime, trueLifetime, true) : Utils.GetLerpValue(-extendedLifetime, fallTime, trueLifetime, true)), 2); + for (int i = -1; i <= 1; i++) + { + if (i == 0) i++; + float rot = MathHelper.PiOver2 * (i > 0 ? -1 : 1); + for (int t = 0; t < 2; t++) + Main.EntitySpriteDraw(shine, drawPosition, null, t == 0 ? Color.Teal : Color.White * 0.65f, rot, shine.Size() * 0.5f, new Vector2((t == 0 ? 3 : 1) * 0.02f, (t == 0 ? 0.6f : 1) * (0.2f + shineMult * 0.4f)) * shineMult * 0.2f, SpriteEffects.None); + } + + }, ((orbitSine > 0.5f || trueLifetime <= 0) ? Enums.GeneralDrawLayer.AfterProjectiles : Enums.GeneralDrawLayer.BeforeProjectiles), BlendState.Additive); return false; } + public float WidthFunction(float completion, Vector2 _) + { + float width; + float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 9 - completion * 6); + float newSine = 0.7f - sine * 0.1f; + width = finalEffectMult * 25 * newSine * (completion < 0.4f ? 1 - MathF.Pow(Utils.GetLerpValue(0.4f, 0f, completion, true), 3) : Utils.GetLerpValue(1f, 0.4f, completion, true)) * (float)Math.Sin(Math.Acos(1 - Utils.GetLerpValue(0f, 0.08f, completion, true))); + + return width; + } + + public Color ColorFunction(float completion, Vector2 _) + { + Color clr = Color.Lerp(Color.Lime, Color.Turquoise, completion + 0.3f); + Color tipColor = Color.Lerp(clr, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(clr, tipColor, completion); + } + + public float CoreWidthFunction(float completion, Vector2 _) + { + float width; + + float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 9 - completion * 6); + float newSine = 0.7f - sine * 0.2f; + width = finalEffectMult * 20 * newSine * (completion < 0.4f ? 1 - MathF.Pow(Utils.GetLerpValue(0.4f, 0f, completion, true), 3) : Utils.GetLerpValue(1f, 0.4f, completion, true)) * (float)Math.Sin(Math.Acos(1 - Utils.GetLerpValue(0f, 0.08f, completion, true))); + + return width; + } + + public Color CoreColorFunction(float completion, Vector2 _) + { + Color tipColor = Color.Lerp(Color.Lerp(Color.White, Color.Turquoise, completion + 0.65f), Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(Color.White, tipColor, completion); + } + + public void RenderPixelatedPrimitives(SpriteBatch spriteBatch, GeneralDrawLayer layer) + { + // Render the main trail + string shader = "CalamityMod:TrailStreak"; + Vector2[] length = Projectile.oldPos.Take((int)(Math.Max(40 * visualMult, 14))).ToArray(); + GameShaders.Misc[shader].SetShaderTexture(ModContent.Request("CalamityMod/Particles/BloomRing")); + PrimitiveRenderer.RenderTrail(length, new(WidthFunction, ColorFunction, (_, _) => Projectile.Size * 0.5f, true, true, GameShaders.Misc[shader]), length.Length * 2); + + // Render a smaller, pure white trail in the same position + Vector2[] length2 = Projectile.oldPos.Take((int)(Math.Max(18 * visualMult, 6))).ToArray(); + GameShaders.Misc[shader].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(length2, new(CoreWidthFunction, CoreColorFunction, (_, _) => Projectile.Size * 0.5f, true, true, GameShaders.Misc[shader]), length2.Length * 2); + } public override void OnKill(int timeLeft) { - if (Projectile.owner == Main.myPlayer) - { - for (int b = 0; b < 2; b++) - { - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), 0f, Projectile.owner, 0f, 0f); - } - for (int i = 0; i < 3; i++) - { - Vector2 velocity = new Vector2(4, 4).RotatedByRandom(100); - LineParticle spark2 = new LineParticle(Projectile.Center + velocity, velocity * Main.rand.NextFloat(0.5f, 1f), false, 11, 0.65f, Main.rand.NextBool(3) ? Color.MediumAquamarine : Color.Lime); - GeneralParticleHandler.SpawnParticle(spark2); - } - } - SoundEngine.PlaySound(SoundID.Item118 with { Pitch = 0.5f }, Projectile.Center); + } } } diff --git a/Projectiles/Ranged/DryadsTearMain.png b/Projectiles/Ranged/DryadsTearMain.png deleted file mode 100644 index c8e2d22eec29eb3443458749580ccca6c9fefe1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^OhBx_!3HEPF0GUVQhuH;jv*3Lli%3pewp701f7gr z68rzJcMv_8vO#74=0l3D0mZ4uxlJba^KTQnGWGel84G54?oJ7Gl~{Z)Pw7RP&v%=9 iRouQ$es{aCP+|}*lFHyxT6hF#GJ~h9pUXO@geCwB&M&Y4 diff --git a/Projectiles/Ranged/DryadsTearSplit.cs b/Projectiles/Ranged/DryadsTearSplit.cs deleted file mode 100644 index 26ca02be87..0000000000 --- a/Projectiles/Ranged/DryadsTearSplit.cs +++ /dev/null @@ -1,61 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Ranged -{ - public class DryadsTearSplit : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Ranged"; - private float speed = 0f; - public override void SetStaticDefaults() - { - ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Type] = 3; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 4; - Projectile.height = 4; - Projectile.aiStyle = ProjAIStyleID.Arrow; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Ranged; - Projectile.penetrate = 1; - Projectile.timeLeft = 210; - Projectile.extraUpdates = 1; - Projectile.tileCollide = false; - Projectile.ArmorPenetration = 10; - AIType = ProjectileID.Bullet; - } - - public override bool? CanHitNPC(NPC target) => Projectile.ai[2] >= 30 && target.CanBeChasedBy(Projectile); - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); - return false; - } - - public override void AI() - { - Projectile.ai[2]++; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - - Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.PortalBoltTrail, -Projectile.velocity * Main.rand.NextFloat(0.05f, 0.6f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.5f, 0.8f); - dust.color = Main.rand.NextBool(3) ? Color.MediumAquamarine : Color.Lime; - - if (speed == 0f) - speed = Projectile.velocity.Length(); - - if (Projectile.ai[2] >= 30) - { - CalamityUtils.HomeInOnNPC(Projectile, true, 500f, speed, 12f); - } - } - } -} diff --git a/Projectiles/Ranged/DryadsTearSplit.png b/Projectiles/Ranged/DryadsTearSplit.png deleted file mode 100644 index eccb062baab86dffab1c3093f53fc7d3afd8e533..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^Oh7Ee!3HD?6ZrQ7DJxGG#}JO0$!~0Pzszq0f=)&* ziT(fAJBS`k*`Tt2^C897faIF>jJ_!k*YcQ5JRY6Du(PKABS$C;L**KQ&^I@<`GKY| Nc)I$ztaD0e0stPuB;Ei3 diff --git a/Projectiles/Typeless/BasicBurst.cs b/Projectiles/Typeless/BasicBurst.cs index 10feff399b..0633d2b71e 100644 --- a/Projectiles/Typeless/BasicBurst.cs +++ b/Projectiles/Typeless/BasicBurst.cs @@ -72,6 +72,14 @@ namespace CalamityMod.Projectiles.Typeless if (customKnockback != 0) target.MoveNPC(pushVelocity, customKnockback, hasStongDisplacement, Main.player[Projectile.owner]); + + if (Projectile.owner != -1) + { + Player Owner = Main.player[Projectile.owner]; + bool crit = Main.rand.Next(0, 100 + 1) < Owner.GetTotalCritChance(Projectile.DamageType); + if (crit) + modifiers.SetCrit(); + } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { From af5bd815c1c49a81af426d59a3b681481fa22426 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 24 Mar 2026 01:37:39 -0700 Subject: [PATCH 35/78] Balance and performance improvements --- .../en-US/Mods.CalamityMod.Items.Ammo.hjson | 2 +- Projectiles/Ranged/DryadsTearMain.cs | 60 +++++++++++-------- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 814d89f209..b784b9662c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -52,7 +52,7 @@ DryadsTear: { ''' An extremely powerful magic bullet blessed with nature's essence that becomes unstable when multiple are nearby Carries a teardrop along with it which on impact will detach and crash down upon the hit enemy and burst - All bullet and teardrop hits have 18 armor penetration + All bullet and teardrop hits have 18 armor penetration [c/40E091:'Focus. Breathe. Just one more shot, and the violence will fade away...'] ''' } diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index e7cab20273..a668c7432d 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -40,6 +40,7 @@ namespace CalamityMod.Projectiles.Ranged public float dropletAttackLerp = 1; // A lerp variable used for timing the droplet's attack public int frameDelay = 0; // A few frames of delay after landing on the enemy before explosing, which improves the visuals public bool detachEffects = true; // Used for the moment when the droplet detatched from the main bullet + public bool isMaxPower => damageMult >= 1; // If the bullet is at maximum power public float finalEffectMult => Projectile.scale * visualMult; // Used for many but not all visual scaling effects public NPC targeted; // The target being attacked by the droplet public ref float trueLifetime => ref Projectile.ai[2]; // The lifetime of the projectile, used over vanilla lifetime because it can increment by decimals @@ -74,7 +75,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - if (dropletAttack && targeted != null && (targeted.life <= 0 || !targeted.active)) // If the chosen target becomes invalid, target a near enemy instead + if (dropletAttack && targeted != null && (targeted.life <= 0 || !targeted.active || !targeted.CanBeChasedBy(Projectile))) // If the chosen target becomes invalid, target a near enemy instead targeted = Projectile.Center.ClosestNPCAt(1000); if (targeted == null) dropletAttack = false; // If that fails, cancel the teardrop effect Projectile.timeLeft++; // Keep regular lifetime from going down, since it uses it's own lifetime timer Projectile.scale = 1 - MathF.Pow(Utils.GetLerpValue(fadeLifetime, 0, trueLifetime, true), 3); // fade out the bullet scale when lifetime is at its end @@ -102,10 +103,10 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(0.85f, 1.0f) * finalEffectMult; dust.color = Color.Aquamarine; dust.noLight = true; + dust.noLightEmittence = true; dust.fadeIn = 1; } - Lighting.AddLight(Projectile.Center, Color.LimeGreen.ToVector3() * 0.4f * finalEffectMult); - + if (time > 0) // Reduce damage and visual intensity for every projectile of this type from the same player that are relativley close to each other { float damageReduction = 1; @@ -121,7 +122,7 @@ namespace CalamityMod.Projectiles.Ranged damageMult = newDamageMult; } - if (damageMult >= 1) + if (isMaxPower) damageMult = 1.5f; if (true) // Adjust velocity to make innacurate if multiple bullets exist @@ -160,6 +161,7 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(1.45f, 1.55f) * scale; dust.color = t == 0 ? Color.Aquamarine : Color.Lime; dust.noLight = true; + dust.noLightEmittence = true; dust.fadeIn = 1 * scale; dust.customData = new Vector2(0.6f, 3.5f); } @@ -169,8 +171,9 @@ namespace CalamityMod.Projectiles.Ranged detachEffects = false; } dropletAttackLerp = (1 - MathF.Pow(Utils.GetLerpValue(startDropAttackTime, -extendedLifetime, trueLifetime, true), 4)) * damageMult; - Vector2 Xoffset = Vector2.UnitX * (targeted.width * 0.5f * turnIntensity) * (1 - damageMult) * turnDirection; - Vector2 goalPosition = targeted.Center + Xoffset - (Vector2.UnitY * (targeted.height / 2 + (220 + turnChange))) * dropletAttackLerp; + float cappedReverseDamageMult = Math.Max(1 - damageMult, 0); + Vector2 Xoffset = Vector2.UnitX * (targeted.width * 0.5f * turnIntensity) * cappedReverseDamageMult * turnDirection; + Vector2 goalPosition = targeted.Center + Xoffset - (Vector2.UnitY * (targeted.height / 2 + (220 + turnChange * (0.25f + cappedReverseDamageMult)))) * dropletAttackLerp; Vector2 goalVel = (goalPosition - dropletPosition) / ((1 + 6 * dropletAttackLerp) * Projectile.MaxUpdates); dropletVel = goalVel; lastDropletPosition = dropletPosition; @@ -193,6 +196,7 @@ namespace CalamityMod.Projectiles.Ranged if (lastDropletPosition == Vector2.Zero) lastDropletPosition = dropletPosition; bool lowLifetime = trueLifetime <= fadeLifetime / 5; + float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp)) * damageMult : finalEffectMult); if (time > 1 * Projectile.MaxUpdates && (!lowLifetime || dropletAttack)) { if (!lowLifetime) @@ -203,8 +207,7 @@ namespace CalamityMod.Projectiles.Ranged } bool falling = trueLifetime < -extendedLifetime * 0.65f; - float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp)) * damageMult : finalEffectMult); - if (dropletScaling > 0.35f && frameDelay < 2 && (trueLifetime > -extendedLifetime * 0.4f || falling)) + if (frameDelay < 2) { float dropLerp = MathF.Pow(Utils.GetLerpValue(startDropAttackTime, -extendedLifetime, trueLifetime, true), 2.5f); if (lastDropletPosition != dropletPosition) @@ -212,7 +215,7 @@ namespace CalamityMod.Projectiles.Ranged float speedMult = falling ? dropLerp * 0.5f : Utils.Remap(speed, 7, 0.5f, 1, 0.1f); float colorMult = falling ? 1 - dropLerp * 0.35f : 1; CustomColorChangeSpark dropTrail = new CustomColorChangeSpark(dropletPosition - dropletVel * 16.5f * speedMult * dropletScaling, falling ? dropletVel * 3 : dropletVel * 0.1f, "CalamityMod/Particles/BloomCircle", false, - falling ? (int)(10 * (1 - dropLerp * 0.6f)) : (int)(7 * dropletScaling), 0.135f * dropletScaling * (1 + dropLerp * 0.3f), Color.Turquoise * colorMult, falling ? Color.Lime * colorMult : Color.Teal * colorMult, new Vector2(0.25f * (falling ? 0.5f + dropLerp * 3 : 1), (Math.Max(0.15f * lastDropletPosition.Distance(dropletPosition), 0.25f) * (1 - dropLerp * 0.2f))), noShrink: true, colorFadeSpeed: 5, glowOpacity: colorMult, shrinkSpeed: falling ? 1.5f - dropLerp : 0); + falling ? (int)(10 * (1 - dropLerp * 0.6f)) : (int)(6 + 2 * dropletScaling), 0.135f * dropletScaling * (1 + dropLerp * 0.3f), Color.Turquoise * colorMult, falling ? Color.Lime * colorMult : Color.Teal * colorMult, new Vector2(0.15f * (falling ? 0.5f + dropLerp * 3 : 1) * damageMult, (Math.Max(0.15f * lastDropletPosition.Distance(dropletPosition), 0.25f) * (1 - dropLerp * 0.2f))), noShrink: true, colorFadeSpeed: 5, glowOpacity: colorMult, shrinkSpeed: falling ? 1.5f - dropLerp : 0); GeneralParticleHandler.SpawnParticle(dropTrail, true); if (Main.rand.NextBool(3)) @@ -223,12 +226,16 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity = dropletVel.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.3f, 0.9f); dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Teal; dust.noLight = true; + dust.noLightEmittence = true; dust.fadeIn = Math.Max((Main.rand.NextFloat(-0.2f, -0.4f) - (Main.rand.NextBool(5) ? 0.4f : 0)) * visualMult, -0.85f); dust.customData = new Vector2(1, 1); } } } + Lighting.AddLight(Projectile.Center, Color.LimeGreen.ToVector3() * 0.4f * finalEffectMult); + Lighting.AddLight(dropletPosition, Color.Turquoise.ToVector3() * 0.25f * dropletScaling); + lastDropletPosition = dropletPosition; if (trueLifetime <= 0 && (!dropletAttack || (frameDelay > 3 && trueLifetime <= -extendedLifetime))) { @@ -250,14 +257,15 @@ namespace CalamityMod.Projectiles.Ranged SoundEngine.PlaySound(drop1 with { Volume = 0.8f * damageMult, Pitch = Main.rand.NextFloat(0.6f, 0.7f) }, dropletPosition); SoundStyle drop2 = new("CalamityMod/Sounds/Item/WaterSplash", 2); SoundEngine.PlaySound(drop2 with { Volume = 0.7f * damageMult, Pitch = Main.rand.NextFloat(1.4f, 1.5f) }, dropletPosition); - if (damageMult >= 1) + if (isMaxPower) { SoundStyle drop3 = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); SoundEngine.PlaySound(drop3 with { Volume = 0.8f, Pitch = Main.rand.NextFloat(-0.5f, -0.6f) }, dropletPosition); } - float scale = (damageMult >= 1 ? 2f : 1.5f) * damageMult; - for (int i = 0; i <= 2; i++) + float scale = (isMaxPower ? 2f : 1.5f) * damageMult; + bool reduceVisuals = damageMult < 0.5f; + for (int i = 0; i <= (reduceVisuals ? 1 : 2); i++) { CustomColorChangeSpark bloomHit = new CustomColorChangeSpark(dropletPosition, Vector2.UnitY * 0.1f, "CalamityMod/Particles/BloomCircle", false, 10, 0.45f * scale, Color.Lime, Color.Turquoise, new Vector2(1f, 2f), true, true, colorFadeSpeed: 5, shrinkSpeed: 0.45f, extraRotation: MathHelper.PiOver2); GeneralParticleHandler.SpawnParticle(bloomHit, true); @@ -273,26 +281,29 @@ namespace CalamityMod.Projectiles.Ranged { float angle = MathHelper.PiOver4 / 2.5f; Vector2 vel = Vector2.UnitX.RotatedBy(Math.Abs(i) == 1 ? angle : -angle) * 2.2f * Math.Sign(i) * scale; - for (int t = -1; t <= 1; t++) // 3 + for (int t = (reduceVisuals ? 0 : -1); t <= (reduceVisuals ? 0 : 1); t++) // 3 { Dust dust = Dust.NewDustPerfect(dropletPosition, ModContent.DustType(), vel.RotatedBy(0.25f * t) * (2.5f - Math.Abs(t)) * scale); dust.noGravity = true; dust.scale = Main.rand.NextFloat(1.25f, 1.35f) * scale; dust.color = t == 0 ? Color.Aquamarine : Color.Lime; dust.noLight = true; + dust.noLightEmittence = true; dust.fadeIn = 1.4f * scale; dust.customData = new Vector2(0.6f, 3.5f); } if (i == -1) i++; } - for (int i = -10; i <= 10; i++) + int dusts = reduceVisuals ? 4 : 10; + for (int i = -dusts; i <= dusts; i++) { Dust dust = Dust.NewDustPerfect(dropletPosition + Main.rand.NextVector2CircularEdge(10 - Math.Abs(i), 10 - Math.Abs(i)), ModContent.DustType(), Vector2.UnitX * 2f * i * scale); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.85f, 0.95f) * scale; dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Lime; dust.noLight = true; + dust.noLightEmittence = true; dust.fadeIn = 0.45f * scale; dust.customData = new Vector2(0.8f, 1.3f); if (i == -1) @@ -301,16 +312,16 @@ namespace CalamityMod.Projectiles.Ranged if (targeted != null) { float blastSize = 75 * scale; - float minMultiplier = 0.05f; - int hitsToMinMult = (int)(6 * damageMult); - int knockback = 0;// (int)(7 * damageMult * (damageMult >= 1 ? -1 : 1)); + float minMultiplier = 0.15f; + int hitsToMinMult = (int)(3 + 5 * damageMult); + int knockback = (int)(7 * damageMult * (isMaxPower ? -1 : 1)); // Give heavy knockback at full power int damage = (int)(Projectile.damage * 1.5f * damageMult); Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); blast.timeLeft = 8; blast.DamageType = DamageClass.Ranged; blast.ArmorPenetration = Projectile.ArmorPenetration; } - if (damageMult >= 0.8f) + if (damageMult >= 0.75f) Owner.SetScreenshake(6f * damageMult); } } @@ -318,26 +329,27 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.extraUpdates = 2; int chanceReduction = (int)(2 / damageMult); - if (damageMult >= 1) + if (isMaxPower) { SoundStyle perfectHit = new("CalamityMod/Sounds/Item/LightMetal"); for (int i = 0; i < 3; i++) SoundEngine.PlaySound(perfectHit with { Volume = 0.85f, Pitch = Main.rand.NextFloat(-1.2f, -1.3f) + 0.6f * i, MaxInstances = 3 }, dropletPosition); } - if (damageMult >= 0.8f) + if (damageMult >= 0.75f) { Owner.SetScreenshake(4f * damageMult); float angle = Main.rand.NextFloat(0, MathHelper.TwoPi); for (int i = -6; i <= 6; i++) // 12 { float variance = Main.rand.NextFloat(-0.5f, 0.5f); - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(variance * 0.4f).RotatedByRandom(0.1f) * (Main.rand.NextFloat(5, 6) - Math.Abs(variance * 9)) * 5 * damageMult); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(variance * 0.3f).RotatedByRandom(0.1f) * (Main.rand.NextFloat(5, 6) - Math.Abs(variance * 9)) * 5 * damageMult); dust.noGravity = true; - dust.scale = (Main.rand.NextFloat(3.15f, 3.25f) - Math.Abs(variance * 0.5f)) * damageMult; + dust.scale = (Main.rand.NextFloat(2.5f, 2.75f) - Math.Abs(variance)) * damageMult; dust.color = Main.rand.NextBool() ? Color.Aquamarine : Color.Lime; dust.noLight = true; - dust.fadeIn = 1.65f * damageMult; - dust.customData = new Vector2(0.4f, 1.3f); + dust.noLightEmittence = true; + dust.fadeIn = 1.25f * damageMult; + dust.customData = new Vector2(0.3f, 1.7f); if (i == -1) i++; } From 01a1666839c64cb79545b46448c7a3c1566a536e Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 24 Mar 2026 10:32:43 -0700 Subject: [PATCH 36/78] Fixed small enemy targeting mistake --- Projectiles/Ranged/DryadsTearMain.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index a668c7432d..c0f6062cec 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { if (dropletAttack && targeted != null && (targeted.life <= 0 || !targeted.active || !targeted.CanBeChasedBy(Projectile))) // If the chosen target becomes invalid, target a near enemy instead - targeted = Projectile.Center.ClosestNPCAt(1000); if (targeted == null) dropletAttack = false; // If that fails, cancel the teardrop effect + targeted = dropletPosition.ClosestNPCAt(1200); if (targeted == null) dropletAttack = false; // If that fails, cancel the teardrop effect Projectile.timeLeft++; // Keep regular lifetime from going down, since it uses it's own lifetime timer Projectile.scale = 1 - MathF.Pow(Utils.GetLerpValue(fadeLifetime, 0, trueLifetime, true), 3); // fade out the bullet scale when lifetime is at its end From 09c3da98bc90301a9152b1d0d71c0dbc72b80f9d Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 24 Mar 2026 12:44:36 -0700 Subject: [PATCH 37/78] Fixes and updates --- Projectiles/Ranged/DryadsTearMain.cs | 37 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index c0f6062cec..70efb7d0ba 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -13,6 +13,7 @@ using Microsoft.Build.Construction; using Microsoft.CodeAnalysis; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.Graphics.Shaders; @@ -49,6 +50,19 @@ namespace CalamityMod.Projectiles.Ranged public int fadeLifetime => (int)(35 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time in which the projectile fades out and can no longer hit anything public int extendedLifetime => (int)(85 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time after lifetime reaches zero where the droplet does its attack public bool fading => trueLifetime <= fadeLifetime; // If the projectile is fading away + + public float explosionDamageMult = 1.4f; + public float maxDamageMult = 1.65f; + public static Asset ShineTexture { get; private set; } + public static Asset BloomTexture { get; private set; } + public override void Load() + { + if (Main.dedServ) + return; + + ShineTexture = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle"); + BloomTexture = ModContent.Request("CalamityMod/Particles/BloomCircle"); + } public Player Owner => Main.player[Projectile.owner]; public override void SetStaticDefaults() { @@ -123,15 +137,14 @@ namespace CalamityMod.Projectiles.Ranged } if (isMaxPower) - damageMult = 1.5f; + damageMult = maxDamageMult; - if (true) // Adjust velocity to make innacurate if multiple bullets exist - { - float movement = Main.rand.NextFloat(0.009f, 0.0115f) * speed; - if (damageMult < 1) - Projectile.velocity += Vector2.Lerp(Projectile.velocity.RotatedBy(MathHelper.PiOver2 * turnDirection).SafeNormalize(Vector2.UnitX) * movement * turnIntensity, Projectile.velocity, MathF.Pow(Math.Min(damageMult + 0.15f, 1), 3.3f)); - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed; - } + + float movement = Main.rand.NextFloat(0.009f, 0.0115f) * speed; + if (damageMult < 1) + Projectile.velocity += Vector2.Lerp(Projectile.velocity.RotatedBy(MathHelper.PiOver2 * turnDirection).SafeNormalize(Vector2.UnitX) * movement * turnIntensity, Projectile.velocity, MathF.Pow(Math.Min(damageMult + 0.15f, 1), 3.3f)); + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * speed; + float startDropAttackTime = 0; if (dropletAttack && trueLifetime <= startDropAttackTime) { @@ -315,7 +328,7 @@ namespace CalamityMod.Projectiles.Ranged float minMultiplier = 0.15f; int hitsToMinMult = (int)(3 + 5 * damageMult); int knockback = (int)(7 * damageMult * (isMaxPower ? -1 : 1)); // Give heavy knockback at full power - int damage = (int)(Projectile.damage * 1.5f * damageMult); + int damage = (int)(Projectile.damage * explosionDamageMult * damageMult); Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); blast.timeLeft = 8; blast.DamageType = DamageClass.Ranged; @@ -374,8 +387,6 @@ namespace CalamityMod.Projectiles.Ranged } public override bool PreDraw(ref Color lightColor) { - Texture2D tex = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; - Texture2D shine = ModContent.Request("CalamityMod/Particles/GlowSpark").Value; Vector2 drawPosition = dropletPosition - Main.screenPosition; float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp) * 0.7f) * damageMult : finalEffectMult); @@ -386,7 +397,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < draws; i++) { float circlingScale = ((i == 0 ? 0.15f : 0.3f) - orbitSine * 0.1f); - Main.EntitySpriteDraw(tex, drawPosition, null, i == 0 ? Color.White * 0.8f : Color.Turquoise, 0, tex.Size() * 0.5f, dropletScaling * (circlingScale) * (0.8f + dropLerp * 0.2f), SpriteEffects.None); + Main.EntitySpriteDraw(BloomTexture.Value, drawPosition, null, i == 0 ? Color.White * 0.8f : Color.Turquoise, 0, BloomTexture.Value.Size() * 0.5f, dropletScaling * (circlingScale) * (0.8f + dropLerp * 0.2f), SpriteEffects.None); } float fallTime = -extendedLifetime * 0.65f; @@ -396,7 +407,7 @@ namespace CalamityMod.Projectiles.Ranged if (i == 0) i++; float rot = MathHelper.PiOver2 * (i > 0 ? -1 : 1); for (int t = 0; t < 2; t++) - Main.EntitySpriteDraw(shine, drawPosition, null, t == 0 ? Color.Teal : Color.White * 0.65f, rot, shine.Size() * 0.5f, new Vector2((t == 0 ? 3 : 1) * 0.02f, (t == 0 ? 0.6f : 1) * (0.2f + shineMult * 0.4f)) * shineMult * 0.2f, SpriteEffects.None); + Main.EntitySpriteDraw(ShineTexture.Value, drawPosition, null, t == 0 ? Color.Teal : Color.White * 0.65f, rot, ShineTexture.Value.Size() * 0.5f, new Vector2((t == 0 ? 3 : 1) * 0.02f, (t == 0 ? 0.6f : 1) * (0.2f + shineMult * 0.4f)) * shineMult * 0.2f, SpriteEffects.None); } }, ((orbitSine > 0.5f || trueLifetime <= 0) ? Enums.GeneralDrawLayer.AfterProjectiles : Enums.GeneralDrawLayer.BeforeProjectiles), BlendState.Additive); From 71e5c62c9b05de52f0e978a8294bd86cc9ae5e2d Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 24 Mar 2026 14:59:46 -0700 Subject: [PATCH 38/78] Fixes and updates --- CalPlayer/CalamityPlayer.cs | 1 - CalPlayer/CalamityPlayerHitHurt.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 8 ++++---- CalPlayer/CalamityPlayerOnHit.cs | 5 +---- Items/Accessories/FeatherCrown.cs | 4 ++++ Items/Accessories/MoonstoneCrown.cs | 4 ++++ Projectiles/Magic/FleshTotemMinion.cs | 7 +++++-- 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e301fc9efc..5f2daa5400 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -6322,7 +6322,6 @@ namespace CalamityMod.CalPlayer { if (Main.myPlayer == Player.whoAmI) { - //Main.NewText(fleshTotemManaStorage); fleshTotemManaStorage += manaConsumed; if (fleshTotemManaStorage >= FleshTotem.manaStorageMax) { diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index c6080fd706..4533b76b29 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2345,7 +2345,7 @@ namespace CalamityMod.CalPlayer { for (int k = 0; k < lostSoulAmount; k++) { - Projectile.NewProjectile(Player.GetSource_FromThis(), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); + Projectile.NewProjectile(Player.GetSource_Accessory_OnHurt(FindAccessory(), hurtInfo.DamageSource), proj.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), FleshTotem.lostSoulDamage, 0f, Main.myPlayer, 0f, 0f, 3f); } break; } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 724399ed28..f5964e6076 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2000,7 +2000,7 @@ namespace CalamityMod.CalPlayer if (Player.velocity.Length() < 6) hookPullVisuals = 0; } - if (featherCrown && !moonCrown) + if (featherCrown) { int MaxSigils = 4; //Starts at 0, so cap is 5 if (mageCrownTimer == 0) @@ -2009,7 +2009,7 @@ namespace CalamityMod.CalPlayer { mageCrownCount += 1; float start = 360f / mageCrownCount; - Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); + Projectile.NewProjectile(Player.GetSource_Accessory(FindAccessory()), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); } mageCrownTimer = 120; } @@ -2018,7 +2018,7 @@ namespace CalamityMod.CalPlayer mageCrownTimer--; } } - if (moonCrown && !featherCrown ) + if (moonCrown) { int MaxSigils = 9; //Starts at 0, so cap is 10 if (mageCrownTimer == 0) @@ -2027,7 +2027,7 @@ namespace CalamityMod.CalPlayer { mageCrownCount += 1; float start = 360f / mageCrownCount; - Projectile.NewProjectile(Player.GetSource_FromThis(), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); + Projectile.NewProjectile(Player.GetSource_Accessory(FindAccessory()), new Vector2((int)(Player.Center.X + (Math.Sin(0 * start) * 300)), (int)(Player.Center.Y + (Math.Cos(0 * start) * 300))), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI, 0, mageCrownCount); } mageCrownTimer = 120; } diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index d3b1baf2f2..c372f88635 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1199,15 +1199,12 @@ namespace CalamityMod.CalPlayer } if (summon && !whip) { - if (pSoulArtifact && !profanedCrystal) - target.AddBuff(BuffType(), 300); - if (profanedCrystal && (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)) { target.AddBuff(BuffType(), 600); } else if (pSoulArtifact) - target.AddBuff(BuffType(), 300); + target.AddBuff(BuffType(), 300); if (divineBless) target.AddBuff(BuffType(), AngelicAlliance.BanishingFireDuration); diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 1f04195026..2f8a8f51aa 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -28,6 +28,10 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Orange; Item.accessory = true; } + public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player) + { + return incomingItem.type != ModContent.ItemType(); + } public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index f2963a967d..bd8daf52d8 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -28,6 +28,10 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Purple; Item.accessory = true; } + public override bool CanAccessoryBeEquippedWith(Item equippedItem, Item incomingItem, Player player) + { + return incomingItem.type != ModContent.ItemType(); + } public override void UpdateAccessory(Player player, bool hideVisual) { diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 05b80fac97..2d09bc3c4b 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -9,6 +9,7 @@ using CalamityMod.NPCs.BrimstoneElemental; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -22,6 +23,8 @@ namespace CalamityMod.Projectiles.Magic public new string LocalizationCategory => "Projectiles.Magic"; public int pulseTimer = 0; + + static Asset totemEyeTexture; public Player Owner => Main.player[Projectile.owner]; public bool visuals => Owner.Calamity().fleshTotemVisual; // Enables/disables visuals and sounds based on accessory visibility public override void SetDefaults() @@ -84,7 +87,6 @@ namespace CalamityMod.Projectiles.Magic //When the timer reaches max, pulse and restore 30 mana if (pulseTimer >= pulseMax) { - //Main.NewText(pulseMax); if (visuals) { SoundEngine.PlaySound(BrimstoneElemental.HellfireballSound with { Volume = 0.65f }, Projectile.Center); @@ -136,7 +138,8 @@ namespace CalamityMod.Projectiles.Magic Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Texture2D totemEyes = ModContent.Request("CalamityMod/Projectiles/Magic/FleshTotemEyes").Value; + totemEyeTexture ??= ModContent.Request("CalamityMod/Projectiles/Magic/FleshTotemEyes"); + Texture2D totemEyes = totemEyeTexture.Value; Vector2 eyesDrawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -69f; Vector2 drawPosition = player.Center - Main.screenPosition + Vector2.UnitY * -67f; Vector2 origin = texture.Size() * 0.5f; From df69ec5ed7c5f7c33fc25bfeae1a0c1ea23def3d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 24 Mar 2026 22:18:03 -0400 Subject: [PATCH 39/78] Changed to CheckMana --- CalPlayer/CalamityPlayer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 5f2daa5400..6a51710fea 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4853,8 +4853,7 @@ namespace CalamityMod.CalPlayer //For use when the player runs out of mana. Currently only used for Feather and Moonstone Crown if (Player.HeldItem.mana > 0 && Player.controlUseItem && Player.itemAnimation == 0) { - int manaCost = Player.GetManaCost(Player.HeldItem); - if (Player.statMana < manaCost) + if (!Player.CheckMana(Player.HeldItem, -1, false, true)) { if (moonCrown || featherCrown) { From fff96eb9fbb9cbbf4efcf43d5e8744609d567dcd Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 25 Mar 2026 09:30:17 -0700 Subject: [PATCH 40/78] Visual Fixes Also made it so bullet "enchants" like the ones on Animosity adjust with bullet scale and don't appear on invisible bullets --- Projectiles/CalamityGlobalProjectile.cs | 200 ++++++++++++------------ Projectiles/Ranged/DryadsTearMain.cs | 17 +- 2 files changed, 107 insertions(+), 110 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 3784e20d35..2bad245dd1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4318,153 +4318,149 @@ namespace CalamityMod.Projectiles } } - if (brimstoneBullets) + if (projectile.Opacity > 0 && projectile.scale > 0.01f) // Only apply bullet visuals if the bullet is visible { - PointParticle spark = new PointParticle(projectile.Center + projectile.velocity * 3, projectile.velocity, false, 2, 0.9f, Color.Crimson * 0.7f); - GeneralParticleHandler.SpawnParticle(spark); + if (brimstoneBullets) + { + PointParticle spark = new PointParticle(projectile.Center + projectile.velocity * 3, projectile.velocity, false, 2, 0.9f * projectile.scale, Color.Crimson * 0.7f); + GeneralParticleHandler.SpawnParticle(spark); - Dust dust = Dust.NewDustPerfect(projectile.Center - projectile.velocity, Main.rand.NextBool(3) ? 90 : DustType(), projectile.velocity * Main.rand.NextFloat(0.05f, 0.9f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.5f, 1f); - } - if (fireBullet) - { - if (projectile.timeLeft > 200) + Dust dust = Dust.NewDustPerfect(projectile.Center - projectile.velocity, Main.rand.NextBool(3) ? 90 : DustType(), projectile.velocity * Main.rand.NextFloat(0.05f, 0.9f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.5f, 1f) * projectile.scale; + } + if (fireBullet) { float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * 8f; - Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation); + Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation) * projectile.scale; for (int i = 0; i < 2; ++i) { Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, Main.rand.NextBool() ? 174 : 6, projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.4f, 0.8f); + dust.scale = Main.rand.NextFloat(0.4f, 0.8f) * projectile.scale; } } - } - if (iceBullet) - { - if (projectile.timeLeft > 200) + if (iceBullet) { float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * -8f; - Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation); + Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation) * projectile.scale; for (int i = 0; i < 2; ++i) { Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, Main.rand.NextBool() ? 135 : 137, projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.4f, 0.8f); + dust.scale = Main.rand.NextFloat(0.4f, 0.8f) * projectile.scale; } } - } - if (shockBullet) - { - float targetDist = Vector2.Distance(player.Center, projectile.Center); - if (projectile.timeLeft > 200 && targetDist < 1400f) + if (shockBullet) { - SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, -projectile.velocity * 0.05f, false, 2, 1.1f, Color.Turquoise * 0.75f); - GeneralParticleHandler.SpawnParticle(spark); - if (Main.rand.NextBool(3)) + float targetDist = Vector2.Distance(player.Center, projectile.Center); + if (targetDist < 1400f) { - SparkParticle spark2 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6), -projectile.velocity * Main.rand.NextFloat(0.05f, 0.4f), false, 20, 0.4f, Color.Turquoise * 0.75f); - GeneralParticleHandler.SpawnParticle(spark2); + SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, -projectile.velocity * 0.05f, false, 2, 1.1f * projectile.scale, Color.Turquoise * 0.75f); + GeneralParticleHandler.SpawnParticle(spark); + if (Main.rand.NextBool(3)) + { + SparkParticle spark2 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6) * projectile.scale, -projectile.velocity * Main.rand.NextFloat(0.05f, 0.4f), false, 20, 0.4f * projectile.scale, Color.Turquoise * 0.75f); + GeneralParticleHandler.SpawnParticle(spark2); + } } } - } - if ((pearlBullet1 || pearlBullet2 || pearlBullet3)) - { - float targetDist = Vector2.Distance(player.Center, projectile.Center); - if (projectile.timeLeft > 200 && targetDist < 1400f) + if ((pearlBullet1 || pearlBullet2 || pearlBullet3)) { - Color color = pearlBullet1 ? Color.LightBlue : pearlBullet2 ? Color.LightPink : Color.Khaki; - Particle spark = new GlowSparkParticle(projectile.Center + projectile.velocity * 1.5f, -projectile.velocity * 0.05f, false, 3, 0.0093f, color, new Vector2(0.6f, 1.8f), false, false); - GeneralParticleHandler.SpawnParticle(spark); - if (Main.rand.NextBool(5)) + float targetDist = Vector2.Distance(player.Center, projectile.Center); + if (targetDist < 1400f) { - PearlParticle pearl1 = new PearlParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6), -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, Main.rand.Next(15, 20 + 1), Main.rand.NextFloat(0.4f, 0.55f), color, 0.9f, Main.rand.NextFloat(1, -1), true); - GeneralParticleHandler.SpawnParticle(pearl1); + Color color = pearlBullet1 ? Color.LightBlue : pearlBullet2 ? Color.LightPink : Color.Khaki; + Particle spark = new GlowSparkParticle(projectile.Center + projectile.velocity * 1.5f, -projectile.velocity * 0.05f, false, 3, 0.0093f * projectile.scale, color, new Vector2(0.6f, 1.8f), false, false); + GeneralParticleHandler.SpawnParticle(spark); + if (Main.rand.NextBool(5)) + { + PearlParticle pearl1 = new PearlParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6) * projectile.scale, -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, Main.rand.Next(15, 20 + 1), Main.rand.NextFloat(0.4f, 0.55f) * projectile.scale, color, 0.9f, Main.rand.NextFloat(1, -1), true); + GeneralParticleHandler.SpawnParticle(pearl1); + } } } - } - if (lifeBullet) - { - float targetDist = Vector2.Distance(player.Center, projectile.Center); - if (projectile.timeLeft > 200 && targetDist < 1400f) + if (lifeBullet) { - SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, -projectile.velocity * 0.05f, false, 2, 0.85f, Color.White * 0.75f); - GeneralParticleHandler.SpawnParticle(spark); - - for (int i = 0; i < 2; ++i) + float targetDist = Vector2.Distance(player.Center, projectile.Center); + if (targetDist < 1400f) { - Dust dust = Dust.NewDustPerfect(projectile.Center + projectile.velocity, DustID.AncientLight, -projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.65f, 0.9f); - dust.alpha = 100; + SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, -projectile.velocity * 0.05f, false, 2, 0.85f * projectile.scale, Color.White * 0.75f); + GeneralParticleHandler.SpawnParticle(spark); + + for (int i = 0; i < 2; ++i) + { + Dust dust = Dust.NewDustPerfect(projectile.Center + projectile.velocity, DustID.AncientLight, -projectile.velocity * Main.rand.NextFloat(0.1f, 0.9f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.65f, 0.9f) * projectile.scale; + dust.alpha = 100; + } + } - } - } - - #region betterLifeBullet - if (betterLifeBullet1) - { - float targetDist = Vector2.Distance(player.Center, projectile.Center); - if (projectile.timeLeft > 200 && targetDist < 1400f) + #region betterLifeBullet + if (betterLifeBullet1) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - - float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * -8f; - Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation); - - for (int i = 0; i < 3; ++i) + float targetDist = Vector2.Distance(player.Center, projectile.Center); + if (targetDist < 1400f) { - Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.35f, 0.45f); - dust.color = color; - } + int randomColor = Main.rand.Next(1, 3 + 1); + Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, projectile.velocity * 0.05f, false, 2, 0.85f, color); - GeneralParticleHandler.SpawnParticle(spark); + float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * -8f; + Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation); - if (Main.rand.NextBool(3)) - { - SparkParticle spark3 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6), -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, 20, 0.55f, color * 0.5f); - GeneralParticleHandler.SpawnParticle(spark3); + for (int i = 0; i < 3; ++i) + { + Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.35f, 0.45f) * projectile.scale; + dust.color = color; + } + + SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, projectile.velocity * 0.05f, false, 2, 0.85f * projectile.scale, color); + GeneralParticleHandler.SpawnParticle(spark); + + if (Main.rand.NextBool(3)) + { + SparkParticle spark3 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6) * projectile.scale, -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, 20, 0.55f * projectile.scale, color * 0.5f); + GeneralParticleHandler.SpawnParticle(spark3); + } } } - } - if (betterLifeBullet2) - { - float targetDist = Vector2.Distance(player.Center, projectile.Center); - if (projectile.timeLeft > 200 && targetDist < 1400f) + if (betterLifeBullet2) { - int randomColor = Main.rand.Next(1, 3 + 1); - Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - - float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * 8f; - Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation); - - for (int i = 0; i < 3; ++i) + float targetDist = Vector2.Distance(player.Center, projectile.Center); + if (targetDist < 1400f) { - Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(0.35f, 0.45f); - dust.color = color; - } + int randomColor = Main.rand.Next(1, 3 + 1); + Color color = randomColor == 1 ? Color.LightBlue : randomColor == 2 ? Color.LightPink : Color.Khaki; - SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, projectile.velocity * 0.05f, false, 2, 0.85f, color); - GeneralParticleHandler.SpawnParticle(spark); + float helixOffset = (float)Math.Sin(projectile.timeLeft / 25f * MathHelper.TwoPi) * 8f; + Vector2 spawnOffset = new Vector2(helixOffset, 10f).RotatedBy(projectile.rotation) * projectile.scale; - if (Main.rand.NextBool(3)) - { - SparkParticle spark3 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6), -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, 20, 0.55f, color * 0.5f); - GeneralParticleHandler.SpawnParticle(spark3); + for (int i = 0; i < 3; ++i) + { + Dust dust = Dust.NewDustPerfect(projectile.Center + spawnOffset, DustID.FireworksRGB, projectile.velocity * Main.rand.NextFloat(0.05f, 0.2f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.35f, 0.45f) * projectile.scale; + dust.color = color; + } + + SparkParticle spark = new SparkParticle(projectile.Center + projectile.velocity, projectile.velocity * 0.05f, false, 2, 0.85f * projectile.scale, color); + GeneralParticleHandler.SpawnParticle(spark); + + if (Main.rand.NextBool(3)) + { + SparkParticle spark3 = new SparkParticle(projectile.Center + Main.rand.NextVector2Circular(6, 6) * projectile.scale, -projectile.velocity * Main.rand.NextFloat(0.05f, 0.3f), false, 20, 0.55f * projectile.scale, color * 0.5f); + GeneralParticleHandler.SpawnParticle(spark3); + } } } + #endregion } - #endregion } } #endregion diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index 70efb7d0ba..b014d84d92 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Ranged public int effectSpeedMod = 0; // Used to add variance to effects when firing rapidly public int fadeLifetime => (int)(35 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time in which the projectile fades out and can no longer hit anything - public int extendedLifetime => (int)(85 + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time after lifetime reaches zero where the droplet does its attack + public int extendedLifetime => (int)(85 * Math.Min(damageMult, 1) + effectSpeedMod * Math.Max(1 - damageMult, 0)); // The time after lifetime reaches zero where the droplet does its attack public bool fading => trueLifetime <= fadeLifetime; // If the projectile is fading away public float explosionDamageMult = 1.4f; @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Ranged if (Main.dedServ) return; - ShineTexture = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle"); + ShineTexture = ModContent.Request("CalamityMod/Particles/GlowSpark"); BloomTexture = ModContent.Request("CalamityMod/Particles/BloomCircle"); } public Player Owner => Main.player[Projectile.owner]; @@ -68,6 +68,7 @@ namespace CalamityMod.Projectiles.Ranged { ProjectileID.Sets.TrailCacheLength[Type] = 35; ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; } public override void SetDefaults() { @@ -92,7 +93,8 @@ namespace CalamityMod.Projectiles.Ranged if (dropletAttack && targeted != null && (targeted.life <= 0 || !targeted.active || !targeted.CanBeChasedBy(Projectile))) // If the chosen target becomes invalid, target a near enemy instead targeted = dropletPosition.ClosestNPCAt(1200); if (targeted == null) dropletAttack = false; // If that fails, cancel the teardrop effect Projectile.timeLeft++; // Keep regular lifetime from going down, since it uses it's own lifetime timer - Projectile.scale = 1 - MathF.Pow(Utils.GetLerpValue(fadeLifetime, 0, trueLifetime, true), 3); // fade out the bullet scale when lifetime is at its end + float mainBulletFadeTime = -extendedLifetime * 0.3f; + Projectile.scale = 1 - MathF.Pow(Utils.GetLerpValue(fadeLifetime, mainBulletFadeTime, trueLifetime, true), 1.3f); // fade out the bullet scale when lifetime is at its end if (turnDirection == 0) { @@ -107,8 +109,7 @@ namespace CalamityMod.Projectiles.Ranged visualMult = MathHelper.Lerp(visualMult, damageMult, 0.1f / Projectile.MaxUpdates); - float speed = 8 * MathF.Pow(visualMult, 0.3f) * Math.Max(MathF.Pow(Utils.GetLerpValue(0, fadeLifetime, trueLifetime, true), 2), 0.1f); - + float speed = 8 * MathF.Pow(visualMult, 0.3f) * Math.Max(MathF.Pow(Utils.GetLerpValue(0, fadeLifetime, trueLifetime, true), 2), 0.15f); bool chanceForDust = Main.rand.NextBool((int)Math.Clamp((fading ? 8 : 5) / finalEffectMult, 3, 60)); if (time > 12 && chanceForDust && finalEffectMult > 0.1f) // Some dust effects { @@ -150,7 +151,7 @@ namespace CalamityMod.Projectiles.Ranged { if (detachEffects) { - Projectile.extraUpdates = startingUpdates; + Projectile.Opacity = 0; float scale = 0.7f * damageMult; SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact with { Volume = 0.9f * damageMult, Pitch = 0.3f }, Projectile.Center); for (int i = 0; i <= 2; i++) @@ -208,13 +209,13 @@ namespace CalamityMod.Projectiles.Ranged } if (lastDropletPosition == Vector2.Zero) lastDropletPosition = dropletPosition; - bool lowLifetime = trueLifetime <= fadeLifetime / 5; + bool lowLifetime = trueLifetime <= mainBulletFadeTime; float dropletScaling = (dropletAttack ? (1 + (1 - dropletAttackLerp)) * damageMult : finalEffectMult); if (time > 1 * Projectile.MaxUpdates && (!lowLifetime || dropletAttack)) { if (!lowLifetime) { - CustomColorChangeSpark trail = new CustomColorChangeSpark(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * (20 - Math.Min(9f / finalEffectMult, 40)), -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 0.1f, "CalamityMod/Particles/BloomCircle", false, + CustomColorChangeSpark trail = new CustomColorChangeSpark(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * (20 - Math.Min(9f / finalEffectMult, 20)), -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 0.1f, "CalamityMod/Particles/BloomCircle", false, (int)(18 * finalEffectMult), 0.2f * finalEffectMult, Color.Turquoise, Color.Lime, new Vector2(0.25f, 2.25f * Utils.Remap(speed, 7, 0.5f, 1, 0.1f)), noShrink: true, colorFadeSpeed: 5); GeneralParticleHandler.SpawnParticle(trail, true); } From 63793ac71a06f499792519006f4d19bd1d6c4157 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 12:56:00 -0400 Subject: [PATCH 41/78] Removed garbage using statements Forgot I had this sitting --- CalPlayer/CalamityPlayerHitHurt.cs | 3 --- CalPlayer/CalamityPlayerMiscEffects.cs | 1 - 2 files changed, 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 4533b76b29..109dd03b09 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -60,9 +60,6 @@ using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; -using CalamityMod.Projectiles.Melee; -using CalamityMod.Items.Tools; -using CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses.BrainOfCthulhu; namespace CalamityMod.CalPlayer { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f5964e6076..50e0550a28 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -75,7 +75,6 @@ using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Mono.Cecil; using ReLogic.Content; using Terraria; using Terraria.Audio; From fd9e58d3064e630aa05c2e0213b25b124e673810 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 13:24:24 -0400 Subject: [PATCH 42/78] Nerfed Clinger Staff to vanilla damage --- Items/CalamityGlobalItemTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 0bc4a75a80..d73222d3db 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -75,7 +75,6 @@ namespace CalamityMod.Items { ItemID.ChlorophytePartisan, Do(UseMeleeSpeed, DamageExact(95)) }, { ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(92), UseExact(10)) }, { ItemID.ChristmasTreeSword, Do(UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) }, - { ItemID.ClingerStaff, Do(DamageExact(63)) }, { ItemID.ClockworkAssaultRifle, Do(DamageExact(21)) }, { ItemID.CobaltNaginata, Do(TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) }, { ItemID.CobaltRepeater, Do(UseExact(18)) }, From e6b0384544a45fc920445a52c93b4cb927954be0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 13:24:59 -0400 Subject: [PATCH 43/78] Nerfed Vampire Knives to vanilla damage --- Items/CalamityGlobalItemTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d73222d3db..6b823d0497 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -271,7 +271,6 @@ namespace CalamityMod.Items { ItemID.UnholyArrow, Do(DamageExact(11)) }, { ItemID.UnholyTrident, Do(ManaRatio(0.78f), DamageRatio(0.91f)) }, // Uses ratios due to remix seed { ItemID.Uzi, Do(UseExact(8)) }, - { ItemID.VampireKnives, Do(DamageExact(38)) }, { ItemID.ValkyrieYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats { ItemID.VenomStaff, Do(UseExact(27)) }, { ItemID.WaspGun, Do(DamageExact(44)) }, From f30510b67436def1fd83ce18fdd438681cfb51aa Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 19:04:25 -0400 Subject: [PATCH 44/78] Item tweak file changes * Added comments besides item balance changes listing the corresponding vanilla stats * Weapon balance changes are now ordered damage - use time - knockback - mana cost - velocity * Tool balance changes are now ordered damage - tool speed - use time - pick - axe - hammer - tile boost * Replaced remaining instances of non-Remix ratio changes with identical exact changes --- Items/CalamityGlobalItemTweaks.cs | 660 +++++++++++++++--------------- 1 file changed, 330 insertions(+), 330 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6b823d0497..bf1c1ac547 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -30,368 +30,368 @@ namespace CalamityMod.Items IItemTweak[] trueMelee = Do(TrueMelee); IItemTweak[] trueMeleeNoSpeed = Do(TrueMeleeNoSpeed); IItemTweak[] nonConsumableBossSummon = Do(MaxStack(1), NotConsumable); - IItemTweak[] phaseblade = Do(UseTurn, DamageExact(36)); - IItemTweak[] phasesaber = Do(DamageExact(132)); + IItemTweak[] phaseblade = Do(UseTurn, DamageExact(36)); // VANILLA: 26 DMG + IItemTweak[] phasesaber = Do(DamageExact(132)); // VANILLA: 48 DMG // SORTING NOTES: // 1. Sort tweaks by categories first, then sort by the internal name in alphabetical order. Navigate through categories and names using the search function. // 2. Higher categories hold priority over lower ones (ie. Balancing with price tweaks belong in balancing, rather than price) - // 3. Items with different display names as opposed to internal ones should have comments for display names for ease of access. + // 3. All balancing tweaks should have comments with the vanilla stats for convenience and reference. + // 4. Items whose internal names are vastly different from their actual names should have comments for ease of access. currentTweaks = new SortedDictionary { #region CATEGORY 1: Weapon Balancing - { ItemID.AdamantiteGlaive, Do(TrueMelee, DamageExact(69), UseExact(7), ShootSpeedExact(18f)) }, - { ItemID.AdamantiteRepeater, Do(UseExact(14)) }, - { ItemID.AdamantiteSword, Do(UseTurn, DamageExact(75), UseExact(7)) }, - { ItemID.AmberStaff, Do(UseTimeExact(15), UseAnimationExact(45), ReuseDelayExact(15)) }, - { ItemID.AmethystStaff, Do(ManaExact(2)) }, - { ItemID.Anchor, Do(DamageExact(107), UseExact(30)) }, - { ItemID.AntlionClaw, Do(UseExact(10)) }, // Mandible Blade - { ItemID.AquaScepter, Do(DamageRatio(0.9f)) }, // Uses ratios due to remix seed - { ItemID.Bananarang, Do(DamageExact(76), UseExact(14)) }, - { ItemID.BatScepter, Do(DamageExact(50)) }, - { ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(131), UseAnimationExact(40), KnockbackExact(8)) }, - { ItemID.BeeGun, Do(DamageExact(11), ManaExact(4)) }, - { ItemID.BeeKeeper, Do(UseTurn, DamageExact(32)) }, - { ItemID.Beenade, Do(DamageExact(11), UseTimeExact(22), ShootSpeedExact(10f)) }, - { ItemID.BeesKnees, Do(DamageExact(21), UseExact(38)) }, - { ItemID.Bladetongue, Do(UseTurn, UseRatio(0.8f), DamageExact(120)) }, - { ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) }, - { ItemID.BloodyMachete, Do(DamageExact(24)) }, - { ItemID.Blowgun, Do(DamageExact(40), ShootSpeedExact(15f)) }, + { ItemID.AdamantiteGlaive, Do(TrueMelee, DamageExact(69), UseExact(7), ShootSpeedExact(18f)) }, // VANILLA: 49 DMG, 25 UT, 5 VEL + { ItemID.AdamantiteRepeater, Do(UseExact(14)) }, // VANILLA: 18 UT + { ItemID.AdamantiteSword, Do(UseTurn, DamageExact(75), UseExact(7)) }, // VANILLA: 61 DMG, 21 UT + { ItemID.AmberStaff, Do(UseTimeExact(15), UseAnimationExact(45), ReuseDelayExact(15)) }, // VANILLA: 28 UT/UA, 0 RUD + { ItemID.AmethystStaff, Do(ManaExact(2)) }, // VANILLA: 5 MANA + { ItemID.Anchor, Do(DamageExact(107), UseExact(30)) }, // VANILLA: 70 DMG, 20 UT + { ItemID.AntlionClaw, Do(UseExact(10)) }, // Mandible Blade. VANILLA: 18 UT + { ItemID.AquaScepter, Do(DamageRatio(0.9f)) }, // VANILLA: 27 DMG. Uses ratios due to remix seed + { ItemID.Bananarang, Do(DamageExact(76), UseExact(14)) }, // VANILLA: 45 DMG, 11 UT + { ItemID.BatScepter, Do(DamageExact(50)) }, // VANILLA: 45 DMG + { ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(131), UseAnimationExact(40), KnockbackExact(8)) }, // VANILLA: 52 DMG, 20 UT, 6.5 KB + { ItemID.BeeGun, Do(DamageExact(11), ManaExact(4)) }, // VANILLA: 9 DMG, 5 MANA + { ItemID.BeeKeeper, Do(UseTurn, DamageExact(32)) }, // VANILLA: 30 DMG + { ItemID.Beenade, Do(DamageExact(11), UseTimeExact(22), ShootSpeedExact(10f)) }, // VANILLA: 12 DMG, 15 UT, 6 VEL + { ItemID.BeesKnees, Do(DamageExact(21), UseExact(38)) }, // VANILLA: 23 DMG, 23 UT + { ItemID.Bladetongue, Do(UseTurn, DamageExact(120), UseExact(22)) }, // VANILLA: 55 DMG, 28 UT + { ItemID.BlizzardStaff, Do(DamageExact(41), ManaExact(7)) }, // VANILLA: 58 DMG, 9 MANA + { ItemID.BloodyMachete, Do(DamageExact(24)) }, // VANILLA: 20 DMG + { ItemID.Blowgun, Do(DamageExact(40), ShootSpeedExact(15f)) }, // VANILLA: 27 DMG, 13 VEL { ItemID.BluePhaseblade, phaseblade }, { ItemID.BluePhasesaber, phasesaber }, - { ItemID.BoneSword, Do(UseTurn, DamageExact(25)) }, - { ItemID.BookofSkulls, Do(DamageExact(27), ManaExact(13), ShootSpeedExact(5.5f)) }, - { ItemID.BookStaff, Do(ManaExact(14)) }, // Tome of Infinite Wisdom - { ItemID.Boomstick, Do(DamageExact(11)) }, - { ItemID.BreakerBlade, Do(UseTurn, DamageExact(140)) }, - { ItemID.CandyCornRifle, Do(DamageExact(66)) }, - { ItemID.Cascade, Do(DamageExact(31)) }, - { ItemID.ChainGuillotines, Do(DamageExact(100)) }, - { ItemID.ChainGun, Do(DamageExact(35)) }, - { ItemID.ChainKnife, Do(DamageRatio(1.34f)) }, // Uses ratios due to remix seed - { ItemID.ChlorophyteClaymore, Do(UseMeleeSpeed, DamageExact(180), UseExact(45), ShootSpeedExact(22f)) }, - { ItemID.ChlorophytePartisan, Do(UseMeleeSpeed, DamageExact(95)) }, - { ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(92), UseExact(10)) }, - { ItemID.ChristmasTreeSword, Do(UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) }, - { ItemID.ClockworkAssaultRifle, Do(DamageExact(21)) }, - { ItemID.CobaltNaginata, Do(TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) }, - { ItemID.CobaltRepeater, Do(UseExact(18)) }, - { ItemID.CobaltSword, Do(DamageExact(60), UseExact(9)) }, - { ItemID.Code2, Do(DamageExact(43)) }, - { ItemID.CoinGun, Do(UseExact(12)) }, - { ItemID.CorruptYoyo, Do(DamageExact(20)) }, // Malaise - { ItemID.CrimsonYoyo, Do(DamageExact(20)) }, // Artery - { ItemID.CrystalBullet, Do(DamageExact(6)) }, - { ItemID.CrystalDart, Do(DamageExact(20)) }, - { ItemID.CrystalStorm, Do(DamageExact(40)) }, - { ItemID.CrystalVileShard, Do(DamageExact(35)) }, - { ItemID.CursedArrow, Do(DamageExact(14)) }, - { ItemID.CursedDart, Do(DamageExact(25)) }, - { ItemID.Cutlass, Do(UseRatio(0.9f), DamageExact(90)) }, - { ItemID.DaedalusStormbow, Do(DamageExact(30)) }, - { ItemID.DaoofPow, Do(DamageExact(85)) }, // Displays as 170 damage - { ItemID.DarkLance, Do(TrueMelee, DamageExact(40)) }, - { ItemID.DartRifle, Do(DamageExact(58)) }, - { ItemID.DayBreak, Do(DamageExact(125), UseExact(22)) }, - { ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // Aerial Bane's ridiculous multiplier is removed, so this compensates for that - { ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed, DamageExact(150)) }, // Flying Dragon - { ItemID.DeadlySphereStaff, Do(DamageExact(50)) }, - { ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(65), ShootSpeedExact(15f)) }, - { ItemID.DemonBow, Do(DamageExact(12)) }, - { ItemID.DemonScythe, Do(DamageExact(28)) }, - { ItemID.DyeTradersScimitar, Do(UseTurn, DamageExact(24)) }, // Exotic Scimitar - { ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) }, - { ItemID.EmeraldStaff, Do(DamageExact(27)) }, - { ItemID.EmpressBlade, Do(DamageExact(68)) }, // Terraprisma - { ItemID.EnchantedBoomerang, Do(DamageExact(24)) }, - { ItemID.EnchantedSword, Do(UseMeleeSpeed, DamageExact(30), ShootSpeedExact(15f)) }, - { ItemID.EndlessMusketPouch, Do(DamageExact(8)) }, - { ItemID.Excalibur, Do(TrueMelee, DamageExact(170)) }, - { ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow - { ItemID.FalconBlade, Do(UseTurn, UseExact(13)) }, - { ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration - { ItemID.Flamarang, Do(DamageExact(37)) }, - { ItemID.Flamelash, Do(DamageExact(36), ManaExact(18)) }, - { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, - { ItemID.FlowerofFire, Do(ManaExact(7), DamageRatio(0.78f)) }, // Uses ratios due to remix seed - { ItemID.FlowerofFrost, Do(ManaExact(7), UseExact(22), DamageExact(70), ShootSpeedExact(14)) }, - { ItemID.FlyingKnife, Do(DamageExact(53)) }, - { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) }, - { ItemID.Gatligator, Do(UseExact(6)) }, - { ItemID.GoldShortsword, Do(TrueMelee, DamageExact(17)) }, - { ItemID.GolemFist, Do(DamageExact(150)) }, - { ItemID.Gradient, Do(DamageExact(39)) }, + { ItemID.BoneSword, Do(UseTurn, DamageExact(25)) }, // VANILLA: 19 DMG + { ItemID.BookofSkulls, Do(DamageExact(27), ManaExact(13), ShootSpeedExact(5.5f)) }, // VANILLA: 29 DMG, 18 MANA, 3.5 VEL + { ItemID.BookStaff, Do(ManaExact(14)) }, // Tome of Infinite Wisdom. VANILLA: 20 MANA + { ItemID.Boomstick, Do(DamageExact(11)) }, // VANILLA: 14 DMG + { ItemID.BreakerBlade, Do(UseTurn, DamageExact(140)) }, // VANILLA: 70 DMG + { ItemID.CandyCornRifle, Do(DamageExact(66)) }, // VANILLA: 44 DMG + { ItemID.Cascade, Do(DamageExact(31)) }, // VANILLA: 27 DMG + { ItemID.ChainGuillotines, Do(DamageExact(100)) }, // VANILLA: 59 DMG + { ItemID.ChainGun, Do(DamageExact(35)) }, // VANILLA: 31 DMG + { ItemID.ChainKnife, Do(DamageRatio(1.34f)) }, // VANILLA: 12 DMG. Uses ratios due to remix seed + { ItemID.ChlorophyteClaymore, Do(UseMeleeSpeed, DamageExact(180), UseExact(45), ShootSpeedExact(22f)) }, // VANILLA: 95 DMG, 26 UT, 8 VEL + { ItemID.ChlorophytePartisan, Do(UseMeleeSpeed, DamageExact(95)) }, // VANILLA: 49 DMG + { ItemID.ChlorophyteSaber, Do(UseMeleeSpeed, DamageExact(92), UseExact(10)) }, // VANILLA: 57 DMG, 16 UT + { ItemID.ChristmasTreeSword, Do(UseTurn, UseMeleeSpeed, DamageExact(80), UseExact(30)) }, // VANILLA: 86 DMG, 23 UT + { ItemID.ClockworkAssaultRifle, Do(DamageExact(21)) }, // VANILLA: 17 DMG + { ItemID.CobaltNaginata, Do(TrueMelee, DamageExact(55), UseExact(9), ShootSpeedExact(12f)) }, // VANILLA: 44 DMG, 28 UT, 4.3 VEL + { ItemID.CobaltRepeater, Do(UseExact(18)) }, // VANILLA: 23 UT + { ItemID.CobaltSword, Do(DamageExact(60), UseExact(9)) }, // VANILLA: 40 DMG, 19 UT + { ItemID.Code2, Do(DamageExact(43)) }, // VANILLA: 54 DMG + { ItemID.CoinGun, Do(UseExact(12)) }, // VANILLA: 8 UT + { ItemID.CorruptYoyo, Do(DamageExact(20)) }, // Malaise. VANILLA: 16 DMG + { ItemID.CrimsonYoyo, Do(DamageExact(20)) }, // Artery. VANILLA: 17 DMG + { ItemID.CrystalBullet, Do(DamageExact(6)) }, // VANILLA: 9 DMG + { ItemID.CrystalDart, Do(DamageExact(20)) }, // VANILLA: 14 DMG + { ItemID.CrystalStorm, Do(DamageExact(40)) }, // VANILLA: 32 DMG + { ItemID.CrystalVileShard, Do(DamageExact(35)) }, // VANILLA: 25 DMG + { ItemID.CursedArrow, Do(DamageExact(14)) }, // VANILLA: 17 DMG + { ItemID.CursedDart, Do(DamageExact(25)) }, // VANILLA: 9 DMG + { ItemID.Cutlass, Do(DamageExact(90), UseExact(14)) }, // VANILLA: 53 DMG, 16 UT + { ItemID.DaedalusStormbow, Do(DamageExact(30)) }, // VANILLA: 38 DMG + { ItemID.DaoofPow, Do(DamageExact(85)) }, // Displays as 170 damage. VANILLA: 50 DMG (displays as 100) + { ItemID.DarkLance, Do(TrueMelee, DamageExact(40)) }, // VANILLA: 34 DMG + { ItemID.DartRifle, Do(DamageExact(58)) }, // VANILLA: 52 DMG + { ItemID.DayBreak, Do(DamageExact(125), UseExact(22)) }, // VANILLA: 150 DMG, 16 UT + { ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // VANILLA: 39 DMG. Compensation for removing aerial multiplier + { ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed, DamageExact(150)) }, // Flying Dragon. VANILLA: 180 DMG + { ItemID.DeadlySphereStaff, Do(DamageExact(50)) }, // VANILLA: 40 DMG + { ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(65), ShootSpeedExact(15f)) }, // VANILLA: 57 DMG, 9 VEL + { ItemID.DemonBow, Do(DamageExact(12)) }, // VANILLA: 14 DMG + { ItemID.DemonScythe, Do(DamageExact(28)) }, // VANILLA: 35 DMG + { ItemID.DyeTradersScimitar, Do(UseTurn, DamageExact(24)) }, // Exotic Scimitar. VANILLA: 20 DMG + { ItemID.ElfMelter, Do(ShootSpeedDelta(+5f)) }, // VANILLA: 8.5 VEL + { ItemID.EmeraldStaff, Do(DamageExact(27)) }, // VANILLA: 19 DMG + { ItemID.EmpressBlade, Do(DamageExact(68)) }, // Terraprisma. VANILLA: 90 DMG + { ItemID.EnchantedBoomerang, Do(DamageExact(24)) }, // VANILLA: 17 DMG + { ItemID.EnchantedSword, Do(UseMeleeSpeed, DamageExact(30), ShootSpeedExact(15f)) }, // VANILLA: 23 DMG, 9.5 VEL + { ItemID.EndlessMusketPouch, Do(DamageExact(8)) }, // VANILLA: 7 DMG. Gives it the same damage as Tungsten Bullet + { ItemID.Excalibur, Do(TrueMelee, DamageExact(170)) }, // VANILLA: 72 DMG + { ItemID.FairyQueenMagicItem, Do(DamageExact(54)) }, // Nightglow. VANILLA: 50 DMG + { ItemID.FalconBlade, Do(UseTurn, UseExact(13)) }, // VANILLA: 20 UT + { ItemID.FireworksLauncher, Do(DamageExact(50), UseExact(25)) }, // Celebration. VANILLA: 25 DMG, 30 UT + { ItemID.Flamarang, Do(DamageExact(37)) }, // VANILLA: 49 DMG + { ItemID.Flamelash, Do(DamageExact(36), ManaExact(18)) }, // VANILLA: 32 DMG, 21 MANA + { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL + { ItemID.FlowerofFire, Do(DamageRatio(0.78f), ManaExact(7)) }, // VANILLA: 48 DMG, 12 MANA. Uses ratios due to remix seed + { ItemID.FlowerofFrost, Do(DamageExact(70), UseExact(22), ManaExact(7), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 12 UT, 11 MANA, 9 VEL + { ItemID.FlyingKnife, Do(DamageExact(53)) }, // VANILLA: 40 DMG + { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) }, // VANILLA: 49 DMG + { ItemID.Gatligator, Do(UseExact(6)) }, // VANILLA: 7 UT + { ItemID.GoldShortsword, Do(TrueMelee, DamageExact(17)) }, // VANILLA: 12 DMG + { ItemID.GolemFist, Do(DamageExact(150)) }, // VANILLA: 90 DMG + { ItemID.Gradient, Do(DamageExact(39)) }, // VANILLA: 49 DMG { ItemID.GreenPhaseblade, phaseblade }, { ItemID.GreenPhasesaber, phasesaber }, - { ItemID.GrenadeLauncher, Do(DamageExact(105)) }, - { ItemID.Gungnir, Do(TrueMelee, DamageExact(130), ShootSpeedExact(7f)) }, - { ItemID.HallowedRepeater, Do(UseExact(12)) }, - { ItemID.Handgun, Do(UseExact(20)) }, - { ItemID.HighVelocityBullet, Do(DamageExact(13)) }, - { ItemID.HiveFive, Do(DamageExact(27)) }, - { ItemID.HornetStaff, Do(DamageExact(18)) }, + { ItemID.GrenadeLauncher, Do(DamageExact(105)) }, // VANILLA: 60 DMG + { ItemID.Gungnir, Do(TrueMelee, DamageExact(130), ShootSpeedExact(7f)) }, // VANILLA: 61 DMG, 5.6 VEL + { ItemID.HallowedRepeater, Do(UseExact(12)) }, // VANILLA: 17 UT + { ItemID.Handgun, Do(UseExact(20)) }, // VANILLA: 15 UT + { ItemID.HighVelocityBullet, Do(DamageExact(13)) }, // VANILLA: 11 DMG + { ItemID.HiveFive, Do(DamageExact(27)) }, // VANILLA: 24 DMG + { ItemID.HornetStaff, Do(DamageExact(18)) }, // VANILLA: 12 DMG { ItemID.IceBlade, Do(UseMeleeSpeed) }, - { ItemID.IceBoomerang, Do(UseExact(25), ShootSpeedExact(9)) }, - { ItemID.IceRod, Do(UseExact(6), ShootSpeedExact(20)) }, - { ItemID.IceSickle, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) }, - { ItemID.IchorArrow, Do(DamageExact(13)) }, - { ItemID.IchorBullet, Do(DamageExact(11)) }, - { ItemID.ImpStaff, Do(DamageExact(25)) }, - { ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) }, - { ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) }, - { ItemID.IronShortsword, Do(TrueMelee, DamageExact(10)) }, + { ItemID.IceBoomerang, Do(ShootSpeedExact(9), UseExact(25)) }, // VANILLA: 20 UT, 11.5 VEL + { ItemID.IceRod, Do(ShootSpeedExact(20), UseExact(6)) }, // VANILLA: 9 UT, 12 VEL + { ItemID.IceSickle, Do(UseMeleeSpeed, DamageExact(75), ShootSpeedExact(20f)) }, // VANILLA: 50 DMG, 12 VEL + { ItemID.IchorArrow, Do(DamageExact(13)) }, // VANILLA: 16 DMG + { ItemID.IchorBullet, Do(DamageExact(11)) }, // VANILLA: 13 DMG + { ItemID.ImpStaff, Do(DamageExact(25)) }, // VANILLA: 17 DMG + { ItemID.InfernoFork, Do(DamageExact(83), ShootSpeedExact(11)) }, // VANILLA: 70 DMG, 8 VEL + { ItemID.InfluxWaver, Do(UseMeleeSpeed, DamageExact(80), UseExact(25)) }, // VANILLA: 100 DMG, 20 UT + { ItemID.IronShortsword, Do(TrueMelee, DamageExact(10)) }, // VANILLA: 8 DMG { ItemID.Keybrand, Do(UseTurn) }, - { ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // Uses ratios due to remix seed - { ItemID.Kraken, Do(DamageExact(65)) }, - { ItemID.LaserMachinegun, Do(DamageExact(49)) }, - { ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) }, - { ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) }, - { ItemID.LeadShortsword, Do(TrueMelee, DamageExact(11)) }, - { ItemID.LeafBlower, Do(DamageExact(61)) }, - { ItemID.LightDisc, Do(DamageExact(80), ShootSpeedExact(18)) }, - { ItemID.LunarFlareBook, Do(DamageExact(110)) }, - { ItemID.MagicalHarp, Do(DamageExact(50), ShootSpeedExact(12f)) }, - { ItemID.MagicMissile, Do(DamageExact(23), ManaExact(10), UseAnimationExact(20), UseTimeExact(10)) }, - { ItemID.Marrow, Do(DamageExact(60)) }, - { ItemID.MedusaHead, Do(ManaExact(6), DamageExact(75)) }, - { ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) }, - { ItemID.MeteorStaff, Do(DamageExact(58), ManaExact(7), ShootSpeedExact(13f)) }, - { ItemID.MiniNukeI, Do(DamageExact(90)) }, + { ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // VANILLA: 40 DMG. Uses ratios due to remix seed + { ItemID.Kraken, Do(DamageExact(65)) }, // VANILLA: 95 DMG + { ItemID.LaserMachinegun, Do(DamageExact(49)) }, // VANILLA: 60 DMG + { ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) }, // VANILLA: 29 DMG, 12 UT, 8 MANA + { ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) }, // VANILLA: 100 DMG, 12 MANA + { ItemID.LeadShortsword, Do(TrueMelee, DamageExact(11)) }, // VANILLA: 9 DMG + { ItemID.LeafBlower, Do(DamageExact(61)) }, // VANILLA: 48 DMG + { ItemID.LightDisc, Do(DamageExact(80), ShootSpeedExact(18)) }, // VANILLA: 60 DMG, 16 VEL + { ItemID.LunarFlareBook, Do(DamageExact(110)) }, // VANILLA: 100 DMG + { ItemID.MagicalHarp, Do(DamageExact(50), ShootSpeedExact(12f)) }, // VANILLA: 42 DMG, 4.5 VEL + { ItemID.MagicMissile, Do(DamageExact(23), UseAnimationExact(20), UseTimeExact(10), ManaExact(10)) }, // VANILLA: 35 DMG, 22 UT/UA, 14 MANA + { ItemID.Marrow, Do(DamageExact(60)) }, // VANILLA: 53 DMG + { ItemID.MedusaHead, Do(DamageExact(75), ManaExact(6)) }, // VANILLA: 40 DMG, 15 MANA + { ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) }, // VANILLA: 200 DMG + { ItemID.MeteorStaff, Do(DamageExact(58), ManaExact(7), ShootSpeedExact(13f)) }, // VANILLA: 50 DMG, 9 MANA, 10 VEL + { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, - { ItemID.Minishark, Do(DamageExact(4)) }, - { ItemID.MoltenFury, Do(UseExact(28)) }, - { ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod - { ItemID.MonkStaffT2, Do(TrueMelee, DamageExact(90)) }, // Ghastly Glaive - { ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury - { ItemID.MoonlordBullet, Do(DamageExact(17)) }, // Luminite Bullet - { ItemID.MoonlordTurretStaff, Do(DamageExact(50)) }, // Lunar Portal Staff - { ItemID.Muramasa, Do(CritDelta(+10)) }, - { ItemID.MushroomSpear, Do(TrueMelee, UseRatio(0.8f), DamageExact(100)) }, - { ItemID.Musket, Do(DamageExact(22)) }, - { ItemID.MythrilHalberd, Do(TrueMelee, DamageExact(65), UseExact(8), ShootSpeedExact(15f)) }, - { ItemID.MythrilRepeater, Do(UseExact(16)) }, - { ItemID.MythrilSword, Do(UseTurn, DamageExact(70), UseExact(8)) }, - { ItemID.NailGun, Do(DamageExact(77)) }, - { ItemID.NettleBurst, Do(ManaExact(10), DamageExact(65)) }, - { ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) }, + { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG + { ItemID.MoltenFury, Do(UseExact(28)) }, // VANILLA: 22 UT + { ItemID.MonkStaffT1, Do(TrueMeleeNoSpeed, DamageExact(83)) }, // Sleepy Octopod. VANILLA: 50 DMG + { ItemID.MonkStaffT2, Do(TrueMelee, DamageExact(90)) }, // Ghastly Glaive. VANILLA: 45 DMG + { ItemID.MonkStaffT3, Do(DamageExact(225)) }, // Sky Dragon's Fury. VANILLA: 140 DMG + { ItemID.MoonlordBullet, Do(DamageExact(17)) }, // Luminite Bullet. VANILLA: 20 DMG + { ItemID.MoonlordTurretStaff, Do(DamageExact(50)) }, // Lunar Portal Staff. VANILLA: 100 DMG + { ItemID.Muramasa, Do(CritDelta(+10)) }, // VANILLA: 4% CRIT + { ItemID.MushroomSpear, Do(TrueMelee, DamageExact(100), UseExact(32)) }, // VANILLA: 60 DMG, 40 UT + { ItemID.Musket, Do(DamageExact(22)) }, // VANILLA: 31 DMG + { ItemID.MythrilHalberd, Do(TrueMelee, DamageExact(65), UseExact(8), ShootSpeedExact(15f)) }, // VANILLA: 45 DMG, 26 UT, 4.5 VEL + { ItemID.MythrilRepeater, Do(UseExact(16)) }, // VANILLA: 20 UT + { ItemID.MythrilSword, Do(UseTurn, DamageExact(70), UseExact(8)) }, // VANILLA: 50 DMG, 20 UT + { ItemID.NailGun, Do(DamageExact(77)) }, // VANILLA: 85 DMG + { ItemID.NettleBurst, Do(DamageExact(65), ManaExact(10)) }, // VANILLA: 35 DMG, 12 MANA + { ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) }, // VANILLA: 40 DMG { ItemID.NorthPole, Do(UseMeleeSpeed) }, { ItemID.OrangePhaseblade, phaseblade }, { ItemID.OrangePhasesaber, phasesaber }, - { ItemID.OrichalcumHalberd, Do(TrueMelee, DamageExact(128), ShootSpeedExact(6f)) }, - { ItemID.OrichalcumRepeater, Do(DamageExact(48)) }, - { ItemID.OrichalcumSword, Do(UseTurn, DamageExact(175)) }, - { ItemID.PaladinsHammer, Do(DamageExact(95), ShootSpeedExact(28)) }, - { ItemID.PalladiumPike, Do(TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) }, - { ItemID.PalladiumRepeater, Do(DamageExact(45)) }, - { ItemID.PalladiumSword, Do(DamageExact(150)) }, - { ItemID.PearlwoodBow, Do(DamageExact(32)) }, - { ItemID.PearlwoodSword, Do(UseTurn, DamageExact(45)) }, - { ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) }, - { ItemID.PhoenixBlaster, Do(UseExact(20)) }, - { ItemID.PlatinumShortsword, Do(TrueMelee, DamageExact(18)) }, - { ItemID.PoisonStaff, Do(DamageExact(57)) }, - { ItemID.PossessedHatchet, Do(DamageExact(135)) }, - { ItemID.PrincessWeapon, Do(DamageExact(80)) }, // Resonance Scepter - { ItemID.PsychoKnife, Do(UseTurn, UseExact(11), DamageExact(200)) }, - { ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) }, + { ItemID.OrichalcumHalberd, Do(TrueMelee, DamageExact(128), ShootSpeedExact(6f)) }, // VANILLA: 46 DMG, 4.5 VEL + { ItemID.OrichalcumRepeater, Do(DamageExact(48)) }, // VANILLA: 40 DMG + { ItemID.OrichalcumSword, Do(UseTurn, DamageExact(175)) }, // VANILLA: 59 DMG + { ItemID.PaladinsHammer, Do(DamageExact(95), ShootSpeedExact(28)) }, // VANILLA: 90 DMG, 14 VEL + { ItemID.PalladiumPike, Do(TrueMelee, DamageExact(120), ShootSpeedExact(5.4f)) }, // VANILLA: 44 DMG, 4.4 VEL + { ItemID.PalladiumRepeater, Do(DamageExact(45)) }, // VANILLA: 37 DMG + { ItemID.PalladiumSword, Do(DamageExact(150)) }, // VANILLA: 49 DMG + { ItemID.PearlwoodBow, Do(DamageExact(32)) }, // VANILLA: 12 DMG + { ItemID.PearlwoodSword, Do(UseTurn, DamageExact(45)) }, // VANILLA: 30 DMG + { ItemID.PewMaticHorn, Do(DamageExact(25), ShootSpeedExact(15)) }, // VANILLA: 20 DMG, 14 VEL + { ItemID.PhoenixBlaster, Do(UseExact(20)) }, // VANILLA: 14 UT + { ItemID.PlatinumShortsword, Do(TrueMelee, DamageExact(18)) }, // VANILLA: 13 DMG + { ItemID.PoisonStaff, Do(DamageExact(57)) }, // VANILLA: 43 DMG + { ItemID.PossessedHatchet, Do(DamageExact(135)) }, // VANILLA: 80 DMG + { ItemID.PrincessWeapon, Do(DamageExact(80)) }, // Resonance Scepter. VANILLA: 70 DMG + { ItemID.PsychoKnife, Do(UseTurn, DamageExact(200), UseExact(11)) }, // VANILLA: 85 DMG, 8 UT + { ItemID.PurpleClubberfish, Do(UseTurn, KnockbackExact(10f)) }, // VANILLA: 8 KB { ItemID.PurplePhaseblade, phaseblade }, { ItemID.PurplePhasesaber, phasesaber }, - { ItemID.PygmyStaff, Do(DamageExact(63)) }, - { ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) }, - { ItemID.RainbowRod, Do(DamageExact(40), ManaExact(13), KnockbackExact(8f)) }, - { ItemID.Rally, Do(DamageExact(18)) }, - { ItemID.RavenStaff, Do(DamageExact(36)) }, - { ItemID.RazorbladeTyphoon, Do(DamageExact(103)) }, - { ItemID.Razorpine, Do(DamageExact(40)) }, + { ItemID.PygmyStaff, Do(DamageExact(63)) }, // VANILLA: 40 DMG + { ItemID.RainbowGun, Do(DamageExact(60), ManaExact(40)) }, // VANILLA: 45 DMG, 20 MANA + { ItemID.RainbowRod, Do(DamageExact(40), KnockbackExact(8f), ManaExact(13)) }, // VANILLA: 50 DMG, 6 KB, 21 MANA + { ItemID.Rally, Do(DamageExact(18)) }, // VANILLA: 14 DMG + { ItemID.RavenStaff, Do(DamageExact(36)) }, // VANILLA: 55 DMG + { ItemID.RazorbladeTyphoon, Do(DamageExact(103)) }, // VANILLA: 85 DMG + { ItemID.Razorpine, Do(DamageExact(40)) }, // VANILLA: 48 DMG { ItemID.RedPhaseblade, phaseblade }, { ItemID.RedPhasesaber, phasesaber }, - { ItemID.RedRyder, Do(DamageExact(24)) }, - { ItemID.RedsYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats - { ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) }, - { ItemID.Sandgun, Do(UseExact(20)) }, - { ItemID.SapphireStaff, Do(DamageExact(25)) }, - { ItemID.ScourgeoftheCorruptor, Do(DamageExact(63)) }, - { ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(45), ShootSpeedExact(16)) }, - { ItemID.ShadowbeamStaff, Do(DamageExact(100)) }, - { ItemID.ShadowFlameBow, Do(DamageExact(55)) }, - { ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) }, - { ItemID.ShadowFlameKnife, Do(DamageExact(50)) }, - { ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn - { ItemID.Shotgun, Do(DamageExact(36)) }, - { ItemID.Shroomerang, Do(ShootSpeedExact(11)) }, - { ItemID.SilverBullet, Do(DamageExact(8)) }, - { ItemID.SilverShortsword, Do(TrueMelee, DamageExact(14)) }, - { ItemID.SkyFracture, Do(DamageExact(46)) }, - { ItemID.SlapHand, Do(UseTurn, DamageExact(120)) }, - { ItemID.Smolstar, Do(DamageExact(9)) }, // Blade Staff - { ItemID.SniperRifle, Do(DamageExact(200), UseExact(40)) }, - { ItemID.SolarEruption, Do(DamageExact(122)) }, - { ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain - { ItemID.SpaceGun, Do(DamageExact(23)) }, - { ItemID.Spear, Do(TrueMelee, DamageExact(14)) }, - { ItemID.SpectreStaff, Do(DamageExact(72)) }, - { ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) }, - { ItemID.StaffofEarth, Do(DamageExact(150)) }, - { ItemID.StarCannon, Do(UseExact(18)) }, - { ItemID.StardustDragonStaff, Do(DamageExact(20)) }, - { ItemID.StormTigerStaff, Do(DamageExact(49)) }, // Desert Tiger Staff - { ItemID.StylistKilLaKillScissorsIWish, Do(UseTurn, DamageExact(21)) }, // Stylish Scissors - { ItemID.Stynger, Do(DamageExact(75)) }, - { ItemID.SuperStarCannon, Do(DamageExact(55)) }, - { ItemID.Swordfish, Do(TrueMelee, DamageExact(24)) }, - { ItemID.TacticalShotgun, Do(DamageExact(34)) }, - { ItemID.TaxCollectorsStickOfDoom, Do(UseTurn, UseRatio(0.8f), DamageExact(70)) }, // Classy Cane - { ItemID.TendonBow, Do(DamageExact(17)) }, - { ItemID.TerraBlade, Do(DamageExact(95)) }, - { ItemID.Terragrim, Do(TrueMeleeNoSpeed, DamageExact(13)) }, - // Vanilla damage 190. After fixing iframes so yoyo and shots can hit simultaneously, - // Terrarian is extremely overpowered and requires a heavy nerf. - { ItemID.Terrarian, Do(DamageExact(90)) }, - { ItemID.TheEyeOfCthulhu, Do(DamageExact(80)) }, - { ItemID.TheMeatball, Do(DamageExact(24)) }, - { ItemID.TheRottedFork, Do(TrueMelee, DamageExact(20)) }, - { ItemID.TheUndertaker, Do(DamageExact(15)) }, + { ItemID.RedRyder, Do(DamageExact(24)) }, // VANILLA: 20 DMG + { ItemID.RedsYoyo, Do(DamageExact(48)) }, // VANILLA: 70 DMG. Has the same stats as Valkyrie Yoyo + { ItemID.RocketLauncher, Do(DamageExact(60), ShootSpeedExact(9)) }, // VANILLA: 55 DMG, 5 VEL + { ItemID.Sandgun, Do(UseExact(20)) }, // VANILLA: 16 UT + { ItemID.SapphireStaff, Do(DamageExact(25)) }, // VANILLA: 18 DMG + { ItemID.ScourgeoftheCorruptor, Do(DamageExact(63)) }, // VANILLA: 70 DMG + { ItemID.Seedler, Do(UseMeleeSpeed, DamageExact(45), ShootSpeedExact(16)) }, // VANILLA: 50 DMG, 12 VEL + { ItemID.ShadowbeamStaff, Do(DamageExact(100)) }, // VANILLA: 80 DMG + { ItemID.ShadowFlameBow, Do(DamageExact(55)) }, // VANILLA: 47 DMG + { ItemID.ShadowFlameHexDoll, Do(DamageExact(40), ShootSpeedExact(30)) }, // VANILLA: 32 DMG, 9 VEL + { ItemID.ShadowFlameKnife, Do(DamageExact(50)) }, // VANILLA: 38 DMG + { ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn. VANILLA: 34 DMG + { ItemID.Shotgun, Do(DamageExact(36)) }, // VANILLA: 24 DMG + { ItemID.Shroomerang, Do(ShootSpeedExact(11)) }, // VANILLA: 10.5 VEL + { ItemID.SilverBullet, Do(DamageExact(8)) }, // VANILLA: 9 DMG + { ItemID.SilverShortsword, Do(TrueMelee, DamageExact(14)) }, // VANILLA: 9 DMG + { ItemID.SkyFracture, Do(DamageExact(46)) }, // VANILLA: 38 DMG + { ItemID.SlapHand, Do(UseTurn, DamageExact(120)) }, // VANILLA: 55 DMG + { ItemID.Smolstar, Do(DamageExact(9)) }, // Blade Staff. VANILLA: 6 DMG + { ItemID.SniperRifle, Do(DamageExact(200), UseExact(40)) }, // VANILLA: 185 DMG, 36 UT + { ItemID.SolarEruption, Do(DamageExact(122)) }, // VANILLA: 105 DMG + { ItemID.SoulDrain, Do(DamageExact(38)) }, // Life Drain. VANILLA: 35 DMG + { ItemID.SpaceGun, Do(DamageExact(23)) }, // VANILLA: 17 DMG + { ItemID.Spear, Do(TrueMelee, DamageExact(14)) }, // VANILLA: 8 DMG + { ItemID.SpectreStaff, Do(DamageExact(72)) }, // VANILLA: 65 DMG + { ItemID.SpiritFlame, Do(UseExact(20), ManaExact(11), ShootSpeedExact(2f)) }, // VANILLA: 22 UT, 14 MANA, 3 VEL + { ItemID.StaffofEarth, Do(DamageExact(150)) }, // VANILLA: 125 DMG + { ItemID.StarCannon, Do(UseExact(18)) }, // VANILLA: 12 UT + { ItemID.StardustDragonStaff, Do(DamageExact(20)) }, // VANILLA: 40 DMG + { ItemID.StormTigerStaff, Do(DamageExact(49)) }, // Desert Tiger Staff. VANILLA: 41 DMG + { ItemID.StylistKilLaKillScissorsIWish, Do(UseTurn, DamageExact(21)) }, // Stylish Scissors. VANILLA: 14 DMG + { ItemID.Stynger, Do(DamageExact(75)) }, // VANILLA: 45 DMG + { ItemID.SuperStarCannon, Do(DamageExact(55)) }, // VANILLA: 60 DMG + { ItemID.Swordfish, Do(TrueMelee, DamageExact(24)) }, // VANILLA: 19 DMG + { ItemID.TacticalShotgun, Do(DamageExact(34)) }, // VANILLA: 29 DMG + { ItemID.TaxCollectorsStickOfDoom, Do(UseTurn, DamageExact(70), UseExact(12)) }, // Classy Cane. VANILLA: 16 DMG, 15 UT + { ItemID.TendonBow, Do(DamageExact(17)) }, // VANILLA: 19 DMG + { ItemID.TerraBlade, Do(DamageExact(95)) }, // VANILLA: 85 DMG + { ItemID.Terragrim, Do(TrueMeleeNoSpeed, DamageExact(13)) }, // VANILLA: 17 DMG + { ItemID.Terrarian, Do(DamageExact(90)) }, // VANILLA: 190 DMG. Required due to fixing iframes so yoyo and shots can hit simultaneously + { ItemID.TheEyeOfCthulhu, Do(DamageExact(80)) }, // VANILLA: 115 DMG + { ItemID.TheMeatball, Do(DamageExact(24)) }, // Displays as 48 damage. VANILLA: 17 DMG (displays as 34) + { ItemID.TheRottedFork, Do(TrueMelee, DamageExact(20)) }, // VANILLA: 17 DMG + { ItemID.TheUndertaker, Do(DamageExact(15)) }, // VANILLA: 19 DMG { ItemID.ThunderSpear, Do(UseMeleeSpeed) }, // Storm Spear - { ItemID.ThunderStaff, Do(DamageExact(18)) }, //Thunder Zapper - { ItemID.TitaniumRepeater, Do(DamageExact(52)) }, - { ItemID.TitaniumSword, Do(UseTurn, DamageExact(192)) }, - { ItemID.TitaniumTrident, Do(TrueMelee, DamageExact(144), ShootSpeedExact(6.5f)) }, - { ItemID.TopazStaff, Do(ManaExact(2)) }, - { ItemID.ToxicFlask, Do(DamageExact(62), UseExact(33), ManaExact(20)) }, - { ItemID.Toxikarp, Do(UseExact(9)) }, - { ItemID.Trident, Do(TrueMelee, DamageExact(20)) }, - { ItemID.Trimarang, Do(DamageExact(24)) }, - { ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(112)) }, - { ItemID.TrueNightsEdge, Do(DamageExact(105)) }, - { ItemID.Tsunami, Do(DamageExact(45)) }, - { ItemID.TungstenBullet, Do(DamageExact(8)) }, - { ItemID.TungstenShortsword, Do(TrueMelee, DamageExact(15)) }, - { ItemID.UnholyArrow, Do(DamageExact(11)) }, - { ItemID.UnholyTrident, Do(ManaRatio(0.78f), DamageRatio(0.91f)) }, // Uses ratios due to remix seed - { ItemID.Uzi, Do(UseExact(8)) }, - { ItemID.ValkyrieYoyo, Do(DamageExact(48)) }, // Red's Throw and Valkyrie Yoyo have the same stats - { ItemID.VenomStaff, Do(UseExact(27)) }, - { ItemID.WaspGun, Do(DamageExact(44)) }, - { ItemID.WaterBolt, Do(DamageExact(23)) }, + { ItemID.ThunderStaff, Do(DamageExact(18)) }, // Thunder Zapper. VANILLA: 20 DMG + { ItemID.TitaniumRepeater, Do(DamageExact(52)) }, // VANILLA: 43 DMG + { ItemID.TitaniumSword, Do(UseTurn, DamageExact(192)) }, // VANILLA: 61 DMG + { ItemID.TitaniumTrident, Do(TrueMelee, DamageExact(144), ShootSpeedExact(6.5f)) }, // VANILLA: 48 DMG, 5 VEL + { ItemID.TopazStaff, Do(ManaExact(2)) }, // VANILLA: 5 MANA + { ItemID.ToxicFlask, Do(DamageExact(62), UseExact(33), ManaExact(20)) }, // VANILLA: 52 DMG, 45 UT, 30 MANA + { ItemID.Toxikarp, Do(UseExact(9)) }, // VANILLA: 10 UT + { ItemID.Trident, Do(TrueMelee, DamageExact(20)) }, // VANILLA: 14 DMG + { ItemID.Trimarang, Do(DamageExact(24)) }, // VANILLA: 21 DMG + { ItemID.TrueExcalibur, Do(TrueMelee, DamageExact(112)) }, // VANILLA: 72 DMG + { ItemID.TrueNightsEdge, Do(DamageExact(105)) }, // VANILLA: 70 DMG + { ItemID.Tsunami, Do(DamageExact(45)) }, // VANILLA: 53 DMG + { ItemID.TungstenBullet, Do(DamageExact(8)) }, // VANILLA: 9 DMG + { ItemID.TungstenShortsword, Do(TrueMelee, DamageExact(15)) }, // VANILLA: 10 DMG + { ItemID.UnholyArrow, Do(DamageExact(11)) }, // VANILLA: 12 DMG + { ItemID.UnholyTrident, Do(DamageRatio(0.91f), ManaRatio(0.78f)) }, // VANILLA: 88 DMG, 19 MANA. Uses ratios due to remix seed + { ItemID.Uzi, Do(UseExact(8)) }, // VANILLA: 9 UT + { ItemID.ValkyrieYoyo, Do(DamageExact(48)) }, // VANILLA: 70 DMG. Has the same stats as Red's Throw + { ItemID.VenomStaff, Do(UseExact(27)) }, // VANILLA: 30 UT + { ItemID.WaspGun, Do(DamageExact(44)) }, // VANILLA: 31 DMG + { ItemID.WaterBolt, Do(DamageExact(23)) }, // VANILLA: 19 DMG { ItemID.WhitePhaseblade, phaseblade }, { ItemID.WhitePhasesaber, phasesaber }, - { ItemID.WoodenBoomerang, Do(DamageExact(16), Value(Item.sellPrice(copper: 20))) }, - { ItemID.Yelets, Do(DamageExact(53)) }, + { ItemID.WoodenBoomerang, Do(DamageExact(16), Value(Item.sellPrice(copper: 20))) }, // VANILLA: 10 DMG + { ItemID.Yelets, Do(DamageExact(53)) }, // VANILLA: 60 DMG { ItemID.YellowPhaseblade, phaseblade }, { ItemID.YellowPhasesaber, phasesaber }, - { ItemID.Zenith, Do(DamageExact(210)) }, - { ItemID.ZombieArm, Do(UseTurn, KnockbackExact(12f)) }, + { ItemID.Zenith, Do(DamageExact(210)) }, // VANILLA: 190 DMG + { ItemID.ZombieArm, Do(UseTurn, KnockbackExact(12f)) }, // VANILLA: 5.5 KB #endregion #region CATEGORY 2: Defense Balancing - { ItemID.LavaSkull, Do(DefenseExact(1)) }, // Magma Skull - { ItemID.MoltenCharm, Do(DefenseExact(1)) }, //Magma Charm - { ItemID.MoltenSkullRose, Do(DefenseExact(3)) }, - { ItemID.ObsidianSkullRose, Do(DefenseExact(1)) }, - { ItemID.SquireAltHead, Do(DefenseDelta(-2)) }, // Valhalla Knight set - { ItemID.SquireAltPants, Do(DefenseDelta(-3)) }, - { ItemID.SquireAltShirt, Do(DefenseDelta(-3)) }, - { ItemID.SquireGreatHelm, Do(DefenseDelta(-1)) }, - { ItemID.SquireGreaves, Do(DefenseDelta(-2)) }, - { ItemID.SquirePlating, Do(DefenseDelta(-4)) }, + { ItemID.LavaSkull, Do(DefenseExact(1)) }, // Magma Skull. VANILLA: 0 DEF + { ItemID.MoltenCharm, Do(DefenseExact(1)) }, // VANILLA: 0 DEF + { ItemID.MoltenSkullRose, Do(DefenseExact(3)) }, // VANILLA: 0 DEF + { ItemID.ObsidianSkullRose, Do(DefenseExact(1)) }, // VANILLA: 0 DEF + // Valhalla Knight armor + { ItemID.SquireAltHead, Do(DefenseDelta(-2)) }, // VANILLA: 20 DEF + { ItemID.SquireAltPants, Do(DefenseDelta(-3)) }, // VANILLA: 24 DEF + { ItemID.SquireAltShirt, Do(DefenseDelta(-3)) }, // VANILLA: 24 DEF + { ItemID.SquireGreatHelm, Do(DefenseDelta(-1)) }, // VANILLA: 13 DEF + { ItemID.SquireGreaves, Do(DefenseDelta(-2)) }, // VANILLA: 18 DEF + { ItemID.SquirePlating, Do(DefenseDelta(-4)) }, // VANILLA: 27 DEF #endregion #region CATEGORY 3: Tool Balancing - { ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth - { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(32)) }, - { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, - { ItemID.AdamantiteWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13)) }, - { ItemID.BonePickaxe, Do(UseTimeExact(6)) }, - { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, - { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) }, - { ItemID.CactusPickaxe, Do(UseTimeExact(9)) }, - { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe - { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), DamageExact(112)) }, - { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+2), DamageExact(43)) }, - { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, - { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) }, - { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) }, - { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) }, - { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(4), DamageExact(51)) }, - { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) }, - { ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) }, - { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12)) }, - { ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) }, - { ItemID.Drax, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(80)) }, - { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, - { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13)) }, - { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14)) }, - { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9)) }, - { ItemID.GoldPickaxe, Do(UseTimeExact(9)) }, - { ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15)) }, - { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11)) }, - { ItemID.IronPickaxe, Do(UseTimeExact(8)) }, - { ItemID.LaserDrill, Do(PickPower(220), AxePower(120), UseTimeExact(4), DamageExact(54)) }, - { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15)) }, - { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11)) }, - { ItemID.LeadPickaxe, Do(PickPower(40), UseTimeExact(8)) }, - { ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) }, - { ItemID.LunarHamaxeNebula, Do(AxePower(175), UseTimeExact(5)) }, - { ItemID.LunarHamaxeSolar, Do(AxePower(175), UseTimeExact(5)) }, - { ItemID.LunarHamaxeStardust, Do(AxePower(175), UseTimeExact(5)) }, - { ItemID.LunarHamaxeVortex, Do(AxePower(175), UseTimeExact(5)) }, - { ItemID.MeteorHamaxe, Do(HammerPower(70)) }, - { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125)) }, - { ItemID.MoltenPickaxe, Do(UseTimeExact(10)) }, - { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, - { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, - { ItemID.MythrilPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11)) }, - { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.NightmarePickaxe, Do(PickPower(66), UseTimeExact(9)) }, - { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, - { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, - { ItemID.OrichalcumPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11)) }, - { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), DamageExact(51)) }, - { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, UseTimeExact(5), DamageExact(21)) }, - { ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) }, - { ItemID.PalladiumWaraxe, Do(AxePower(125)) }, - { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, - { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36)) }, - { ItemID.PickaxeAxe, Do(TileBoostExact(+1)) }, - { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14)) }, - { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9)) }, - { ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) }, - { ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) }, - { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10)) }, - { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10)) }, - { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) }, - { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, - { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14)) }, - { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10)) }, - { ItemID.SilverPickaxe, Do(PickPower(50)) }, - { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) }, - { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) }, - { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13)) }, - { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16)) }, - { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12)) }, - { ItemID.TinPickaxe, Do(UseTimeExact(10)) }, - { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), TileBoostExact(+1), DamageExact(32)) }, - { ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, - { ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14)) }, - { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10)) }, - { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) }, - { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13)) }, - { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) }, + { ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth. VANILLA: 150% AXE + { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(75), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 33 DMG, 100 AXE, -1 TILE + { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, DamageExact(32), TileBoostExact(+1)) }, // VANILLA: 20 DMG, -1 TILE + { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, // VANILLA: 0 TILE + { ItemID.AdamantiteWaraxe, Do(UseTimeExact(10), AxePower(160), TileBoostExact(+1)) }, // VANILLA: 8 SPD, 100 AXE, 0 TILE + { ItemID.BloodLustCluster, Do(UseTimeExact(13), AxePower(100)) }, // VANILLA: 15 SPD, 75 AXE + { ItemID.BonePickaxe, Do(UseTimeExact(6)) }, // VANILLA: 11 SPD + { ItemID.BorealWoodHammer, Do(UseTimeExact(11), HammerPower(25)) }, // VANILLA: 23 SPD, 35 HAM + { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) }, // VANILLA: 4 SPD, -1 TILE + { ItemID.CactusPickaxe, Do(UseTimeExact(9)) }, // VANILLA: 16 SPD + { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe. VANILLA: 16 SPD + { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(112), UseTimeExact(3), AxePower(120)) }, // VANILLA: 50 DMG, 4 SPD, 115 AXE + { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, DamageExact(43), TileBoostExact(+2)) }, // VANILLA: 35 DMG, 0 TILE + { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, // VANILLA: 115 AXE, +1 TILE + { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) }, // VANILLA: 4 SPD + { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) }, // VANILLA: +1 TILE + { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) }, // VANILLA: 14 SPD, +1 TILE + { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, DamageExact(51), UseTimeExact(4)) }, // VANILLA: 23 DMG, 7 SPD + { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, DamageExact(21), UseTimeExact(5), PickPower(130)) }, // VANILLA: 10 DMG, 7 SPD, 110 PICK + { ItemID.CobaltPickaxe, Do(UseTimeExact(9), PickPower(130)) }, // VANILLA: 13 SPD, 110 PICK + { ItemID.CobaltWaraxe, Do(UseTimeExact(12), AxePower(125)) }, // VANILLA: 13 SPD, 70 AXE + { ItemID.CopperAxe, Do(UseTimeExact(16), AxePower(50), TileBoostExact(+0)) }, // VANILLA: 21 SPD, 35 AXE, -1 TILE + { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) }, // VANILLA: 23 SPD, -1 TILE + { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) }, // VANILLA: 15 SPD, -1 TILE + { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) }, // VANILLA: 14 SPD + { ItemID.Drax, Do(TrueMeleeNoSpeed, DamageExact(80), TileBoostExact(+1)) }, // VANILLA: 35 DMG, -1 TILE + { ItemID.EbonwoodHammer, Do(UseTimeExact(9), HammerPower(25)) }, // VANILLA: 20 SPD, 40 HAM + { ItemID.FleshGrinder, Do(UseTimeExact(13), HammerPower(70)) }, // VANILLA: 19 SPD, 55 HAM + { ItemID.GoldAxe, Do(UseTimeExact(14), AxePower(80)) }, // VANILLA: 18 SPD, 55 AXE + { ItemID.GoldHammer, Do(UseTimeExact(9), HammerPower(60)) }, // VANILLA: 23 SPD, 55 HAM + { ItemID.GoldPickaxe, Do(UseTimeExact(9)) }, // VANILLA: 17 SPD + { ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) }, // VANILLA: 14 SPD, 0 TILE + { ItemID.IronAxe, Do(UseTimeExact(15), AxePower(60)) }, // VANILLA: 19 SPD, 45 AXE + { ItemID.IronHammer, Do(UseTimeExact(11), HammerPower(45)) }, // VANILLA: 20 SPD, 40 HAM + { ItemID.IronPickaxe, Do(UseTimeExact(8)) }, // VANILLA: 13 SPD + { ItemID.LaserDrill, Do(DamageExact(54), UseTimeExact(4), PickPower(220), AxePower(120)) }, // VANILLA: 35 DMG, 6 SPD, 230 PICK, 0 AXE + { ItemID.LeadAxe, Do(UseTimeExact(15), AxePower(60)) }, // VANILLA: 19 SPD, 50 AXE + { ItemID.LeadHammer, Do(UseTimeExact(11), HammerPower(45)) }, // VANILLA: 19 SPD, 43 HAM + { ItemID.LeadPickaxe, Do(UseTimeExact(8), PickPower(40)) }, // VANILLA: 12 SPD, 43 PICK + { ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) }, // VANILLA: 15 SPD/UT, 0 TILE + { ItemID.LunarHamaxeNebula, Do(UseTimeExact(5), AxePower(175)) }, // VANILLA: 7 SPD, 150 AXE + { ItemID.LunarHamaxeSolar, Do(UseTimeExact(5), AxePower(175)) }, + { ItemID.LunarHamaxeStardust, Do(UseTimeExact(5), AxePower(175)) }, + { ItemID.LunarHamaxeVortex, Do(UseTimeExact(5), AxePower(175)) }, + { ItemID.MeteorHamaxe, Do(HammerPower(70)) }, // VANILLA: 60 HAM + { ItemID.MoltenHamaxe, Do(AxePower(125), HammerPower(75)) }, // VANILLA: 150 AXE, 70 HAM + { ItemID.MoltenPickaxe, Do(UseTimeExact(10)) }, // VANILLA: 18 SPD + { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, DamageExact(63), UseTimeExact(4), AxePower(80)) }, // VANILLA: 29 DMG, 6 SPD, 85 AXE + { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, DamageExact(26), UseTimeExact(4), PickPower(160)) }, // VANILLA: 15 DMG, 6 SPD, 150 PICK + { ItemID.MythrilPickaxe, Do(UseTimeExact(8), PickPower(160)) }, // VANILLA: 10 SPD, 150 PICK + { ItemID.MythrilWaraxe, Do(UseTimeExact(11), AxePower(140)) }, // VANILLA: 10 SPD, 85 AXE + { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.NightmarePickaxe, Do(UseTimeExact(9), PickPower(66)) }, // VANILLA: 15 SPD, 65 PICK + { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(63), UseTimeExact(4), AxePower(80)) }, // VANILLA: 31 DMG, 5 SPD, 90 AXE + { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, DamageExact(26), UseTimeExact(4), PickPower(160)) }, // VANILLA: 17 DMG, 5 SPD, 165 PICK + { ItemID.OrichalcumPickaxe, Do(UseTimeExact(8), PickPower(160)) }, // VANILLA: 9 SPD, 165 PICK + { ItemID.OrichalcumWaraxe, Do(UseTimeExact(11), AxePower(140)) }, // VANILLA: 9 SPD, 90 AXE + { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(51), UseTimeExact(4), AxePower(70)) }, // VANILLA: 26 DMG, 7 SPD, 75 AXE + { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, DamageExact(21), UseTimeExact(5)) }, // VANILLA: 12 DMG, 7 SPD + { ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) }, // VANILLA: 12 SPD + { ItemID.PalladiumWaraxe, Do(AxePower(125)) }, // VANILLA: 75 AXE + { ItemID.PalmWoodHammer, Do(UseTimeExact(11), HammerPower(25)) }, // VANILLA: 23 SPD, 35 HAM + { ItemID.PearlwoodHammer, Do(DamageExact(36), UseTimeExact(4), UseAnimationExact(20), HammerPower(25)) }, // VANILLA: 10 DMG, 19 SPD/UT, 55 HAM + { ItemID.PickaxeAxe, Do(TileBoostExact(+1)) }, // VANILLA: 0 TILE + { ItemID.PlatinumAxe, Do(UseTimeExact(14), AxePower(80)) }, // VANILLA: 17 SPD, 60 AXE + { ItemID.PlatinumHammer, Do(UseTimeExact(9), HammerPower(60)) }, // VANILLA: 21 SPD, 59 HAM + { ItemID.PlatinumPickaxe, Do(UseTimeExact(9), PickPower(55)) }, // VANILLA: 15 SPD, 59 PICK + { ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) }, // VANILLA: 14 SPD, 0 TILE + { ItemID.RichMahoganyHammer, Do(UseTimeExact(10), HammerPower(25)) }, // VANILLA: 23 SPD, 35 HAM + { ItemID.Rockfish, Do(UseTimeExact(10), HammerPower(50)) }, // VANILLA: 14 SPD, 70 HAM + { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) }, // VANILLA: 70 AXE + { ItemID.ShadewoodHammer, Do(UseTimeExact(9), HammerPower(25)) }, // VANILLA: 20 SPD, 40 HAM + { ItemID.SilverAxe, Do(UseTimeExact(14), AxePower(70)) }, // VANILLA: 18 SPD, 50 AXE + { ItemID.SilverHammer, Do(UseTimeExact(10), HammerPower(55)) }, // VANILLA: 19 SPD, 45 HAM + { ItemID.SilverPickaxe, Do(PickPower(50)) }, // VANILLA: 45 PICK + { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) }, // VANILLA: 150 AXE, +3 TILE + { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) }, // VANILLA: +3 TILE + { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.TheBreaker, Do(UseTimeExact(13), HammerPower(70)) }, // VANILLA: 19 SPD, 55 HAM + { ItemID.TinAxe, Do(UseTimeExact(16), AxePower(50)) }, // VANILLA: 20 SPD, 40 AXE + { ItemID.TinHammer, Do(UseTimeExact(12), HammerPower(35)) }, // VANILLA: 21 SPD, 38 HAM + { ItemID.TinPickaxe, Do(UseTimeExact(10)) }, // VANILLA: 14 SPD + { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(75), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 34 DMG, 105 AXE, -1 TILE + { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, DamageExact(32), PickPower(180), TileBoostExact(+1)) }, // VANILLA: 27 DMG, 190 PICK, -1 TILE + { ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, // VANILLA: 7 SPD, 190 PICK, 0 TILE + { ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, // VANILLA: 7 SPD, 105 AXE, 0 TILE + { ItemID.TungstenAxe, Do(UseTimeExact(14), AxePower(70)) }, // VANILLA: 18 SPD, 55 AXE + { ItemID.TungstenHammer, Do(UseTimeExact(10), HammerPower(55)) }, // VANILLA: 25 SPD, 50 HAM + { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) }, // VANILLA: 19 SPD + { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.WarAxeoftheNight, Do(UseTimeExact(13), AxePower(100)) }, // VANILLA: 15 SPD, 75 AXE + { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) }, // VANILLA: 25 SPD, -1 TILE #endregion #region CATEGORY 4: True Melee support From 0ef0f401f0eb3fa506f097ac520868277e0571ce Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 19:43:29 -0400 Subject: [PATCH 45/78] Removed Laser Drill axe power change because it lost axe functionality in 1.4 --- Items/CalamityGlobalItemTweaks.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index bf1c1ac547..486729fd39 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -334,7 +334,7 @@ namespace CalamityMod.Items { ItemID.IronAxe, Do(UseTimeExact(15), AxePower(60)) }, // VANILLA: 19 SPD, 45 AXE { ItemID.IronHammer, Do(UseTimeExact(11), HammerPower(45)) }, // VANILLA: 20 SPD, 40 HAM { ItemID.IronPickaxe, Do(UseTimeExact(8)) }, // VANILLA: 13 SPD - { ItemID.LaserDrill, Do(DamageExact(54), UseTimeExact(4), PickPower(220), AxePower(120)) }, // VANILLA: 35 DMG, 6 SPD, 230 PICK, 0 AXE + { ItemID.LaserDrill, Do(DamageExact(54), UseTimeExact(4), PickPower(220)) }, // VANILLA: 35 DMG, 6 SPD, 230 PICK { ItemID.LeadAxe, Do(UseTimeExact(15), AxePower(60)) }, // VANILLA: 19 SPD, 50 AXE { ItemID.LeadHammer, Do(UseTimeExact(11), HammerPower(45)) }, // VANILLA: 19 SPD, 43 HAM { ItemID.LeadPickaxe, Do(UseTimeExact(8), PickPower(40)) }, // VANILLA: 12 SPD, 43 PICK From 75f3cfacd604bbbd21417fcfcb7f6ca6517c4c57 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 19:47:48 -0400 Subject: [PATCH 46/78] Removed Shroomerang's pointless +0.5 velocity buff --- Items/CalamityGlobalItemTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 486729fd39..03e2a79ab5 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -221,7 +221,6 @@ namespace CalamityMod.Items { ItemID.ShadowFlameKnife, Do(DamageExact(50)) }, // VANILLA: 38 DMG { ItemID.SharpTears, Do(DamageExact(49)) }, // Blood Thorn. VANILLA: 34 DMG { ItemID.Shotgun, Do(DamageExact(36)) }, // VANILLA: 24 DMG - { ItemID.Shroomerang, Do(ShootSpeedExact(11)) }, // VANILLA: 10.5 VEL { ItemID.SilverBullet, Do(DamageExact(8)) }, // VANILLA: 9 DMG { ItemID.SilverShortsword, Do(TrueMelee, DamageExact(14)) }, // VANILLA: 9 DMG { ItemID.SkyFracture, Do(DamageExact(46)) }, // VANILLA: 38 DMG From 11103fe5d655bdd90c2e4c4ae2de404e504b6ffc Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 20:01:09 -0400 Subject: [PATCH 47/78] Made Raven's Staff cawing noises much rarer --- Projectiles/VanillaProjectileOverrides/RavenMinionAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/VanillaProjectileOverrides/RavenMinionAI.cs b/Projectiles/VanillaProjectileOverrides/RavenMinionAI.cs index 5e43429685..92ab6e86f8 100644 --- a/Projectiles/VanillaProjectileOverrides/RavenMinionAI.cs +++ b/Projectiles/VanillaProjectileOverrides/RavenMinionAI.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.VanillaProjectileOverrides if (!Main.dedServ) { - if (Main.rand.NextBool(6000)) + if (Main.rand.NextBool(16000)) SoundEngine.PlaySound(CrowNoises, proj.Center); } From cc2ca88ecce4f68f26484c26404b8be48dd95c59 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 21:02:20 -0400 Subject: [PATCH 48/78] Removed a few sources of Crumbling/Armor Crunch --- CalPlayer/CalamityPlayerOnHit.cs | 4 ---- Localization/en-US/Mods.CalamityMod.Attunement.hjson | 6 +++--- NPCs/CalamityGlobalNPC.cs | 2 -- Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs | 2 -- Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs | 4 ---- Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs | 2 -- 6 files changed, 3 insertions(+), 17 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 1f4a128a71..3435efd988 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -316,10 +316,6 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.Venom, 60); break; - case ProjectileID.BoneArrow: - target.AddBuff(BuffType(), 300); - break; - case ProjectileID.NorthPoleWeapon: target.AddBuff(BuffID.Frostburn, 300); break; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index bb971a8498..df17618bce 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -1,7 +1,7 @@ // Broken Biome Blade DefaultAttunement: { Name: Pure Clarity - Function: Fires a weak sword beam that crushes enemy defenses + Function: Fires a weak sword beam } HotAttunement: { @@ -28,7 +28,7 @@ TrueDefaultAttunement: { Name: Pure Clarity Function: ''' - Fires a weak sword beam that crushes enemy defenses + Fires a weak sword beam Landing three true melee hits charges a powerful lunge, unleashed when you stop swinging the sword Enemies struck by the lunge are marked with a sigil that sword beams will home in on ''' @@ -124,7 +124,7 @@ ShockwaveAttunement: { ''' Charge an earth-shattering lunge, release to unleash a devastating blow Homing sword beams are emitted as the sword charges up - Striking an enemy with the lunge creates a shockwave and marks them with an armor crunching sigil that attracts sword beam homing + Striking an enemy with the lunge creates a shockwave and marks them with a sigil that attracts sword beam homing Striking the earth with the lunge will cause several blasts of dust to erupt around you ''' PassiveDesc: Periodically emit large shock waves while attacking diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 211798cb71..132f98525b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3568,8 +3568,6 @@ namespace CalamityMod.NPCs target.AddBuff(BuffType(), 480); break; - case NPCID.GolemHead: - case NPCID.GolemHeadFree: case NPCID.GolemFistRight: case NPCID.GolemFistLeft: if (CalamityWorld.revenge) diff --git a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs index 02c71828d9..3b6a91704e 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs @@ -63,7 +63,5 @@ namespace CalamityMod.Projectiles.Melee Main.dust[dustParticle].velocity = Projectile.oldVelocity; } } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType(), 90); } } diff --git a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs index cbd57293bb..f36901be7a 100644 --- a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs +++ b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs @@ -45,10 +45,6 @@ namespace CalamityMod.Projectiles.Melee if (target.CanBeChasedBy(Projectile)) { Projectile.Center = target.Center; - - // TBB sigil marks the enemy with Armor Crunch - if (Projectile.ai[1] == 1f) - target.AddBuff(ModContent.BuffType(), 5); } else Projectile.active = false; diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs index 960e66f1fa..8d09ed4ea1 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs @@ -87,7 +87,5 @@ namespace CalamityMod.Projectiles.Melee Main.dust[dustParticle].velocity = Projectile.oldVelocity; } } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType(), 90); } } From 58a6412ed9231a211ed88c8c110542e8d5c32d00 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 21:08:04 -0400 Subject: [PATCH 49/78] North Pole's snowflakes no longer have shared ID-static iframes with the other North Pole projectiles --- Projectiles/CalamityGlobalProjectileTweaks.cs | 1 - Systems/Collections/CalamityProjectileSets.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 6f3860270f..fe82d06917 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -459,7 +459,6 @@ namespace CalamityMod.Projectiles { ProjectileID.NettleBurstLeft, defaultIFrames }, { ProjectileID.NettleBurstRight, defaultIFrames }, { ProjectileID.NightBeam, defaultIFrames }, - { ProjectileID.NorthPoleSnowflake, defaultIFrames }, { ProjectileID.NorthPoleSpear, defaultIFrames }, { ProjectileID.NorthPoleWeapon, defaultIFrames }, { ProjectileID.NurseSyringeHeal, defaultIFrames }, diff --git a/Systems/Collections/CalamityProjectileSets.cs b/Systems/Collections/CalamityProjectileSets.cs index 8d0d52a1c7..bd3eb44325 100644 --- a/Systems/Collections/CalamityProjectileSets.cs +++ b/Systems/Collections/CalamityProjectileSets.cs @@ -102,7 +102,6 @@ namespace CalamityMod.Systems.Collections // North Pole ProjectileID.NorthPoleWeapon, ProjectileID.NorthPoleWeapon, ProjectileID.NorthPoleSpear, ProjectileID.NorthPoleWeapon, - ProjectileID.NorthPoleSnowflake, ProjectileID.NorthPoleWeapon, // Spore gas clouds ProjectileID.SporeTrap, ProjectileID.SporeTrap, ProjectileID.SporeTrap2, ProjectileID.SporeTrap, From 5e23ea4ef4c6bc51d6b9c3bbf22bd3d4832626d6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 26 Mar 2026 21:35:29 -0400 Subject: [PATCH 50/78] Adjusted tile boost of several mechanical tools to properly be less than their swung counterparts Also gave Chlorophyte Jackhammer the drill local iframes and AP --- Items/CalamityGlobalItemTweaks.cs | 20 +++++++++---------- Projectiles/CalamityGlobalProjectileTweaks.cs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 03e2a79ab5..d51e357e31 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -300,7 +300,7 @@ namespace CalamityMod.Items #region CATEGORY 3: Tool Balancing { ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth. VANILLA: 150% AXE { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(75), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 33 DMG, 100 AXE, -1 TILE - { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, DamageExact(32), TileBoostExact(+1)) }, // VANILLA: 20 DMG, -1 TILE + { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, DamageExact(32), TileBoostExact(+0)) }, // VANILLA: 20 DMG, -1 TILE { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, // VANILLA: 0 TILE { ItemID.AdamantiteWaraxe, Do(UseTimeExact(10), AxePower(160), TileBoostExact(+1)) }, // VANILLA: 8 SPD, 100 AXE, 0 TILE { ItemID.BloodLustCluster, Do(UseTimeExact(13), AxePower(100)) }, // VANILLA: 15 SPD, 75 AXE @@ -309,10 +309,10 @@ namespace CalamityMod.Items { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) }, // VANILLA: 4 SPD, -1 TILE { ItemID.CactusPickaxe, Do(UseTimeExact(9)) }, // VANILLA: 16 SPD { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe. VANILLA: 16 SPD - { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(112), UseTimeExact(3), AxePower(120)) }, // VANILLA: 50 DMG, 4 SPD, 115 AXE - { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, DamageExact(43), TileBoostExact(+2)) }, // VANILLA: 35 DMG, 0 TILE + { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(112), UseTimeExact(3), AxePower(120), TileBoostExact(+1)) }, // VANILLA: 50 DMG, 4 SPD, 115 AXE, 0 TILE + { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, DamageExact(43), TileBoostExact(+1)) }, // VANILLA: 35 DMG, 0 TILE { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, // VANILLA: 115 AXE, +1 TILE - { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) }, // VANILLA: 4 SPD + { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, DamageExact(53), UseTimeExact(5), TileBoostExact(+1)) }, // VANILLA: 45 DMG, 4 SPD, 0 TILE { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) }, // VANILLA: +1 TILE { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) }, // VANILLA: 14 SPD, +1 TILE { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, DamageExact(51), UseTimeExact(4)) }, // VANILLA: 23 DMG, 7 SPD @@ -323,7 +323,7 @@ namespace CalamityMod.Items { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) }, // VANILLA: 23 SPD, -1 TILE { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) }, // VANILLA: 15 SPD, -1 TILE { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) }, // VANILLA: 14 SPD - { ItemID.Drax, Do(TrueMeleeNoSpeed, DamageExact(80), TileBoostExact(+1)) }, // VANILLA: 35 DMG, -1 TILE + { ItemID.Drax, Do(TrueMeleeNoSpeed, DamageExact(80), TileBoostExact(+0)) }, // VANILLA: 35 DMG, -1 TILE { ItemID.EbonwoodHammer, Do(UseTimeExact(9), HammerPower(25)) }, // VANILLA: 20 SPD, 40 HAM { ItemID.FleshGrinder, Do(UseTimeExact(13), HammerPower(70)) }, // VANILLA: 19 SPD, 55 HAM { ItemID.GoldAxe, Do(UseTimeExact(14), AxePower(80)) }, // VANILLA: 18 SPD, 55 AXE @@ -349,7 +349,7 @@ namespace CalamityMod.Items { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, DamageExact(26), UseTimeExact(4), PickPower(160)) }, // VANILLA: 15 DMG, 6 SPD, 150 PICK { ItemID.MythrilPickaxe, Do(UseTimeExact(8), PickPower(160)) }, // VANILLA: 10 SPD, 150 PICK { ItemID.MythrilWaraxe, Do(UseTimeExact(11), AxePower(140)) }, // VANILLA: 10 SPD, 85 AXE - { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE { ItemID.NightmarePickaxe, Do(UseTimeExact(9), PickPower(66)) }, // VANILLA: 15 SPD, 65 PICK { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(63), UseTimeExact(4), AxePower(80)) }, // VANILLA: 31 DMG, 5 SPD, 90 AXE { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, DamageExact(26), UseTimeExact(4), PickPower(160)) }, // VANILLA: 17 DMG, 5 SPD, 165 PICK @@ -373,22 +373,22 @@ namespace CalamityMod.Items { ItemID.SilverAxe, Do(UseTimeExact(14), AxePower(70)) }, // VANILLA: 18 SPD, 50 AXE { ItemID.SilverHammer, Do(UseTimeExact(10), HammerPower(55)) }, // VANILLA: 19 SPD, 45 HAM { ItemID.SilverPickaxe, Do(PickPower(50)) }, // VANILLA: 45 PICK - { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) }, // VANILLA: 150 AXE, +3 TILE { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) }, // VANILLA: +3 TILE - { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE { ItemID.TheBreaker, Do(UseTimeExact(13), HammerPower(70)) }, // VANILLA: 19 SPD, 55 HAM { ItemID.TinAxe, Do(UseTimeExact(16), AxePower(50)) }, // VANILLA: 20 SPD, 40 AXE { ItemID.TinHammer, Do(UseTimeExact(12), HammerPower(35)) }, // VANILLA: 21 SPD, 38 HAM { ItemID.TinPickaxe, Do(UseTimeExact(10)) }, // VANILLA: 14 SPD { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(75), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 34 DMG, 105 AXE, -1 TILE - { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, DamageExact(32), PickPower(180), TileBoostExact(+1)) }, // VANILLA: 27 DMG, 190 PICK, -1 TILE + { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, DamageExact(32), PickPower(180), TileBoostExact(+0)) }, // VANILLA: 27 DMG, 190 PICK, -1 TILE { ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, // VANILLA: 7 SPD, 190 PICK, 0 TILE { ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, // VANILLA: 7 SPD, 105 AXE, 0 TILE { ItemID.TungstenAxe, Do(UseTimeExact(14), AxePower(70)) }, // VANILLA: 18 SPD, 55 AXE { ItemID.TungstenHammer, Do(UseTimeExact(10), HammerPower(55)) }, // VANILLA: 25 SPD, 50 HAM { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) }, // VANILLA: 19 SPD - { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+4)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, DamageExact(95), UseTimeExact(3), TileBoostExact(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE { ItemID.WarAxeoftheNight, Do(UseTimeExact(13), AxePower(100)) }, // VANILLA: 15 SPD, 75 AXE { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) }, // VANILLA: 25 SPD, -1 TILE #endregion diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index fe82d06917..4ba2d24ae0 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -126,6 +126,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ButchersChainsaw, Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(7), ScaleExact(1.5f)) }, { ProjectileID.ChlorophyteChainsaw, standardChainsawTweaks }, { ProjectileID.ChlorophyteDrill, standardDrillTweaks }, + { ProjectileID.ChlorophyteJackhammer, standardDrillTweaks }, { ProjectileID.ChlorophyteOrb, Do(NoPiercing) }, { ProjectileID.CobaltChainsaw, standardChainsawTweaks }, { ProjectileID.CobaltDrill, standardDrillTweaks }, @@ -217,7 +218,6 @@ namespace CalamityMod.Projectiles #endregion #region CATEGORY 3: True Melee support - { ProjectileID.ChlorophyteJackhammer, trueMeleeNoSpeed }, { ProjectileID.CopperShortswordStab, trueMelee }, { ProjectileID.DarkLance, trueMelee }, { ProjectileID.GoldShortswordStab, trueMelee }, From 19ad2bf52c0e601731f43b832cf89c3ee973d4d0 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 26 Mar 2026 23:51:48 -0400 Subject: [PATCH 51/78] Substantial Ghoulish Gouger buffs --- Items/Weapons/Rogue/GhoulishGouger.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index d69d5b3f12..8dc8c9725f 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -17,19 +17,19 @@ namespace CalamityMod.Items.Weapons.Rogue Item.width = 74; Item.height = 68; - Item.damage = 166; + Item.damage = 204; Item.noMelee = true; Item.noUseGraphic = true; - Item.useTime = 6; - Item.useAnimation = 24; - Item.reuseDelay = 11; + Item.useTime = 5; + Item.useAnimation = 20; + Item.reuseDelay = 15; Item.useLimitPerAnimation = 4; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 7.5f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 16f; + Item.shootSpeed = 17f; Item.DamageType = RogueDamageClass.Instance; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; From a0e2e89fe5943ef56941a6385629147b146858af Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Fri, 27 Mar 2026 00:05:05 -0400 Subject: [PATCH 52/78] Small Gamma Heart buff --- Items/Weapons/Summon/GammaHeart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/GammaHeart.cs b/Items/Weapons/Summon/GammaHeart.cs index ae0778527f..ca1eb43c66 100644 --- a/Items/Weapons/Summon/GammaHeart.cs +++ b/Items/Weapons/Summon/GammaHeart.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.Item42; Item.DamageType = DamageClass.Summon; Item.mana = 10; - Item.damage = 85; + Item.damage = 93; Item.knockBack = 3f; Item.autoReuse = true; Item.useAnimation = Item.useTime = 24; From f38d8af431212d55afd1a6c8a68b4cb57973f804 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 27 Mar 2026 21:06:38 -0400 Subject: [PATCH 53/78] Fixed Aureus Spawn still having an AI change at daytime despite Aureus' enrage getting removed --- NPCs/AstrumAureus/AureusSpawn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 9d20520ac4..54dd2cac0d 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -136,7 +136,7 @@ namespace CalamityMod.NPCs.AstrumAureus float lifeRatio = NPC.life / (float)NPC.lifeMax; // Phase 2 check - bool phase2 = lifeRatio <= 0.5f || Main.IsItDay(); + bool phase2 = lifeRatio <= 0.5f; // Charge towards the target and explode after some time int inertia = 30; From dcceadf01f24e8270ff99d4b666909e7533ccaa3 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 28 Mar 2026 00:20:38 -0500 Subject: [PATCH 54/78] warbanner now checks the closest point on the npc hitbox extra range lowered to 5 tiles instead of 6.25 to compensate --- Items/Accessories/WarbanneroftheRighteous.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index 78fcb24d41..17509aa30b 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -110,8 +110,8 @@ namespace CalamityMod.Items.Accessories NPC closestTarget = player.Center.ClosestNPCAt(MaxDistance * 7); // extra range is to account for bonus range from massive targets if (closestTarget != null) { - float generousHitboxWidth = Math.Max(closestTarget.Hitbox.Width / 2f, closestTarget.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox - bonus = Utils.Remap(Utils.Distance(player.Center, closestTarget.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 0, MaxBonus, true); + Vector2 pointToCheck = Vector2.Clamp(player.Center, closestTarget.TopLeft, closestTarget.BottomRight); + bonus = Utils.Remap(Utils.Distance(player.Center, pointToCheck), MaxDistance + 80, 80, 0, MaxBonus, true); } else bonus = 0; From a20c82999467c3279579ab74fb4f6b7d9c12b285 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 28 Mar 2026 00:26:22 -0500 Subject: [PATCH 55/78] Warbanner max distance reduced 48.75 -> 45 tiles --- Items/Accessories/WarbanneroftheRighteous.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index 17509aa30b..1b880b8310 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; internal const float MaxBonus = 0.3f; - internal const float MaxDistance = 700f; + internal const float MaxDistance = 720f; public override void SetStaticDefaults() { @@ -111,7 +111,7 @@ namespace CalamityMod.Items.Accessories if (closestTarget != null) { Vector2 pointToCheck = Vector2.Clamp(player.Center, closestTarget.TopLeft, closestTarget.BottomRight); - bonus = Utils.Remap(Utils.Distance(player.Center, pointToCheck), MaxDistance + 80, 80, 0, MaxBonus, true); + bonus = Utils.Remap(Utils.Distance(player.Center, pointToCheck), MaxDistance, 80, 0, MaxBonus, true); } else bonus = 0; From 247f03e278aa6ae430bbc2bd45703b2648562924 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 29 Mar 2026 00:46:30 -0500 Subject: [PATCH 56/78] bugfixes --- Items/CalamityGlobalItemTooltip.cs | 6 +++--- Localization/en-US/Mods.CalamityMod.Common.hjson | 1 + Utilities/HitModiferUtils.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 24735fca0a..554eba6713 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -166,14 +166,14 @@ namespace CalamityMod.Items //Replace Crit Chance with Crit Damage on applicable tooltips if (CalamityItemSets.ShowScalingCritDamageTooltip[item.type]) { - float cdmg = 2f + Main.LocalPlayer.Calamity().critDamage + Main.LocalPlayer.GetTotalCritChance(TrueMeleeNoSpeedDamageClass.Instance) * 0.02f; + float cdmg = 2f + Main.LocalPlayer.Calamity().critDamage + Main.LocalPlayer.GetTotalCritChance(item.DamageType) * 0.02f; tooltips.FirstOrDefault(x => x.Name == "CritChance")!.Text = CalamityUtils.GetText("Common.CritDamageTootip").Format(cdmg.ToPercent()); } //Add "Uses X Minion Slots right above "Uses X Mana" - if (ItemID.Sets.StaffMinionSlotsRequired[item.type] > 0) + if (ItemID.Sets.StaffMinionSlotsRequired[item.type] > 1 || ContentSamples.ProjectilesByType[item.shoot].minionSlots > 0) { - tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback") + 1, new(Mod, "Minions", CalamityUtils.GetText("Common.MinionSlotCost").Format(ItemID.Sets.StaffMinionSlotsRequired[item.type]))); + tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback") + 1, new(Mod, "Minions", CalamityUtils.GetText(ItemID.Sets.StaffMinionSlotsRequired[item.type] > 1 ? "Common.MinionSlotCost" : "Common.MinionSlotCostSingle").Format(ItemID.Sets.StaffMinionSlotsRequired[item.type]))); } diff --git a/Localization/en-US/Mods.CalamityMod.Common.hjson b/Localization/en-US/Mods.CalamityMod.Common.hjson index 8b0a31d46e..77ec346020 100644 --- a/Localization/en-US/Mods.CalamityMod.Common.hjson +++ b/Localization/en-US/Mods.CalamityMod.Common.hjson @@ -12,6 +12,7 @@ ArmorSetBonusKey: Press {0} DoubleTapDown: Double tap {0} // Miscellaneous stats/info MinionSlotCost: Uses {0} minion slots +MinionSlotCostSingle: Uses {0} minion slot AggroBoost: Enemies are more likely to target you AggroReduction: Enemies are less likely to target you KnockbackImmunity: Grants immunity to knockback diff --git a/Utilities/HitModiferUtils.cs b/Utilities/HitModiferUtils.cs index 12c60828ef..99cf3df95b 100644 --- a/Utilities/HitModiferUtils.cs +++ b/Utilities/HitModiferUtils.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Utilities { internal static class HitModiferUtils { - extension(NPC.HitModifiers modifiers) + extension(ref NPC.HitModifiers modifiers) { internal void ApplyScalingForcedCrit(Projectile Projectile) { From d5d5ab26a5b8d74f51a5ca9d7a2d7b0813ede0e8 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 29 Mar 2026 10:26:20 -0700 Subject: [PATCH 57/78] hey buddy --- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++-- Projectiles/Magic/FleshTotemMinion.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 50e0550a28..b59ee7fcfa 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2004,7 +2004,7 @@ namespace CalamityMod.CalPlayer int MaxSigils = 4; //Starts at 0, so cap is 5 if (mageCrownTimer == 0) { - if (mageCrownCount <= MaxSigils) + if (mageCrownCount <= MaxSigils && Main.myPlayer == Player.whoAmI) { mageCrownCount += 1; float start = 360f / mageCrownCount; @@ -2022,7 +2022,7 @@ namespace CalamityMod.CalPlayer int MaxSigils = 9; //Starts at 0, so cap is 10 if (mageCrownTimer == 0) { - if (mageCrownCount <= MaxSigils) + if (mageCrownCount <= MaxSigils && Main.myPlayer == Player.whoAmI) { mageCrownCount += 1; float start = 360f / mageCrownCount; diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 2d09bc3c4b..065e405317 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Projectiles.Magic { pulseMax = 60; } - //When the timer reaches max, pulse and restore 30 mana + //When the timer reaches max, pulse and restore 20 mana if (pulseTimer >= pulseMax) { if (visuals) From 89d95ad044e23b5e3496fee01f3ecaa4dab607a6 Mon Sep 17 00:00:00 2001 From: Listentowind <2926669682@qq.com> Date: Tue, 31 Mar 2026 08:28:09 +0800 Subject: [PATCH 58/78] Fix a lot localization --- CalPlayer/CalamityPlayerOnHit.cs | 2 +- .../en-US/Mods.CalamityMod.BossChecklistIntegration.hjson | 6 +++--- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 4 ++-- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson | 2 +- .../en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 4 ---- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index e211b65d8c..e90a9505e6 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -762,7 +762,7 @@ namespace CalamityMod.CalPlayer if (hideOfDeus && hideOfDeusTimer == 0) { hideOfDeusTimer = 10; - int bulwarkStarDamage = (int)Player.GetTotalDamage().ApplyTo(320); + int bulwarkStarDamage = (int)Player.GetTotalDamage().ApplyTo(HideofAstrumDeus.StarDamage); for (int n = 0; n < 3; n++) CalamityUtils.ProjectileRain(source, Player.Center, 400f, 100f, 500f, 800f, 29f, ProjectileType(), bulwarkStarDamage, 5f, Player.whoAmI); diff --git a/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson index 8e6b15daba..3578ce8f43 100644 --- a/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson +++ b/Localization/en-US/Mods.CalamityMod.BossChecklistIntegration.hjson @@ -53,7 +53,7 @@ CalamitasClone: { CeaselessVoid: { EntryName: Ceaseless Void - SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the dungeon. + SpawnInfo: Use a [i:CalamityMod/MarkofProvidence] in the dungeon. DespawnMessage: "[c/4B0082:The ancient spatial rift slips away to places unknown.]" } @@ -180,7 +180,7 @@ Ravager: { Signus: { EntryName: Signus - SpawnInfo: Use a [i:CalamityMod/RuneofKos] in the underworld. + SpawnInfo: Use a [i:CalamityMod/MarkofProvidence] in the underworld. DespawnMessage: "[c/BA55D3:Signus inexplicably ceases to be where he once was.]" } @@ -192,7 +192,7 @@ SlimeGod: { StormWeaver: { EntryName: Storm Weaver - SpawnInfo: Use a [i:CalamityMod/RuneofKos] high in the sky or in space. + SpawnInfo: Use a [i:CalamityMod/MarkofProvidence] high in the sky or in space. DespawnMessage: "[c/EE82EE:Storm Weaver hides itself within the fierce anvilhead clouds.]" } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index f2870cf583..1c9f566c22 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1068,7 +1068,7 @@ Bane: { Description: An ancient curse envelops you ItemTooltipEnemy: ''' - Typeless - 45 DPS + Typeless - 20 DPS Does not scale with debuff multipliers Scales based on your critical strike chance ''' @@ -1209,7 +1209,7 @@ WitherDebuff: { Withered... Defense decreased by {0} ''' - ItemTooltipPlayer: Decreases defense + ItemTooltipEnemy: Decreases defense } // Summons diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index dae92204de..36d45d8a8a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1164,7 +1164,7 @@ NecklaceofVexation: { ''' Up to 30% increased damage the lower your life is Current boost: [DAMAGE]% - All attacks inflict acid venom + All attacks inflict [cbuff:Venom] Revenge ''' } @@ -1671,7 +1671,7 @@ SpringStool: { DisplayName: Spring Stool Tooltip: ''' - Hold Up to reach higher + Hold {$Key.UP} to reach higher Press [KEY] to jump super high Super jumps can only be performed once every {0} seconds and after landing +{1}% critical strike chance when striking enemies below you diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 0c6da2395a..ab7db3fa2d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -110,7 +110,7 @@ HyperiusBullet: { Damage that would be dealt from the bullets is instead stored on the target As more damage is stored, it will begin to overflow, slowly releasing and damaging the enemy Attacks from sources other than Hyperius Bullets will release some of the charge - Releasing charge in this way is 20% more efficent + Releasing charge in this way is 20% more efficient ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index a461ca580e..ec4d7d4bc6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -878,7 +878,7 @@ MonolithSword: { MonstrousKnives: { DisplayName: Monstrous Knives - Tooltip: Throws a spread of short-range knives that have a chance to heal the user + Tooltip: Throws a spread of short-range knives that heal the user } Mourningstar: { diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 373a159249..504863dab8 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -142,11 +142,7 @@ EditedTooltip: { /* OOA armors */ - ApprenticeHat: Increases your max number of sentries by 1, 10% reduced mana cost - ApprenticeRobe: 15% increased summon damage and magic damage - ApprenticeTrousers: 10% increased summon damage, 15% increased magic critical strike chance, 20% increased movement speed SquireGreatHelm: Increases your max number of sentries by 1 and grants +2 HP/s life regen - SquireGreaves: 10% increased summon damage, 15% increased melee critical strike chance and movement speed MonkBrows: Increases your max number of sentries by 1 and increases rogue velocity by 20% MonkShirt: 20% increased summon and rogue damage MonkPants: 15% increased rogue critical strike chance and 20% increased movement speed From f87b10f211a4ea4e0480f0a057d1ba917a1cbec3 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 30 Mar 2026 19:51:26 -0500 Subject: [PATCH 59/78] Return Hide of Deus star damage fixing it not using the variable nerfed it from 320 -> 75. Not notably overperforming in public, so returning to same value as public. --- Items/Accessories/HideofAstrumDeus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/HideofAstrumDeus.cs b/Items/Accessories/HideofAstrumDeus.cs index d73eca4c00..d59931e185 100644 --- a/Items/Accessories/HideofAstrumDeus.cs +++ b/Items/Accessories/HideofAstrumDeus.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(50); - public static int StarDamage => 75; + public static int StarDamage => 320; public override void SetDefaults() { From 3d057fdbb6f23beb17ce90b626881dfbe673a2f9 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 30 Mar 2026 19:53:07 -0500 Subject: [PATCH 60/78] Proboscis dynamic stat fix --- Projectiles/Melee/Spears/GildedProboscisProj.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index b61bd6042b..c22d68a15f 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Melee.Spears else { if (timer == StartupTime - 1) - Projectile.damage = (int)(Projectile.damage * 0.75 * (channelCharge / 75f)); //scales from 0x to 3x power + Projectile.originalDamage = (int)(Projectile.originalDamage * 0.75 * (channelCharge / 75f)); //scales from 0x to 3x power } //Make the sprite rotation look right in game Projectile.rotation -= (MathHelper.PiOver2) * (angle.X > 0 ? 1 : -1); @@ -261,8 +261,7 @@ namespace CalamityMod.Projectiles.Melee.Spears { target.AddBuff(ModContent.BuffType(), 900); Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015)); - if (Projectile.damage > 1) - Projectile.damage = (int)(Projectile.damage * 0.925f); + Projectile.originalDamage = (int)(Projectile.originalDamage * 0.925f); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { From a0437eb0d94e15504bac810286a5d4d64e097bf9 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 30 Mar 2026 20:44:40 -0700 Subject: [PATCH 61/78] Gave the mage crowns lore tooltips --- Items/Accessories/FeatherCrown.cs | 2 +- Items/Accessories/MoonstoneCrown.cs | 2 +- .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Items/Accessories/FeatherCrown.cs b/Items/Accessories/FeatherCrown.cs index 2f8a8f51aa..172ca19e4e 100644 --- a/Items/Accessories/FeatherCrown.cs +++ b/Items/Accessories/FeatherCrown.cs @@ -7,7 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { [AutoloadEquip(EquipType.Face)] - public class FeatherCrown : ModItem, ILocalizedModType + public class FeatherCrown : ModItem, ILocalizedModType, IHoldShiftTooltipItem { public new string LocalizationCategory => "Items.Accessories"; public override void SetStaticDefaults() diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index bd8daf52d8..cc6ed61b48 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -7,7 +7,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { [AutoloadEquip(EquipType.Face)] - public class MoonstoneCrown : ModItem, ILocalizedModType + public class MoonstoneCrown : ModItem, ILocalizedModType, IHoldShiftTooltipItem { public new string LocalizationCategory => "Items.Accessories"; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 36d45d8a8a..bc9281e244 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -760,7 +760,12 @@ FeatherCrown: { Each [c/81B7F7:Skyline Feather] increases magic damage by 2% and decreases mana cost by 1% With 5 feathers, increases magic critical strike chance by 5% and all magic attacks inflict [cbuff:CalamityMod/StaticDischarge] Running out of mana or drinking a mana potion sheds all feathers - Upon shedding a feather, no new feathers can be gained for 5 seconds + Upon shedding a feather, no new feathers can be gained for 5 seconds + ''' + HoldShiftTooltip: + ''' + [c/81B7F7:Young mages would don feathers and gaze into the starlit night, as if welcoming the breath of the heavens.] + [c/81B7F7:To commune with mana was to commune with the world, and further, its draconic masters.] ''' } @@ -1133,6 +1138,11 @@ MoonstoneCrown: { Running out of mana or using a mana potion shatters all sigils Upon shattering a sigil, no new sigils can appear for 5 seconds ''' + HoldShiftTooltip: + ''' + [c/27F5E0:Countless tears were shed over Chrysadia's marring: when its eventide clouds gave way not to beloved stars,] + [c/27F5E0:or to dear patrons, but to a ravenous void and its unyielding dread.] + ''' } Nanotech: { From b17203c30ed0c60943aad0838463daed1908722b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 11:06:00 -0700 Subject: [PATCH 62/78] Signus Mine and Siren Lure now unlock on boss kill --- NPCs/Leviathan/LeviathanStart.cs | 3 +++ NPCs/Signus/CosmicMine.cs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 19205bd748..415325546d 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -64,6 +64,9 @@ namespace CalamityMod.NPCs.Leviathan public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { + int associatedNPCType = ModContent.NPCType(); + bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Ocean, diff --git a/NPCs/Signus/CosmicMine.cs b/NPCs/Signus/CosmicMine.cs index 8a2a83f901..4b7e8cb2fd 100644 --- a/NPCs/Signus/CosmicMine.cs +++ b/NPCs/Signus/CosmicMine.cs @@ -19,6 +19,7 @@ namespace CalamityMod.NPCs.Signus public override void SetStaticDefaults() { NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.BossBestiaryPriority.Add(Type); } public override void SetDefaults() @@ -42,6 +43,9 @@ namespace CalamityMod.NPCs.Signus public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { + int associatedNPCType = ModContent.NPCType(); + bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] { BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheUnderworld, From c2ab968caa2c54814e44ab4b9f6aef9bcf71202a Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 11:14:35 -0700 Subject: [PATCH 63/78] Flamethrower recipe and debuff changes --- Items/Weapons/Ranged/WildfireBloom.cs | 1 - Projectiles/Ranged/AuroraFire.cs | 7 ++++++- Projectiles/Ranged/SlimeBolt.cs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Ranged/WildfireBloom.cs b/Items/Weapons/Ranged/WildfireBloom.cs index efcde627f1..b3b7b5dbba 100644 --- a/Items/Weapons/Ranged/WildfireBloom.cs +++ b/Items/Weapons/Ranged/WildfireBloom.cs @@ -70,7 +70,6 @@ namespace CalamityMod.Items.Weapons.Ranged AddIngredient(ItemID.Flamethrower). AddIngredient(). AddIngredient(12). - AddIngredient(5). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Projectiles/Ranged/AuroraFire.cs b/Projectiles/Ranged/AuroraFire.cs index 8ae685bc7a..649136df35 100644 --- a/Projectiles/Ranged/AuroraFire.cs +++ b/Projectiles/Ranged/AuroraFire.cs @@ -108,7 +108,12 @@ namespace CalamityMod.Projectiles.Ranged LightPower = MathHelper.Lerp(LightPower, lightPowerBelow, 0.15f); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + //Doze - Flamethrowers in vanilla are long debuff infliction tools (20 seconds of their debuff). + //I am applying this as the base for Cal flamethrowers, with shorter times being the exception instead of the rule + target.AddBuff(ModContent.BuffType(), 1200); + } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { modifiers.SourceDamage *= damageMult; diff --git a/Projectiles/Ranged/SlimeBolt.cs b/Projectiles/Ranged/SlimeBolt.cs index 576bcec82f..cad450e61d 100644 --- a/Projectiles/Ranged/SlimeBolt.cs +++ b/Projectiles/Ranged/SlimeBolt.cs @@ -107,7 +107,9 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(BuffID.Slimed, Empowered ? 480 : 180); + //Doze - Flamethrowers in vanilla are long debuff infliction tools (20 seconds of their debuff). + //I am applying this as the base for Cal flamethrowers, with shorter times being the exception instead of the rule + target.AddBuff(BuffID.Slimed, 1200); if (Empowered) { Particle pulse2 = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, SlimeColor, Vector2.One, 0f, 0f, 0.65f, 35); From 517249b39577c28cc217158bfade3f724e8e31c0 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 11:29:34 -0700 Subject: [PATCH 64/78] The Jailor no longer uses bullets --- Items/Weapons/Ranged/TheJailor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/TheJailor.cs b/Items/Weapons/Ranged/TheJailor.cs index fc33f30846..55fc16c5d4 100644 --- a/Items/Weapons/Ranged/TheJailor.cs +++ b/Items/Weapons/Ranged/TheJailor.cs @@ -27,8 +27,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.UseSound = SoundID.Item14; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 20f; - Item.useAmmo = AmmoID.Bullet; + Item.shootSpeed = 28f; } public override Vector2? HoldoutOffset() => new Vector2(-40f, -16f); From f8021646d5d657d91d0cbb7b3c9f1592283ef521 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 11:53:12 -0700 Subject: [PATCH 65/78] Wulfrum Labstation now counts as a table --- Tiles/FurnitureWulfrum/WulfrumLabstation.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Tiles/FurnitureWulfrum/WulfrumLabstation.cs b/Tiles/FurnitureWulfrum/WulfrumLabstation.cs index e58e455dd4..5b7f227594 100644 --- a/Tiles/FurnitureWulfrum/WulfrumLabstation.cs +++ b/Tiles/FurnitureWulfrum/WulfrumLabstation.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum public override void SetStaticDefaults() { + this.SetUpTable(ModContent.ItemType(), true); Main.tileFrameImportant[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); TileObjectData.addTile(Type); From 5d53b4646bf05317cc358c9d036a0ad1a0c13c5a Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 11:56:31 -0700 Subject: [PATCH 66/78] Nebulous Core now properly shows rainbow colors --- Rarities/CosmicPurple.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Rarities/CosmicPurple.cs b/Rarities/CosmicPurple.cs index 7ede28b514..0a38e2d428 100644 --- a/Rarities/CosmicPurple.cs +++ b/Rarities/CosmicPurple.cs @@ -42,6 +42,9 @@ namespace CalamityMod.Rarities ChatManager.DrawColorCodedString(spriteBatch, font, text, new Vector2(X, Y) + new Vector2(pulsing, 0f).RotatedBy(f + time * 2f % MathHelper.TwoPi), textColor * 0.5f, rotation, origin, baseScale); } + if (Item.expert) + textColor = Main.DiscoColor; + textColor.A = 255; ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, new Vector2(X, Y), textColor * 2f, rotation, origin, baseScale); From 16519cef9c7defa9eab14c079008c90f0e48ab25 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 12:03:06 -0700 Subject: [PATCH 67/78] Added an alt Deific Amulet recipe --- Items/Accessories/DeificAmulet.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Items/Accessories/DeificAmulet.cs b/Items/Accessories/DeificAmulet.cs index 32593b0266..4df2e3455a 100644 --- a/Items/Accessories/DeificAmulet.cs +++ b/Items/Accessories/DeificAmulet.cs @@ -83,6 +83,13 @@ namespace CalamityMod.Items.Accessories AddIngredient(10). AddTile(TileID.TinkerersWorkbench). Register(); + CreateRecipe(). + AddIngredient(ItemID.BeeCloak). + AddIngredient(ItemID.CrossNecklace). + AddIngredient(ItemID.PanicNecklace). + AddIngredient(10). + AddTile(TileID.TinkerersWorkbench). + Register(); } } } From 106b03907509fc71bce6951651941acbeb217dc6 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 12:14:04 -0700 Subject: [PATCH 68/78] Cragmaw Mire no longer reduces drop rates post-Polter --- NPCs/AcidRain/CragmawMire.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index 92368654ad..e79dc4ba06 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -14,7 +14,6 @@ using Terraria; using Terraria.Audio; using Terraria.GameContent; using Terraria.GameContent.Bestiary; -using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; using Terraria.Utilities; @@ -520,13 +519,8 @@ namespace CalamityMod.NPCs.AcidRain public override void ModifyNPCLoot(NPCLoot npcLoot) { - // If post-Polter, the drop rates are 10%. Otherwise they're 100%. - // This is accomplished by adding rules if the CONDITION "Post-Polter" fails. - LeadingConditionRule postPolter = npcLoot.DefineConditionalDropSet(() => DownedBossSystem.downedPolterghast); - postPolter.Add(ModContent.ItemType(), 10, hideLootReport: !DownedBossSystem.downedPolterghast); - postPolter.Add(ModContent.ItemType(), 10, hideLootReport: !DownedBossSystem.downedPolterghast); - postPolter.AddFail(ModContent.ItemType(), hideLootReport: DownedBossSystem.downedPolterghast); - postPolter.AddFail(ModContent.ItemType(), hideLootReport: DownedBossSystem.downedPolterghast); + npcLoot.Add(ModContent.ItemType()); + npcLoot.Add(ModContent.ItemType()); npcLoot.Add(ModContent.ItemType(), 10); npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); From 33dc7269302394d6137f91b491e3d559d921d01c Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 12:19:11 -0700 Subject: [PATCH 69/78] Reduced Ice Clasper shooting sound --- Projectiles/Summon/IceClasperMinion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/IceClasperMinion.cs b/Projectiles/Summon/IceClasperMinion.cs index 07093de895..837d00d743 100644 --- a/Projectiles/Summon/IceClasperMinion.cs +++ b/Projectiles/Summon/IceClasperMinion.cs @@ -148,7 +148,7 @@ namespace CalamityMod.Projectiles.Summon if (!Main.dedServ) { // For the fucking love of any god you can think of, this sound sucks but I can't find another one that fits better. - SoundEngine.PlaySound(SoundID.Item28, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item28 with { Volume = 0.6f }, Projectile.Center); } TimerForShooting = 0f; From 3585bf307f1caae1473288c31b54810128a30eb4 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 12:22:34 -0700 Subject: [PATCH 70/78] Spikecrag nerf, Forgotten Apex wand buff --- Items/Weapons/Summon/ForgottenApexWand.cs | 2 +- Items/Weapons/Summon/SpikecragStaff.cs | 2 +- Projectiles/Summon/Spikecrag.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Summon/ForgottenApexWand.cs b/Items/Weapons/Summon/ForgottenApexWand.cs index 32000195ad..7165e12837 100644 --- a/Items/Weapons/Summon/ForgottenApexWand.cs +++ b/Items/Weapons/Summon/ForgottenApexWand.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.knockBack = 4f; Item.mana = 10; - Item.damage = 28; + Item.damage = 46; Item.useAnimation = Item.useTime = 36; Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/SpikecragStaff.cs b/Items/Weapons/Summon/SpikecragStaff.cs index 70feda5470..2c927aab9a 100644 --- a/Items/Weapons/Summon/SpikecragStaff.cs +++ b/Items/Weapons/Summon/SpikecragStaff.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Summon { Item.width = 50; Item.height = 50; - Item.damage = 56; + Item.damage = 25; Item.mana = 10; Item.DamageType = DamageClass.Summon; Item.sentry = true; diff --git a/Projectiles/Summon/Spikecrag.cs b/Projectiles/Summon/Spikecrag.cs index f78e7076b2..fc09709f37 100644 --- a/Projectiles/Summon/Spikecrag.cs +++ b/Projectiles/Summon/Spikecrag.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.ai[1] += 1f; if ((Projectile.ai[1] % 10f) == 0f) { - int amount = Main.rand.Next(2, 4); + int amount = Main.rand.Next(1, 3); if (DownedBossSystem.downedProvidence && Main.zenithWorld) // spikecrag gfb buff { amount += 6; From 5bf01a4973db27205b6e3930756e401270315712 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 31 Mar 2026 13:15:09 -0700 Subject: [PATCH 71/78] Brain Sprite config --- CalamityConfig.cs | 4 ++++ Localization/en-US/Mods.CalamityMod.Configs.hjson | 9 +++++++++ .../Bosses/BrainOfCthulhu/FalseBrain.cs | 2 +- en-US.hjson | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 en-US.hjson diff --git a/CalamityConfig.cs b/CalamityConfig.cs index af43e1923a..7c72d2f83d 100644 --- a/CalamityConfig.cs +++ b/CalamityConfig.cs @@ -46,6 +46,10 @@ namespace CalamityMod [DefaultValue(false)] public bool Photosensitivity { get; set; } + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool BoCSpriteChange { get; set; } + [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] public bool EnableVanillaTextureEdits { get; set; } diff --git a/Localization/en-US/Mods.CalamityMod.Configs.hjson b/Localization/en-US/Mods.CalamityMod.Configs.hjson index e4eb0c04ad..d4d7fac81b 100644 --- a/Localization/en-US/Mods.CalamityMod.Configs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Configs.hjson @@ -208,6 +208,15 @@ CalamityClientConfig: { ''' } + BoCSpriteChange: { + Label: "[i:BrainOfConfusion] Remove Potentially Disturbing Imagery" + Tooltip: + ''' + Replaces some boss sprites to remove potentially upsetting imagery that could trigger phobias. + Highly recommended if you are uncomfortable with body horror or have trypophobia. + ''' + } + RageMeterPosX: { Label: "[i:LaserRuler] Rage Meter X Position" Tooltip: diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs index c69afe955c..86a7aa7f8c 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/FalseBrain.cs @@ -166,7 +166,7 @@ public class FalseBrain : ModNPC, ILocalizedModType float endLerp = AttackTime / 60f; float startLerp = SpawnTime / 60f; - if (BrainOfCthulhuSystem.IsBrainOfCthulhuTextureVanilla) + if (BrainOfCthulhuSystem.IsBrainOfCthulhuTextureVanilla && !CalamityClientConfig.Instance.BoCSpriteChange) { tex = TextureAssets.Npc[Type].Value; frame = tex.Frame(7, 4, Variant, (int)NPC.frameCounter); diff --git a/en-US.hjson b/en-US.hjson new file mode 100644 index 0000000000..8ac5e52783 --- /dev/null +++ b/en-US.hjson @@ -0,0 +1 @@ +Mods.CalamityMod.Projectiles.V8000SoulVisual.DisplayName: V8000 Soul Visual From 96da62dde8bca011f4560d9e3eacf3594a16424d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 31 Mar 2026 16:37:12 -0500 Subject: [PATCH 72/78] fixed dodges dodging once on player load --- CalPlayer/CalamityPlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1d01e55f3a..fd8c49ad3f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -951,7 +951,7 @@ namespace CalamityMod.CalPlayer public bool v8Engine = false; public bool v8000Engine = false; public bool v8EngineFXPlayed = false; - public bool procDodgeEffects = true; + public bool procDodgeEffects = false; public bool nanotech = false; public int nanotechHitCooldown = 0; public bool deadshotBrooch = false; From 57aa02e524678d959f93a30a5abaa4f17f5b41b4 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 31 Mar 2026 17:39:55 -0500 Subject: [PATCH 73/78] Void of Calamity fix/buff, Sea Spirit Buff, Sand Cloak Fix + Nerf - Fixed Void of Calamity not recognizing boss iframes - Made dmg scale with difficulty like other retaliatory effects - Made fireballs home in, ignore tiles, but not pierce - Fireballs spawn in groups of 2 but half as often - Adjusted fireball visuals --- CalPlayer/CalamityPlayerMiscEffects.cs | 6 +- Items/Accessories/VoidofCalamity.cs | 14 ++-- .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- ...ods.CalamityMod.Projectiles.Typeless.hjson | 2 +- .../Melee/Spears/GildedProboscisProj.cs | 4 ++ Projectiles/Typeless/StandingFire.cs | 71 +++++-------------- 6 files changed, 35 insertions(+), 64 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index b5994a410f..3a30a11ffc 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -305,7 +305,7 @@ namespace CalamityMod.CalPlayer } // First Frame dash effects - bool dashStart = (Player.dashDelay == -1 && ((!HasCustomDash && IsFirstDashFrame) || (HasCustomDash && UsedDash.DashTimeAdjustedForStartup == 1))); + bool dashStart = (Player.Calamity().DashID == DefaultDash.ID && Player.timeSinceLastDashStarted == 1 && Player.dashDelay != 0 ) || (Player.dashDelay == -1 && ((!HasCustomDash && IsFirstDashFrame) || (HasCustomDash && UsedDash.DashTimeAdjustedForStartup == 1))); int dir = MathF.Sign(Player.velocity.X); if (dashStart) @@ -553,7 +553,7 @@ namespace CalamityMod.CalPlayer // Spawn sand veil when dashing if it does not exist and you do not have the cooldown if (!(CalamityUtils.AnyProjectiles(ModContent.ProjectileType()) || Player.HasCooldown(Cooldowns.SandCloak.ID))) { - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 13, 2.5f, Player.whoAmI); + Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 10, 2.5f, Player.whoAmI); SoundEngine.PlaySound(SoundID.Item45, Player.Center); } } @@ -1853,7 +1853,7 @@ namespace CalamityMod.CalPlayer { if (numOfEnergy < energyCap) { - int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(8); + int energyDamage = (int)Player.GetBestClassDamage().ApplyTo(12); Projectile energy = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, (Vector2.One * 4).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), energyDamage, 0f, Player.whoAmI, 0, numOfEnergy); if (numOfEnergy + 1 == energyCap && Player.Calamity().sSpiritAmuletVisual) { diff --git a/Items/Accessories/VoidofCalamity.cs b/Items/Accessories/VoidofCalamity.cs index 7289ae6af2..17965e2300 100644 --- a/Items/Accessories/VoidofCalamity.cs +++ b/Items/Accessories/VoidofCalamity.cs @@ -10,6 +10,8 @@ namespace CalamityMod.Items.Accessories public class VoidofCalamity : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int BrimstoneFlamesDmg => CalamityUtils.ScaleWithDifficulty(15); public override void SetDefaults() { Item.width = 20; @@ -19,6 +21,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; Item.expert = true; } + int cooldown = 0; public override void UpdateAccessory(Player player, bool hideVisual) { @@ -28,14 +31,17 @@ namespace CalamityMod.Items.Accessories if (player.whoAmI == Main.myPlayer) { var source = player.GetSource_Accessory(Item); - if (player.immune) + if (player.HasIFrames()) { - if (player.miscCounter % 10 == 0) + if (cooldown <= 0) { - int damage = (int)player.GetBestClassDamage().ApplyTo(30); - CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType(), damage, 5f, player.whoAmI); + cooldown = 20; + int damage = (int)player.GetBestClassDamage().ApplyTo(BrimstoneFlamesDmg); + for (var i = 0; i < 2; i++) + CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 5.5f, ModContent.ProjectileType(), damage, 5f, player.whoAmI); } } + cooldown--; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 36d45d8a8a..e5df102938 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2081,7 +2081,7 @@ VoidofCalamity: { Tooltip: ''' 12% increased damage - Brimstone fire rains down after getting hit + Calamitous flames rain down while invincible ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 3c03ba6f79..0fc9ab152c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -136,7 +136,7 @@ SlimeStream.DisplayName: Slime Stream SlurperBobber.DisplayName: Slurper Bobber SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye SpringStoolFX.DisplayName: Spring Stool -StandingFire.DisplayName: Flame +StandingFire.DisplayName: Calamitous Flame StarStruckWaterBottle.DisplayName: Bottle StepStoolBonusFX.DisplayName: Step Stool Bonus StickyFeatherAero.DisplayName: Feather diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index 2896e1e559..eaa68a964c 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -90,7 +90,10 @@ namespace CalamityMod.Projectiles.Melee.Spears else { if (timer == StartupTime - 1) + { Projectile.originalDamage = (int)(Projectile.originalDamage * 0.75 * (channelCharge / 75f)); //scales from 0x to 3x power + Projectile.damage = (int)(Projectile.damage * 0.75 * (channelCharge / 75f)); //Both are needed + } } //Make the sprite rotation look right in game Projectile.rotation -= (MathHelper.PiOver2) * (angle.X > 0 ? 1 : -1); @@ -262,6 +265,7 @@ namespace CalamityMod.Projectiles.Melee.Spears target.AddBuff(ModContent.BuffType(), 900); Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015), 0.5f); Projectile.originalDamage = (int)(Projectile.originalDamage * 0.925f); + Projectile.damage = (int)(Projectile.damage * 0.925f); //Both are needed as it doesn't recalculate till next frame } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Typeless/StandingFire.cs b/Projectiles/Typeless/StandingFire.cs index b692380ee6..a6fde03773 100644 --- a/Projectiles/Typeless/StandingFire.cs +++ b/Projectiles/Typeless/StandingFire.cs @@ -1,5 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; +using CalamityMod.Graphics.Metaballs; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -14,82 +14,43 @@ namespace CalamityMod.Projectiles.Typeless public override void SetDefaults() { - Projectile.width = 6; - Projectile.height = 12; + Projectile.width = 8; + Projectile.height = 8; Projectile.friendly = true; - Projectile.penetrate = -1; + Projectile.penetrate = 1; Projectile.timeLeft = 240; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 7; + Projectile.MaxUpdates = 4; + Projectile.tileCollide = false; + } public override void AI() { - if (Projectile.velocity.X != Projectile.velocity.X) + CalamityUtils.HomeInOnNPC(Projectile, false, 300, 5.5f, 10f, true); + + if (Projectile.Calamity().HomingTarget < 0) { - Projectile.velocity.X = Projectile.velocity.X * -0.1f; + Projectile.velocity.Y += 0.025f; } - if (Projectile.velocity.X != Projectile.velocity.X) - { - Projectile.velocity.X = Projectile.velocity.X * -0.5f; - } - if (Projectile.velocity.Y != Projectile.velocity.Y && Projectile.velocity.Y > 1f) - { - Projectile.velocity.Y = Projectile.velocity.Y * -0.5f; - } - Projectile.ai[0] += 1f; - if (Projectile.ai[0] > 5f) - { - Projectile.ai[0] = 5f; - if (Projectile.velocity.Y == 0f && Projectile.velocity.X != 0f) - { - Projectile.velocity.X = Projectile.velocity.X * 0.97f; - if ((double)Projectile.velocity.X > -0.01 && (double)Projectile.velocity.X < 0.01) - { - Projectile.velocity.X = 0f; - Projectile.netUpdate = true; - } - } - Projectile.velocity.Y = Projectile.velocity.Y + 0.2f; - } - Projectile.rotation += Projectile.velocity.X * 0.1f; if (Projectile.ai[1] == 0f && Projectile.type >= ProjectileID.GreekFire1 && Projectile.type <= ProjectileID.GreekFire3) { Projectile.ai[1] = 1f; SoundEngine.PlaySound(SoundID.Item13, Projectile.position); } - int brimDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); - Dust dust = Main.dust[brimDust]; - dust.position.X -= 2f; - dust.position.Y += 2f; - dust.scale += (float)Main.rand.Next(50) * 0.01f; - dust.noGravity = true; - dust.velocity.Y -= 2f; - if (Main.rand.NextBool()) - { - int brimDusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 1f); - Dust dusty = Main.dust[brimDusty]; - dusty.position.X -= 2f; - dusty.position.Y += 2f; - dusty.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f; - dusty.noGravity = true; - dusty.velocity *= 0.1f; - } - if ((double)Projectile.velocity.Y < 0.25 && (double)Projectile.velocity.Y > 0.15) - { - Projectile.velocity.X = Projectile.velocity.X * 0.8f; - } - Projectile.rotation = -Projectile.velocity.X * 0.05f; + + CalamitasMetaball.SpawnParticle(Projectile.Center + Projectile.velocity, Main.rand.NextVector2Circular(2, 2), 16f); + if (Projectile.velocity.Y > 16f) { Projectile.velocity.Y = 16f; } } - public override bool OnTileCollide(Vector2 oldVelocity) => false; - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 300); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 300); } } From 98b2827208e92834959f13aa1b384862892ea186 Mon Sep 17 00:00:00 2001 From: Doze-Zoze <43045606+Doze-Zoze@users.noreply.github.com> Date: Tue, 31 Mar 2026 17:58:29 -0500 Subject: [PATCH 74/78] Garbage Localization Fix --- en-US.hjson | 1 - 1 file changed, 1 deletion(-) delete mode 100644 en-US.hjson diff --git a/en-US.hjson b/en-US.hjson deleted file mode 100644 index 8ac5e52783..0000000000 --- a/en-US.hjson +++ /dev/null @@ -1 +0,0 @@ -Mods.CalamityMod.Projectiles.V8000SoulVisual.DisplayName: V8000 Soul Visual From f56e00bb4c7cad25216150b9a2ac110d803d64bd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 31 Mar 2026 22:02:03 -0500 Subject: [PATCH 75/78] explosive bullet fix --- Projectiles/CalamityGlobalProjectileTweaks.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 6f3860270f..5874aaa100 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -143,7 +143,7 @@ namespace CalamityMod.Projectiles { ProjectileID.DeadlySphere, Do(LocalIFrames(30)) }, { ProjectileID.EmeraldBolt, Do(NoPiercing) }, { ProjectileID.EnchantedBoomerang, Do(ExtraUpdatesExact(1), DefaultIDStaticIFrames) }, - { ProjectileID.ExplosiveBullet, Do(ExtraUpdatesDelta(+2), IDStaticIFrames(5)) }, // Has an exception in Vanilla iframe code, uses 5 iframes + { ProjectileID.ExplosiveBullet, Do(ExtraUpdatesDelta(+2), IDStaticIFrames(5), SingleHitImmunity) }, // Has an exception in Vanilla iframe code, uses 5 iframes { ProjectileID.FairyQueenRangedItemShot, Do(PiercingExact(7), ExtraUpdatesExact(1)) }, // Eventide Convert { ProjectileID.FlaironBubble, Do(ExtraUpdatesExact(1), TimeLeftExact(150), DefaultIDStaticIFrames) }, { ProjectileID.Flamarang, Do(ExtraUpdatesExact(2), DefaultIDStaticIFrames) }, From d281465a8e55adb9fc34a02f007300ba521806bc Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 1 Apr 2026 01:28:39 -0400 Subject: [PATCH 76/78] Coral Spout Buff Coral Spout: Base damage increased from 8 to 9, damage mult of Mana-charged Coral increased from 6 to 7, all shots have 5 armor penetration --- Items/Weapons/Magic/CoralSpout.cs | 3 ++- Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson | 1 + Projectiles/Magic/CoralSpoutHoldout.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Magic/CoralSpout.cs b/Items/Weapons/Magic/CoralSpout.cs index f0df8bd95b..29915efe9f 100644 --- a/Items/Weapons/Magic/CoralSpout.cs +++ b/Items/Weapons/Magic/CoralSpout.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 28; Item.height = 30; - Item.damage = 8; + Item.damage = 9; Item.DamageType = DamageClass.Magic; Item.mana = 7; Item.useTime = 26; @@ -38,6 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; + Item.ArmorPenetration = 5; } public override void HoldItem(Player player) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 2081186560..895e42de07 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -202,6 +202,7 @@ CoralSpout: { ''' Casts a shotgun-like blast of coral shards Keep the attack button held down to narrow the spread + Coral shards ignore 5 points of enemy defense Fully charging the attack releases a single, bigger chunk of coral that sticks to enemies Grabbing the chunk of coral after it falls from the enemy replenishes 150 mana The mana-charged coral also provides the [cbuffplr:CalamityMod/CoralSymbiosis] buff diff --git a/Projectiles/Magic/CoralSpoutHoldout.cs b/Projectiles/Magic/CoralSpoutHoldout.cs index 821503dd27..e9319efd17 100644 --- a/Projectiles/Magic/CoralSpoutHoldout.cs +++ b/Projectiles/Magic/CoralSpoutHoldout.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Magic if (Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.MountedCenter + direction * 30f, direction * 35, ModContent.ProjectileType(), (int)Projectile.damage * (ShotProjectiles + 1), Projectile.knockBack, Owner.whoAmI); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.MountedCenter + direction * 30f, direction * 35, ModContent.ProjectileType(), (int)Projectile.damage * 7, Projectile.knockBack, Owner.whoAmI); } Color pulseColor = Main.rand.NextBool() ? Color.Coral : Color.DeepSkyBlue; From 9fe5c8033fc443af37ed3eeac83fa0e0771ea580 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 1 Apr 2026 01:58:43 -0400 Subject: [PATCH 77/78] Aether's Whisper Buff Increased base damage from 504 to 600 --- Items/Weapons/Magic/AethersWhisper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/AethersWhisper.cs b/Items/Weapons/Magic/AethersWhisper.cs index e6b56a57c7..48329f3ad6 100644 --- a/Items/Weapons/Magic/AethersWhisper.cs +++ b/Items/Weapons/Magic/AethersWhisper.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 134; Item.height = 44; - Item.damage = 504; + Item.damage = 600; Item.knockBack = 5.5f; Item.useAnimation = Item.useTime = 24; Item.shootSpeed = 12f; From 6ca3cc0cb1d40ca4e74ef11305d5e96a535ea260 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 1 Apr 2026 16:17:56 -0500 Subject: [PATCH 78/78] Undid Hide buff --- Items/Accessories/HideofAstrumDeus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/HideofAstrumDeus.cs b/Items/Accessories/HideofAstrumDeus.cs index d59931e185..d73eca4c00 100644 --- a/Items/Accessories/HideofAstrumDeus.cs +++ b/Items/Accessories/HideofAstrumDeus.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int BlazeDamage => CalamityUtils.ScaleWithDifficulty(50); - public static int StarDamage => 320; + public static int StarDamage => 75; public override void SetDefaults() {