From d07c7993fddca7e0837a784b87be8f7513d3f07b Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Sat, 26 Apr 2025 15:26:20 -0700 Subject: [PATCH 001/142] 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 002/142] 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 003/142] 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 004/142] 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 005/142] 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 11171d62041d9cbac304ffb2ffb5c8853fa925ea Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 14 Jan 2026 20:21:52 -0500 Subject: [PATCH 006/142] V8 Basis --- CalPlayer/CalamityPlayer.cs | 10 +++ CalPlayer/CalamityPlayerDashEffects.cs | 2 +- CalPlayer/Dashes/V8EngineDash.cs | 59 ++++++++++++++++++ Items/Accessories/V8Engine.cs | 32 ++++++++++ Items/Accessories/V8Engine.png | Bin 0 -> 1025 bytes .../Mods.CalamityMod.Items.Accessories.hjson | 5 ++ 6 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 CalPlayer/Dashes/V8EngineDash.cs create mode 100644 Items/Accessories/V8Engine.cs create mode 100644 Items/Accessories/V8Engine.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1ab2361a61..cc830a8ba6 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -935,6 +935,7 @@ namespace CalamityMod.CalPlayer public bool seraphTracers = false; public bool frostFlare = false; public bool evolution = false; + public bool v8Engine = false; public bool nanotech = false; public bool deadshotBrooch = false; public bool shadowMinions = false; @@ -2371,6 +2372,7 @@ namespace CalamityMod.CalPlayer amalgam = false; frostFlare = false; evolution = false; + v8Engine = false; nanotech = false; deadshotBrooch = false; tesla = false; @@ -3768,6 +3770,14 @@ namespace CalamityMod.CalPlayer } } + if (CalamityKeybinds.DashHotkey.JustPressed) + { + if (godSlayer && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && !Player.HasCooldown(GodSlayerDash.ID) && Player.dashDelay == 0) + { + godSlayerDashHotKeyPressed = true; + } + } + //Right click dash on Speed Blaster if (sBlasterDashActivated == true) { diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index 35995aaf7c..a418e748e0 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -231,7 +231,7 @@ namespace CalamityMod.CalPlayer } // Handle first-frame effects. - else if (HasCustomDash && !Player.mount.Active) + else if (HasCustomDash && (!Player.mount.Active || DashID == V8EngineDash.ID)) { UsedDash.dashTime = 0; if (DoADash(UsedDash.CalculateDashSpeed(Player))) diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs new file mode 100644 index 0000000000..dd4522d237 --- /dev/null +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -0,0 +1,59 @@ +using System; +using CalamityMod.Enums; +using CalamityMod.Items.Accessories; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.CalPlayer.Dashes +{ + public class V8EngineDash : PlayerDashEffect + { + public static new string ID { get; private set; } + + public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam; + + public override bool IsOmnidirectional => false; + + public override void Load() + { + ID = DashID; + } + + public override float CalculateDashSpeed(Player player) => 13f; + + public override void DashStartupEffects(Player player) + { + player.velocity *= 0.9f; + } + + public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) + { + dashSpeed = 10.5f; + + + + // Spawn fire dust around the player's body. + if (DashTimeAdjustedForStartup > 14) + return; + for (int d = 0; d < 3; d++) + { + Dust holyFireDashDust = Dust.NewDustDirect(player.position + Vector2.UnitY * 4f, player.width, player.height - 8, Main.rand.NextBool() ? 296 : 158, 0f, 0f, 0, default, 1.2f); + holyFireDashDust.velocity = -player.velocity * Main.rand.NextFloat(0.1f, 0.75f); + holyFireDashDust.scale *= Main.rand.NextFloat(2f, 2.4f); + holyFireDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); + holyFireDashDust.noGravity = true; + if (Main.rand.NextBool()) + holyFireDashDust.fadeIn = 0.1f; + } + Vector2 dustPosition = player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.7f); + Dust dust = Dust.NewDustPerfect(dustPosition, DustID.FireworkFountain_Yellow, -player.velocity * Main.rand.NextFloat(0.15f, 0.4f), 0, default, 0.5f); + dust.noGravity = false; + dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); + } + } +} diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs new file mode 100644 index 0000000000..1d83878a97 --- /dev/null +++ b/Items/Accessories/V8Engine.cs @@ -0,0 +1,32 @@ +using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer.Dashes; +using CalamityMod.Rarities; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class V8Engine : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Accessories"; + + public override void SetDefaults() + { + Item.width = 44; + Item.height = 42; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.v8Engine = true; + modPlayer.DashID = V8EngineDash.ID; + player.dashType = 0; + } + } +} diff --git a/Items/Accessories/V8Engine.png b/Items/Accessories/V8Engine.png new file mode 100644 index 0000000000000000000000000000000000000000..a795ce0c9695d0e0c89d3cc1d434c31b34f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.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 2bf1e2fe1f..74b402b1df 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2205,3 +2205,8 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } + +V8Engine: { + DisplayName: V8 Engine + Tooltip: "" +} From ed9e76e572e4c55466e0cc6b89a6dea994642987 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 17 Jan 2026 21:53:05 -0500 Subject: [PATCH 007/142] More progress --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerDashEffects.cs | 7 +- CalPlayer/Dashes/V8000EngineDash.cs | 99 ++++++++++++++++++ CalPlayer/Dashes/V8EngineDash.cs | 40 +++---- CalPlayer/DrawLayers/V8000Cowcatcher.png | Bin 0 -> 754 bytes CalPlayer/DrawLayers/V8000CowcatcherLayer.cs | 35 +++++++ Items/Accessories/V8000Engine.cs | 48 +++++++++ Items/Accessories/V8000Engine.png | Bin 0 -> 1323 bytes Items/Accessories/V8Engine.cs | 17 ++- .../Mods.CalamityMod.Items.Accessories.hjson | 20 +++- 10 files changed, 240 insertions(+), 28 deletions(-) create mode 100644 CalPlayer/Dashes/V8000EngineDash.cs create mode 100644 CalPlayer/DrawLayers/V8000Cowcatcher.png create mode 100644 CalPlayer/DrawLayers/V8000CowcatcherLayer.cs create mode 100644 Items/Accessories/V8000Engine.cs create mode 100644 Items/Accessories/V8000Engine.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index cc830a8ba6..650eccae45 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -936,6 +936,7 @@ namespace CalamityMod.CalPlayer public bool frostFlare = false; public bool evolution = false; public bool v8Engine = false; + public bool v8000Engine = false; public bool nanotech = false; public bool deadshotBrooch = false; public bool shadowMinions = false; @@ -2373,6 +2374,7 @@ namespace CalamityMod.CalPlayer frostFlare = false; evolution = false; v8Engine = false; + v8000Engine = false; nanotech = false; deadshotBrooch = false; tesla = false; diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index a418e748e0..cfc495120f 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -3,6 +3,7 @@ using CalamityMod.Balancing; using CalamityMod.CalPlayer.Dashes; using CalamityMod.EntitySources; using CalamityMod.Enums; +using CalamityMod.Items.Accessories; using CalamityMod.Items.Mounts; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; @@ -132,6 +133,10 @@ namespace CalamityMod.CalPlayer dashDelayToApply = BalancingConstants.UniversalShieldBonkCooldown; if (DashID == DeepDiverDash.ID || (evasionScarf && DashID == CounterScarfDash.ID)) dashDelayToApply = (int)(dashDelayToApply * 0.75f); + if (DashID == V8EngineDash.ID) + dashDelayToApply = (int)(dashDelayToApply * V8Engine.DashDelayModifier); + if (DashID == V8000EngineDash.ID) + dashDelayToApply = (int)(dashDelayToApply * V8000Engine.DashDelayModifier); if (DashID == StatisNinjaBeltDash.ID || DashID == StatisVoidSashDash.ID || Player.dashType == 1) dashDelayToApply = BalancingConstants.UniversalSashDashCooldown; @@ -231,7 +236,7 @@ namespace CalamityMod.CalPlayer } // Handle first-frame effects. - else if (HasCustomDash && (!Player.mount.Active || DashID == V8EngineDash.ID)) + else if (HasCustomDash && (!Player.mount.Active || DashID == V8EngineDash.ID || DashID == V8000EngineDash.ID)) { UsedDash.dashTime = 0; if (DoADash(UsedDash.CalculateDashSpeed(Player))) diff --git a/CalPlayer/Dashes/V8000EngineDash.cs b/CalPlayer/Dashes/V8000EngineDash.cs new file mode 100644 index 0000000000..2d1be150e5 --- /dev/null +++ b/CalPlayer/Dashes/V8000EngineDash.cs @@ -0,0 +1,99 @@ +using System; +using CalamityMod.Enums; +using CalamityMod.Items.Accessories; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.CalPlayer.Dashes +{ + public class V8000EngineDash : PlayerDashEffect + { + public static new string ID { get; private set; } + + public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam; + + public override bool IsOmnidirectional => false; + public int Time = 0; + + public override void Load() + { + ID = DashID; + } + + public override float CalculateDashSpeed(Player player) => 16f; + + public override void DashStartupEffects(Player player) + { + player.velocity *= 0.9f; + } + + public override void OnDashEffects(Player player) + { + Time = 0; + for (int m = 0; m < 3; m++) + { + PointParticle spark = new PointParticle(player.Center - player.velocity, -player.velocity * (0.08f * m), false, 25, 4f - (0.5f * m), (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.46f); + GeneralParticleHandler.SpawnParticle(spark); + } + } + + public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) + { + Time++; // For VFX + + if (Time % 2 == 0) + { + Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + + PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark); + PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark2); + PointParticle spark3 = new PointParticle(player.Center + new Vector2(0, 45 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark2); + } + + dashSpeed = 14f; + } + + public override void OnHitEffects(Player player, NPC npc, IEntitySource source, ref DashHitContext hitContext) + { + SoundStyle hit = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); + SoundEngine.PlaySound(hit with { Pitch = 0f, Volume = 0.4f }, player.Center); + for (int i = 0; i <= 6; i++) + { + Dust dust = Dust.NewDustPerfect(player.Center, Main.rand.NextBool() ? 278 : 132, player.velocity.RotatedByRandom(0.7f) * Main.rand.NextFloat(0.5f, 1f) + new Vector2(0, -3f)); + if (dust.type == 278) + { + dust.scale = 1.2f; + dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue; + } + else + { + dust.scale = 0.9f; + } + dust.noGravity = false; + dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); + } + + // Define hit context variables. + int hitDirection = player.direction; + if (player.velocity.X != 0f) + hitDirection = Math.Sign(player.velocity.X); + hitContext.HitDirection = hitDirection; + hitContext.PlayerImmunityFrames = V8000Engine.ShieldSlamIFrames; + + // Define damage parameters. + hitContext.damageClass = DamageClass.Melee; + hitContext.BaseDamage = V8000Engine.ShieldSlamDamage; + hitContext.BaseKnockback = V8000Engine.ShieldSlamKnockback; + } + } +} diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs index dd4522d237..425b92e60f 100644 --- a/CalPlayer/Dashes/V8EngineDash.cs +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -1,6 +1,7 @@ using System; using CalamityMod.Enums; using CalamityMod.Items.Accessories; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -18,42 +19,41 @@ namespace CalamityMod.CalPlayer.Dashes public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam; public override bool IsOmnidirectional => false; + public int Time = 0; public override void Load() { ID = DashID; } - public override float CalculateDashSpeed(Player player) => 13f; + public override float CalculateDashSpeed(Player player) => 6.5f; - public override void DashStartupEffects(Player player) + public override void OnDashEffects(Player player) { - player.velocity *= 0.9f; + Time = 0; + for (int m = 0; m < 3; m++) + { + PointParticle spark = new PointParticle(player.Center - player.velocity, -player.velocity * (0.08f * m), false, 25, 4f - (0.5f * m), (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.4f); + GeneralParticleHandler.SpawnParticle(spark); + } } public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) { - dashSpeed = 10.5f; + Time++; // For VFX + player.velocity.X *= 0.925f; - - // Spawn fire dust around the player's body. - if (DashTimeAdjustedForStartup > 14) - return; - for (int d = 0; d < 3; d++) + if (Time % 2 == 0) { - Dust holyFireDashDust = Dust.NewDustDirect(player.position + Vector2.UnitY * 4f, player.width, player.height - 8, Main.rand.NextBool() ? 296 : 158, 0f, 0f, 0, default, 1.2f); - holyFireDashDust.velocity = -player.velocity * Main.rand.NextFloat(0.1f, 0.75f); - holyFireDashDust.scale *= Main.rand.NextFloat(2f, 2.4f); - holyFireDashDust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); - holyFireDashDust.noGravity = true; - if (Main.rand.NextBool()) - holyFireDashDust.fadeIn = 0.1f; + Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + + PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.4f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark); + PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark2); } - Vector2 dustPosition = player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.7f); - Dust dust = Dust.NewDustPerfect(dustPosition, DustID.FireworkFountain_Yellow, -player.velocity * Main.rand.NextFloat(0.15f, 0.4f), 0, default, 0.5f); - dust.noGravity = false; - dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); } } } diff --git a/CalPlayer/DrawLayers/V8000Cowcatcher.png b/CalPlayer/DrawLayers/V8000Cowcatcher.png new file mode 100644 index 0000000000000000000000000000000000000000..e1954a5f1141c69103cc4aa815f75dab1a70c569 GIT binary patch literal 754 zcmVPx#1ZP1_K>z@;j|==^1poj7oJmAMR9Hvtm`_MkaRA4k-89e)HKZU@GqxVFL{hZP zln#>pRcR+XlrQ2J~#utWI2Cu)(=(GiU6>+0dLx4xt- zW1b>qC5JJ-(CC4?I@{r7D`Wg3gk?^jsm9oO@;sbuWz17VNy|o&riMxkvvT*q5oIR7 z!OB|rpA<4t5rM0s1Z9c}@-SwZ=G%ASD>qu;U!i%pqva~>D6fG@&%HKyI4}bzYK|GO zh?om9)VwU1`^w^)_ECF54$LxDRaya_2nb7%;+hk%zL`8TYm`@tR z;C{j9IagL!R^YPYgD}f*m3#8+73?~?AFfrk=LlCZmi*KEk8xKmu1?X|ow*aPbzg#C z3=YBR85wYe%L%JC8+`0Y5!`;K8Gh&c1UEVzFjq0ok>1ySIMy;I*x7aa%0{?w%d;uj zvv|Ml=0%LjQs@WFoj-H$AvjtY7PjVyupCi_s}12_F5j-goD(y?G1!rx3NNgu!z^>z zeGVop!&Pm&r)LutA-YwK|I?(k^CA4a*9()`&??N;%;UKRbFPqh%b2hT(XD2r>rsbz zrNMng&)+Iz;vzCcso{Y>487jRFyUE@@Jz`T>FFaMWy zSbxKew~SRJ0?7$L&#v49FiWr$PXOC3V-<-&vcJU2*;CqmBqvS#H9V`iuiuA>tc+D8 k;Y2CQ?+9cVq==$y0wU%OUb)$9bN~PV07*qoM6N<$f new AfterParent(PlayerDrawLayers.MountFront); + + public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) + { + Player drawPlayer = drawInfo.drawPlayer; + CalamityPlayer modPlayer = drawPlayer.Calamity(); + return false; + } + + protected override void Draw(ref PlayerDrawSet drawInfo) + { + Texture2D texture = ModContent.Request("CalamityMod/CalPlayer/DrawLayers/V8000Cowcatcher").Value; + + // Spitball an offset for the sprite that may or may not look right + Vector2 pos = (drawInfo.drawPlayer.MountedCenter - Main.screenPosition).Floor(); + Vector2 offset = new Vector2(0f * drawInfo.drawPlayer.direction, -22f); + pos += offset; + + SpriteEffects effects = drawInfo.drawPlayer.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + drawInfo.DrawDataCache.Add(new DrawData(texture, pos, null, drawInfo.colorArmorBody, drawInfo.drawPlayer.fullRotation, texture.Size() * 0.5f, 1f, effects, 0)); + } + } +} diff --git a/Items/Accessories/V8000Engine.cs b/Items/Accessories/V8000Engine.cs new file mode 100644 index 0000000000..85b659b97b --- /dev/null +++ b/Items/Accessories/V8000Engine.cs @@ -0,0 +1,48 @@ +using CalamityMod.CalPlayer; +using CalamityMod.CalPlayer.Dashes; +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + public class V8000Engine : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Accessories"; + + public static float DashDelayModifier = 1.6f; + public const int ShieldSlamDamage = 900; + public const float ShieldSlamKnockback = 0.4f; + public const int ShieldSlamIFrames = 14; // While this has more i-frames than Elysian's dash, the dash speed sets this one back comparitively + + public override void SetDefaults() + { + Item.width = 54; + Item.height = 50; + Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; + Item.rare = ModContent.RarityType(); + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.v8000Engine = true; + modPlayer.DashID = V8000EngineDash.ID; + player.dashType = 0; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ModContent.ItemType()). + AddIngredient(ModContent.ItemType(), 5). + AddIngredient(ItemID.Nanites, 200). + AddTile(TileID.LunarCraftingStation). + Register(); + } + } +} diff --git a/Items/Accessories/V8000Engine.png b/Items/Accessories/V8000Engine.png new file mode 100644 index 0000000000000000000000000000000000000000..d764be8b924b0e5c244487c3e3059a8fd596abb8 GIT binary patch literal 1323 zcmV+`1=RY9P)Px#1ZP1_K>z@;j|==^1poj9)k#D_RA@u(nSDrAXB@|Gv0DFla}sUrTH!VfOH(Ul zZ7?0em^Mdih%j5l+_Ws}4_o925tF?{gTaW+sOef3CG85CI;5Aa*0fyeAWO$?N!(r) z^A=;Y4LkSyJ74iWdOY{u#r`RiX(hRbd&$`S&yBmx-CaI zql~0>@2|x{^RZ_5YF{6Gsk;+?BQGCrtUnBE{I7{d64MANDe@Q-Q)`+`__>k9G%#Wd zlT&fPgj6PZKHS6tz9|JO-hx*Z7Qsf?H?f3SE~D>uNcbN9r9Tq9zCp8VsmDMoBj-cB3`i?8!n*z3CvtNeZE9DJ?+Dr}To>6UU_e{O6nj$3~| z0W&GHB<+)!n$(HfgK(c`FC72e`>+vNYv0iy2~3cvN&bGJ4px)XY6t%ZYbV+{6V{T1 zCrC2j{nk&+EUC1DMtIwv<*>@9MaSXcUmD=FD=tPpy~NzxtKDzBS)oz{lRHhI3VAiU}gh>%guVbh&^=xsCspD9!NiG{*rZ7j>n3*3H!RJePF;f=W^b1N zr92&7E{R^use;MkrtNUyX_?K`q)JLR!|W7D*%yKPG_#$zORvqI^IyYe$yvX~wB-C6 zg)2MPi@I1@mtIf$2aYLv1s*ygU3*ze4_rMYvl=^x1N-*CgrDm@*8wj`Uk97*+X$1b zbAM>_#5lrgN5Bpwwx%9_bJINd*7Du(lWPj#L)ovvtWD0cT%Xk1Q)fN)j!cpmosZNQ zYmECFb;S2&N)kCKf%~hbF4DGR zz+Y9KPL`zZ z4xE8GdvVq@V$A+10Pe%c?e3%SRM%`cuR^{N^%XK3^LiET7I@70plXX)KQRp?X7r0B z&l5gx^!nnbq*EaeGG)DEFUXy=8Nqh*D)vciFgp4c@dJ&xUQ#;JwFj%ynP=6HM`bF%M*oeCX2kYLGUmn%OxGwSjpL(n&7E>*=T4L@l zm~fpUMziV|B8mAKml)x?rFP?-1v%pC^Jec;dqUQz+9Rs7tVSd;KNF2YKyo3#&kFbb hB&1}FuxMfq$0JzGE%7m5IT-)|002ovPDHLkV1gm@i8lZM literal 0 HcmV?d00001 diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs index 1d83878a97..0ecd41a1c2 100644 --- a/Items/Accessories/V8Engine.cs +++ b/Items/Accessories/V8Engine.cs @@ -1,8 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.CalPlayer.Dashes; +using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent.UI; using Terraria.ID; using Terraria.ModLoader; @@ -12,12 +14,14 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; + public static float DashDelayModifier = 2f; + public override void SetDefaults() { Item.width = 44; Item.height = 42; - Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + Item.rare = ItemRarityID.LightRed; Item.accessory = true; } @@ -28,5 +32,14 @@ namespace CalamityMod.Items.Accessories modPlayer.DashID = V8EngineDash.ID; player.dashType = 0; } + + public override void AddRecipes() + { + CreateRecipe(). + AddRecipeGroup("AnyAdamantiteBar", 5). + AddIngredient(ModContent.ItemType(), 4). + AddTile(TileID.MythrilAnvil). + Register(); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 74b402b1df..934346b6d9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2016,6 +2016,21 @@ UnstableGraniteCore: { ''' } +V8Engine: { + DisplayName: V8 Engine + Tooltip: Grants a dash which can be used by both mounts and players alike +} + +V8000Engine: { + DisplayName: V8000 Engine + Tooltip: + ''' + Grants a dash which can be used by both mounts and players alike + Mounts are fashioned with a cowcatcher which can damage enemies + 'Are soul-powered engines eco-friendly?' + ''' +} + VampiricTalisman: { DisplayName: Vampiric Talisman Tooltip: @@ -2205,8 +2220,3 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } - -V8Engine: { - DisplayName: V8 Engine - Tooltip: "" -} From 73d922fa8d62d14663df57d2d37b2f36db277b85 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 17 Jan 2026 22:16:59 -0500 Subject: [PATCH 008/142] yeah thats not happening --- CalPlayer/DrawLayers/V8000Cowcatcher.png | Bin 754 -> 0 bytes CalPlayer/DrawLayers/V8000CowcatcherLayer.cs | 35 ------------------- 2 files changed, 35 deletions(-) delete mode 100644 CalPlayer/DrawLayers/V8000Cowcatcher.png delete mode 100644 CalPlayer/DrawLayers/V8000CowcatcherLayer.cs diff --git a/CalPlayer/DrawLayers/V8000Cowcatcher.png b/CalPlayer/DrawLayers/V8000Cowcatcher.png deleted file mode 100644 index e1954a5f1141c69103cc4aa815f75dab1a70c569..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 754 zcmVPx#1ZP1_K>z@;j|==^1poj7oJmAMR9Hvtm`_MkaRA4k-89e)HKZU@GqxVFL{hZP zln#>pRcR+XlrQ2J~#utWI2Cu)(=(GiU6>+0dLx4xt- zW1b>qC5JJ-(CC4?I@{r7D`Wg3gk?^jsm9oO@;sbuWz17VNy|o&riMxkvvT*q5oIR7 z!OB|rpA<4t5rM0s1Z9c}@-SwZ=G%ASD>qu;U!i%pqva~>D6fG@&%HKyI4}bzYK|GO zh?om9)VwU1`^w^)_ECF54$LxDRaya_2nb7%;+hk%zL`8TYm`@tR z;C{j9IagL!R^YPYgD}f*m3#8+73?~?AFfrk=LlCZmi*KEk8xKmu1?X|ow*aPbzg#C z3=YBR85wYe%L%JC8+`0Y5!`;K8Gh&c1UEVzFjq0ok>1ySIMy;I*x7aa%0{?w%d;uj zvv|Ml=0%LjQs@WFoj-H$AvjtY7PjVyupCi_s}12_F5j-goD(y?G1!rx3NNgu!z^>z zeGVop!&Pm&r)LutA-YwK|I?(k^CA4a*9()`&??N;%;UKRbFPqh%b2hT(XD2r>rsbz zrNMng&)+Iz;vzCcso{Y>487jRFyUE@@Jz`T>FFaMWy zSbxKew~SRJ0?7$L&#v49FiWr$PXOC3V-<-&vcJU2*;CqmBqvS#H9V`iuiuA>tc+D8 k;Y2CQ?+9cVq==$y0wU%OUb)$9bN~PV07*qoM6N<$f new AfterParent(PlayerDrawLayers.MountFront); - - public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) - { - Player drawPlayer = drawInfo.drawPlayer; - CalamityPlayer modPlayer = drawPlayer.Calamity(); - return false; - } - - protected override void Draw(ref PlayerDrawSet drawInfo) - { - Texture2D texture = ModContent.Request("CalamityMod/CalPlayer/DrawLayers/V8000Cowcatcher").Value; - - // Spitball an offset for the sprite that may or may not look right - Vector2 pos = (drawInfo.drawPlayer.MountedCenter - Main.screenPosition).Floor(); - Vector2 offset = new Vector2(0f * drawInfo.drawPlayer.direction, -22f); - pos += offset; - - SpriteEffects effects = drawInfo.drawPlayer.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - - drawInfo.DrawDataCache.Add(new DrawData(texture, pos, null, drawInfo.colorArmorBody, drawInfo.drawPlayer.fullRotation, texture.Size() * 0.5f, 1f, effects, 0)); - } - } -} From 9208446d649bee51f434f522f49c13ed65708280 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 28 Jan 2026 17:15:39 -0500 Subject: [PATCH 009/142] Better FX --- CalPlayer/Dashes/V8000EngineDash.cs | 82 +++++++++++++++++-- CalPlayer/Dashes/V8EngineDash.cs | 52 ++++++++---- .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- Projectiles/Typeless/V8000SoulVisual.cs | 82 +++++++++++++++++++ 4 files changed, 194 insertions(+), 24 deletions(-) create mode 100644 Projectiles/Typeless/V8000SoulVisual.cs diff --git a/CalPlayer/Dashes/V8000EngineDash.cs b/CalPlayer/Dashes/V8000EngineDash.cs index 2d1be150e5..9f7975f356 100644 --- a/CalPlayer/Dashes/V8000EngineDash.cs +++ b/CalPlayer/Dashes/V8000EngineDash.cs @@ -1,7 +1,11 @@ using System; +using CalamityMod.Dusts; using CalamityMod.Enums; using CalamityMod.Items.Accessories; +using CalamityMod.Items.Weapons.Magic; using CalamityMod.Particles; +using CalamityMod.Projectiles.Magic; +using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -36,10 +40,20 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnDashEffects(Player player) { Time = 0; - for (int m = 0; m < 3; m++) + for (int m = 0; m < 6; m++) { - PointParticle spark = new PointParticle(player.Center - player.velocity, -player.velocity * (0.08f * m), false, 25, 4f - (0.5f * m), (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.46f); - GeneralParticleHandler.SpawnParticle(spark); + float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true); + + Vector2 trailPos = player.Center - (player.velocity * 2) + new Vector2(0, (18 - (m * 6))); + float trailScale = 1 * fxFade; + Color trailColor = Main.rand.NextBool(3) ? Color.DodgerBlue : Color.LightSkyBlue; + + int dustStyle = ModContent.DustType(); + Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 21)); + dust2.scale = Main.rand.NextFloat(0.8f, 1.4f); + dust2.color = trailColor; + dust2.noGravity = true; + dust2.fadeIn = 0.5f; } } @@ -47,17 +61,49 @@ namespace CalamityMod.CalPlayer.Dashes { Time++; // For VFX - if (Time % 2 == 0) + if (Time % 2 == 0 && Time < 10) { + // Angled, consistently placed sparks Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; - PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); + PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.25f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); GeneralParticleHandler.SpawnParticle(spark); - PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); - GeneralParticleHandler.SpawnParticle(spark2); - PointParticle spark3 = new PointParticle(player.Center + new Vector2(0, 45 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); + PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.25f, (Main.rand.NextBool() ? Color.DodgerBlue : Color.LightSkyBlue) * 0.66f); GeneralParticleHandler.SpawnParticle(spark2); + + // Glow beam + float fadeInLerp = Utils.GetLerpValue(0, 12, Time, true); + Color primaryColor = Color.Lerp(Color.DodgerBlue, Color.LightSkyBlue, fadeInLerp); + Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, true, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamBody); + Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, true, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamCore); + + // Horizontal dust + float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true); + Vector2 trailPos = player.Center - (player.velocity * 2) + Main.rand.NextVector2Circular(10, 20); + float trailScale = 1 * fxFade; + Color trailColor = Main.rand.NextBool(3) ? Color.DodgerBlue : Color.LightSkyBlue; + + int dustStyle = ModContent.DustType(); + Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(6, 21)); + dust2.scale = Main.rand.NextFloat(0.8f, 1.4f); + dust2.color = trailColor; + dust2.noGravity = true; + dust2.fadeIn = 0.5f; + } + + // SHPS-esque souls + if (Time % 4 == 0) + { + if (player.whoAmI == Main.myPlayer) + { + Vector2 spawnPos = player.Center + Main.rand.NextVector2Circular(10, 10); + Vector2 trailVel = -player.velocity * 0.6f + Main.rand.NextVector2Circular(3f, 3f); + + Projectile.NewProjectile(player.GetSource_FromThis(), spawnPos, trailVel, ModContent.ProjectileType(), 0, 0, player.whoAmI); + } } dashSpeed = 14f; @@ -66,7 +112,10 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnHitEffects(Player player, NPC npc, IEntitySource source, ref DashHitContext hitContext) { SoundStyle hit = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); - SoundEngine.PlaySound(hit with { Pitch = 0f, Volume = 0.4f }, player.Center); + SoundEngine.PlaySound(hit with { Pitch = -0.2f, Volume = 0.4f }, player.Center); + SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode with { Volume = 1f, Pitch = -0.2f }, player.Center); + SoundEngine.PlaySound(SoundID.Item74 with { Volume = 0.7f, Pitch = 1f }, player.Center); + for (int i = 0; i <= 6; i++) { Dust dust = Dust.NewDustPerfect(player.Center, Main.rand.NextBool() ? 278 : 132, player.velocity.RotatedByRandom(0.7f) * Main.rand.NextFloat(0.5f, 1f) + new Vector2(0, -3f)); @@ -83,6 +132,21 @@ namespace CalamityMod.CalPlayer.Dashes dust.shader = GameShaders.Armor.GetSecondaryShader(player.cShield, player); } + Particle pulse = new DirectionalPulseRing(npc.Center, Vector2.Zero, Color.DodgerBlue * 0.8f, new Vector2(2f, 2f), 0, 0.05f, 1f, 24); + GeneralParticleHandler.SpawnParticle(pulse); + + for (int i = 0; i < 14; i++) + { + Vector2 velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(3f, 7f); + Color dustColor = Color.Lerp(Color.DodgerBlue, Color.White, Main.rand.NextFloat()); + + float scale = Main.rand.NextFloat(0.25f, .6f); + int lifetime = Main.rand.Next(30, 50); + + SquishyLightParticle plasma = new(player.Center, velocity, scale, dustColor, lifetime); + GeneralParticleHandler.SpawnParticle(plasma); + } + // Define hit context variables. int hitDirection = player.direction; if (player.velocity.X != 0f) diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs index 425b92e60f..51ee2a74d1 100644 --- a/CalPlayer/Dashes/V8EngineDash.cs +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Dusts; using CalamityMod.Enums; using CalamityMod.Items.Accessories; using CalamityMod.Particles; @@ -31,29 +32,52 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnDashEffects(Player player) { Time = 0; - for (int m = 0; m < 3; m++) + for (int m = 0; m < 6; m++) { - PointParticle spark = new PointParticle(player.Center - player.velocity, -player.velocity * (0.08f * m), false, 25, 4f - (0.5f * m), (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.4f); - GeneralParticleHandler.SpawnParticle(spark); + float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true); + + Vector2 trailPos = player.Center - (player.velocity * 2) + new Vector2(0, (18 - (m * 6))); + float trailScale = 1 * fxFade; + Color trailColor = Main.rand.NextBool(3) ? Color.Firebrick : Color.OrangeRed; + + int dustStyle = ModContent.DustType(); + Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 15)); + dust2.scale = Main.rand.NextFloat(0.75f, 1.2f); + dust2.color = trailColor; + dust2.noGravity = true; + dust2.fadeIn = 0.5f; } } public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) { - Time++; // For VFX - player.velocity.X *= 0.925f; + Dust hFlameDust = Dust.NewDustPerfect(player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 5f), DustID.HeatRay, -player.velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.1f, 0.8f), 0, Color.Firebrick, Main.rand.NextFloat(1.8f, 2.8f)); - if (Time % 2 == 0) - { - Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; - Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + // Angled, consistently placed sparks + Vector2 dustVel = -player.velocity.RotatedBy(0.05f + MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; + Vector2 dustVel2 = -player.velocity.RotatedBy(-0.05f - MathHelper.Clamp(Time * 0.03f, 0, 0.55f)) * 0.75f; - PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.4f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); - GeneralParticleHandler.SpawnParticle(spark); - PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.4f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); - GeneralParticleHandler.SpawnParticle(spark2); - } + PointParticle spark = new PointParticle(player.Center + new Vector2(0, -15 * player.direction) + dustVel, dustVel, false, 8, 1.25f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark); + PointParticle spark2 = new PointParticle(player.Center + new Vector2(0, 15 * player.direction) + dustVel2, dustVel2, false, 8, 1.25f, (Main.rand.NextBool() ? Color.Firebrick : Color.OrangeRed) * 0.66f); + GeneralParticleHandler.SpawnParticle(spark2); + + // Glow beam + float fadeInLerp = Utils.GetLerpValue(0, 12, Time, true); + Color primaryColor = Color.Lerp(Color.Firebrick, Color.OrangeRed, fadeInLerp); + Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, false, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamBody); + Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, false, shrinkSpeed: 0.6f); + GeneralParticleHandler.SpawnParticle(beamCore); + + Dust dust = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(6, 6) - player.velocity * 2, DustID.GoldFlame); + dust.velocity = -player.velocity * Main.rand.NextFloat(0.6f, 1.4f); + dust.scale = Main.rand.NextFloat(0.9f, 1.4f); + dust.noGravity = true; + Particle sparkler = new CustomSpark(player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.2f), -player.velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.1f, 0.8f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 17, Main.rand.NextFloat(1.15f, 1.25f), Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.4f, 0.5f)); + GeneralParticleHandler.SpawnParticle(sparkler); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 934346b6d9..1ac07bc99a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2026,7 +2026,7 @@ V8000Engine: { Tooltip: ''' Grants a dash which can be used by both mounts and players alike - Mounts are fashioned with a cowcatcher which can damage enemies + This dash can ram through enemies without taking damage 'Are soul-powered engines eco-friendly?' ''' } diff --git a/Projectiles/Typeless/V8000SoulVisual.cs b/Projectiles/Typeless/V8000SoulVisual.cs new file mode 100644 index 0000000000..76d526cd24 --- /dev/null +++ b/Projectiles/Typeless/V8000SoulVisual.cs @@ -0,0 +1,82 @@ +using System; +using System.Linq; +using CalamityMod.DataStructures; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Particles; +using CalamityMod.Enums; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class V8000SoulVisual : ModProjectile, IPixelatedPrimitiveRenderer + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 10; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 14; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.timeLeft = 50; + Projectile.Opacity = 1f; + } + + public override void AI() + { + if (Projectile.timeLeft % 10 == 0) + Projectile.ai[1] = Main.rand.NextFloat(-0.25f, 0.25f); + + Projectile.velocity = Projectile.velocity.RotatedBy(Projectile.ai[1]); + + Projectile.velocity *= 0.98f; + + if (Main.rand.NextBool(5)) + { + Vector2 smokeVelocity = Main.rand.NextVector2Circular(1f, 1f) * 0.5f; + HeavySmokeParticle ghastlySmoke = new(Projectile.Center, smokeVelocity, Color.DodgerBlue, Main.rand.Next(20, 35), Main.rand.NextFloat(0.15f, 0.25f), Projectile.Opacity * 0.8f, 0.0175f, true); + GeneralParticleHandler.SpawnParticle(ghastlySmoke); + } + } + + public override bool PreDraw(ref Color lightColor) => false; + + public float WidthFunction(float completion, Vector2 _) + { + float maxBodyWidth = Projectile.scale * 14f; + + if (completion < 0.2f) + return MathF.Sin(completion / 0.2f * MathHelper.PiOver2) * maxBodyWidth; + + return MathHelper.Lerp(maxBodyWidth, 0f, (completion - 0.2f) / 0.8f); + } + + public Color ColorFunction(float completion, Vector2 _) + { + Color baseColor = Color.DodgerBlue; + return baseColor * Projectile.Opacity * (1f - completion); + } + + public void RenderPixelatedPrimitives(SpriteBatch spriteBatch, GeneralDrawLayer layer) + { + var shader = GameShaders.Misc["CalamityMod:ImpFlameTrail"]; + + shader.SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_, _) => Projectile.Size * 0.5f, true, true, shader), Projectile.oldPos.Length * 2); + + Vector2[] corePos = Projectile.oldPos.Take(4).ToArray(); + shader.SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(corePos, new((c, _) => WidthFunction(c, _) * 0.6f, (c, _) => Color.White * Projectile.Opacity * (1f - c), (_, _) => Projectile.Size * 0.5f, true, true, shader), corePos.Length * 2); + } + } +} From 68b3e8d4c7b218ce9c6d6c06e03e7919a91de9e3 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 28 Jan 2026 20:23:05 -0500 Subject: [PATCH 010/142] Custom sounds --- CalPlayer/Dashes/V8000EngineDash.cs | 2 ++ CalPlayer/Dashes/V8EngineDash.cs | 18 ++++++++++++------ Items/Accessories/V8000Engine.cs | 3 +++ Items/Accessories/V8Engine.cs | 3 +++ Sounds/Item/V8000Boost.ogg | Bin 0 -> 19438 bytes Sounds/Item/V8Boost.ogg | Bin 0 -> 19096 bytes 6 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 Sounds/Item/V8000Boost.ogg create mode 100644 Sounds/Item/V8Boost.ogg diff --git a/CalPlayer/Dashes/V8000EngineDash.cs b/CalPlayer/Dashes/V8000EngineDash.cs index 9f7975f356..0902d2499b 100644 --- a/CalPlayer/Dashes/V8000EngineDash.cs +++ b/CalPlayer/Dashes/V8000EngineDash.cs @@ -55,6 +55,8 @@ namespace CalamityMod.CalPlayer.Dashes dust2.noGravity = true; dust2.fadeIn = 0.5f; } + SoundStyle sound = V8000Engine.DashSound; + SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center); } public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs index 51ee2a74d1..dd6d567595 100644 --- a/CalPlayer/Dashes/V8EngineDash.cs +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -41,12 +41,14 @@ namespace CalamityMod.CalPlayer.Dashes Color trailColor = Main.rand.NextBool(3) ? Color.Firebrick : Color.OrangeRed; int dustStyle = ModContent.DustType(); - Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 15)); + Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(4, 13)); dust2.scale = Main.rand.NextFloat(0.75f, 1.2f); dust2.color = trailColor; dust2.noGravity = true; dust2.fadeIn = 0.5f; } + SoundStyle sound = V8Engine.DashSound; + SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center); } public override void MidDashEffects(Player player, ref float dashSpeed, ref float dashSpeedDecelerationFactor, ref float runSpeedDecelerationFactor) @@ -71,13 +73,17 @@ namespace CalamityMod.CalPlayer.Dashes Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, false, shrinkSpeed: 0.6f); GeneralParticleHandler.SpawnParticle(beamCore); - Dust dust = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(6, 6) - player.velocity * 2, DustID.GoldFlame); - dust.velocity = -player.velocity * Main.rand.NextFloat(0.6f, 1.4f); - dust.scale = Main.rand.NextFloat(0.9f, 1.4f); - dust.noGravity = true; + + for (int i = 0; i < 2; i++) + { + // Fruit loop particles, also used by Elysian Aegis + Dust dust = Dust.NewDustPerfect(player.Center + Main.rand.NextVector2Circular(6, 6) - player.velocity * 2.2f, DustID.GoldFlame); + dust.velocity = -player.velocity * Main.rand.NextFloat(0.66f, 1.8f); + dust.scale = Main.rand.NextFloat(0.4f, 1.3f); + dust.noGravity = true; Particle sparkler = new CustomSpark(player.Center + new Vector2(Main.rand.NextFloat(-6f, 6f), Main.rand.NextFloat(-15f, 15f)) - (player.velocity * 1.2f), -player.velocity.RotatedByRandom(MathHelper.ToRadians(10f)) * Main.rand.NextFloat(0.1f, 0.8f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 17, Main.rand.NextFloat(1.15f, 1.25f), Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.4f, 0.5f)); GeneralParticleHandler.SpawnParticle(sparkler); - + } } } } diff --git a/Items/Accessories/V8000Engine.cs b/Items/Accessories/V8000Engine.cs index 85b659b97b..48892dbe73 100644 --- a/Items/Accessories/V8000Engine.cs +++ b/Items/Accessories/V8000Engine.cs @@ -3,6 +3,7 @@ using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -18,6 +19,8 @@ namespace CalamityMod.Items.Accessories public const float ShieldSlamKnockback = 0.4f; public const int ShieldSlamIFrames = 14; // While this has more i-frames than Elysian's dash, the dash speed sets this one back comparitively + public static SoundStyle DashSound = new("CalamityMod/Sounds/Item/V8000Boost"); + public override void SetDefaults() { Item.width = 54; diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs index 0ecd41a1c2..2404d1dab6 100644 --- a/Items/Accessories/V8Engine.cs +++ b/Items/Accessories/V8Engine.cs @@ -3,6 +3,7 @@ using CalamityMod.CalPlayer.Dashes; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent.UI; using Terraria.ID; @@ -16,6 +17,8 @@ namespace CalamityMod.Items.Accessories public static float DashDelayModifier = 2f; + public static SoundStyle DashSound = new("CalamityMod/Sounds/Item/V8Boost"); + public override void SetDefaults() { Item.width = 44; diff --git a/Sounds/Item/V8000Boost.ogg b/Sounds/Item/V8000Boost.ogg new file mode 100644 index 0000000000000000000000000000000000000000..ea2fe8ff96f2712051b55cc34654349ffacb9eb7 GIT binary patch literal 19438 zcmeFZcT`l*(kQxThMXibM2DP_8G?YIL(WJXGLkb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w{2-1#hr8xAyLi9wz6ElepCzas40mh4`sY1)+z0d8FH zTj=R&tnYS^3KOOOcx_SPY3rA;#n{hmBYU^?r?_^q>K|2S7F;O^Dq8*@0TTo4{Ce-% z@x+Lk4hX_DbCW0_-Amnr(L%c^C{z>xw3Z$NLKdu8(;^-!)k)({m<1uXbk!Pz1*9!9 zw5&v|MzV2^OYe4`2SC3`R%OD4X{ba4C={aF(1ZT5v|q6V9pdBKe{#-F;P zq5%L!14+;|Fi#XgPk;z8008vq0W9DsfWZO;#PY9W?Uom<8lZt|H2}Va{Jb`H^Z^X0 znOq@1k4nI6g9bGv=ewIn!R)j~HHL+%G0o~S0HFL_Zvx1ixpS> zfz_Q5D=c6Di3DmAdW=VCa*STE2Zu<|1-M;#F_m9w0RSMQ1>qzFFd1X&E$;)> z%S^w8>hdW7&!bHPPgq`yYHw;&7z%eY<*PM=zw=Z=yT>45Bv!Y96b+rY_0!S5OS)`b zf*2r_Jpcg9997ax0iK2YeKc;^0TXH^UC3XT#)ID=+7@ahbJoU)YAvd&%#tMm03i02 zF5dmTM!6`V9;H|>6lHRnvvMdIv8aVCNO(G8r4*|?4VGfXRTYc1we~EbXd}l#$7pci zq3Ms>{?!Dca>|xMNUQ(^^@^Kmpn)U~LJbgB)o7p{8HrG06;?ZPPXfrm9GIR+4J{r3 z07^4NF~}1b1Y}#BiHRY?oh5sv3>;xu&SrYD5EcOKS?szbX73KIfI;pNUNDh?9)OXZ zvH-}_)W`)mGB8W1EC66p-jsYWB7b$~O4g=W7kyYFqMpN=pLhOyHA7BnBSwSzJ#~Ms zz~$FY6o|Mg^gelRZ(w{-ay(H96Ep$dh5YZVeAEtjLrt*@`QNtkQaj)cHAMgb00000 H00000|K(!< literal 0 HcmV?d00001 diff --git a/Sounds/Item/V8Boost.ogg b/Sounds/Item/V8Boost.ogg new file mode 100644 index 0000000000000000000000000000000000000000..cbcbcd3a3f0c13983d1dddf2697912e0a3279c5a GIT binary patch literal 19096 zcmeFYcT`hN_b7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i}ln`xkd zBo0Ci5LVS_pdA^BP+}EUJ919~$iN(!o=6QX9smGJGej}S6Bq*da@7}0PR`qx+G@r4y}Me?h#%vk%1n7k)5&t$kWuw1voM=OQ~XfrdSt!SR$gH! Date: Mon, 9 Feb 2026 19:25:02 -0800 Subject: [PATCH 011/142] 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 012/142] 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 013/142] 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 f285dd88af4cbad22d5e711a9663033767ef2d9b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 15 Feb 2026 22:08:47 -0500 Subject: [PATCH 014/142] cease --- 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 bee2e7c822da208c7cfcd74d29809ce023d9627a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 16 Feb 2026 18:37:25 -0500 Subject: [PATCH 015/142] Thruster FX --- CalPlayer/Dashes/V8000EngineDash.cs | 27 +++- CalPlayer/Dashes/V8EngineDash.cs | 34 ++++- Particles/ThrusterParticle.cs | 219 ++++++++++++++++++++++++++++ Particles/V8ThrusterParticle.cs | 40 ----- 4 files changed, 276 insertions(+), 44 deletions(-) create mode 100644 Particles/ThrusterParticle.cs delete mode 100644 Particles/V8ThrusterParticle.cs diff --git a/CalPlayer/Dashes/V8000EngineDash.cs b/CalPlayer/Dashes/V8000EngineDash.cs index 0902d2499b..4b0e18f2ca 100644 --- a/CalPlayer/Dashes/V8000EngineDash.cs +++ b/CalPlayer/Dashes/V8000EngineDash.cs @@ -40,6 +40,8 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnDashEffects(Player player) { Time = 0; + + // Burst of evenly spaced but random velocity dusts for (int m = 0; m < 6; m++) { float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true); @@ -55,6 +57,29 @@ namespace CalamityMod.CalPlayer.Dashes dust2.noGravity = true; dust2.fadeIn = 0.5f; } + + // Thruster prim + int beamCount = 3; + float maxAngle = MathHelper.ToRadians(10f); + + Vector2 baseDir = -player.velocity.SafeNormalize(Vector2.UnitX); + + for (int i = -1; i < beamCount; i++) + { + float t = i / (float)(beamCount - 1); + + float centered = t * 2f - 1f; + + float angleOffset = centered * maxAngle; + + Vector2 dir = baseDir.RotatedBy(angleOffset); + + float sizeFactor = 1f - Math.Abs(centered) * 0.7f; + + ThrusterParticle particle = new ThrusterParticle(player, dir, 16, 120f * sizeFactor, 1); + GeneralParticleHandler.SpawnParticle(particle, false, GeneralDrawLayer.BeforeProjectiles); + } + SoundStyle sound = V8000Engine.DashSound; SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center); } @@ -79,7 +104,7 @@ namespace CalamityMod.CalPlayer.Dashes Color primaryColor = Color.Lerp(Color.DodgerBlue, Color.LightSkyBlue, fadeInLerp); Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, true, shrinkSpeed: 0.6f); GeneralParticleHandler.SpawnParticle(beamBody); - Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, true, shrinkSpeed: 0.6f); + Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.5f, 1.4f), true, true, shrinkSpeed: 0.6f); GeneralParticleHandler.SpawnParticle(beamCore); // Horizontal dust diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs index dd6d567595..a3c94a31aa 100644 --- a/CalPlayer/Dashes/V8EngineDash.cs +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -1,12 +1,15 @@ using System; using CalamityMod.Dusts; using CalamityMod.Enums; +using CalamityMod.Graphics.Renderers; using CalamityMod.Items.Accessories; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.Items; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -32,6 +35,8 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnDashEffects(Player player) { Time = 0; + + // Burst of evenly spaced but random velocity dusts for (int m = 0; m < 6; m++) { float fxFade = Utils.GetLerpValue(5, 15, Math.Abs(player.velocity.X), true); @@ -41,12 +46,35 @@ namespace CalamityMod.CalPlayer.Dashes Color trailColor = Main.rand.NextBool(3) ? Color.Firebrick : Color.OrangeRed; int dustStyle = ModContent.DustType(); - Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(4, 13)); - dust2.scale = Main.rand.NextFloat(0.75f, 1.2f); + Dust dust2 = Dust.NewDustPerfect(trailPos, dustStyle, -player.velocity.SafeNormalize(Vector2.UnitX) * Main.rand.NextFloat(5, 16)); + dust2.scale = Main.rand.NextFloat(0.8f, 1.3f); dust2.color = trailColor; dust2.noGravity = true; dust2.fadeIn = 0.5f; } + + // Thruster prim + int beamCount = 3; + float maxAngle = MathHelper.ToRadians(10f); + + Vector2 baseDir = -player.velocity.SafeNormalize(Vector2.UnitX); + + for (int i = -1; i < beamCount; i++) + { + float t = i / (float)(beamCount - 1); + + float centered = t * 2f - 1f; + + float angleOffset = centered * maxAngle; + + Vector2 dir = baseDir.RotatedBy(angleOffset); + + float sizeFactor = 1f - Math.Abs(centered) * 0.7f; + + ThrusterParticle particle = new ThrusterParticle(player, dir, 12, 100f * sizeFactor, 0); + GeneralParticleHandler.SpawnParticle(particle, false, GeneralDrawLayer.BeforeProjectiles); + } + SoundStyle sound = V8Engine.DashSound; SoundEngine.PlaySound(sound with { Volume = 0.5f, Pitch = Main.rand.NextFloat(-0.4f, -0.3f) }, player.Center); } @@ -70,7 +98,7 @@ namespace CalamityMod.CalPlayer.Dashes Color primaryColor = Color.Lerp(Color.Firebrick, Color.OrangeRed, fadeInLerp); Particle beamBody = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 7, 0.65f - 0.3f * fadeInLerp, primaryColor * 0.8f, new Vector2(1.1f - 0.4f * fadeInLerp, 0.8f + 0.6f * fadeInLerp), true, false, shrinkSpeed: 0.6f); GeneralParticleHandler.SpawnParticle(beamBody); - Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.7f, 1.4f), true, false, shrinkSpeed: 0.6f); + Particle beamCore = new CustomSpark(player.Center, -player.velocity * 0.15f, "CalamityMod/Particles/BloomCircle", false, 5, 0.35f - 0.15f * fadeInLerp, Color.Lerp(primaryColor, Color.White, 0.6f), new Vector2(0.5f, 1.2f), true, false, shrinkSpeed: 0.6f); GeneralParticleHandler.SpawnParticle(beamCore); diff --git a/Particles/ThrusterParticle.cs b/Particles/ThrusterParticle.cs new file mode 100644 index 0000000000..92179e0b8e --- /dev/null +++ b/Particles/ThrusterParticle.cs @@ -0,0 +1,219 @@ +using System; +using CalamityMod.Enums; +using CalamityMod.Items.Accessories; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using rail; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Particles +{ + public class ThrusterParticle : Particle + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override bool SetLifetime => true; + public override bool UseCustomDraw => true; + + public Vector2[] Path = new Vector2[2]; + public Vector2 DashDirection; + private VertexPositionColorTexture[] vertices; + private BasicEffect effect; + + private Vector2 lastPlayerCenter; + private Vector2[] pos = new Vector2[20]; + public float length; + private int time; + private Player Owner; + private int ColorSelection; + + private static readonly Color[] V8Colors = + { + Color.White, + Color.Yellow, + Color.OrangeRed, + Color.Red, + Color.Transparent + }; + + private static readonly Color[] V8000Colors = +{ + Color.White, + Color.LightBlue, + Color.LightCyan, + Color.Cyan, + Color.Transparent + }; + Vector2 GetPlayerDrawCenter(Player p) + { + return p.Center + new Vector2(0f, p.gfxOffY); + } + + public ThrusterParticle(Player player, Vector2 direction, int lifetime, float scale, int colors) + { + Owner = player; + + Position = player.Center; + Velocity = direction; + Scale = scale; + Lifetime = lifetime; + ColorSelection = colors; + + Vector2 start = GetPlayerDrawCenter(player); + Vector2 dir = direction; + + if (dir == Vector2.Zero) + dir = Vector2.UnitX; + + dir.Normalize(); + + length = scale; + Vector2 tip = start + dir * length; + + for (int i = 0; i < pos.Length; i++) + { + float t = i / (float)(pos.Length - 1); + pos[i] = Vector2.Lerp(start, tip, t); + } + + lastPlayerCenter = start; + } + + public override void Update() + { + Path[0] = GetPlayerDrawCenter(Owner); + Path[^1] = Position; + + float lifeProgress = 1f - (time / (float)Lifetime); + if (lifeProgress < 0f) + lifeProgress = 0f; + if (lifeProgress > 1f) + lifeProgress = 1f; + + time++; + + } + + private Color SampleGradient(float t) + { + Color[] ThrusterGradient = ColorSelection == 1 ? V8000Colors : V8Colors; + + t = MathHelper.Clamp(t, 0, 1); + float scaled = t * (ThrusterGradient.Length - 1); + + int index = (int)scaled; + int next = Math.Min(index + 1, ThrusterGradient.Length - 1); + + float interp = scaled - index; + + return Color.Lerp(ThrusterGradient[index], ThrusterGradient[next], interp); + } + + private void BuildPrimitive() + { + int count = pos.Length - 1; + + if (vertices == null || vertices.Length != count * 2) + vertices = new VertexPositionColorTexture[count * 2]; + + float width = 18f; + float lifeProgress = 1f - (time / (float)Lifetime); + + float widthFactor = MathF.Sin(lifeProgress); + + for (int i = 0; i < count; i++) + { + Vector2 current = pos[i]; + + Vector2 direction; + + if (i == count - 1) + direction = pos[i] - pos[i - 1]; + else + direction = pos[i + 1] - pos[i]; + + if (direction == Vector2.Zero) + direction = Vector2.UnitX; + + direction.Normalize(); + + Vector2 normal = direction.RotatedBy(MathHelper.PiOver2); + + float progress = i / (float)(count - 1); + float profile = 0; + if (length < 100) + profile = (float)Math.Sinh(progress * MathHelper.PiOver2) * 1.8f + 0.2f; + else + profile = (float)Math.Sin(progress * Math.PI) * 0.8f + 0.2f; + + float scaledWidth = width * profile * widthFactor; + + Vector2 left = current - normal * scaledWidth; + Vector2 right = current + normal * scaledWidth; + + Color color = SampleGradient(progress); + + vertices[i * 2] = new VertexPositionColorTexture( + new Vector3(left - Main.screenPosition, 0), + color, + new Vector2(progress, 0)); + + vertices[i * 2 + 1] = new VertexPositionColorTexture( + new Vector3(right - Main.screenPosition, 0), + color, + new Vector2(progress, 1)); + } + } + + public override void CustomDraw(SpriteBatch spriteBatch) + { + if (pos == null || pos.Length < 2) + return; + + Vector2 drawCenter = GetPlayerDrawCenter(Owner); + Vector2 delta = drawCenter - lastPlayerCenter; + + for (int i = 0; i < pos.Length; i++) + pos[i] += delta; + + lastPlayerCenter = drawCenter; + BuildPrimitive(); + + GraphicsDevice device = Main.graphics.GraphicsDevice; + + RasterizerState rasterizer = new RasterizerState { CullMode = CullMode.None, FillMode = FillMode.Solid }; + + effect ??= new BasicEffect(device) + { + VertexColorEnabled = true, + TextureEnabled = false, + Projection = Matrix.CreateOrthographicOffCenter( + 0, + Main.screenWidth, + Main.screenHeight, + 0, + -1, + 1) + }; + effect.World = Matrix.Identity; + effect.View = Main.GameViewMatrix.ZoomMatrix; + + device.RasterizerState = rasterizer; + + spriteBatch.End(); + spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, SamplerState.PointWrap, default, device.RasterizerState, null, Main.GameViewMatrix.TransformationMatrix); + foreach (EffectPass pass in effect.CurrentTechnique.Passes) + { + pass.Apply(); + + device.DrawUserPrimitives( + PrimitiveType.TriangleStrip, + vertices, + 0, + vertices.Length - 2); + } + } + } +} diff --git a/Particles/V8ThrusterParticle.cs b/Particles/V8ThrusterParticle.cs deleted file mode 100644 index 0634b0934f..0000000000 --- a/Particles/V8ThrusterParticle.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using CalamityMod.Enums; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; -using static CalamityMod.CalamityUtils; - -namespace CalamityMod.Particles -{ - public class V8ThrusterParticle : Particle - { - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public override bool SetLifetime => true; - public override bool UseCustomDraw => true; - - public Vector2[] Path = new Vector2[2]; - public Vector2 DashDirection; - private VertexPositionColorTexture[] vertices; - private BasicEffect effect; - - - public V8ThrusterParticle(Vector2 relativePosition, Vector2 velocity, /*Vector2 dashDirection,*/ int lifetime, float scale, Color color) - { - Position = relativePosition; - Velocity = velocity; - Scale = scale; - // DashDirection = dashDirection; - Lifetime = lifetime; - Color = color; - } - - public override void Update() - { - Path[0] = Main.LocalPlayer.Center; - Path[^1] = Position; - } - - } -} From beed4b20494d2680c138723c88c066cb5a0777ed Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 19 Feb 2026 00:10:43 -0500 Subject: [PATCH 016/142] Massive nerfs --- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerMiscEffects.cs | 24 ++++++++++++++++++++++++ Items/Accessories/V8000Engine.cs | 2 +- Items/Accessories/V8Engine.cs | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index c4ca6104b0..8b843c8852 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -953,6 +953,7 @@ namespace CalamityMod.CalPlayer public bool evolution = false; public bool v8Engine = false; public bool v8000Engine = false; + public bool v8EngineFXPlayed = false; public bool procDodgeEffects = true; public bool nanotech = false; public bool deadshotBrooch = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 334b399aa3..bf39b617db 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -558,6 +558,30 @@ namespace CalamityMod.CalPlayer } + if (v8Engine || v8000Engine) + { + if (Player.dashDelay == 1 && !v8EngineFXPlayed) + { + + SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/ScornJump"); + SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.7f }, Player.Center); + + for (int i = 0; i < 10; i++) // Circular ring of particles burst from player + { + float angle = MathHelper.TwoPi * (i / 10f); + Vector2 spawnDirection = angle.ToRotationVector2(); + Vector2 velocity = spawnDirection * 18f; + + CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Player.Calamity().DashID == V8EngineDash.ID ? Color.OrangeRed : Color.Cyan, Color.White, Main.rand.NextFloat(1f)), Color.White * 0.5f, 1.2f, 12, 0.3f, 1.2f); + GeneralParticleHandler.SpawnParticle(spark); + } + v8EngineFXPlayed = true; + } + + if (Player.dashDelay == -1) + v8EngineFXPlayed = false; + } + if (XykVisualsBlue || XykVisualsOrange) { bool Orange = XykVisualsOrange; diff --git a/Items/Accessories/V8000Engine.cs b/Items/Accessories/V8000Engine.cs index 48892dbe73..304eab63a2 100644 --- a/Items/Accessories/V8000Engine.cs +++ b/Items/Accessories/V8000Engine.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static float DashDelayModifier = 1.6f; + public static float DashDelayModifier = 3.5f; public const int ShieldSlamDamage = 900; public const float ShieldSlamKnockback = 0.4f; public const int ShieldSlamIFrames = 14; // While this has more i-frames than Elysian's dash, the dash speed sets this one back comparitively diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs index 2404d1dab6..3edf85e265 100644 --- a/Items/Accessories/V8Engine.cs +++ b/Items/Accessories/V8Engine.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static float DashDelayModifier = 2f; + public static float DashDelayModifier = 4f; public static SoundStyle DashSound = new("CalamityMod/Sounds/Item/V8Boost"); From f4b8d1db3d83c9ad204c4d2d2d330c7c11f75c9a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Feb 2026 20:35:30 -0500 Subject: [PATCH 017/142] Touchups --- CalPlayer/CalamityPlayer.cs | 2 ++ Items/Accessories/V8000Engine.cs | 3 +++ Items/Accessories/V8Engine.cs | 3 +++ Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8b843c8852..e32c7cbe39 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1110,6 +1110,7 @@ namespace CalamityMod.CalPlayer public int spectralVeilImmunity = 0; /// Check for if the player has Plagued Fuel Pack OR Blunder Booster equipped. public bool hasJetpack = false; + public bool hasEngineDash = false; public bool plaguedFuelPack = false; public bool blunderBooster = false; public bool blunderBoosterVisibility = true; @@ -2639,6 +2640,7 @@ namespace CalamityMod.CalPlayer sandCloak = false; spectralVeil = false; hasJetpack = false; + hasEngineDash = false; plaguedFuelPack = false; blunderBooster = false; blunderBoosterVisibility = true; diff --git a/Items/Accessories/V8000Engine.cs b/Items/Accessories/V8000Engine.cs index 304eab63a2..2c5b7238df 100644 --- a/Items/Accessories/V8000Engine.cs +++ b/Items/Accessories/V8000Engine.cs @@ -30,9 +30,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasEngineDash; + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); + modPlayer.hasEngineDash = true; modPlayer.v8000Engine = true; modPlayer.DashID = V8000EngineDash.ID; player.dashType = 0; diff --git a/Items/Accessories/V8Engine.cs b/Items/Accessories/V8Engine.cs index 3edf85e265..83f8e825ca 100644 --- a/Items/Accessories/V8Engine.cs +++ b/Items/Accessories/V8Engine.cs @@ -28,9 +28,12 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; } + public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().hasEngineDash; + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); + modPlayer.hasEngineDash = true; modPlayer.v8Engine = true; modPlayer.DashID = V8EngineDash.ID; player.dashType = 0; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index ca35b35986..25ed7b189e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2014,14 +2014,14 @@ UnstableGraniteCore: { V8Engine: { DisplayName: V8 Engine - Tooltip: Grants a dash which can be used by both mounts and players alike + Tooltip: Grants a short dash with a long cooldown that works while mounted } V8000Engine: { DisplayName: V8000 Engine Tooltip: ''' - Grants a dash which can be used by both mounts and players alike + Grants a dash with a long cooldown that works while mounted This dash can ram through enemies without taking damage 'Are soul-powered engines eco-friendly?' ''' From 1b57c3b050b3392a91a718b49b061799e1c5091f Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 23 Feb 2026 14:02:10 -0800 Subject: [PATCH 018/142] 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 019/142] 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 zcmce-dstdmx;VT+Ktv>)+5k+h+O*Nv)^fVnWO=C=_P19s1ov*)>Z<}=H%sJol{C?kG z-+DHiwKnUr*Sp^P`?BZ2flL4n{9fMCzN*Y>*psku*n96D(i9(FdjuCae($p4^RhAm z+p{+EpJi<%3~HGZu?~XZ#eXl6KCfmeTbU(FHAPsxG-Xy^$mgEFa~ZdL*S9styl zF}PFv(_(sCyXZ&Hwx+JtCYkkTTk9vm0yE3=j~gX%9|-^ufS&Hx)ct*$_Ez!%FuLiG zCAnC_?xXmcWDCiD1>F&JuLH602y(1rFkJRkFTa)*XVJ7+{G= zKC>KSrID>m$yT50S_d51w+0f5Ukfd!r917ye(lBL4?igy_~e}%m*Q?*!oKVRoi1YS zZ2(Jg`-T74wLkkz;s5#K7Jb10xDYI-%0j2gB8B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`VqmOYMc^6CTwAk{Q7Z4oj|qonPNi%U%c+?u?XMEfJTLQasmWL z!gkTV`DNvK(gfx`+dCWnGY;_;Fv@&l(Uxa@_{H9d+Zk{`Qoxv3S#=Il958%1rqiUy zvEYpwu69RssmlMpKw^QTq+%?*_+J;e1*NGx^P(nMY0(vI_1`kflV{$LpbM!zwI+s{ zu}lTGQQNaBWLp@~K`2tNUA#hEB8|(k+ZjkdG(a2$R~NBM0WKpqx}h(0(_>z z2mZQ1gxn;om8}prwPfY{;7ij>0YIJn{xLoD-T(6glH$lrL Date: Sun, 8 Mar 2026 19:26:42 -0700 Subject: [PATCH 020/142] 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 021/142] 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 022/142] 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 023/142] 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 024/142] 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 025/142] 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 026/142] 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 027/142] 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 028/142] 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 029/142] 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 030/142] 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 031/142] 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 032/142] 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 033/142] 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 034/142] 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 035/142] 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 036/142] 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 037/142] 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 038/142] 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 039/142] 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 040/142] 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 041/142] 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 042/142] 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 043/142] 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 044/142] 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 045/142] 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 046/142] 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 f3666059fbb6bf077c8d987b82de6ee21d5b7b2a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Tue, 24 Mar 2026 15:54:12 -0400 Subject: [PATCH 047/142] animosity adjustment --- Items/Weapons/Ranged/Animosity.cs | 2 +- Projectiles/Ranged/AnimosityBullet.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/Animosity.cs b/Items/Weapons/Ranged/Animosity.cs index fdb7e08c9b..2866542d6e 100644 --- a/Items/Weapons/Ranged/Animosity.cs +++ b/Items/Weapons/Ranged/Animosity.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 39; Item.DamageType = DamageClass.Ranged; Item.scale = 0.85f; - Item.useTime = Item.useAnimation = 33; + Item.useTime = Item.useAnimation = 31; Item.reuseDelay = 10; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Projectiles/Ranged/AnimosityBullet.cs b/Projectiles/Ranged/AnimosityBullet.cs index a403ac043a..da98941b47 100644 --- a/Projectiles/Ranged/AnimosityBullet.cs +++ b/Projectiles/Ranged/AnimosityBullet.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300); - target.AddBuff(ModContent.BuffType(), 120); + target.AddBuff(ModContent.BuffType(), 180); // Music easter egg in GFB, and more! if (Main.zenithWorld) From 71e5c62c9b05de52f0e978a8294bd86cc9ae5e2d Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 24 Mar 2026 14:59:46 -0700 Subject: [PATCH 048/142] 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 049/142] 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 050/142] 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 051/142] 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 052/142] 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 053/142] 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 3ac0aeeca753712a3e7128b88f21edd2529c5c86 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 26 Mar 2026 18:54:34 -0400 Subject: [PATCH 054/142] Fixes based on review --- CalPlayer/CalamityPlayer.cs | 8 -------- CalPlayer/Dashes/V8EngineDash.cs | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e32c7cbe39..2beaef6b2b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -3820,14 +3820,6 @@ namespace CalamityMod.CalPlayer } } - if (CalamityKeybinds.DashHotkey.JustPressed) - { - if (godSlayer && !Player.pulley && Player.grappling[0] == -1 && !Player.tongued && !Player.mount.Active && !Player.HasCooldown(GodSlayerDash.ID) && Player.dashDelay == 0) - { - godSlayerDashHotKeyPressed = true; - } - } - //Right click dash on Speed Blaster if (sBlasterDashActivated == true) { diff --git a/CalPlayer/Dashes/V8EngineDash.cs b/CalPlayer/Dashes/V8EngineDash.cs index a3c94a31aa..9b124c3cbf 100644 --- a/CalPlayer/Dashes/V8EngineDash.cs +++ b/CalPlayer/Dashes/V8EngineDash.cs @@ -20,7 +20,7 @@ namespace CalamityMod.CalPlayer.Dashes { public static new string ID { get; private set; } - public override DashCollisionType CollisionType => DashCollisionType.ShieldSlam; + public override DashCollisionType CollisionType => DashCollisionType.NoCollision; public override bool IsOmnidirectional => false; public int Time = 0; 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 055/142] 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 056/142] 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 057/142] 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 058/142] 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 059/142] 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 060/142] 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 71fc7731799d4fb5fccf00672f52bad3dd6f7ff6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 27 Mar 2026 08:27:56 +0700 Subject: [PATCH 061/142] tweaked earlier game values --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- CalPlayer/CalamityPlayerOnHit.cs | 6 +++--- Projectiles/Healing/BurntSiennaProj.cs | 2 +- Projectiles/Healing/CactusHealOrb.cs | 2 +- Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs | 2 +- Projectiles/Melee/Spears/GildedProboscisProj.cs | 2 +- Projectiles/Rogue/ShinobiBladeProjectile.cs | 2 +- Projectiles/Typeless/FungalClumpMinion.cs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 5c21d0a0e5..20d86a1125 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2092,7 +2092,7 @@ namespace CalamityMod.CalPlayer if (whitewaterHeal > 0) { - if (whitewaterHeal % 15 == 0) + if (whitewaterHeal % 20 == 0) Player.HealPlayer(1); whitewaterHeal--; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 1f4a128a71..b5118349e3 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1320,19 +1320,19 @@ namespace CalamityMod.CalPlayer if (heal > 2) heal = 2; - Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.3f : 1.6f); + Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, heal, (raiderCritLifespan > 0 && !proj.Calamity().stealthStrike) ? 1.2f : 1.5f); } if (bloodyGlove && proj.CountsAsClass() && modProj.stealthStrike && proj.numHits < 1) //Nanotech has the same heal as Electrician's glove - Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, 2f); + Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, electricianGlove ? 2f : 3f); if (proj.CountsAsClass() && Player.HeldItem.CountsAsClass()) { if (manaOverloader) { double healMult = 0.1D - proj.numHits * 0.025D; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 2); + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 2f); } if (ataxiaMage && hydroHealTimer <= 0) diff --git a/Projectiles/Healing/BurntSiennaProj.cs b/Projectiles/Healing/BurntSiennaProj.cs index 52efdc55f8..71e7e6d524 100644 --- a/Projectiles/Healing/BurntSiennaProj.cs +++ b/Projectiles/Healing/BurntSiennaProj.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Healing { Projectile.velocity *= 0.95f; - Projectile.HealingProjectile(3, (int)Projectile.ai[0], 6f, 15f, false); + Projectile.HealingProjectile(2, (int)Projectile.ai[0], 6f, 15f, false); int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.GoldCoin, 0f, 0f, 100, default, 1f); Dust dust = Main.dust[dusty]; dust.noGravity = true; diff --git a/Projectiles/Healing/CactusHealOrb.cs b/Projectiles/Healing/CactusHealOrb.cs index 23f54b162e..9925677a4d 100644 --- a/Projectiles/Healing/CactusHealOrb.cs +++ b/Projectiles/Healing/CactusHealOrb.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Healing { Projectile.velocity.Y *= 0.98f; - Projectile.HealingProjectile(15, Projectile.owner, 12f, 15f, false); + Projectile.HealingProjectile(10, Projectile.owner, 12f, 15f, false); int dusty = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.TerraBlade, 0f, 0f, 100, new Color(0, 200, 0), 1.5f); Dust dust = Main.dust[dusty]; dust.noGravity = true; diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs index 4f6706afe6..a8da7a3b52 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) return; - Owner.DoLifestealDirect(target, BrokenBiomeBlade.EvilAttunement_Lifesteal, 1.25f); //Idk if its too much or what but at the same time its close range as fuck + Owner.DoLifestealDirect(target, BrokenBiomeBlade.EvilAttunement_Lifesteal, 1.5f); //Idk if its too much or what but at the same time its close range as fuck // Bounce off float bounceStrength = LungeSpeed / 2f; diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index 817f251d32..5fb1bb1a05 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -260,7 +260,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 900); - Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015),0.5f); + Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, (int)Math.Round(hit.Damage * 0.0015), 0.5f); if (Projectile.damage > 1) Projectile.damage = (int)(Projectile.damage * 0.925f); } diff --git a/Projectiles/Rogue/ShinobiBladeProjectile.cs b/Projectiles/Rogue/ShinobiBladeProjectile.cs index 5ef272e6b4..217ef9e6da 100644 --- a/Projectiles/Rogue/ShinobiBladeProjectile.cs +++ b/Projectiles/Rogue/ShinobiBladeProjectile.cs @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Rogue } if (target.life <= 0) - Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ModContent.ProjectileType(), 10, 0f); + Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ModContent.ProjectileType(), 5, 0f); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Typeless/FungalClumpMinion.cs b/Projectiles/Typeless/FungalClumpMinion.cs index 782a84cecd..a407317fbc 100644 --- a/Projectiles/Typeless/FungalClumpMinion.cs +++ b/Projectiles/Typeless/FungalClumpMinion.cs @@ -230,7 +230,7 @@ namespace CalamityMod.Projectiles.Typeless } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ModContent.ProjectileType(), 1, 2f); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ModContent.ProjectileType(), 1, 3f); public override bool OnTileCollide(Vector2 oldVelocity) => false; 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 062/142] 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 063/142] 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 064/142] 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 065/142] 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 066/142] 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 067/142] 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 a7dab91b2c53c0bb11f93c393f8a9b3508c11a72 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Mar 2026 12:47:02 -0400 Subject: [PATCH 068/142] Projectiles that set heldProj are pierce resist-exempt Removed a few vanilla projectiles from the pierce resist exception list that are now covered by this check --- NPCs/CalamityPierceResistance.cs | 14 +++++++------- en-US.hjson | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 en-US.hjson diff --git a/NPCs/CalamityPierceResistance.cs b/NPCs/CalamityPierceResistance.cs index 2ee5de4bbc..b6fedbc21d 100644 --- a/NPCs/CalamityPierceResistance.cs +++ b/NPCs/CalamityPierceResistance.cs @@ -50,19 +50,15 @@ namespace CalamityMod.NPCs pierceResistNPC.Add(NPCID.TheDestroyerTail); // Specific vanilla projectile exemptions - exemptProjectiles.Add(ProjectileID.Arkhalis); exemptProjectiles.Add(ProjectileID.ChargedBlasterLaser); exemptProjectiles.Add(ProjectileID.ClingerStaff); exemptProjectiles.Add(ProjectileID.FinalFractal); exemptProjectiles.Add(ProjectileID.FlyingKnife); - exemptProjectiles.Add(ProjectileID.HallowJoustingLance); + exemptProjectiles.Add(ProjectileID.HallowJoustingLance); // "Why not make jousting lances exempt via AI style?" Because they use spear AI. Thanks vanilla! exemptProjectiles.Add(ProjectileID.JoustingLance); exemptProjectiles.Add(ProjectileID.LastPrismLaser); exemptProjectiles.Add(ProjectileType()); // Included here as it does not have a projectile - exemptProjectiles.Add(ProjectileID.MonkStaffT3); - exemptProjectiles.Add(ProjectileID.PiercingStarlight); exemptProjectiles.Add(ProjectileID.ShadowJoustingLance); - exemptProjectiles.Add(ProjectileID.Terragrim); // Specific vanilla projectile single hitbox exemptions singleHitboxExemptProjectiles[ProjectileID.NettleBurstEnd] = true; @@ -134,6 +130,11 @@ namespace CalamityMod.NPCs if (singleHitboxExemptProjectiles.TryGetValue(projectile.type, out bool isSingleHitboxExempt) && isSingleHitboxExempt && singleHitboxNPC.Contains(npc.type)) return; + // Skip specific vanilla AI styles, or if the projectile sets heldProj (meaning it's a holdout). + if (projectile.aiStyle == ProjAIStyleID.Flail || projectile.aiStyle == ProjAIStyleID.MechanicalPiranha || projectile.aiStyle == ProjAIStyleID.Yoyo || + Main.player[projectile.owner].heldProj == projectile.whoAmI) + return; + PierceResistGlobal(projectile, npc, ref modifiers); } @@ -150,8 +151,7 @@ namespace CalamityMod.NPCs modifiers.FinalDamage *= 1f - damageReduction; - bool aiStyleExempt = projectile.aiStyle == ProjAIStyleID.Flail || projectile.aiStyle == ProjAIStyleID.MechanicalPiranha || projectile.aiStyle == ProjAIStyleID.Yoyo; - if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !projectile.CountsAsClass() && !aiStyleExempt) + if ((projectile.penetrate > 1 || projectile.penetrate == -1) && !projectile.CountsAsClass()) projectile.Calamity().timesPierced++; } } 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 4a2598d4692ff3240ef93cd337accead1a22a565 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Mar 2026 16:03:38 -0400 Subject: [PATCH 069/142] Removed pierce resist exception attributes from projectiles that no longer need them --- Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs | 1 - Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs | 1 - Projectiles/Magic/Teslabeam.cs | 1 - Projectiles/Melee/BasherHoldout.cs | 1 - Projectiles/Melee/DevilsSunriseProj.cs | 1 - Projectiles/Melee/DragonRageStaff.cs | 1 - Projectiles/Melee/MaceFlails/UrchinMaceProj.cs | 1 - Projectiles/Melee/MurasamaSlash.cs | 1 - Projectiles/Melee/OmnibladeSwing.cs | 1 - Projectiles/Melee/TyphonsGreedStaff.cs | 1 - Projectiles/Ranged/HellbornHoldout.cs | 1 - 11 files changed, 11 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs index 8c9a1641a9..344bf53445 100644 --- a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs @@ -73,7 +73,6 @@ namespace CalamityMod.Projectiles.BaseProjectiles } } - [PierceResistException] //Doze 24apr2025 - Not a child of BaseCustomUseStyleProjectile because this doesn't use any of it's functionality. Comes from my melee rework mod. public abstract class BaseSwordHoldoutProjectile : ModProjectile { diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs index aae9fd3773..22a4bd3c7a 100644 --- a/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs +++ b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs @@ -17,7 +17,6 @@ using static Terraria.Player; namespace CalamityMod.Projectiles.DraedonsArsenal { - [PierceResistException] public class CountermeasureMittHoldout : BaseGunHoldoutProjectile { public new string LocalizationCategory => "Projectiles.Misc"; diff --git a/Projectiles/Magic/Teslabeam.cs b/Projectiles/Magic/Teslabeam.cs index 406697d659..e188baaf9b 100644 --- a/Projectiles/Magic/Teslabeam.cs +++ b/Projectiles/Magic/Teslabeam.cs @@ -16,7 +16,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Magic { - [PierceResistException] public class Teslabeam : BaseLaserbeamProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Magic"; diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 3428fbe1dc..c79686bd1b 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -16,7 +16,6 @@ using static Terraria.Player; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class BasherHoldout : ModProjectile, ILocalizedModType { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); diff --git a/Projectiles/Melee/DevilsSunriseProj.cs b/Projectiles/Melee/DevilsSunriseProj.cs index 9fdf15536d..08a801efe8 100644 --- a/Projectiles/Melee/DevilsSunriseProj.cs +++ b/Projectiles/Melee/DevilsSunriseProj.cs @@ -12,7 +12,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class DevilsSunriseProj : ModProjectile { public static readonly SoundStyle HitSound = new SoundStyle("CalamityMod/Sounds/Item/MantisSwipe", 2) with { Pitch = 0.8f }; diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index 5286f392d9..1d0d877dfa 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -14,7 +14,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class DragonRageStaff : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); diff --git a/Projectiles/Melee/MaceFlails/UrchinMaceProj.cs b/Projectiles/Melee/MaceFlails/UrchinMaceProj.cs index 477271b0b2..e0215e4913 100644 --- a/Projectiles/Melee/MaceFlails/UrchinMaceProj.cs +++ b/Projectiles/Melee/MaceFlails/UrchinMaceProj.cs @@ -13,7 +13,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee.MaceFlails { - [PierceResistException] public class UrchinMaceProj : BaseMaceFlailProjectile { // The entire chain is on the mace sprite, in which the player swings diff --git a/Projectiles/Melee/MurasamaSlash.cs b/Projectiles/Melee/MurasamaSlash.cs index 62c19d5938..9db51e148c 100644 --- a/Projectiles/Melee/MurasamaSlash.cs +++ b/Projectiles/Melee/MurasamaSlash.cs @@ -11,7 +11,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class MurasamaSlash : ModProjectile, ILocalizedModType { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index e884f6f0ba..2e76546ddc 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -8,7 +8,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class OmnibladeSwing : ModProjectile, ILocalizedModType { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); diff --git a/Projectiles/Melee/TyphonsGreedStaff.cs b/Projectiles/Melee/TyphonsGreedStaff.cs index 17cf90d7a2..e52c6e5d7f 100644 --- a/Projectiles/Melee/TyphonsGreedStaff.cs +++ b/Projectiles/Melee/TyphonsGreedStaff.cs @@ -11,7 +11,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - [PierceResistException] public class TyphonsGreedStaff : ModProjectile { public override LocalizedText DisplayName => CalamityUtils.GetItemName(); diff --git a/Projectiles/Ranged/HellbornHoldout.cs b/Projectiles/Ranged/HellbornHoldout.cs index e4380d6c83..a81a01cb47 100644 --- a/Projectiles/Ranged/HellbornHoldout.cs +++ b/Projectiles/Ranged/HellbornHoldout.cs @@ -13,7 +13,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Ranged { - [PierceResistException] public class HellbornHoldout : BaseGunHoldoutProjectile { public override int AssociatedItemID => ModContent.ItemType(); From 77b093d59dbb11d35af4387ab832b8845b80f4e4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Mar 2026 18:11:05 -0400 Subject: [PATCH 070/142] Butcher's Chainsaw will make me grow old --- CalPlayer/CalamityPlayerOnHit.cs | 1 - Items/CalamityGlobalItemTweaks.cs | 2 +- Projectiles/CalamityGlobalProjectileTweaks.cs | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index b5118349e3..318d22ac6d 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -292,7 +292,6 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 180); break; - case ProjectileID.ButchersChainsaw: case ProjectileID.MechanicalPiranha: target.AddBuff(BuffType(), 180); break; diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 0bc4a75a80..77df0f0209 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -309,7 +309,7 @@ namespace CalamityMod.Items { 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.ButchersChainsaw, Do(TrueMeleeNoSpeed, DamageExact(100), 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)) }, diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 6f3860270f..b21386ae61 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles { ProjectileID.BlueMoon, Do(ExtraUpdatesExact(1)) }, { ProjectileID.Bullet, Do(ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.BulletHighVelocity, Do(ExtraUpdatesDelta(+2), LocalIFrames(-1)) }, - { ProjectileID.ButchersChainsaw, Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(7), ScaleExact(1.5f)) }, + { ProjectileID.ButchersChainsaw, Do(TrueMeleeNoSpeed, ArmorPenetrationDelta(+15), LocalIFrames(10), ScaleExact(1.5f)) }, { ProjectileID.ChlorophyteChainsaw, standardChainsawTweaks }, { ProjectileID.ChlorophyteDrill, standardDrillTweaks }, { ProjectileID.ChlorophyteOrb, Do(NoPiercing) }, @@ -237,6 +237,7 @@ namespace CalamityMod.Projectiles { ProjectileID.ShadowJoustingLance, trueMelee }, { ProjectileID.SilverShortswordStab, trueMelee }, { ProjectileID.SolarFlareChainsaw, trueMeleeNoSpeed }, + { ProjectileID.Spark, trueMeleeNoSpeed }, { ProjectileID.Spear, trueMelee }, { ProjectileID.StardustChainsaw, trueMeleeNoSpeed }, { ProjectileID.Swordfish, trueMelee }, From 247f03e278aa6ae430bbc2bd45703b2648562924 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 29 Mar 2026 00:46:30 -0500 Subject: [PATCH 071/142] 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 072/142] 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 7be4976b744aa6070be30ae70dd0a2044e056612 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 29 Mar 2026 17:03:38 -0400 Subject: [PATCH 073/142] Solar Eruption This may be a bit underpowered now, but I am okay with that as it is a simple Lunar Fragment craft I also tested Nebulash and Mourningstar, and they were fine --- Balancing/BalancingChangesManager.cs | 3 +++ Items/CalamityGlobalItemTweaks.cs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 23b231907c..29b8c5dd69 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -222,6 +222,9 @@ namespace CalamityMod.Balancing // 30% resist to Flak Kraken. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.7f, ProjectileType())))); + // 25% resist to Solar Eruption. + NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.75f, ProjectileID.SolarWhipSword, ProjectileID.SolarWhipSwordExplosion)))); + // 20% resist to Ballistic Poison Bomb's clouds. NPCSpecificBalancingChanges.AddRange(Bundle(CalamityNPCTypeSets.AstrumDeus, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 77df0f0209..536b9fee5c 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -228,7 +228,6 @@ namespace CalamityMod.Items { 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)) }, 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 074/142] 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 075/142] 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 076/142] 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 077/142] 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 078/142] 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 079/142] 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 080/142] 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 081/142] 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 082/142] 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 083/142] 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 084/142] 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 085/142] 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 086/142] 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 087/142] 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 088/142] 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 089/142] 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 090/142] 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 9f16e5ec107f5a1090d60ed46de844b61adb90bb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Mar 2026 21:54:00 -0400 Subject: [PATCH 091/142] The Jailor is a specialist weapon --- Items/Weapons/Ranged/TheJailor.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Items/Weapons/Ranged/TheJailor.cs b/Items/Weapons/Ranged/TheJailor.cs index 55fc16c5d4..b2cc4f3371 100644 --- a/Items/Weapons/Ranged/TheJailor.cs +++ b/Items/Weapons/Ranged/TheJailor.cs @@ -12,6 +12,11 @@ namespace CalamityMod.Items.Weapons.Ranged public class TheJailor : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Ranged"; + + public override void SetStaticDefaults() + { + ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; + } public override void SetDefaults() { Item.width = 102; From 8df2d29296f797863f7752a7887680e25ff5e426 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Mar 2026 22:43:39 -0400 Subject: [PATCH 092/142] Proper fix for Dryad's Tear extra burst not critting Removed logic giving artificial crit chance to BasicBurst Also actually fixed V8000 soul localization --- .../en-US/Mods.CalamityMod.Projectiles.Typeless.hjson | 1 + Projectiles/Ranged/DryadsTearMain.cs | 2 +- Projectiles/Typeless/BasicBurst.cs | 8 -------- Projectiles/Typeless/V8000SoulVisual.cs | 3 ++- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 3c03ba6f79..ee3498a7eb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -153,6 +153,7 @@ TitanHeartBoom.DisplayName: Titan Heart Boom TransformerAura.DisplayName: Transformer Aura TransformerBlob.DisplayName: Transformer Shard UrsaSlash.DisplayName: Ursa Slash +V8000SoulVisual.DisplayName: V8000 Soul VerstaltiteBobber.DisplayName: Verstaltite Bobber VictideBarrier.DisplayName: Tidal Barrier VictideBobber.DisplayName: Snail Bobber diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index b014d84d92..7af0a84e3d 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -330,7 +330,7 @@ namespace CalamityMod.Projectiles.Ranged 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 * explosionDamageMult * damageMult); - Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), targeted.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); + Projectile blast = Projectile.NewProjectileDirect(Projectile.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; diff --git a/Projectiles/Typeless/BasicBurst.cs b/Projectiles/Typeless/BasicBurst.cs index 0633d2b71e..10feff399b 100644 --- a/Projectiles/Typeless/BasicBurst.cs +++ b/Projectiles/Typeless/BasicBurst.cs @@ -72,14 +72,6 @@ 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) { diff --git a/Projectiles/Typeless/V8000SoulVisual.cs b/Projectiles/Typeless/V8000SoulVisual.cs index 76d526cd24..0507db89f3 100644 --- a/Projectiles/Typeless/V8000SoulVisual.cs +++ b/Projectiles/Typeless/V8000SoulVisual.cs @@ -13,8 +13,9 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class V8000SoulVisual : ModProjectile, IPixelatedPrimitiveRenderer + public class V8000SoulVisual : ModProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer { + public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() From f56e00bb4c7cad25216150b9a2ac110d803d64bd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 31 Mar 2026 22:02:03 -0500 Subject: [PATCH 093/142] 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 094/142] 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 095/142] 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 491394c4c942203b05bd79b71f6b8635834b7256 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Apr 2026 12:28:28 -0400 Subject: [PATCH 096/142] Removed Void of Calamity Cal Clone's Expert drop is now Regenerator --- CalPlayer/CalamityPlayer.cs | 2 - Items/Accessories/Regenerator.cs | 1 + Items/Accessories/VoidofCalamity.cs | 42 -------- Items/Accessories/VoidofCalamity.png | Bin 613 -> 0 bytes Items/TreasureBags/CalamitasCloneBag.cs | 3 +- .../Mods.CalamityMod.Items.Accessories.hjson | 9 -- ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 - NPCs/CalClone/CalamitasClone.cs | 3 +- Projectiles/Typeless/StandingFire.cs | 95 ------------------ 9 files changed, 3 insertions(+), 153 deletions(-) delete mode 100644 Items/Accessories/VoidofCalamity.cs delete mode 100644 Items/Accessories/VoidofCalamity.png delete mode 100644 Projectiles/Typeless/StandingFire.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 1d01e55f3a..d46cef1e26 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1037,7 +1037,6 @@ namespace CalamityMod.CalPlayer public bool baroclaw = false; public bool IsFirstDashFrame = true; public int fallingBootVelCheckTimer = 0; - public bool voidOfCalamity = false; public bool apollyon = false; public bool eArtifact = false; public bool dArtifact = false; @@ -2466,7 +2465,6 @@ namespace CalamityMod.CalPlayer darkSunRing = false; crawCarapace = false; baroclaw = false; - voidOfCalamity = false; apollyon = false; eArtifact = false; dArtifact = false; diff --git a/Items/Accessories/Regenerator.cs b/Items/Accessories/Regenerator.cs index dc1bc73dd3..20d8e38a39 100644 --- a/Items/Accessories/Regenerator.cs +++ b/Items/Accessories/Regenerator.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Accessories Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.accessory = true; + Item.expert = true; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/VoidofCalamity.cs b/Items/Accessories/VoidofCalamity.cs deleted file mode 100644 index 7289ae6af2..0000000000 --- a/Items/Accessories/VoidofCalamity.cs +++ /dev/null @@ -1,42 +0,0 @@ -using CalamityMod.CalPlayer; -using CalamityMod.Projectiles.Typeless; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Accessories -{ - [LegacyName("CalamityRing")] - public class VoidofCalamity : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Accessories"; - public override void SetDefaults() - { - Item.width = 20; - Item.height = 22; - Item.value = CalamityGlobalItem.RarityLimeBuyPrice; - Item.rare = ItemRarityID.Lime; - Item.accessory = true; - Item.expert = true; - } - - public override void UpdateAccessory(Player player, bool hideVisual) - { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.voidOfCalamity = true; - player.GetDamage() += 0.12f; - if (player.whoAmI == Main.myPlayer) - { - var source = player.GetSource_Accessory(Item); - if (player.immune) - { - if (player.miscCounter % 10 == 0) - { - int damage = (int)player.GetBestClassDamage().ApplyTo(30); - CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType(), damage, 5f, player.whoAmI); - } - } - } - } - } -} diff --git a/Items/Accessories/VoidofCalamity.png b/Items/Accessories/VoidofCalamity.png deleted file mode 100644 index 6054ac92732392d908d64c1a6335fc9515ada3aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 613 zcmV-r0-F7aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0s2WqK~z{r)t0eK z0#O{t?-G^rG+G^`ATYroYG`S13YuyP`WIS*rXp(UUkKWo8f$9`8jPTzjKG3w2qQ`x zH1P7izOQ&c?{(Mq`ha}z`HrXe@%MXA+tT2wJWr>Qv$Y!E3gl*F1Zx%E-!X3EyZCCL;^B9wY!p&q>a6)XG=#xvE+@?f{wg$PuAzVe z`KuWp7sJC?I~k8-{EUE^N|Iu;qS%a+> z#*J7E`I$^2i`6R9JVUzLiAtCu&g*Ke-OVu9?q-aQG(;oadQ#wh*=3i_Ci1FMLCSeq zJF*68Oq!&re^EmOQyc&{q z_8aEa&~Yk-i}|mwz^;;ABWsGa@?sw$=SSC&64qW=7n-{d@yYol3$}k-T2iO6yl?kz z7fJS~H<9cjcAe}_8abSpK+ctSkmeiG!CH}qi2R>KLpp=27aK^4`CS&(RM_4k&5*3S zh-6pxVE9>fB20xLyMu5aI(gVb>WI7dF!F7WV@%95q*8l$HLN1?&EAS+j)c`p559HH zHKgOY{|Tijt`TT3;a+3DX?INb5V($EhAis`%R0=3=Wi~J00000NkvXXu0mjfIy@fX diff --git a/Items/TreasureBags/CalamitasCloneBag.cs b/Items/TreasureBags/CalamitasCloneBag.cs index 25b976118d..19173990a8 100644 --- a/Items/TreasureBags/CalamitasCloneBag.cs +++ b/Items/TreasureBags/CalamitasCloneBag.cs @@ -72,8 +72,7 @@ namespace CalamityMod.Items.TreasureBags // Equipment itemLoot.Add(ModContent.ItemType(), DropHelper.BagWeaponDropRateFraction); - itemLoot.Add(ModContent.ItemType(), DropHelper.BagWeaponDropRateFraction); - itemLoot.Add(ModContent.ItemType()); + itemLoot.Add(ModContent.ItemType()); itemLoot.AddRevBagAccessories(); // Vanity diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 8a2cef2d0e..042a8f6b4e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2086,15 +2086,6 @@ VitalJelly: { Tooltip: 12% increased movement and jump speed } -VoidofCalamity: { - DisplayName: Void of Calamity - Tooltip: - ''' - 12% increased damage - Brimstone fire rains down after getting hit - ''' -} - VoltaicJelly: { DisplayName: Voltaic Jelly Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index ee3498a7eb..746145cb29 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -136,7 +136,6 @@ SlimeStream.DisplayName: Slime Stream SlurperBobber.DisplayName: Slurper Bobber SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye SpringStoolFX.DisplayName: Spring Stool -StandingFire.DisplayName: Flame StarStruckWaterBottle.DisplayName: Bottle StepStoolBonusFX.DisplayName: Step Stool Bonus StickyFeatherAero.DisplayName: Feather diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 7f96e910bc..2a6e8d8d98 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -1052,9 +1052,8 @@ namespace CalamityMod.NPCs.CalClone // Equipment // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss - // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + // normalOnly.Add(ModContent.ItemType()); normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); - normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); // Materials normalOnly.Add(ModContent.ItemType(), 1, 8, 10); diff --git a/Projectiles/Typeless/StandingFire.cs b/Projectiles/Typeless/StandingFire.cs deleted file mode 100644 index b692380ee6..0000000000 --- a/Projectiles/Typeless/StandingFire.cs +++ /dev/null @@ -1,95 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -namespace CalamityMod.Projectiles.Typeless -{ - public class StandingFire : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = 6; - Projectile.height = 12; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.timeLeft = 240; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 7; - } - - public override void AI() - { - if (Projectile.velocity.X != Projectile.velocity.X) - { - Projectile.velocity.X = Projectile.velocity.X * -0.1f; - } - 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; - 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 OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); - } -} From 6ca3cc0cb1d40ca4e74ef11305d5e96a535ea260 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 1 Apr 2026 16:17:56 -0500 Subject: [PATCH 097/142] 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() { From fdd39bef7ed7f7735ba7b79e89fde8426c7933c3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Apr 2026 14:46:05 -0400 Subject: [PATCH 098/142] Reverted Void of Calamity removal for now Maybe we officially decide to remove it later idk, but it was definitely done hastily --- CalPlayer/CalamityPlayer.cs | 2 + Items/Accessories/Regenerator.cs | 1 - Items/Accessories/VoidofCalamity.cs | 42 ++++++++ Items/Accessories/VoidofCalamity.png | Bin 0 -> 613 bytes Items/TreasureBags/CalamitasCloneBag.cs | 3 +- .../Mods.CalamityMod.Items.Accessories.hjson | 9 ++ ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 + NPCs/CalClone/CalamitasClone.cs | 3 +- Projectiles/Typeless/StandingFire.cs | 95 ++++++++++++++++++ 9 files changed, 153 insertions(+), 3 deletions(-) create mode 100644 Items/Accessories/VoidofCalamity.cs create mode 100644 Items/Accessories/VoidofCalamity.png create mode 100644 Projectiles/Typeless/StandingFire.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d46cef1e26..1d01e55f3a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1037,6 +1037,7 @@ namespace CalamityMod.CalPlayer public bool baroclaw = false; public bool IsFirstDashFrame = true; public int fallingBootVelCheckTimer = 0; + public bool voidOfCalamity = false; public bool apollyon = false; public bool eArtifact = false; public bool dArtifact = false; @@ -2465,6 +2466,7 @@ namespace CalamityMod.CalPlayer darkSunRing = false; crawCarapace = false; baroclaw = false; + voidOfCalamity = false; apollyon = false; eArtifact = false; dArtifact = false; diff --git a/Items/Accessories/Regenerator.cs b/Items/Accessories/Regenerator.cs index 20d8e38a39..dc1bc73dd3 100644 --- a/Items/Accessories/Regenerator.cs +++ b/Items/Accessories/Regenerator.cs @@ -25,7 +25,6 @@ namespace CalamityMod.Items.Accessories Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.accessory = true; - Item.expert = true; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/VoidofCalamity.cs b/Items/Accessories/VoidofCalamity.cs new file mode 100644 index 0000000000..7289ae6af2 --- /dev/null +++ b/Items/Accessories/VoidofCalamity.cs @@ -0,0 +1,42 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Projectiles.Typeless; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories +{ + [LegacyName("CalamityRing")] + public class VoidofCalamity : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Accessories"; + public override void SetDefaults() + { + Item.width = 20; + Item.height = 22; + Item.value = CalamityGlobalItem.RarityLimeBuyPrice; + Item.rare = ItemRarityID.Lime; + Item.accessory = true; + Item.expert = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.voidOfCalamity = true; + player.GetDamage() += 0.12f; + if (player.whoAmI == Main.myPlayer) + { + var source = player.GetSource_Accessory(Item); + if (player.immune) + { + if (player.miscCounter % 10 == 0) + { + int damage = (int)player.GetBestClassDamage().ApplyTo(30); + CalamityUtils.ProjectileRain(source, player.Center, 400f, 100f, 500f, 800f, 22f, ModContent.ProjectileType(), damage, 5f, player.whoAmI); + } + } + } + } + } +} diff --git a/Items/Accessories/VoidofCalamity.png b/Items/Accessories/VoidofCalamity.png new file mode 100644 index 0000000000000000000000000000000000000000..6054ac92732392d908d64c1a6335fc9515ada3aa GIT binary patch literal 613 zcmV-r0-F7aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0s2WqK~z{r)t0eK z0#O{t?-G^rG+G^`ATYroYG`S13YuyP`WIS*rXp(UUkKWo8f$9`8jPTzjKG3w2qQ`x zH1P7izOQ&c?{(Mq`ha}z`HrXe@%MXA+tT2wJWr>Qv$Y!E3gl*F1Zx%E-!X3EyZCCL;^B9wY!p&q>a6)XG=#xvE+@?f{wg$PuAzVe z`KuWp7sJC?I~k8-{EUE^N|Iu;qS%a+> z#*J7E`I$^2i`6R9JVUzLiAtCu&g*Ke-OVu9?q-aQG(;oadQ#wh*=3i_Ci1FMLCSeq zJF*68Oq!&re^EmOQyc&{q z_8aEa&~Yk-i}|mwz^;;ABWsGa@?sw$=SSC&64qW=7n-{d@yYol3$}k-T2iO6yl?kz z7fJS~H<9cjcAe}_8abSpK+ctSkmeiG!CH}qi2R>KLpp=27aK^4`CS&(RM_4k&5*3S zh-6pxVE9>fB20xLyMu5aI(gVb>WI7dF!F7WV@%95q*8l$HLN1?&EAS+j)c`p559HH zHKgOY{|Tijt`TT3;a+3DX?INb5V($EhAis`%R0=3=Wi~J00000NkvXXu0mjfIy@fX literal 0 HcmV?d00001 diff --git a/Items/TreasureBags/CalamitasCloneBag.cs b/Items/TreasureBags/CalamitasCloneBag.cs index 19173990a8..25b976118d 100644 --- a/Items/TreasureBags/CalamitasCloneBag.cs +++ b/Items/TreasureBags/CalamitasCloneBag.cs @@ -72,7 +72,8 @@ namespace CalamityMod.Items.TreasureBags // Equipment itemLoot.Add(ModContent.ItemType(), DropHelper.BagWeaponDropRateFraction); - itemLoot.Add(ModContent.ItemType()); + itemLoot.Add(ModContent.ItemType(), DropHelper.BagWeaponDropRateFraction); + itemLoot.Add(ModContent.ItemType()); itemLoot.AddRevBagAccessories(); // Vanity diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 042a8f6b4e..8a2cef2d0e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2086,6 +2086,15 @@ VitalJelly: { Tooltip: 12% increased movement and jump speed } +VoidofCalamity: { + DisplayName: Void of Calamity + Tooltip: + ''' + 12% increased damage + Brimstone fire rains down after getting hit + ''' +} + VoltaicJelly: { DisplayName: Voltaic Jelly Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 746145cb29..ee3498a7eb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -136,6 +136,7 @@ SlimeStream.DisplayName: Slime Stream SlurperBobber.DisplayName: Slurper Bobber SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye SpringStoolFX.DisplayName: Spring Stool +StandingFire.DisplayName: Flame StarStruckWaterBottle.DisplayName: Bottle StepStoolBonusFX.DisplayName: Step Stool Bonus StickyFeatherAero.DisplayName: Feather diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 2a6e8d8d98..7f96e910bc 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -1052,8 +1052,9 @@ namespace CalamityMod.NPCs.CalClone // Equipment // 16NOV2025: Ozzatron: item has been chosen as the "Expert gatekept" item for this Calamity boss - // normalOnly.Add(ModContent.ItemType()); + // normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); + normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); // Materials normalOnly.Add(ModContent.ItemType(), 1, 8, 10); diff --git a/Projectiles/Typeless/StandingFire.cs b/Projectiles/Typeless/StandingFire.cs new file mode 100644 index 0000000000..b692380ee6 --- /dev/null +++ b/Projectiles/Typeless/StandingFire.cs @@ -0,0 +1,95 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Typeless +{ + public class StandingFire : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Typeless"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 12; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 240; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 7; + } + + public override void AI() + { + if (Projectile.velocity.X != Projectile.velocity.X) + { + Projectile.velocity.X = Projectile.velocity.X * -0.1f; + } + 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; + 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 OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); + } +} From 6ee55f1eeaae38e8d98c60b15fd59477d904fc2c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Apr 2026 15:55:26 -0400 Subject: [PATCH 099/142] 1 - Fixed weapons spawning holdout when item is held using the wrong source and thus not receiving crit from prefixes 2 - Basher nerf --- CalPlayer/CalamityPlayerMiscEffects.cs | 8 ++++---- Items/Weapons/Melee/Basher.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8f40b12dd9..47b16f7abb 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -211,22 +211,22 @@ namespace CalamityMod.CalPlayer if (Player.HeldItem.type == ModContent.ItemType() && (Player.ownedProjectileCounts[ModContent.ProjectileType()] == 0)) { int damage = (int)Player.GetTotalDamage().ApplyTo(Player.HeldItem.damage); - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); + Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); } if (Player.HeldItem.type == ModContent.ItemType() && (Player.ownedProjectileCounts[ModContent.ProjectileType()] == 0)) { int damage = (int)Player.GetTotalDamage().ApplyTo(Player.HeldItem.damage); - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); + Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); } if (Player.HeldItem.type == ModContent.ItemType() && (Player.ownedProjectileCounts[ModContent.ProjectileType()] == 0)) { int damage = (int)Player.GetTotalDamage().ApplyTo(Player.HeldItem.damage); - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); + Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); } if (Player.HeldItem.type == ModContent.ItemType() && (Player.ownedProjectileCounts[ModContent.ProjectileType()] == 0)) { int damage = (int)Player.GetTotalDamage().ApplyTo(Player.HeldItem.damage); - Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); + Projectile.NewProjectile(Player.GetProjectileSource_Item_WithPotentialAmmo(Player.HeldItem, 0), Player.Center, Player.Center.DirectionTo(Player.Calamity().mouseWorld), ModContent.ProjectileType(), damage, Player.HeldItem.knockBack, Player.whoAmI); } } diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 99890c2b25..17e7676ecb 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 56; Item.height = 60; - Item.damage = 85; + Item.damage = 77; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Swing; From a99a7e93e398c3dbf89176d066f3a3ebeb7ff545 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 2 Apr 2026 16:28:03 -0400 Subject: [PATCH 100/142] Rebalances of chainsaw and drill damages Also buffed Marnite Obliterator AP and gave Wulfrum Drill AP --- Items/CalamityGlobalItemTweaks.cs | 42 +++++++++---------- Items/Tools/MarniteObliterator.cs | 2 +- Items/Tools/WulfrumDrill.cs | 4 ++ .../en-US/Mods.CalamityMod.Items.Tools.hjson | 2 +- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index fe2cebd7d8..2530c95ded 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -298,8 +298,8 @@ 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(+0)) }, // VANILLA: 20 DMG, -1 TILE + { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(58), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 33 DMG, 100 AXE, -1 TILE + { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, DamageExact(33), 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 @@ -308,21 +308,21 @@ namespace CalamityMod.Items { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, DamageExact(100), 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), 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.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, DamageExact(88), UseTimeExact(3), AxePower(120), TileBoostExact(+1)) }, // VANILLA: 50 DMG, 4 SPD, 115 AXE, 0 TILE + { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, DamageExact(45), TileBoostExact(+1)) }, // VANILLA: 35 DMG, 0 TILE { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, // VANILLA: 115 AXE, +1 TILE - { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, DamageExact(53), UseTimeExact(5), TileBoostExact(+1)) }, // VANILLA: 45 DMG, 4 SPD, 0 TILE + { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, DamageExact(58), 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 - { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, DamageExact(21), UseTimeExact(5), PickPower(130)) }, // VANILLA: 10 DMG, 7 SPD, 110 PICK + { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, DamageExact(42), UseTimeExact(4)) }, // VANILLA: 23 DMG, 7 SPD + { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, DamageExact(13), 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(+0)) }, // VANILLA: 35 DMG, -1 TILE + { ItemID.Drax, Do(TrueMeleeNoSpeed, DamageExact(62), 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 @@ -332,7 +332,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)) }, // VANILLA: 35 DMG, 6 SPD, 230 PICK + { ItemID.LaserDrill, Do(DamageExact(50), 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 @@ -344,18 +344,18 @@ namespace CalamityMod.Items { 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.MythrilChainsaw, Do(TrueMeleeNoSpeed, DamageExact(52), UseTimeExact(4), AxePower(80)) }, // VANILLA: 29 DMG, 6 SPD, 85 AXE + { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, DamageExact(20), 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(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, DamageExact(70), 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 + { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(54), UseTimeExact(4), AxePower(80)) }, // VANILLA: 31 DMG, 5 SPD, 90 AXE + { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, DamageExact(22), 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.PalladiumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(44), UseTimeExact(4), AxePower(70)) }, // VANILLA: 26 DMG, 7 SPD, 75 AXE + { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, DamageExact(15), 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 @@ -372,22 +372,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(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, DamageExact(70), 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(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, DamageExact(70), 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(+0)) }, // VANILLA: 27 DMG, 190 PICK, -1 TILE + { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, DamageExact(60), AxePower(90), TileBoostExact(+0)) }, // VANILLA: 34 DMG, 105 AXE, -1 TILE + { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, DamageExact(35), 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(+3)) }, // VANILLA: 50 DMG, 2 SPD, +2 TILE + { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, DamageExact(70), 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/Items/Tools/MarniteObliterator.cs b/Items/Tools/MarniteObliterator.cs index 636fbc944a..4e8ffccdb8 100644 --- a/Items/Tools/MarniteObliterator.cs +++ b/Items/Tools/MarniteObliterator.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Tools public new string LocalizationCategory => "Items.Tools"; public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/MarniteObliteratorUse") { PitchVariance = 0.3f }; - public static int ArmorPenetration = 5; + public static int ArmorPenetration = 15; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration); public override void SetDefaults() diff --git a/Items/Tools/WulfrumDrill.cs b/Items/Tools/WulfrumDrill.cs index 99ac145eee..a7e47e03ea 100644 --- a/Items/Tools/WulfrumDrill.cs +++ b/Items/Tools/WulfrumDrill.cs @@ -2,6 +2,7 @@ using CalamityMod.Projectiles.Typeless; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Tools @@ -10,12 +11,15 @@ namespace CalamityMod.Items.Tools public class WulfrumDrill : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Tools"; + public static int ArmorPenetration = 15; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration); public override void SetDefaults() { Item.width = 46; Item.height = 38; Item.damage = 5; Item.DamageType = DamageClass.Melee; + Item.ArmorPenetration = ArmorPenetration; Item.pick = 35; Item.tileBoost += 1; Item.useAnimation = 16; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 0719eba5fb..0f3e79e5de 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -390,7 +390,7 @@ WulfrumDiggingTurtle: { WulfrumDrill: { DisplayName: Wulfrum Drill - Tooltip: "" + Tooltip: {$Common.ArmorPenetration} } WulfrumScaffoldKit: { From 60489f54c299a0dc94b62256c1a78fd7313d60e6 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 3 Apr 2026 15:28:53 -0500 Subject: [PATCH 101/142] reddid scal thresholds --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 76 ++++++++++++++--------- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index d27b72b1ba..a5fcdec89a 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -87,6 +87,25 @@ namespace CalamityMod.NPCs.SupremeCalamitas public const int ThirdBulletHellEndValue = BulletHellDuration * 3; public const int FourthBulletHellEndValue = BulletHellDuration * 4; public const int FifthBulletHellEndValue = BulletHellDuration * 5; + + public bool FinishedBH1 => bulletHellCounter2 >= BulletHellDuration; + public bool FinishedBH2 => bulletHellCounter2 >= SecondBulletHellEndValue; + public bool FinishedBH3 => bulletHellCounter2 >= ThirdBulletHellEndValue; + public bool FinishedBH4 => bulletHellCounter2 >= FourthBulletHellEndValue; + public bool FinishedBH5 => bulletHellCounter2 >= FifthBulletHellEndValue; + + public float lifeRatio = 1; + + public bool IsAtHp_BH2 => lifeRatio <= 0.75f; + public bool IsAtHp_BH3 => lifeRatio <= 0.5f; + public bool IsAtHp_BH4 => lifeRatio <= 0.3f; + public bool IsAtHp_BH5 => lifeRatio <= 0.1f; + public bool IsAtHp_Acceptance => NPC.life < 2; + + public bool IsAtBrothers => IsAtHp_BH3 && FinishedBH3; + public bool IsAtSeekers => IsAtHp_BH4 && FinishedBH4; + public bool IsAtSep2 => IsAtHp_BH5 && FinishedBH5; + public const int PermafrostAbsoluteZeroDamage = 3725; private const float PermafrostPhotonRipperDashVelocity = 6f; private const float PermafrostPhotonRipperMinDistanceFromTarget = 64f; @@ -478,7 +497,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas bool zenithAI = Main.zenithWorld && !permafrost; // Percent life remaining - float lifeRatio = NPC.life / (float)NPC.lifeMax; + lifeRatio = NPC.life / (float)NPC.lifeMax; int bulletHellblast = zenithAI ? ModContent.ProjectileType() : ModContent.ProjectileType(); int barrage = ModContent.ProjectileType(); @@ -554,7 +573,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.ai[0] == 1f || NPC.ai[0] == 2f; // Make the shield and forcefield fade away in SCal's acceptance phase. - if (lifeRatio <= 0.01f && hasDoneDeathAnim) + if (IsAtHp_Acceptance && hasDoneDeathAnim) { shieldOpacity = MathHelper.Lerp(shieldOpacity, 0f, 0.08f); forcefieldScale = MathHelper.Lerp(forcefieldScale, 0f, 0.08f); @@ -665,9 +684,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas } if (cataclysmAlive || catastropheAlive) baseSize *= new Vector4(0.85f, 1.33f, 0.85f, 1.33f); - if (lifeRatio <= 0.01f) + if (IsAtHp_Acceptance) baseSize = (Main.zenithWorld && !permafrost) ? new Vector4(22f, 22f, 22f, 22f) : new Vector4(400f, 500f, 73f, 500f); - else if (Main.zenithWorld && lifeRatio <= 0.08f && !wormAlive && !permafrost) // gfb + else if (Main.zenithWorld && IsAtHp_BH5 && !wormAlive && !permafrost && FinishedBH5) // gfb, only after Bh5 and sep both end baseSize *= MathHelper.Lerp(0.22f, 1f, lifeRatio * 12.5f); // Scale down the lower health scal has return baseSize; } @@ -686,12 +705,12 @@ namespace CalamityMod.NPCs.SupremeCalamitas c = AcceptanceColor; oldColor = EpiphanyColor; } - else if (lifeRatio <= 0.3f) + else if (IsAtHp_BH4) { c = EpiphanyColor; oldColor = LamentColor; } - else if (lifeRatio <= 0.5f) + else if (IsAtHp_BH3) c = LamentColor; return c; } @@ -782,7 +801,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas }; ArenaWallSystem.ActiveBoxes.Add(ArenaBox); } - ArenaBox.NewDimensions = Vector4.Lerp(ArenaBox.boxDimensions, GetArenaSize(), lifeRatio <= 0.01f ? 0.02f : startFourthAttack ? 0.05f : 0.1f); + ArenaBox.NewDimensions = Vector4.Lerp(ArenaBox.boxDimensions, GetArenaSize(), IsAtHp_Acceptance ? 0.02f : startFourthAttack ? 0.05f : 0.1f); var color = GetArenaColor(out Color oldColor); if (colorCompletion > 1.1f && color != ArenaBox.borderColor) colorCompletion = 0; @@ -939,7 +958,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region FirstAttack - if (bulletHellCounter2 < BulletHellDuration) + if (!FinishedBH1) { despawnProj = true; bulletHellCounter2++; @@ -1020,7 +1039,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region SecondAttack - if (bulletHellCounter2 < SecondBulletHellEndValue && startSecondAttack) // Bullet hell lasts 1800 + if (!FinishedBH2 && startSecondAttack) // Bullet hell lasts 1800 { despawnProj = true; bulletHellCounter2++; @@ -1120,7 +1139,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } - if (!startSecondAttack && lifeRatio <= 0.75f) + if (!startSecondAttack && IsAtHp_BH2) { // Bouncy Boulders if (permafrost) @@ -1151,7 +1170,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region ThirdAttack - if (bulletHellCounter2 < ThirdBulletHellEndValue && startThirdAttack) + if (!FinishedBH3 && startThirdAttack) { despawnProj = true; bulletHellCounter2++; @@ -1245,7 +1264,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } - if (!startThirdAttack && lifeRatio <= 0.5f) + if (!startThirdAttack && IsAtHp_BH3) { // Bouncy Boulders if (permafrost) @@ -1276,7 +1295,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region FourthAttack - if (lifeRatio <= 0.3f && musicSyncCounter > -120) + if (IsAtHp_BH4 && musicSyncCounter > -120) musicSyncCounter--; if (musicSyncCounter <= 126 && musicSyncCounter > 0) { @@ -1305,7 +1324,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas forcefieldPureVisualScale = 1.5f; postMusicHit = true; } - if (postMusicHit && lifeRatio > 0.01f && !canDespawn && NPC.ai[1] != 2f) + if (postMusicHit && !IsAtHp_Acceptance && !canDespawn && NPC.ai[1] != 2f) { forcefieldPureVisualScale = MathHelper.Lerp(forcefieldPureVisualScale, 1f, 0.095f); Vector2 velOffset = new Vector2(56, 56).RotatedByRandom(100) * forcefieldPureVisualScale; @@ -1327,7 +1346,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } - if (bulletHellCounter2 < FourthBulletHellEndValue && startFourthAttack) + if (!FinishedBH4 && startFourthAttack) { despawnProj = true; bulletHellCounter2++; @@ -1451,7 +1470,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } - if (!startFourthAttack && lifeRatio <= 0.3f) + if (!startFourthAttack && IsAtHp_BH4) { // Bouncy Boulders if (permafrost) @@ -1482,7 +1501,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region FifthAttack - if (bulletHellCounter2 < FifthBulletHellEndValue && startFifthAttack) + if (!FinishedBH5 && startFifthAttack) { despawnProj = true; bulletHellCounter2++; @@ -1598,7 +1617,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } - if (!startFifthAttack && lifeRatio <= 0.1f) + if (!startFifthAttack && IsAtHp_BH5) { // Bouncy Boulders if (permafrost) @@ -1891,7 +1910,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas return; } - if (!gettingTired5 && lifeRatio <= 0.01f) + if (!gettingTired5 && IsAtHp_Acceptance) { for (int x = 0; x < Main.maxProjectiles; x++) { @@ -1978,7 +1997,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas gettingTired2 = true; return; } - else if (!gettingTired && lifeRatio <= 0.08f) + else if (!gettingTired && IsAtSep2) { attackCastDelay = sepulcherSpawnCastTime; for (int i = 0; i < 40; i++) @@ -2033,7 +2052,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } #endregion #region TransformSeekerandBrotherTriggers - if (!halfLife && lifeRatio <= 0.45f && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) == false) + if (!halfLife && IsAtBrothers && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) == false) { if (!BossRushEvent.BossRushActive) { @@ -2049,7 +2068,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas halfLife = true; } - if (lifeRatio <= 0.2f) + if (IsAtSeekers) { if (!secondStage) { @@ -2107,7 +2126,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (attackPause > 0) attackPause--; - if (lifeRatio < 0.45f && !enteredBrothersPhase) + if (IsAtBrothers && !enteredBrothersPhase) { attackPause = 5; if (preventionPause == 0) @@ -2652,8 +2671,8 @@ namespace CalamityMod.NPCs.SupremeCalamitas } } - // Previously the 40% health threshold transition - if (lifeRatio <= 0.45f && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) == false) + // Phase 2 + if (IsAtBrothers && hasSummonedBrothers && (permafrost ? NPC.AnyNPCs(ModContent.NPCType()) : (NPC.AnyNPCs(ModContent.NPCType()) || NPC.AnyNPCs(ModContent.NPCType()))) == false) { NPC.ai[0] = 1f; NPC.ai[1] = 0f; @@ -3492,8 +3511,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas public void HandleMusicVariables() { - float lifeRatio = NPC.life / (float)NPC.lifeMax; - CalamityGlobalNPC.SCalGrief = -1; CalamityGlobalNPC.SCalLament = -1; CalamityGlobalNPC.SCalEpiphany = -1; @@ -3501,9 +3518,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas if (startFifthAttack && gettingTired5 && (giveUpCounter < 1160 || hasDoneDeathAnim)) CalamityGlobalNPC.SCalAcceptance = NPC.whoAmI; - else if (lifeRatio <= 0.3f) + else if (IsAtHp_BH4) CalamityGlobalNPC.SCalEpiphany = NPC.whoAmI; - else if (lifeRatio <= 0.5f) + else if (IsAtHp_BH3) CalamityGlobalNPC.SCalLament = NPC.whoAmI; else CalamityGlobalNPC.SCalGrief = NPC.whoAmI; @@ -3757,7 +3774,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas //if (NPC.ai[0] >= 3f) //intensity *= 0.6f; - float lifeRatio = NPC.life / (float)NPC.lifeMax; if (lifeRatio < 0.05f) forcefieldOpacity = 0.75f; From f7ab902fcbe2ab6be0140c2edc00faaa7544ffa2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Apr 2026 20:50:03 -0400 Subject: [PATCH 102/142] EoL no longer randomly skips attacks in her attack pattern Also adjusted her attack pattern to be the same as vanilla because why was it not lmao --- .../Bosses/EmpressofLightAI.cs | 44 +++++-------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index 93f63dd357..b2f1cadca3 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -243,30 +243,22 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses attackType = 2; if (attackPatternLength % attackIncrement == phase1Attack2) - attackType = 6; - - if (attackPatternLength % attackIncrement == phase1Attack3) attackType = 8; + if (attackPatternLength % attackIncrement == phase1Attack3) + attackType = 6; + if (attackPatternLength % attackIncrement == phase1Attack4) - { - attackType = 4; - - // Adjust the upcoming Ethereal Lance attack depending on what random variable is chosen here. - calamityGlobalNPC.newAI[3] = Main.rand.Next(2); - - // Sync the Calamity AI variables. - NPC.SyncExtraAI(); - } + attackType = 8; if (attackPatternLength % attackIncrement == phase1Attack5) attackType = 5; if (attackPatternLength % attackIncrement == phase1Attack6) - attackType = 8; + attackType = 2; if (attackPatternLength % attackIncrement == phase1Attack7) - attackType = 2; + attackType = 8; if (attackPatternLength % attackIncrement == phase1Attack8) { @@ -319,28 +311,15 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (attackPatternLength % attackIncrement == phase2Attack3) attackType = 8; + if (attackPatternLength % attackIncrement == phase2Attack4) + attackType = 11; + if (attackPatternLength % attackIncrement == phase2Attack5) attackType = 5; if (attackPatternLength % attackIncrement == phase2Attack6) attackType = 2; - if (attackPatternLength % attackIncrement == phase2Attack7) - { - if (phase3) - { - attackType = 7; - - // Adjust the upcoming Ethereal Lance attack depending on what random variable is chosen here. - calamityGlobalNPC.newAI[2] = Main.rand.Next(2); - - // Sync the Calamity AI variables. - NPC.SyncExtraAI(); - } - else - attackType = 6; - } - if (attackPatternLength % attackIncrement == phase2Attack7) { if (phase3) @@ -371,9 +350,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (attackPatternLength % attackIncrement == phase2Attack9) attackType = 8; - if (attackPatternLength % attackIncrement == phase2Attack4) - attackType = 11; - if (attackPatternLength % attackIncrement == phase2Attack10) attackType = 12; } @@ -403,7 +379,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.ai[0] = attackType; NPC.ai[1] = 0f; - NPC.ai[2] += Main.rand.Next(2) + 1f; + NPC.ai[2] += 1f; NPC.netUpdate = true; break; From c88c5608c359730df71ff249265d96b8b8196e53 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Apr 2026 00:53:03 -0400 Subject: [PATCH 103/142] Buffed Planebreaker's Pouch crit chance to match Deadshot Brooch --- Items/Accessories/PlanebreakersPouch.cs | 2 +- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/PlanebreakersPouch.cs b/Items/Accessories/PlanebreakersPouch.cs index 11de8740a1..30445b7dcc 100644 --- a/Items/Accessories/PlanebreakersPouch.cs +++ b/Items/Accessories/PlanebreakersPouch.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.GetDamage() += 0.15f; - player.GetCritChance() += 5; + player.GetCritChance() += 7; player.magicQuiver = true; CalamityPlayer modPlayer = player.Calamity(); modPlayer.deadshotBrooch = true; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b2ab571ea3..55a075fb84 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1320,7 +1320,7 @@ PlanebreakersPouch: { DisplayName: Planebreaker's Pouch Tooltip: ''' - 15% increased ranged damage, 5% increased ranged critical strike chance and 20% reduced ammo usage + 15% increased ranged damage, 7% increased ranged critical strike chance and 20% reduced ammo usage Grants a 20% chance to not consume arrows Pressing [KEY] will automatically swap the ammos in your ammo slots The ammo type swapped depends on the ammo of the weapon you are holding From 0c57f7284e37683ffb330647b9ac74eca95be9f2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Apr 2026 13:41:49 -0400 Subject: [PATCH 104/142] Fixed natural Draconic Swarmer localization --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index da3390cf62..ac7691f508 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -190,7 +190,7 @@ Stormlion.DisplayName: Stormlion StormlionSentry.DisplayName: Stormlion Sentry Sunskater.DisplayName: Sunskater SuperDummyNPC.DisplayName: Super Dummy -WildBumblefuck.DisplayName: Draconic Swarmer +WildBumblebirb.DisplayName: Draconic Swarmer WulfrumAmplifier.DisplayName: Wulfrum Amplifier WulfrumDrone.DisplayName: Wulfrum Drone WulfrumGyrator.DisplayName: Wulfrum Gyrator @@ -561,7 +561,6 @@ SeaKing: { } } -WildBumblebirb.DisplayName: Wild Bumblebirb DraconicSwarmer.DisplayName: Draconic Swarmer Dragonfolly.DisplayName: Dragonfolly Shoreskipper.DisplayName: Shoreskipper From 22137fd14f97f3d99a7ef0852cae8f8675e5297d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 5 Apr 2026 00:47:51 -0400 Subject: [PATCH 105/142] Fixed Influx Waver beams not inflicting Electrified --- CalPlayer/CalamityPlayerOnHit.cs | 1 - Projectiles/CalamityGlobalProjectile.cs | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f6ea8ea8b2..8a6afe2612 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -276,7 +276,6 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.OnFire3, 180); break; - case ProjectileID.InfluxWaver: case ProjectileID.UFOLaser: case ProjectileID.Electrosphere: target.AddBuff(BuffID.Electrified, 180); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5aea36abe3..3914fb7714 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4680,6 +4680,10 @@ namespace CalamityMod.Projectiles modifiers.SourceDamage /= 1.5f; } + // Debuff infliction must be placed here as opposed to a more common hook like OnHitNPCWithProj because its on-hit logic breaks the loop before it reaches that hook + if (projectile.type == ProjectileID.InfluxWaver) + target.AddBuff(BuffID.Electrified, 180); + // Create sparks on hit to hammer in the defense shredding. if (deepcoreBullet) { From 7ef5bd1d494edb2a110d076e3bc7b3e1a4622940 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 5 Apr 2026 14:38:34 -0400 Subject: [PATCH 106/142] Removed several debuffs added to vanilla weapons A few rebalances Piranha Gun and Barracuda Gun now have dynamic stat updating --- CalPlayer/CalamityPlayerOnHit.cs | 28 +++-------------------- Items/CalamityGlobalItemTweaks.cs | 6 ++--- Projectiles/CalamityGlobalProjectile.cs | 15 ++++-------- Projectiles/Ranged/MechanicalBarracuda.cs | 1 + 4 files changed, 11 insertions(+), 39 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 8a6afe2612..506a854fc1 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -109,15 +109,6 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffID.Electrified, 300); break; - case ItemID.BeeKeeper: - case ItemID.BladeofGrass: - target.AddBuff(BuffID.Poisoned, 240); - break; - - case ItemID.FieryGreatsword: - target.AddBuff(BuffID.OnFire3, 90); - break; - case ItemID.IceSickle: case ItemID.Frostbrand: target.AddBuff(BuffID.Frostburn2, 300); @@ -126,11 +117,6 @@ namespace CalamityMod.CalPlayer case ItemID.IceBlade: target.AddBuff(BuffID.Frostburn, 120); break; - - case (>= ItemID.BluePhaseblade and <= ItemID.YellowPhaseblade) or ItemID.OrangePhaseblade: - case (>= ItemID.BluePhasesaber and <= ItemID.YellowPhasesaber) or ItemID.OrangePhasesaber: - // TODO: find an EPIC lightsaber sound - break; } if (flameWakerBoots) @@ -272,6 +258,7 @@ namespace CalamityMod.CalPlayer switch (proj.type) { + // Remove this in 1.4.5 port case ProjectileID.ObsidianSwordfish: target.AddBuff(BuffID.OnFire3, 180); break; @@ -287,11 +274,13 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 90); break; + // Replace with Broken Armor in 1.4.5 port case ProjectileID.GolemFist: target.AddBuff(BuffType(), 180); break; case ProjectileID.ButchersChainsaw: + // Remove this in 1.4.5 port case ProjectileID.MechanicalPiranha: target.AddBuff(BuffType(), 180); break; @@ -300,21 +289,10 @@ namespace CalamityMod.CalPlayer target.AddBuff(BuffType(), 180); break; - case ProjectileID.Cascade: case ProjectileID.FlamingMace: target.AddBuff(BuffID.OnFire, 60); break; - case ProjectileID.Bee: - case ProjectileID.GiantBee: - case ProjectileID.BladeOfGrass: - target.AddBuff(BuffID.Poisoned, 120); - break; - - case ProjectileID.Wasp: - target.AddBuff(BuffID.Venom, 60); - break; - case ProjectileID.NorthPoleWeapon: target.AddBuff(BuffID.Frostburn, 300); break; diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d51e357e31..ee808d4840 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -54,8 +54,8 @@ namespace CalamityMod.Items { 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.Beenade, Do(UseTimeExact(22), ShootSpeedExact(10f)) }, // VANILLA: 15 UT, 6 VEL + { ItemID.BeesKnees, Do(DamageExact(21), UseExact(35)) }, // 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 @@ -271,7 +271,7 @@ namespace CalamityMod.Items { 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.WaspGun, Do(DamageExact(41)) }, // VANILLA: 31 DMG { ItemID.WaterBolt, Do(DamageExact(23)) }, // VANILLA: 19 DMG { ItemID.WhitePhaseblade, phaseblade }, { ItemID.WhitePhasesaber, phasesaber }, diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 3914fb7714..4b2d2048e8 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -420,6 +420,10 @@ namespace CalamityMod.Projectiles if (projectile.type == ProjectileID.ZapinatorLaser) projectile.originalDamage = projectile.damage; + // Make Piranha Gun have dynamic stat tweaking + if (projectile.type == ProjectileID.MechanicalPiranha) + projectile.ContinuouslyUpdateDamageStats = true; + // Apply Calamity Global Projectile Tweaks. SetDefaults_ApplyTweaks(projectile); } @@ -3783,17 +3787,6 @@ namespace CalamityMod.Projectiles projectile.damage += 15; } - if (projectile.type == ProjectileID.GiantBee || projectile.type == ProjectileID.Bee) - { - if (projectile.timeLeft > 570) //all of these have a time left of 600 or 660 - { - if (player.HeldItem.type == ItemID.BeesKnees) - projectile.DamageType = DamageClass.Ranged; - } - } - else if (projectile.type == ProjectileID.SoulDrain) - projectile.DamageType = DamageClass.Magic; - frameOneHacksExecuted = true; } diff --git a/Projectiles/Ranged/MechanicalBarracuda.cs b/Projectiles/Ranged/MechanicalBarracuda.cs index ca668b7d03..f4cdb22e3e 100644 --- a/Projectiles/Ranged/MechanicalBarracuda.cs +++ b/Projectiles/Ranged/MechanicalBarracuda.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.height = 22; Projectile.friendly = true; Projectile.aiStyle = ProjAIStyleID.MechanicalPiranha; + Projectile.ContinuouslyUpdateDamageStats = true; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 6; From 52445e5ea8d004bcd50d1b113b7146c4e97c9bf6 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 23:17:50 -0500 Subject: [PATCH 107/142] iv drip tooltip effect chat tag --- ChatTags/CustomColorEffectHandler.cs | 92 +++++++++++++++++++ Items/CalamityGlobalItemTooltip.cs | 29 ------ .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- 3 files changed, 93 insertions(+), 30 deletions(-) create mode 100644 ChatTags/CustomColorEffectHandler.cs diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs new file mode 100644 index 0000000000..67d630ad9e --- /dev/null +++ b/ChatTags/CustomColorEffectHandler.cs @@ -0,0 +1,92 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.UI.Chat; + +namespace CalamityMod.ChatTags +{ + // This is a tag handler for storing custom color effects for text all within the "ceffect" tag; the parameter determining the actual effect in use. + // i.e [ceffect/darksun:Hello World] would apply darksun effect to "Hello World". + public sealed class CustomColorEffectHandler : AbstractTagHandler + { + protected override string[] TagNames { get; } = ["ceffect"]; + public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) + { + if (options.Equals("darksun", StringComparison.OrdinalIgnoreCase)) + return new DarksunTextSnippet(text); + if (options.Equals("drunk", StringComparison.OrdinalIgnoreCase)) + return new DrunkTextSnippet(text); + return new TextSnippet(text); + } + } + + public sealed class DarksunTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var font = FontAssets.MouseText.Value; + var BorderColor = new Color(255, 191, 73); + var HazeColor = new Color(238, 226, 153); + + for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.05f) + { + ChatManager.DrawColorCodedString(spriteBatch, font, text, position + new Vector2(2, 0).RotatedBy(f + Main.GlobalTimeWrappedHourly), Color.Lerp(BorderColor, HazeColor, (Main.mouseTextColor - 190) / 65f * 0.1f), 0f, Vector2.Zero, new Vector2(scale)); + } + ChatManager.DrawColorCodedString(spriteBatch, font, text, position, Color.Black, 0f, Vector2.Zero, new Vector2(scale)); + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } + + public sealed class DrunkTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); + + for (int i = 0; i < 3; i++) // Draw 3 lines of differing opacity, color, and displacement. + { + float timer = (float)Math.Sin(Main.GlobalTimeWrappedHourly + 1f) / 2f; + + float angle = (Main.GlobalTimeWrappedHourly * 2f) + (i * MathHelper.TwoPi / 3f); + float radius = timer * (3f + i * 6f); + Vector2 offset = new Vector2((float)Math.Cos(angle) * 1.7f, (float)Math.Sin(angle) * 1f) * radius; // Offset in an elliptical pattern + Vector2 pos = position + offset; + + color = CalamityUtils.MulticolorLerp(Math.Abs(timer + (i * 0.2f)) % 1f, Color.LightBlue, Color.LightGreen, (i == 3) ? Color.Blue : (i == 2) ? Color.Red : Color.White); + float opacity = 1f - (i * 0.2f); + float rotation = +(timer * (Main.GlobalTimeWrappedHourly * 0.00001f)); // This precision is intended + + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, FontAssets.MouseText.Value, text, pos, color * opacity, rotation, Vector2.Zero, new Vector2(scale)); + } + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } +} diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 314a51650a..6b68971444 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1655,35 +1655,6 @@ namespace CalamityMod.Items return false; } - // IV Drip tooltip FX - if (line.Mod == "Terraria" && item.type == ModContent.ItemType() && line.Name == "Tooltip4") - { - Vector2 basePosition = new Vector2(line.X, line.Y); - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); - - for (int i = 0; i < 3; i++) // Draw 3 lines of differing opacity, color, and displacement. - { - float timer = (float)Math.Sin(Main.GlobalTimeWrappedHourly + 1f) / 2f; - - float angle = (Main.GlobalTimeWrappedHourly * 2f) + (i * MathHelper.TwoPi / 3f); - float radius = timer * (3f + i * 6f); - Vector2 offset = new Vector2((float)Math.Cos(angle) * 1.7f, (float)Math.Sin(angle) * 1f) * radius; // Offset in an elliptical pattern - Vector2 pos = basePosition + offset; - - Color color = MulticolorLerp(Math.Abs(timer + (i * 0.2f)) % 1f, Color.LightBlue, Color.LightGreen, (i == 3) ? Color.Blue : (i == 2) ? Color.Red : Color.White); - float opacity = 1f - (i * 0.2f); - float rotation = line.Rotation + (timer * (Main.GlobalTimeWrappedHourly * 0.00001f)); // This precision is intended - - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, pos, color * opacity, rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); - } - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); - - return false; - } if (line.Mod == "Terraria" && item.type == ModContent.ItemType() && (line.Name == "Tooltip1" || line.Name == "Tooltip2" || line.Name == "Tooltip4" || line.Name == "Tooltip5" || line.Name == "Tooltip7")) { Color rarityColor = Color.Black; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b2ab571ea3..74e1213f2a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1032,7 +1032,7 @@ IVDripOnTheRocks: { Multiplies all weapon damage by {1}x Counts as an alcohol stack toward Alcohol Poisoning {$Common.AlcoholWarning} - '(drunken mumbling)' + [ceffect/drunk:'(drunken mumbling)'] ''' } From 74c82a78967879d68d6676f5b5663c06ce2ad399 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 5 Apr 2026 01:45:00 -0500 Subject: [PATCH 108/142] DoG attack chat tag --- ChatTags/CustomColorEffectHandler.cs | 54 +++++++++++++++++++ .../Mods.CalamityMod.Items.SummonItems.hjson | 2 +- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 2 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 6 +-- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 6 +-- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 2 +- .../Mods.CalamityMod.Projectiles.Boss.hjson | 6 +-- .../en-US/Mods.CalamityMod.Status.Death.hjson | 12 ++--- 9 files changed, 73 insertions(+), 19 deletions(-) diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs index 67d630ad9e..6bed419cee 100644 --- a/ChatTags/CustomColorEffectHandler.cs +++ b/ChatTags/CustomColorEffectHandler.cs @@ -1,4 +1,7 @@ using System; +using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Graphics; @@ -15,10 +18,14 @@ namespace CalamityMod.ChatTags protected override string[] TagNames { get; } = ["ceffect"]; public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) { + if (!CalamityClientConfig.Instance.TextEffects) + return new TextSnippet(text); if (options.Equals("darksun", StringComparison.OrdinalIgnoreCase)) return new DarksunTextSnippet(text); if (options.Equals("drunk", StringComparison.OrdinalIgnoreCase)) return new DrunkTextSnippet(text); + if (options.Equals("dog", StringComparison.OrdinalIgnoreCase)) + return new DoGTextSnippet(text); return new TextSnippet(text); } } @@ -89,4 +96,51 @@ namespace CalamityMod.ChatTags return size * Scale; } } + + public sealed class DoGTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var pos = position; + using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); + string txt = ""; + using (spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + foreach (var item in text) + { + pos = position; + pos.X += FontAssets.MouseText.Value.MeasureString(txt).X; + float sin = MathHelper.SmoothStep(0, 1, (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f); + var c = Color.Lerp(Color.Cyan, Color.Fuchsia, sin); + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), pos + new Vector2(0, -2 + sin * 4), c, 0, Vector2.Zero, new Vector2(scale)); + txt += item; + } + spriteBatch.End(); + } + + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + foreach (var item in ChatManager.ShadowDirections) + { + spriteBatch.Draw(lease.Target, Vector2.Zero + item * 2, null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.End(); + } + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson index 52b51c52c4..8423bc9f44 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson @@ -71,7 +71,7 @@ CosmicWorm: { ''' Summons the Devourer of Gods {$Common.NotConsumable} - 'The Nameless Serpent has set out for you.' + [ceffect/dog:'The Nameless Serpent has set out for you.'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 895e42de07..ce22045fcb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -437,7 +437,7 @@ Heresy: { HyperdeathRiftScepter: { DisplayName: Hyperdeath Rift Scepter - Tooltip: Tears space in two with [c/ff00ff:Hyperdeath Rift Ripper] + Tooltip: Tears space in two with [ceffect/dog:Hyperdeath Rift Ripper] } HyphaeRod: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index ec4d7d4bc6..1d68029706 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -849,8 +849,8 @@ MawOfInfinity: { ''' Swings a blade forged from the Devourer's maw in a 3-swing combo The first swing only hits close range - The second swing additionally launches [c/ff00ff:Faith Incinerator] - The third swing unleashes [c/ff00ff:Divinity Devourer] at your cursor, exploding for massive damage + The second swing additionally launches [ceffect/dog:Faith Incinerator] + The third swing unleashes [ceffect/dog:Divinity Devourer] at your cursor, exploding for massive damage ''' } @@ -1380,7 +1380,7 @@ TheObliterator: { {$Common.YoyoStatsInfinite} [GFB] ''' - TooltipNormal: Occasionally performs a miniature [c/ff00ff:Dimensional Drive] at nearby foes + TooltipNormal: Occasionally performs a miniature [ceffect/dog:Dimensional Drive] at nearby foes TooltipGFB: just a slight bit of dust spam on this weapon im afraid } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 3afeaa551b..7a6aa94689 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1406,9 +1406,9 @@ ThreadOfEradication: { DisplayName: Thread of Eradication Tooltip: ''' - Charges up [c/ff00ff:God's Bane Doombeam] - Channelling the weapon causes it to charge up [c/ff00ff:Hyperdeath Rift] instead - While charging [c/ff00ff:Hyperdeath Rift], the bow's turning speed is slowed down + Charges up [ceffect/dog:God's Bane Doombeam] + Channelling the weapon causes it to charge up [ceffect/dog:Hyperdeath Rift] instead + While charging [ceffect/dog:Hyperdeath Rift], the bow's turning speed is slowed down ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 79545b4952..689983fb5d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -308,7 +308,7 @@ DimensionTearingDisk: { Tooltip: ''' Throws a disk that tears space in the direction of the nearest enemy - Stealth strikes stick to enemies and unleash [c/ff00ff:God's Bane Doombeam Array] + Stealth strikes stick to enemies and unleash [ceffect/dog:God's Bane Doombeam Array] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index b4cf866c6f..27a0b40339 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -901,7 +901,7 @@ VoidEaterMarionette: { ''' Contains the power to control a miniature Devourer Repeated summons increase the length and power of the Devourer - The Devourer attacks with [c/ff00ff:Divinity Devourer], [c/ff00ff:Faith Incinerator] and [c/ff00ff:Ultracosmic Maelstrom] + The Devourer attacks with [ceffect/dog:Divinity Devourer], [ceffect/dog:Faith Incinerator] and [ceffect/dog:Ultracosmic Maelstrom] Can play fetch with dropped items Shift- this item in your inventory when the Devourer has been spawned to prioritize fetching ''' diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index c394d0ba93..80ab9a0ac6 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -63,9 +63,9 @@ DoGBeam.DisplayName: Portal Laser DoGBeamPortal.DisplayName: Beam Portal DoGDeath.DisplayName: Death Beam DoGDeathBoom.DisplayName: Cosmic Explosion -DoGFire.DisplayName: Faith Incinerator -DoGLaserWalls.DisplayName: God's Bane Doombeam Array -DoGLaserWallsBigBeam.DisplayName: Hyperdeath Rift Ripper +DoGFire.DisplayName: "[ceffect/dog:Faith Incinerator]" +DoGLaserWalls.DisplayName: "[ceffect/dog:God's Bane Doombeam Array]" +DoGLaserWallsBigBeam.DisplayName: "[ceffect/dog:Hyperdeath Rift Ripper]" DoGP1EndPortal.DisplayName: Portal DoGRiftCrack.DisplayName: DoG Distortion Crack DoGTeleportRift.DisplayName: DoG Distortion Rift diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index 1e0d926ef4..dd505cfd52 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -61,10 +61,10 @@ Dragonfire1: "{0}'s ashes scatter in the wind." Dragonfire2: "{0}'s embers fade away in a warm glow." Dragonfire3: "{0} can no longer feel the heat of the dragonfire." Dragonfire4: This was a fight {0} could not win. -DimensionalDrive: "{0} was blasted apart into space dust by the Dimensional Drive." -DivinityDevourer1: "{0} fell victim to the Divinity Devourer." -DivinityDevourer2: "{0} was consumed by the Divinity Devourer." -DivinityDevourer3: "{0}'s essence was snuffed by the Divinity Devourer." +DimensionalDrive: "{0} was blasted apart into space dust by [ceffect/dog:Dimensional Drive]." +DivinityDevourer1: "{0} fell victim to [ceffect/dog:Divinity Devourer]." +DivinityDevourer2: "{0} was consumed by [ceffect/dog:Divinity Devourer]." +DivinityDevourer3: "{0}'s essence was snuffed by [ceffect/dog:Divinity Devourer]." ElementalMix1: "{0} was reduced to technicolor confetti." ElementalMix2: "{0} was blasted apart by a harmonized elemental onslaught." ElementalMix3: "{0} was overwhelmed by elemental turbulence." @@ -110,8 +110,8 @@ SulphuricPoisoning1: "{0} was melted by the toxic waste." SulphuricPoisoning2: "{0} ingested too many caustic chemicals." SulphuricPoisoning3: "{0} couldn't handle the industrial backwash." ThornBlossom: "{0} was violently pricked by a flower." -UltracosmicMaelstrom1: "{0} was sublimated by the Ultracosmic Maelstrom." -UltracosmicMaelstrom2: "{0} got cut down to size by the Ultracosmic Maelstrom." +UltracosmicMaelstrom1: "{0} was sublimated by [ceffect/dog:Ultracosmic Maelstrom]." +UltracosmicMaelstrom2: "{0} got cut down to size by [ceffect/dog:Ultracosmic Maelstrom]." Vaporfied: "{0} vaporized into thin air." VermillionFlux1: "{0} burst apart in a shower of scarlet sparks." VermillionFlux2: "{0} went deathly stiff, still crackling with crimson." From 1175098cf50560cea3c4cddf9fe1b0cd55183c1f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 5 Apr 2026 15:17:02 -0500 Subject: [PATCH 109/142] Calamity Red & Exotic Rainbow, all custom rarities to chat tags --- ChatTags/CustomColorEffectHandler.cs | 24 ++- Items/Accessories/Calamity.cs | 2 +- Items/Accessories/DraedonsHeart.cs | 2 +- Items/Armor/GemTech/GemTechBodyArmor.cs | 2 +- Items/Armor/GemTech/GemTechHeadgear.cs | 2 +- Items/Armor/GemTech/GemTechSchynbaulds.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 53 ----- Items/Dyes/CalamitousDye.cs | 2 +- Items/Dyes/ExoDye.cs | 2 +- Items/Materials/AshesofAnnihilation.cs | 2 +- Items/Materials/ExoPrism.cs | 2 +- Items/Materials/MiracleMatter.cs | 2 +- Items/Pets/BrimstoneJewel.cs | 2 +- .../CraftingStations/DraedonsForge.cs | 2 +- Items/SummonItems/CeremonialUrn.cs | 2 +- Items/Weapons/Magic/Heresy.cs | 2 +- Items/Weapons/Magic/SubsumingVortex.cs | 2 +- Items/Weapons/Magic/Vehemence.cs | 2 +- Items/Weapons/Magic/VividClarity.cs | 2 +- Items/Weapons/Melee/Exoblade.cs | 2 +- Items/Weapons/Melee/PhotonRipper.cs | 2 +- Items/Weapons/Melee/SpineOfThanatos.cs | 2 +- Items/Weapons/Melee/Violence.cs | 2 +- Items/Weapons/Ranged/Condemnation.cs | 2 +- Items/Weapons/Ranged/HeavenlyGale.cs | 2 +- Items/Weapons/Ranged/MagnomalyCannon.cs | 2 +- Items/Weapons/Ranged/Photoviscerator.cs | 2 +- Items/Weapons/Ranged/SurgeDriver.cs | 2 +- Items/Weapons/Ranged/TheJailor.cs | 2 +- Items/Weapons/Rogue/Celestus.cs | 2 +- Items/Weapons/Rogue/RefractionRotor.cs | 2 +- Items/Weapons/Rogue/Sacrifice.cs | 2 +- Items/Weapons/Rogue/Supernova.cs | 2 +- Items/Weapons/Rogue/TheAtomSplitter.cs | 2 +- Items/Weapons/Summon/AresExoskeleton.cs | 2 +- Items/Weapons/Summon/AtlasMunitionsBeacon.cs | 2 +- Items/Weapons/Summon/CosmicImmaterializer.cs | 2 +- Items/Weapons/Summon/Perdition.cs | 2 +- Items/Weapons/Summon/Vigilance.cs | 2 +- Rarities/BurnishedAuric.cs | 150 ++++++++------ Rarities/CalamityRed.cs | 195 ++++++++++-------- Rarities/ColorTool.cs | 7 + Rarities/CosmicPurple.cs | 89 ++++---- Rarities/ExoticRainbow.cs | 160 ++++++++++++++ 44 files changed, 473 insertions(+), 279 deletions(-) create mode 100644 Rarities/ExoticRainbow.cs diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs index 6bed419cee..b99db87773 100644 --- a/ChatTags/CustomColorEffectHandler.cs +++ b/ChatTags/CustomColorEffectHandler.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.Rarities; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; @@ -15,7 +16,7 @@ namespace CalamityMod.ChatTags // i.e [ceffect/darksun:Hello World] would apply darksun effect to "Hello World". public sealed class CustomColorEffectHandler : AbstractTagHandler { - protected override string[] TagNames { get; } = ["ceffect"]; + protected override string[] TagNames { get; } = ["ceffect", "ce"]; public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) { if (!CalamityClientConfig.Instance.TextEffects) @@ -26,6 +27,14 @@ namespace CalamityMod.ChatTags return new DrunkTextSnippet(text); if (options.Equals("dog", StringComparison.OrdinalIgnoreCase)) return new DoGTextSnippet(text); + if (options.Equals("cosmic", StringComparison.OrdinalIgnoreCase)) + return new CosmicPurple.CustomTextSnippet(text); + if (options.Equals("auric", StringComparison.OrdinalIgnoreCase)) + return new BurnishedAuric.CustomTextSnippet(text); + if (options.Equals("calamity", StringComparison.OrdinalIgnoreCase)) + return new CalamityRed.CustomTextSnippet(text); + if (options.Equals("exo", StringComparison.OrdinalIgnoreCase)) + return new ExoticRainbow.CustomTextSnippet(text); return new TextSnippet(text); } } @@ -65,9 +74,9 @@ namespace CalamityMod.ChatTags if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) { - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); + var matrix = spriteBatch.transformMatrix; + Main.spriteBatch.End(out var ss); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, matrix); for (int i = 0; i < 3; i++) // Draw 3 lines of differing opacity, color, and displacement. { @@ -86,7 +95,7 @@ namespace CalamityMod.ChatTags } Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); + Main.spriteBatch.Begin(ss); } return true; } @@ -108,12 +117,13 @@ namespace CalamityMod.ChatTags var pos = position; using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); string txt = ""; + var matrix = spriteBatch.transformMatrix; using (spriteBatch.Scope()) { using (lease.Scope(clearColor: Color.Transparent)) { - spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); foreach (var item in text) { pos = position; @@ -129,7 +139,7 @@ namespace CalamityMod.ChatTags spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); foreach (var item in ChatManager.ShadowDirections) { - spriteBatch.Draw(lease.Target, Vector2.Zero + item * 2, null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.Draw(lease.Target, Vector2.Zero + Vector2.TransformNormal(item * 2,matrix), null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); spriteBatch.End(); diff --git a/Items/Accessories/Calamity.cs b/Items/Accessories/Calamity.cs index 14c7c7566f..9c76adf1a9 100644 --- a/Items/Accessories/Calamity.cs +++ b/Items/Accessories/Calamity.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 44; Item.height = 108; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.accessory = true; Item.expert = true; diff --git a/Items/Accessories/DraedonsHeart.cs b/Items/Accessories/DraedonsHeart.cs index 66d5d7aa9a..e1b1e5d4fe 100644 --- a/Items/Accessories/DraedonsHeart.cs +++ b/Items/Accessories/DraedonsHeart.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Accessories Item.accessory = true; Item.defense = 20; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.expert = true; } diff --git a/Items/Armor/GemTech/GemTechBodyArmor.cs b/Items/Armor/GemTech/GemTechBodyArmor.cs index 29e83fc015..4e5af57b08 100644 --- a/Items/Armor/GemTech/GemTechBodyArmor.cs +++ b/Items/Armor/GemTech/GemTechBodyArmor.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.GemTech Item.height = 32; Item.defense = 31; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/GemTech/GemTechHeadgear.cs b/Items/Armor/GemTech/GemTechHeadgear.cs index 2feef341da..cc96471327 100644 --- a/Items/Armor/GemTech/GemTechHeadgear.cs +++ b/Items/Armor/GemTech/GemTechHeadgear.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Items.Armor.GemTech Item.height = 32; Item.defense = 14; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = RarityType(); + Item.rare = RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Armor/GemTech/GemTechSchynbaulds.cs b/Items/Armor/GemTech/GemTechSchynbaulds.cs index a7d5c0fa54..84ba7d24ea 100644 --- a/Items/Armor/GemTech/GemTechSchynbaulds.cs +++ b/Items/Armor/GemTech/GemTechSchynbaulds.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.GemTech Item.height = 26; Item.defense = 24; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 6b68971444..ad3ed2a996 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1762,60 +1762,7 @@ namespace CalamityMod.Items // Might be used for Miracle stuff later or something idk /*if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) { - Color rarityColor = Color.White; - Vector2 basePosition = new Vector2(line.X, line.Y); - - float rate = Main.GlobalTimeWrappedHourly * 29; - List eColors = new List() - { - Color.PaleVioletRed, - Color.Coral, - Color.Khaki, - Color.PaleGreen, - Color.Turquoise, - Color.Violet - }; - - int colorIndex = (int)(rate / 2 % eColors.Count); - Color currentColor = eColors[colorIndex]; - Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; - Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); - - float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi); - sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5); - Vector2 backScale = line.BaseScale; - Color backColor = usedColor; - Vector2 shake = Main.rand.NextVector2Circular(15, 15) * sine; - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); - - int draws = 20; - for (int i = 0; i < draws; i++) - { - shake = Main.rand.NextVector2Circular(15, 15) * sine; - Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (5 + 0.5f * sine); - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake * 4 + backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread); - } - Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; - - Vector2 drawPosition = basePosition; - Color drawColor = backColor; - Vector2 rotationPoint = texture.Size() * 0.5f; - for (int i = 0; i < 6; i++) - { - int length = line.Text.Length; - Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(1 - 0.05f * i * (1 + 0.2f * -sine), 1 + 0.75f * i * (1 + 0.2f * sine) * 1f) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None); - } - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); - - // Draw the front text as usual. - ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake + basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); - - return false; }*/ return true; } diff --git a/Items/Dyes/CalamitousDye.cs b/Items/Dyes/CalamitousDye.cs index 89c33691ea..35c48b9192 100644 --- a/Items/Dyes/CalamitousDye.cs +++ b/Items/Dyes/CalamitousDye.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(gold: 2, silver: 50); } diff --git a/Items/Dyes/ExoDye.cs b/Items/Dyes/ExoDye.cs index 1080879443..e66edbfb7a 100644 --- a/Items/Dyes/ExoDye.cs +++ b/Items/Dyes/ExoDye.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Dyes public override void SafeSetDefaults() { - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = Item.sellPrice(gold: 2, silver: 50); } diff --git a/Items/Materials/AshesofAnnihilation.cs b/Items/Materials/AshesofAnnihilation.cs index 38efcdd53a..0c52d2ae91 100644 --- a/Items/Materials/AshesofAnnihilation.cs +++ b/Items/Materials/AshesofAnnihilation.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Materials Item.height = 56; Item.maxStack = Item.CommonMaxStack; Item.value = Item.sellPrice(gold: 6, silver: 66, copper: 66); - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public void DrawPulsingAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float baseScale) { diff --git a/Items/Materials/ExoPrism.cs b/Items/Materials/ExoPrism.cs index 5b8c11ad99..143248da98 100644 --- a/Items/Materials/ExoPrism.cs +++ b/Items/Materials/ExoPrism.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Materials Item.height = 52; Item.maxStack = Item.CommonMaxStack; Item.value = Item.sellPrice(gold: 7); - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public void DrawBackAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, float baseScale) { diff --git a/Items/Materials/MiracleMatter.cs b/Items/Materials/MiracleMatter.cs index 4f7392b898..39a7fa9695 100644 --- a/Items/Materials/MiracleMatter.cs +++ b/Items/Materials/MiracleMatter.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Materials Item.height = 80; Item.maxStack = Item.CommonMaxStack; Item.value = Item.sellPrice(platinum: 1); - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public void DrawBackAfterimage(SpriteBatch spriteBatch, Vector2 baseDrawPosition, Rectangle frame, Vector2 origin, float baseScale) diff --git a/Items/Pets/BrimstoneJewel.cs b/Items/Pets/BrimstoneJewel.cs index a6b9e00e61..2009e81afd 100644 --- a/Items/Pets/BrimstoneJewel.cs +++ b/Items/Pets/BrimstoneJewel.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Pets { Item.DefaultToVanitypet(ModContent.ProjectileType(), ModContent.BuffType()); Item.value = Item.sellPrice(gold: 20); - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } diff --git a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs index 6c812e8cfd..a186b15911 100644 --- a/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs +++ b/Items/Placeables/Furniture/CraftingStations/DraedonsForge.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Placeables.Furniture.CraftingStations { Item.DefaultToPlaceableTile(ModContent.TileType()); Item.value = Item.sellPrice(platinum: 4); - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/SummonItems/CeremonialUrn.cs b/Items/SummonItems/CeremonialUrn.cs index d0e5bfa47e..6362c8f695 100644 --- a/Items/SummonItems/CeremonialUrn.cs +++ b/Items/SummonItems/CeremonialUrn.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.SummonItems { Item.width = 34; Item.height = 54; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) diff --git a/Items/Weapons/Magic/Heresy.cs b/Items/Weapons/Magic/Heresy.cs index 5b215872ec..659af3c9b6 100644 --- a/Items/Weapons/Magic/Heresy.cs +++ b/Items/Weapons/Magic/Heresy.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; diff --git a/Items/Weapons/Magic/SubsumingVortex.cs b/Items/Weapons/Magic/SubsumingVortex.cs index 0f21e8bc20..c6784b6a12 100644 --- a/Items/Weapons/Magic/SubsumingVortex.cs +++ b/Items/Weapons/Magic/SubsumingVortex.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.Item84; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.noMelee = true; Item.channel = true; diff --git a/Items/Weapons/Magic/Vehemence.cs b/Items/Weapons/Magic/Vehemence.cs index 72df4ffb67..0e330fb229 100644 --- a/Items/Weapons/Magic/Vehemence.cs +++ b/Items/Weapons/Magic/Vehemence.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16.5f; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index b4ea614361..25647e0b5a 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 6f; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo projSource, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Melee/Exoblade.cs b/Items/Weapons/Melee/Exoblade.cs index 928c535962..eb971fdb5b 100644 --- a/Items/Weapons/Melee/Exoblade.cs +++ b/Items/Weapons/Melee/Exoblade.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.shoot = ProjectileType(); Item.shootSpeed = 9f; - Item.rare = RarityType(); + Item.rare = RarityType(); } public override bool CanShoot(Player player) diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index ca5701977f..568e60509b 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 1f; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Melee/SpineOfThanatos.cs b/Items/Weapons/Melee/SpineOfThanatos.cs index aeeb946f60..f5c2304a8f 100644 --- a/Items/Weapons/Melee/SpineOfThanatos.cs +++ b/Items/Weapons/Melee/SpineOfThanatos.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = Item.height = 28; Item.damage = 128; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.noMelee = true; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Melee/Violence.cs b/Items/Weapons/Melee/Violence.cs index 22c0b05054..50406f0118 100644 --- a/Items/Weapons/Melee/Violence.cs +++ b/Items/Weapons/Melee/Violence.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; Item.channel = true; diff --git a/Items/Weapons/Ranged/Condemnation.cs b/Items/Weapons/Ranged/Condemnation.cs index b0a3d62c15..6782f1e87a 100644 --- a/Items/Weapons/Ranged/Condemnation.cs +++ b/Items/Weapons/Ranged/Condemnation.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 42c7c55d87..0c39c5de41 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 12f; Item.useAmmo = AmmoID.Arrow; Item.useTurn = true; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Ranged/MagnomalyCannon.cs b/Items/Weapons/Ranged/MagnomalyCannon.cs index 27c689dd12..9762ad4903 100644 --- a/Items/Weapons/Ranged/MagnomalyCannon.cs +++ b/Items/Weapons/Ranged/MagnomalyCannon.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 15f; Item.useAmmo = AmmoID.Rocket; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override Vector2? HoldoutOffset() => new Vector2(-30, -10); diff --git a/Items/Weapons/Ranged/Photoviscerator.cs b/Items/Weapons/Ranged/Photoviscerator.cs index 11a20c6147..8edfcfc403 100644 --- a/Items/Weapons/Ranged/Photoviscerator.cs +++ b/Items/Weapons/Ranged/Photoviscerator.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.noUseGraphic = true; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Ranged/SurgeDriver.cs b/Items/Weapons/Ranged/SurgeDriver.cs index 11784019ce..95bb662349 100644 --- a/Items/Weapons/Ranged/SurgeDriver.cs +++ b/Items/Weapons/Ranged/SurgeDriver.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.channel = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 11f; diff --git a/Items/Weapons/Ranged/TheJailor.cs b/Items/Weapons/Ranged/TheJailor.cs index 55fc16c5d4..882a0ad8d3 100644 --- a/Items/Weapons/Ranged/TheJailor.cs +++ b/Items/Weapons/Ranged/TheJailor.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.noMelee = true; Item.knockBack = 8f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item14; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Rogue/Celestus.cs b/Items/Weapons/Rogue/Celestus.cs index 2af3d2b3dc..7e37c4614f 100644 --- a/Items/Weapons/Rogue/Celestus.cs +++ b/Items/Weapons/Rogue/Celestus.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.autoReuse = true; Item.noMelee = true; diff --git a/Items/Weapons/Rogue/RefractionRotor.cs b/Items/Weapons/Rogue/RefractionRotor.cs index 6004817676..36c30b998f 100644 --- a/Items/Weapons/Rogue/RefractionRotor.cs +++ b/Items/Weapons/Rogue/RefractionRotor.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override float StealthDamageMultiplier => 0.3f; diff --git a/Items/Weapons/Rogue/Sacrifice.cs b/Items/Weapons/Rogue/Sacrifice.cs index cd5c882622..d2c1e803d4 100644 --- a/Items/Weapons/Rogue/Sacrifice.cs +++ b/Items/Weapons/Rogue/Sacrifice.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityVioletBuyPrice; } diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index abcaa7fee0..81900bf511 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override float StealthDamageMultiplier => 0.7f; diff --git a/Items/Weapons/Rogue/TheAtomSplitter.cs b/Items/Weapons/Rogue/TheAtomSplitter.cs index 7372b085b7..7b43424195 100644 --- a/Items/Weapons/Rogue/TheAtomSplitter.cs +++ b/Items/Weapons/Rogue/TheAtomSplitter.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.noMelee = true; Item.noUseGraphic = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs index f8c8a5a9d7..309102e5a2 100644 --- a/Items/Weapons/Summon/AresExoskeleton.cs +++ b/Items/Weapons/Summon/AresExoskeleton.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.knockBack = 1f; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item117; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs index 159b5cb614..c3d384a302 100644 --- a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs +++ b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.shootSpeed = 10f; Item.noUseGraphic = true; Item.DamageType = DamageClass.Summon; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.sentry = true; } diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index 37ff1d6a4a..c2b8cc8f03 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.maxMinions >= 10; diff --git a/Items/Weapons/Summon/Perdition.cs b/Items/Weapons/Summon/Perdition.cs index d608c2d761..f9a539f18b 100644 --- a/Items/Weapons/Summon/Perdition.cs +++ b/Items/Weapons/Summon/Perdition.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.noMelee = true; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.DD2_EtherianPortalOpen; } diff --git a/Items/Weapons/Summon/Vigilance.cs b/Items/Weapons/Summon/Vigilance.cs index ebd6932831..b49cbc32e8 100644 --- a/Items/Weapons/Summon/Vigilance.cs +++ b/Items/Weapons/Summon/Vigilance.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.DamageType = DamageClass.Summon; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) diff --git a/Rarities/BurnishedAuric.cs b/Rarities/BurnishedAuric.cs index 50f86b9814..ad8ea40043 100644 --- a/Rarities/BurnishedAuric.cs +++ b/Rarities/BurnishedAuric.cs @@ -1,12 +1,15 @@ using System; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Graphics; -using Terraria.GameContent; using Terraria; +using Terraria.GameContent; +using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; -using Terraria.ID; +using static System.Net.Mime.MediaTypeNames; namespace CalamityMod.Rarities { @@ -20,6 +23,80 @@ namespace CalamityMod.Rarities public static Color TextClr = new Color(157, 110, 11, 50); static float lastFlashTime = 0f; static bool isFlashing = false; + + public sealed class CustomTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (color == default || color == Main.MouseTextColorReal) + { + color = Colors.AlphaDarken(TextClr); + } + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var borderColor = color * 2f; + var coreColor = new Color(77, 0, 33); + var shineColor = new Color(254, 231, 117); + if (isFlashing) + { + shineColor = new Color(90, 207, 255); + position += Main.rand.NextVector2Circular(8f, 4.8f); + } + + var pos = position; + using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); + var matrix = spriteBatch.transformMatrix; + using (spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, text, pos, Color.White, 0, Vector2.Zero, new Vector2(scale)); + spriteBatch.End(); + } + + //Draw the base text + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); + for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.125f) + { + spriteBatch.Draw(lease.Target, Vector2.Zero + new Vector2(2,0).RotatedBy(f), null, borderColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + spriteBatch.Draw(lease.Target, Vector2.Zero, null, coreColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.End(); + + //Draw the shine character-by-character + using (lease.Scope(clearColor: Color.Transparent)) + { + string txt = ""; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + foreach (var item in text) + { + pos = position; + pos.X += FontAssets.MouseText.Value.MeasureString(txt).X; + float sin = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f; + var c = shineColor * MathF.Pow(sin, 120); + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), pos, c, 0, Vector2.Zero, new Vector2(scale)); + txt += item; + } + spriteBatch.End(); + } + + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); + spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.End(); + } + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } + public static void Draw(Item Item, SpriteBatch spriteBatch, string text, int X, int Y, Color textColor, Color lightColor, float rotation, Vector2 origin, Vector2 baseScale, float time, bool renderTextSparkles, DynamicSpriteFont font) { @@ -38,26 +115,20 @@ namespace CalamityMod.Rarities isFlashing = false; } } - var fontSize = font.MeasureString(text); - var center = fontSize / 2.0f; + // Get all snippets and convert all plain text snippets to the custom rarity snippet + TextSnippet[] snippets = ChatManager.ParseMessage(text, textColor).ToArray(); + for (int i = 0; i < snippets.Length; i++) + { + TextSnippet textSnippet = snippets[i]; + if (snippets[i].GetType() == typeof(TextSnippet)) + { + snippets[i] = new CustomTextSnippet(textSnippet.Text); + } + } if (Item.expert) textColor = Main.DiscoColor; - var glowPosition = new Vector2(X + center.X, Y + center.Y / 1.5f); - textColor.A = 0; - - float pulsing = 1.5f + (float)Math.Sin(time * 5f); - for (float f = 0f; f < MathHelper.TwoPi; f += 0.79f) - { - 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 (isFlashing && CalamityClientConfig.Instance.TextEffects) - origin += Main.rand.NextVector2Circular(2f, 1.2f); // Small shake - } - if (isFlashing) { textColor = new Color(0, 183, 241, 50); @@ -65,47 +136,8 @@ namespace CalamityMod.Rarities } textColor.A = 255; - - // Shadow - ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, new Vector2(X, Y), textColor * 2f, rotation, origin, baseScale); - - // Outline base - ChatManager.DrawColorCodedString(spriteBatch, font, text, new Vector2(X, Y), new Color(77, 0, 33), rotation, origin, baseScale); - - float shineWidth = 40f; //set to charSize - float shineSpeed = 80f; - - float shineDisp = time * shineSpeed; //predicted current location of the shine based on the time and speed - float shinePos = (shineDisp % (fontSize.X + shineWidth)); - - Vector2 basePos = new Vector2(X, Y); - if (isFlashing && CalamityClientConfig.Instance.TextEffects) - basePos += Main.rand.NextVector2Circular(3f, 10f); // Small shake - - float charOffsetX = 0f; - if (!renderTextSparkles) - return; - for (int i = 0; i < text.Length; i++) - { - string c = text[i].ToString(); - Vector2 charSize = font.MeasureString(c); - Vector2 charOrigin = charSize * 0.5f; - - Vector2 charPos = basePos + new Vector2(charOffsetX, 0f); - - float centerX = charPos.X + (charSize.X * baseScale.X) / 2f + 10.5f; - float dist = Math.Abs(centerX - (X + shinePos - shineWidth * 0.15f)); - float intensity = 1f - MathHelper.Clamp(dist / shineWidth, 0f, 1f); - - if (intensity > 0f) - { - Color shineColor = isFlashing ? new Color(90, 207, 255) * intensity * 2f : new Color(254, 231, 117) * intensity * 1f; - ChatManager.DrawColorCodedString( - spriteBatch, font, c, charPos, shineColor, rotation, origin, baseScale); - } - - charOffsetX += charSize.X - text.Length * 0.0085f; - } + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X,Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); + } public static void Draw(Item Item, string text, int X, int Y, float rotation, Vector2 origin, Vector2 baseScale, Color? textColor = null, Color? lightColor = null, bool? renderTextSparkles = null) diff --git a/Rarities/CalamityRed.cs b/Rarities/CalamityRed.cs index eb2f0d1920..9ea280216b 100644 --- a/Rarities/CalamityRed.cs +++ b/Rarities/CalamityRed.cs @@ -2,115 +2,136 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Graphics; -using Terraria.GameContent; using Terraria; +using Terraria.GameContent; +using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; -using Terraria.ID; namespace CalamityMod.Rarities { public class CalamityRed : ModRarity { // Calamity Red is Rarity 17 - // This rarity should never be assigned to any items. - // It is the equivalent of vanilla's Purple rarity (11): only used for positive reforges on top-rarity items. - //public override Color RarityColor => new Color(163, 25, 26); // #A3191A - // // (139, 0, 0) is the classic donator item color - public override Color RarityColor => TextClr * 2f; public static float MaxY = 4.5f; public static Color BloomClr = new Color(180, 20, 75, 0); public static Color TextClr = new Color(242, 27, 27, 255); + public sealed class CustomTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (color == default || color == Main.MouseTextColorReal) + { + color = Colors.AlphaDarken(TextClr); + } + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var font = FontAssets.MouseText.Value; + var time = Main.GlobalTimeWrappedHourly; + + var crystalTextGlow = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextGlow").Value; + var sparkle = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextSparkle").Value; + var fontSize = ChatManager.GetStringSize(font, text, new Vector2(1)); + var center = fontSize / 2f; + + var glowPosition = position + new Vector2(size.X * 0.5f, size.Y * 0.5f);// new Vector2(X + center.X, Y + center.Y / 1.5f); + color.A = 0; + float pulsing = 10f + (float)Math.Sin(time * 20f); + float baseScalePulse = 1.03f; + float flameHeight = 5f; + float distortionAmount = 2f; + + + for (float f = 0f; f < MathHelper.TwoPi; f += 0.79f) + { + float angle = f + (time * 2f % MathHelper.TwoPi); + + float distortion = (float)Math.Sin((position.Y + f * 100f + time * 20f) * 0.05f) * distortionAmount; + + Vector2 offset = new Vector2( + (float)Math.Cos(angle) * pulsing * 0.4f + distortion, + -(float)Math.Abs((float)Math.Sin(angle)) * flameHeight + ); + + float scaleVariation = 0.95f + 0.05f * (float)Math.Sin(time * 15f + f * 2f); + Vector2 vscale = new Vector2(baseScalePulse * scaleVariation) * scale; + + Color flameLayerColor = new Color( + (int)(color.R * 0.5f), + (int)(color.G * 0.5f), + (int)(color.B * 0.5f), + (int)(color.A * 0.5f) + ); + + ChatManager.DrawColorCodedString( + spriteBatch, + font, + text, + position + offset, + flameLayerColor, + 0, + Vector2.Zero, + vscale + ); + } + + // Draw crisp center text + ChatManager.DrawColorCodedString( + spriteBatch, + font, + text, + position, + color, + 0, + Vector2.Zero, + new Vector2(baseScalePulse) + ); + + color.A = 255; + + + var bloomColor = ColorTool.Rainbowing(time * 4 - 0.9f); + + spriteBatch.Draw(crystalTextGlow, glowPosition, null, BloomClr, MathHelper.PiOver2, new Vector2(6f, 33f), + new Vector2(1.6f, fontSize.X / crystalTextGlow.Height * 1.2f), SpriteEffects.None, 0f); + + ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, position, Color.Lerp(color,Color.White,0.67f), 0, Vector2.Zero, new(scale)); + ChatManager.DrawColorCodedString(spriteBatch, font, text, position, Color.Black, 0, Vector2.Zero, new(scale)); + + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } + public static void Draw(Item Item, SpriteBatch spriteBatch, string text, int X, int Y, Color textColor, Color lightColor, float rotation, Vector2 origin, Vector2 baseScale, float time, bool renderTextSparkles, DynamicSpriteFont font) { - var crystalTextGlow = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextGlow").Value; - var sparkle = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextSparkle").Value; - var fontSize = font.MeasureString(text); - var center = fontSize / 2f; + // Get all snippets and convert all plain text snippets to the custom rarity snippet + TextSnippet[] snippets = ChatManager.ParseMessage(text, textColor).ToArray(); + for (int i = 0; i < snippets.Length; i++) + { + TextSnippet textSnippet = snippets[i]; + if (snippets[i].GetType() == typeof(TextSnippet)) + { + snippets[i] = new CustomTextSnippet(textSnippet.Text); + } + } if (Item.expert) textColor = Main.DiscoColor; - var glowPosition = new Vector2(X + center.X, Y + center.Y / 1.5f); - textColor.A = 0; - float pulsing = 10f + (float)Math.Sin(time * 20f); - float baseScalePulse = 1.03f; - float flameHeight = 5f; - float distortionAmount = 2f; - - if (renderTextSparkles) - - for (float f = 0f; f < MathHelper.TwoPi; f += 0.79f) - { - float angle = f + (time * 2f % MathHelper.TwoPi); - - float distortion = (float)Math.Sin((Y + f * 100f + time * 20f) * 0.05f) * distortionAmount; - - Vector2 offset = new Vector2( - (float)Math.Cos(angle) * pulsing * 0.4f + distortion, - -(float)Math.Abs((float)Math.Sin(angle)) * flameHeight - ); - - float scaleVariation = 0.95f + 0.05f * (float)Math.Sin(time * 15f + f * 2f); - Vector2 scale = new Vector2(baseScalePulse * scaleVariation); - - Color flameLayerColor = new Color( - (int)(textColor.R * 0.5f), - (int)(textColor.G * 0.5f), - (int)(textColor.B * 0.5f), - (int)(textColor.A * 0.5f) - ); - - ChatManager.DrawColorCodedString( - spriteBatch, - font, - text, - new Vector2(X, Y) + offset, - flameLayerColor, - rotation, - origin, - scale - ); - } - - // Draw crisp center text - ChatManager.DrawColorCodedString( - spriteBatch, - font, - text, - new Vector2(X, Y), - textColor, - rotation, - origin, - new Vector2(baseScalePulse) - ); - - textColor.A = 255; - - ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, new Vector2(X, Y), textColor * 2f, rotation, origin, baseScale); - - var bloomColor = ColorTool.Rainbowing(time * 4 - 0.9f); - - spriteBatch.Draw(crystalTextGlow, glowPosition, null, lightColor, rotation + MathHelper.PiOver2, new Vector2(6f, 33f), - new Vector2(1.6f, fontSize.X / crystalTextGlow.Height * 1.2f), SpriteEffects.None, 0f); - - ChatManager.DrawColorCodedString(spriteBatch, font, text, new Vector2(X, Y), Color.Black, rotation, origin, baseScale); - - // Is this a scrapped visual feature of the rarity? - /*int sparkleCount = Main.rand.Next((int)fontSize.X / 7, (int)fontSize.X / 5) + 1; - var color2 = lightColor * 1.00f; - color2.A = 0; - var sparkleOrigin = new Vector2(15f, 15f); - for (int i = 0; i < sparkleCount; i++) - { - var v = new Vector2(Main.rand.NextFloat(fontSize.X), Main.rand.NextFloat(fontSize.Y * 0.6f) + 1f); - float lifeTime = Main.GlobalTimeWrappedHourly * 4f + Main.rand.NextFloat(MathHelper.TwoPi * 7f); - lifeTime %= MathHelper.TwoPi * 1f; - }*/ + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X, Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); return; } diff --git a/Rarities/ColorTool.cs b/Rarities/ColorTool.cs index 77b3166b5a..45eb3a0820 100644 --- a/Rarities/ColorTool.cs +++ b/Rarities/ColorTool.cs @@ -9,6 +9,7 @@ namespace CalamityMod.Rarities public static int RarityCosmicPurple => ModContent.GetInstance().Type; public static int RarityBurnishedAuric => ModContent.GetInstance().Type; public static int RarityCalamityRed => ModContent.GetInstance().Type; + public static int RarityExoticRainbow => ModContent.GetInstance().Type; public override bool PreDrawTooltipLine(Item Item, DrawableTooltipLine line, ref int yOffset) @@ -30,6 +31,12 @@ namespace CalamityMod.Rarities CalamityRed.Draw(Item, line); return false; } + + if (Item.rare == RarityExoticRainbow) + { + ExoticRainbow.Draw(Item, line); + return false; + } } return true; } diff --git a/Rarities/CosmicPurple.cs b/Rarities/CosmicPurple.cs index 0a38e2d428..1c3e382f4a 100644 --- a/Rarities/CosmicPurple.cs +++ b/Rarities/CosmicPurple.cs @@ -1,13 +1,14 @@ using System; +using System.Text.RegularExpressions; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Graphics; -using Terraria.GameContent; using Terraria; +using Terraria.GameContent; +using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; using Terraria.Utilities; -using Terraria.ID; namespace CalamityMod.Rarities { @@ -19,59 +20,75 @@ namespace CalamityMod.Rarities public static float MaxY = 4.5f; public static Color BloomClr = new Color(65, 38, 87, 0); public static Color TextClr = new Color(103, 66, 138, 255); + public static UnifiedRandom rand = new UnifiedRandom(1); + + public sealed class CustomTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (color == default || color == Main.MouseTextColorReal) + { + color = Colors.AlphaDarken(TextClr); + } + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var font = FontAssets.MouseText.Value; + color.A = 255; + float pulsing = 2.5f + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 5f); + for (float f = 0f; f < MathHelper.TwoPi; f += 0.79f) + { + ChatManager.DrawColorCodedString(spriteBatch, font, text, position + new Vector2(pulsing, 0f).RotatedBy(f + Main.GlobalTimeWrappedHourly * 2f % MathHelper.TwoPi), color with { A = 0 } * 0.5f, 0, Vector2.Zero, new(scale)); + } + ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, position, color * 2f, 0, Vector2.Zero, new(scale)); + ChatManager.DrawColorCodedString(spriteBatch, font, text, position, Color.Black, 0, Vector2.Zero, new(scale)); + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } public static void Draw(Item Item, SpriteBatch spriteBatch, string text, int X, int Y, Color textColor, Color lightColor, float rotation, Vector2 origin, Vector2 baseScale, float time, bool renderTextSparkles, DynamicSpriteFont font) { var crystalTextGlow = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextGlow").Value; var sparkle = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextSparkle").Value; - var fontSize = font.MeasureString(text); + var fontSize = ChatManager.GetStringSize(font, text, new Vector2(1)); var center = fontSize / 2f; + if (Item.expert) textColor = Main.DiscoColor; - // this was intended behavior. i'm commenting it out for now because it seems like people do not like it. - /* - if (Item.expert) - textColor = Main.DiscoColor; - */ - - var glowPosition = new Vector2(X + center.X, Y + center.Y / 1.5f); - textColor.A = 0; - float pulsing = 2.5f + (float)Math.Sin(time * 5f); - for (float f = 0f; f < MathHelper.TwoPi; f += 0.79f) + // Get all snippets and convert all plain text snippets to the custom rarity snippet + TextSnippet[] snippets = ChatManager.ParseMessage(text, textColor).ToArray(); + for (int i = 0; i < snippets.Length; i++) { - 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); + TextSnippet textSnippet = snippets[i]; + if (snippets[i].GetType() == typeof(TextSnippet)) + { + snippets[i] = new CustomTextSnippet(textSnippet.Text); + } } - if (Item.expert) - textColor = Main.DiscoColor; - - textColor.A = 255; - - ChatManager.DrawColorCodedStringShadow(spriteBatch, font, text, new Vector2(X, Y), textColor * 2f, rotation, origin, baseScale); - - var bloomColor = ColorTool.Rainbowing(time * 4 - 0.9f); - + //Draw backglow + var glowPosition = new Vector2(X + center.X, Y + center.Y / 1.5f); spriteBatch.Draw(crystalTextGlow, glowPosition, null, lightColor, rotation + MathHelper.PiOver2, new Vector2(6f, 33f), new Vector2(1.6f, fontSize.X / crystalTextGlow.Height * 1.2f), SpriteEffects.None, 0f); - ChatManager.DrawColorCodedString(spriteBatch, font, text, new Vector2(X, Y), Color.Black, rotation, origin, baseScale); + //Draw text + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X,Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); + //Draw sparkles if (!renderTextSparkles) return; - static int Hash(int x) - { - x ^= x >> 16; - x *= unchecked((int)0x7feb352d); - x ^= x >> 15; - x *= unchecked((int)0x846ca68b); - x ^= x >> 16; - return x; - } - - // why was this using a string hash previously?????? - var rand = new UnifiedRandom(Hash((int)(center.X + center.Y))); + rand.SetSeed(1); + int sparkleCount = rand.Next((int)fontSize.X / 7, (int)fontSize.X / 5) + 1; var color2 = lightColor; color2.A = 0; diff --git a/Rarities/ExoticRainbow.cs b/Rarities/ExoticRainbow.cs new file mode 100644 index 0000000000..bc143960ff --- /dev/null +++ b/Rarities/ExoticRainbow.cs @@ -0,0 +1,160 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.UI.Chat; + +namespace CalamityMod.Rarities +{ + public class ExoticRainbow : ModRarity + { + // Exotic Rainbow is Rarity 17 (same as Calamity Red) + public override Color RarityColor => TextClr * 2f; + + public static float MaxY = 4.5f; + public static Color BloomClr = new Color(180, 20, 75, 0); + public static Color TextClr = new Color(242, 27, 27, 255); + + public sealed class CustomTextSnippet(string text) : TextSnippet + { + public bool IsExpert = false; + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (color == default || color == Main.MouseTextColorReal) + { + color = Colors.AlphaDarken(TextClr); + } + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var font = FontAssets.MouseText.Value; + var time = Main.GlobalTimeWrappedHourly; + + List eColors = new List() + { + new Color(255,107,107), //Ares + new Color(125,196,225), //Thanatos + new Color(211,235,108), //Apollo + //new Color(255,160,71), //Artemis + }; + + if (IsExpert) + eColors = new List() + { + new Color(255,70,70), + new Color(255,70,255), + new Color(70,70,255), + new Color(70,255,255), + new Color(70,255,90), + new Color(255,255,70) + }; + + + var pos = position; + using var lease = ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); + var matrix = spriteBatch.transformMatrix; + using (spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + string txt = ""; + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + foreach (var item in text) + { + + pos = position; + pos.X += FontAssets.MouseText.Value.MeasureString(txt).X; + + float rate = Main.GlobalTimeWrappedHourly * (IsExpert ? 2 : 1) + pos.X * (IsExpert ? 0.01f : 0.005f); + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : MathF.Round(rate % 1f)); + + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), pos, usedColor, 0, Vector2.Zero, new Vector2(scale)); + txt += item; + } + spriteBatch.End(); + } + + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, matrix); + float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi); + sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5); + int draws = 16; + for (int i = 0; i < draws; i++) + { + var shake = Main.rand.NextVector2Circular(32, 32) * sine; + Vector2 backPosition = (MathHelper.TwoPi * i / (float)draws).ToRotationVector2() * (4) + shake; + spriteBatch.Draw(lease.Target, Vector2.Zero + backPosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + + Main.spriteBatch.End(); + + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); + for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.125f) + { + spriteBatch.Draw(lease.Target, Vector2.Zero + new Vector2(2, 0).RotatedBy(f), null, Color.Black, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.End(); + } + } + return true; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + + return size * Scale; + } + } + + public static void Draw(Item Item, SpriteBatch spriteBatch, string text, int X, int Y, Color textColor, Color lightColor, float rotation, + Vector2 origin, Vector2 baseScale, float time, bool renderTextSparkles, DynamicSpriteFont font) + { + // Get all snippets and convert all plain text snippets to the custom rarity snippet + TextSnippet[] snippets = ChatManager.ParseMessage(text, textColor).ToArray(); + for (int i = 0; i < snippets.Length; i++) + { + TextSnippet textSnippet = snippets[i]; + if (snippets[i].GetType() == typeof(TextSnippet)) + { + snippets[i] = new CustomTextSnippet(textSnippet.Text) { IsExpert = Item.expert }; + } + } + + + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X, Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); + + return; + } + + public static void Draw(Item Item, string text, int X, int Y, float rotation, Vector2 origin, Vector2 baseScale, Color? textColor = null, Color? lightColor = null, bool? renderTextSparkles = null) + { + Draw(Item, Main.spriteBatch, text, X, Y, Colors.AlphaDarken(textColor ?? TextClr), lightColor ?? BloomClr, rotation, origin, baseScale, Main.GlobalTimeWrappedHourly, + renderTextSparkles ?? CalamityClientConfig.Instance.TextEffects, FontAssets.MouseText.Value); + } + + public static void Draw(Item Item, DrawableTooltipLine line) + { + Draw(Item, line.Text, line.X, line.Y, line.Rotation, line.Origin, line.BaseScale); + } + + // TODO: Add a cooler alternative for reforge rarities + /*public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + { + -2 => ModContent.RarityType(), + -1 => ModContent.RarityType(), + _ => Type, + };*/ + } +} From b92328347b8cd6061c2f5929bbb5274c9788c8dd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 6 Apr 2026 21:40:54 -0500 Subject: [PATCH 110/142] fix to auric tag + exo rainbow changes --- Rarities/BurnishedAuric.cs | 9 ++++----- Rarities/ExoticRainbow.cs | 19 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Rarities/BurnishedAuric.cs b/Rarities/BurnishedAuric.cs index ad8ea40043..dfbc5c0a2c 100644 --- a/Rarities/BurnishedAuric.cs +++ b/Rarities/BurnishedAuric.cs @@ -9,7 +9,6 @@ using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; using Terraria.UI.Chat; -using static System.Net.Mime.MediaTypeNames; namespace CalamityMod.Rarities { @@ -20,7 +19,7 @@ namespace CalamityMod.Rarities public static float MaxY = 4.5f; public static Color BloomClr = new Color(48, 33, 4, 0); - public static Color TextClr = new Color(157, 110, 11, 50); + public static Color TextClr = new Color(157, 110, 11, 255); static float lastFlashTime = 0f; static bool isFlashing = false; @@ -61,7 +60,7 @@ namespace CalamityMod.Rarities spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.125f) { - spriteBatch.Draw(lease.Target, Vector2.Zero + new Vector2(2,0).RotatedBy(f), null, borderColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + spriteBatch.Draw(lease.Target, Vector2.Zero + new Vector2(2, 0).RotatedBy(f), null, borderColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } spriteBatch.Draw(lease.Target, Vector2.Zero, null, coreColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); spriteBatch.End(); @@ -136,8 +135,8 @@ namespace CalamityMod.Rarities } textColor.A = 255; - ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X,Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); - + ChatManager.DrawColorCodedString(spriteBatch, font, snippets, new(X, Y), textColor, 0, Vector2.Zero, baseScale, out _, -1, true); + } public static void Draw(Item Item, string text, int X, int Y, float rotation, Vector2 origin, Vector2 baseScale, Color? textColor = null, Color? lightColor = null, bool? renderTextSparkles = null) diff --git a/Rarities/ExoticRainbow.cs b/Rarities/ExoticRainbow.cs index bc143960ff..3040ea1bd6 100644 --- a/Rarities/ExoticRainbow.cs +++ b/Rarities/ExoticRainbow.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Rarities public static float MaxY = 4.5f; public static Color BloomClr = new Color(180, 20, 75, 0); public static Color TextClr = new Color(242, 27, 27, 255); - + public sealed class CustomTextSnippet(string text) : TextSnippet { public bool IsExpert = false; @@ -49,7 +49,7 @@ namespace CalamityMod.Rarities if (IsExpert) eColors = new List() - { + { new Color(255,70,70), new Color(255,70,255), new Color(70,70,255), @@ -87,13 +87,12 @@ namespace CalamityMod.Rarities } Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, matrix); - float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi); + float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2 / MathHelper.Pi); sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5); int draws = 16; for (int i = 0; i < draws; i++) { - var shake = Main.rand.NextVector2Circular(32, 32) * sine; - Vector2 backPosition = (MathHelper.TwoPi * i / (float)draws).ToRotationVector2() * (4) + shake; + Vector2 backPosition = (MathHelper.TwoPi * i / (float)draws + Main.GlobalTimeWrappedHourly * 1.7f).ToRotationVector2() * (4 + 24 * sine); spriteBatch.Draw(lease.Target, Vector2.Zero + backPosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } @@ -110,12 +109,12 @@ namespace CalamityMod.Rarities } return true; } - public override float GetStringLength(DynamicSpriteFont font) - { - float size = font.MeasureString(text).X; + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; - return size * Scale; - } + return size * Scale; + } } public static void Draw(Item Item, SpriteBatch spriteBatch, string text, int X, int Y, Color textColor, Color lightColor, float rotation, From b45b6bdec9afc66a17259beada6ee78ce70b5923 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 6 Apr 2026 21:45:02 -0500 Subject: [PATCH 111/142] oops forgot to stage --- Rarities/ExoticRainbow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rarities/ExoticRainbow.cs b/Rarities/ExoticRainbow.cs index 3040ea1bd6..cf065cc707 100644 --- a/Rarities/ExoticRainbow.cs +++ b/Rarities/ExoticRainbow.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Rarities int draws = 16; for (int i = 0; i < draws; i++) { - Vector2 backPosition = (MathHelper.TwoPi * i / (float)draws + Main.GlobalTimeWrappedHourly * 1.7f).ToRotationVector2() * (4 + 24 * sine); + Vector2 backPosition = (MathHelper.TwoPi * i / (float)draws + Main.GlobalTimeWrappedHourly * 1.7f).ToRotationVector2() * (4 + 16 * sine); spriteBatch.Draw(lease.Target, Vector2.Zero + backPosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); } From 4b867c273d0047c43319bf4fd6de7b0a31a15cd2 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:50:59 +0700 Subject: [PATCH 112/142] things that were missed, again also just executively decided the skull line is not worth buffing --- Buffs/StatBuffs/Mushy.cs | 2 +- CalPlayer/CalamityPlayer.cs | 4 ++-- CalPlayer/CalamityPlayerHitHurt.cs | 8 +++---- CalPlayer/CalamityPlayerMiscEffects.cs | 22 +++++++++---------- Items/Accessories/BloodyWormScarf.cs | 2 +- Items/Accessories/BloodyWormTooth.cs | 2 +- Items/Accessories/FrostFlare.cs | 8 +++++++ Items/Accessories/GiantShell.cs | 9 +++++++- Items/Accessories/GiantTortoiseShell.cs | 10 ++++++++- Items/CalamityGlobalItemTweaks.cs | 4 ---- Items/Weapons/Magic/PrimordialEarth.cs | 2 +- Items/Weapons/Melee/StygianShield.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 12 +++++----- 13 files changed, 53 insertions(+), 34 deletions(-) diff --git a/Buffs/StatBuffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs index 53a0e6b247..6400ba9f56 100644 --- a/Buffs/StatBuffs/Mushy.cs +++ b/Buffs/StatBuffs/Mushy.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Buffs.StatBuffs { public class Mushy : ModBuff { - public static int DefenseBoost = 5; + public static int DefenseBoost = 3; public static int RegenBoost = 2; public override LocalizedText Description => base.Description.WithFormatArgs(DefenseBoost, RegenBoost.ToRegenPerSecond()); diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index fd8c49ad3f..a3a0320242 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5187,7 +5187,7 @@ namespace CalamityMod.CalPlayer ((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) + (aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) + (laudanum && Player.HasBuff(BuffID.VortexDebuff) ? 0.15f : 0f) + - ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) + + ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold)) ? FrostFlare.AccelerationBoost : 0f) + (dragonScales ? 0.1f : 0f) + (CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) + (silvaSet ? SilvaArmor.AccelerationBoost : 0f) + @@ -5207,7 +5207,7 @@ namespace CalamityMod.CalPlayer (stressPills ? 0.05f : 0f) + ((abyssalDivingSuit && Player.IsUnderwater()) ? 0.05f : 0f) + (aquaticHeartWaterBuff ? AquaticHeart.WaterSpeedBoost : 0f) + - ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) ? 0.15f : 0f) + + ((frostFlare && Player.statLife <= (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold)) ? FrostFlare.AccelerationBoost : 0f) + (dragonScales ? 0.1f : 0f) + (CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) + (silvaSet ? SilvaArmor.AccelerationBoost : 0f) + diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 2c8276d8ee..290e7e6d3e 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2225,7 +2225,7 @@ namespace CalamityMod.CalPlayer SoundEngine.PlaySound(SoundID.Item96, Player.Center); } - if (gShell) //3 seconds of no dash reduction and reduced defense + if (gShell) { if (giantShellPostHit == 0) { @@ -2242,10 +2242,10 @@ namespace CalamityMod.CalPlayer dust.scale = Main.rand.NextFloat(1.5f, 1.2f); } } - giantShellPostHit = 180; + giantShellPostHit = GiantShell.PostHitCancelDuration; } - if (tortShell) //3 seconds of no dash reduction and reduced defense + if (tortShell) { if (tortShellPostHit == 0) { @@ -2262,7 +2262,7 @@ namespace CalamityMod.CalPlayer dust.scale = Main.rand.NextFloat(1.6f, 2.2f); } } - tortShellPostHit = 180; + tortShellPostHit = GiantTortoiseShell.PostHitCancelDuration; } if (aquaticHeartIce) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8f40b12dd9..3d5996fa8f 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -311,11 +311,11 @@ namespace CalamityMod.CalPlayer if (dashStart) { lastDashWasTabi = false; - } - if (((gShell && giantShellPostHit == 0) || (tortShell && tortShellPostHit == 0)) && dashStart) - { - Player.velocity.X *= 0.9f; + if ((tortShell && tortShellPostHit == 0)) + Player.velocity.X *= GiantTortoiseShell.DashVelocityMult; + if ((gShell && giantShellPostHit == 0)) + Player.velocity.X *= GiantShell.DashVelocityMult; } // Tabi/Master Ninja Gear dash change @@ -3471,7 +3471,7 @@ namespace CalamityMod.CalPlayer if (giantShellPostHit > 0) { - Player.statDefense -= 3; + Player.statDefense -= GiantShell.DefenseBoost; giantShellPostHit--; } if (giantShellPostHit < 0) @@ -3487,11 +3487,11 @@ namespace CalamityMod.CalPlayer if (tortShellPostHit > 0) { - Player.statDefense -= 6; + Player.statDefense -= GiantTortoiseShell.DefenseBoost; tortShellPostHit--; } else - Player.endurance += 0.05f; + Player.endurance += GiantTortoiseShell.DamageReductionBoost; if (tortShellPostHit < 0) { @@ -3799,10 +3799,10 @@ namespace CalamityMod.CalPlayer Player.buffImmune[BuffID.Chilled] = true; Player.buffImmune[BuffID.Frozen] = true; - if (Player.statLife > (int)(Player.statLifeMax2 * 0.5)) - Player.GetDamage() += 0.1f; - if (Player.statLife <= (int)(Player.statLifeMax2 * 0.5)) - Player.statDefense += 15; + if (Player.statLife > (int)(Player.statLifeMax2 * FrostFlare.HealthRatioThreshold)) + Player.GetDamage() += FrostFlare.DamageBoost; + else + Player.statDefense += FrostFlare.DefenseBoost; } if (vexation) diff --git a/Items/Accessories/BloodyWormScarf.cs b/Items/Accessories/BloodyWormScarf.cs index 94f56a3c97..846392ae1d 100644 --- a/Items/Accessories/BloodyWormScarf.cs +++ b/Items/Accessories/BloodyWormScarf.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 42; - Item.defense = 3; + Item.defense = 2; Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.accessory = true; diff --git a/Items/Accessories/BloodyWormTooth.cs b/Items/Accessories/BloodyWormTooth.cs index f81bb96832..a57a2e73d0 100644 --- a/Items/Accessories/BloodyWormTooth.cs +++ b/Items/Accessories/BloodyWormTooth.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 12; Item.height = 15; - Item.defense = 3; + Item.defense = 2; Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; Item.accessory = true; diff --git a/Items/Accessories/FrostFlare.cs b/Items/Accessories/FrostFlare.cs index 647d427878..93326a9153 100644 --- a/Items/Accessories/FrostFlare.cs +++ b/Items/Accessories/FrostFlare.cs @@ -2,6 +2,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,6 +10,13 @@ namespace CalamityMod.Items.Accessories public class FrostFlare : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static float HealthRatioThreshold = 0.5f; + public static float DamageBoost = 0.1f; + public static int DefenseBoost = 10; + public static float AccelerationBoost = 0.15f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(HealthRatioThreshold.ToPercent(), DamageBoost.ToPercent(), DefenseBoost, AccelerationBoost.ToPercent()); + public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 4)); diff --git a/Items/Accessories/GiantShell.cs b/Items/Accessories/GiantShell.cs index fe575c6fd1..07a4087a9e 100644 --- a/Items/Accessories/GiantShell.cs +++ b/Items/Accessories/GiantShell.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,11 +10,17 @@ namespace CalamityMod.Items.Accessories public class GiantShell : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int DefenseBoost = 4; + public static float DashVelocityMult = 0.9f; + public static int PostHitCancelDuration = CalamityUtils.SecondsToFrames(3); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((1f - DashVelocityMult).ToPercent(), PostHitCancelDuration.FramesToSeconds()); + public override void SetDefaults() { Item.width = 30; Item.height = 28; - Item.defense = 5; + Item.defense = DefenseBoost; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; Item.accessory = true; diff --git a/Items/Accessories/GiantTortoiseShell.cs b/Items/Accessories/GiantTortoiseShell.cs index 9551ffbb81..95a335be53 100644 --- a/Items/Accessories/GiantTortoiseShell.cs +++ b/Items/Accessories/GiantTortoiseShell.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -8,11 +9,18 @@ namespace CalamityMod.Items.Accessories public class GiantTortoiseShell : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int DefenseBoost = 6; + public static float DamageReductionBoost = 0.1f; + public static float DashVelocityMult = 0.9f; + public static int PostHitCancelDuration = CalamityUtils.SecondsToFrames(3); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageReductionBoost.ToPercent(), (1f - DashVelocityMult).ToPercent(), PostHitCancelDuration.FramesToSeconds()); + public override void SetDefaults() { Item.width = 46; Item.height = 30; - Item.defense = 10; + Item.defense = DefenseBoost; Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; Item.rare = ItemRarityID.LightRed; Item.accessory = true; diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d51e357e31..7dcbae69b9 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -284,10 +284,6 @@ namespace CalamityMod.Items #endregion #region CATEGORY 2: Defense Balancing - { 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 diff --git a/Items/Weapons/Magic/PrimordialEarth.cs b/Items/Weapons/Magic/PrimordialEarth.cs index f0f2663dd6..40fa87bb55 100644 --- a/Items/Weapons/Magic/PrimordialEarth.cs +++ b/Items/Weapons/Magic/PrimordialEarth.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Magic { public new string LocalizationCategory => "Items.Weapons.Magic"; - public static int BuffDefenseBoost = 12; + public static int BuffDefenseBoost = 4; public static float BuffDamageBoost = 0.12f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(BuffDefenseBoost, BuffDamageBoost.ToPercent()); diff --git a/Items/Weapons/Melee/StygianShield.cs b/Items/Weapons/Melee/StygianShield.cs index 53f56777d9..ef54c26f90 100644 --- a/Items/Weapons/Melee/StygianShield.cs +++ b/Items/Weapons/Melee/StygianShield.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee public static readonly SoundStyle ShieldCatchSound = new("CalamityMod/Sounds/Item/StygianCatch"); // Held stats - public const int HeldDefense = 16; + public const int HeldDefense = 8; public const int DisableDashDuration = 90; public int ThrownShieldID = ModContent.ProjectileType(); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b2ab571ea3..0a39832510 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -815,8 +815,8 @@ FrostFlare: { ''' All attacks and projectiles inflict [cbuff:Frostburn2] Grants immunity to Frostburn, Chilled and Frozen - Being above 50% life grants 10% increased damage - Being below 50% life grants 15 defense and 15% increased max movement speed and acceleration + Being above {0}% life grants {1}% increased damage + Being below {0}% life grants {2} defense and {3}% increased max movement speed and acceleration Grants resistance against cold attacks ''' } @@ -855,8 +855,8 @@ GiantShell: { DisplayName: Giant Shell Tooltip: ''' - 10% reduced dash velocity - Taking a hit restores dash velocity and reduces defense for 3 seconds + {0}% reduced dash velocity + Taking a hit restores dash velocity and reduces defense for {1} seconds ''' } @@ -865,8 +865,8 @@ GiantTortoiseShell: { Tooltip: ''' {$Common.KnockbackImmunity} - 5% increased damage reduction and 10% reduced dash velocity - Taking a hit restores dash velocity and reduces defense and damage reduction for 3 seconds + {0}% increased damage reduction and {1}% reduced dash velocity + Taking a hit restores dash velocity and reduces defense and damage reduction for {2} seconds ''' } From 7dd48f6ffca107d44aa66460c22e36168f65f1ed Mon Sep 17 00:00:00 2001 From: Big E Date: Tue, 7 Apr 2026 14:10:12 -0400 Subject: [PATCH 113/142] + Made Luci's Sight not a transformation item --- Items/Accessories/Vanity/LucisSight.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Items/Accessories/Vanity/LucisSight.cs b/Items/Accessories/Vanity/LucisSight.cs index df711e8b14..0afdc9724c 100644 --- a/Items/Accessories/Vanity/LucisSight.cs +++ b/Items/Accessories/Vanity/LucisSight.cs @@ -1,18 +1,22 @@ -using CalamityMod.Items.BaseItems; -using Terraria; +using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories.Vanity { - public class LucisSight : TransformationAccessory, ILocalizedModType + [AutoloadEquip(EquipType.Face)] + public class LucisSight : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public override (EquipType, string, string)[] EquipSlots => - [ - (EquipType.Face, "LucisSight", null), - ]; + public override void SetStaticDefaults() + { + if (!Main.dedServ) + { + int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face); + ArmorIDs.Face.Sets.DrawInFaceUnderHairLayer[equipSlot] = true; + } + } public override void SetDefaults() { From 4cc7c7b6ad9ef32c0b1a541114a0e9db113c447d Mon Sep 17 00:00:00 2001 From: fryzahh Date: Tue, 7 Apr 2026 17:55:22 -0400 Subject: [PATCH 114/142] Wulfrum Rovers can now travel up half tiles --- NPCs/NormalNPCs/WulfrumRover.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/NormalNPCs/WulfrumRover.cs b/NPCs/NormalNPCs/WulfrumRover.cs index 4b82f3e3e3..592183f14f 100644 --- a/NPCs/NormalNPCs/WulfrumRover.cs +++ b/NPCs/NormalNPCs/WulfrumRover.cs @@ -135,6 +135,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.spriteDirection = -NPC.direction; NPC.velocity.X = MathHelper.Lerp(NPC.velocity.X, MaxMovementSpeedX * NPC.direction, 0.0125f); + NPC.StepUpBlocks(); } public override float SpawnChance(NPCSpawnInfo spawnInfo) From 3b3a3c3d68eb71722199dfc88cddd098cc67e1fb Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 7 Apr 2026 17:37:20 -0500 Subject: [PATCH 115/142] final cleanups --- Items/Armor/GodSlayer/GodSlayerHeadMelee.cs | 1 - Items/Armor/GodSlayer/GodSlayerHeadRanged.cs | 1 - Items/Armor/GodSlayer/GodSlayerHeadRogue.cs | 1 - Items/Weapons/Magic/HyperdeathRiftScepter.cs | 5 ----- Items/Weapons/Melee/MawOfInfinity.cs | 4 ---- Items/Weapons/Melee/TheObliterator.cs | 2 -- Items/Weapons/Ranged/ThreadOfEradication.cs | 4 ---- Items/Weapons/Rogue/DimensionTearingDisk.cs | 5 ----- Items/Weapons/Summon/VoidEaterMarionette.cs | 5 ----- .../en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 6 +++--- 10 files changed, 3 insertions(+), 31 deletions(-) diff --git a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs index 76d20bfa39..b43f8bf6f0 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadMelee.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Items.Armor.GodSlayer modPlayer.godSlayerDamage = true; var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(); player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusHurtDamageThreshold, hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds()); - player.setBonus = player.setBonus.Replace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); player.aggro += SetBonusAggroBoost; if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs index 1c5617ac58..1eff59c595 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRanged.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Items.Armor.GodSlayer modPlayer.godSlayerRanged = true; var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(); player.setBonus = this.GetLocalization("SetBonus").Format(ShrapnelRoundCooldown.FramesToSeconds(), hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds()); - player.setBonus = player.setBonus.Replace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) { modPlayer.DeferredDashID = GodslayerArmorDash.ID; diff --git a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs index b5d0b638f5..c89fbe2355 100644 --- a/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs +++ b/Items/Armor/GodSlayer/GodSlayerHeadRogue.cs @@ -50,7 +50,6 @@ namespace CalamityMod.Items.Armor.GodSlayer modPlayer.wearingRogueArmor = true; var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString(); player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), RogueDamageBoostAtFullHealth.ToPercent(), SetBonusHurtDamageThreshold, hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds()); - player.setBonus = player.setBonus.Replace("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) { modPlayer.DeferredDashID = GodslayerArmorDash.ID; diff --git a/Items/Weapons/Magic/HyperdeathRiftScepter.cs b/Items/Weapons/Magic/HyperdeathRiftScepter.cs index f8978a184f..2a2bd2e163 100644 --- a/Items/Weapons/Magic/HyperdeathRiftScepter.cs +++ b/Items/Weapons/Magic/HyperdeathRiftScepter.cs @@ -16,11 +16,6 @@ namespace CalamityMod.Items.Weapons.Magic public class HyperdeathRiftScepter : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; - - public override void ModifyTooltips(List tooltips) - { - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); - } public override void SetStaticDefaults() { Item.staff[Type] = true; diff --git a/Items/Weapons/Melee/MawOfInfinity.cs b/Items/Weapons/Melee/MawOfInfinity.cs index 1cfcd0745f..32073b2d56 100644 --- a/Items/Weapons/Melee/MawOfInfinity.cs +++ b/Items/Weapons/Melee/MawOfInfinity.cs @@ -20,10 +20,6 @@ namespace CalamityMod.Items.Weapons.Melee { base.SetStaticDefaults(); } - public override void ModifyTooltips(List tooltips) - { - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); - } public override void SetDefaults() { Item.width = 78; diff --git a/Items/Weapons/Melee/TheObliterator.cs b/Items/Weapons/Melee/TheObliterator.cs index 274426a673..25c24004a0 100644 --- a/Items/Weapons/Melee/TheObliterator.cs +++ b/Items/Weapons/Melee/TheObliterator.cs @@ -20,8 +20,6 @@ namespace CalamityMod.Items.Weapons.Melee public override void ModifyTooltips(List tooltips) { tooltips.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal")); - if (!Main.zenithWorld) - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); } public override void SetStaticDefaults() diff --git a/Items/Weapons/Ranged/ThreadOfEradication.cs b/Items/Weapons/Ranged/ThreadOfEradication.cs index 722fb0535e..cde4b30f11 100644 --- a/Items/Weapons/Ranged/ThreadOfEradication.cs +++ b/Items/Weapons/Ranged/ThreadOfEradication.cs @@ -22,10 +22,6 @@ namespace CalamityMod.Items.Weapons.Ranged { CalamityItemSets.ShowScalingCritDamageTooltip[Type] = true; } - public override void ModifyTooltips(List tooltips) - { - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); - } public override void SetDefaults() { Item.width = 40; diff --git a/Items/Weapons/Rogue/DimensionTearingDisk.cs b/Items/Weapons/Rogue/DimensionTearingDisk.cs index 4a4aeb869d..762b079e8d 100644 --- a/Items/Weapons/Rogue/DimensionTearingDisk.cs +++ b/Items/Weapons/Rogue/DimensionTearingDisk.cs @@ -35,11 +35,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shootSpeed = Speed; } - public override void ModifyTooltips(List tooltips) - { - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); - } - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); diff --git a/Items/Weapons/Summon/VoidEaterMarionette.cs b/Items/Weapons/Summon/VoidEaterMarionette.cs index 4bfb783090..cbcd6952e3 100644 --- a/Items/Weapons/Summon/VoidEaterMarionette.cs +++ b/Items/Weapons/Summon/VoidEaterMarionette.cs @@ -19,11 +19,6 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public bool FocusFetch = false; - - public override void ModifyTooltips(List tooltips) - { - tooltips.FindAndReplaceAll("ff00ff", Utils.Hex3(DevourerofGodsHead.SpecialMoveColor)); - } public override void SetDefaults() { Item.width = 68; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index b55af2186e..7d07b1699f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -422,10 +422,10 @@ GodSlayerChestplate: { Tooltip: "{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}" CommonSetBonus: ''' - Press {0} to [c/ff00ff:Dimensional Drive] towards your cursor for 2 seconds + Press {0} to [ceffect/dog:Dimensional Drive] towards your cursor for 2 seconds Enemies you dash through take massive damage - During [c/ff00ff:Dimensional Drive] you are immune to damage and most debuffs - [c/ff00ff:Dimensional Drive] has a {1} second cooldown + During [ceffect/dog:Dimensional Drive] you are immune to damage and most debuffs + [ceffect/dog:Dimensional Drive] has a {1} second cooldown ''' } From ca768f1ede2f1e9cb84ea95482e762665f2e73f9 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 4 Mar 2026 18:11:02 -0600 Subject: [PATCH 116/142] Grape Beer changes --- Buffs/Alcohol/GrapeBeerBuff.cs | 1 - Items/Potions/Alcohol/GrapeBeer.cs | 8 +-- .../en-US/Mods.CalamityMod.Buffs.hjson | 2 +- .../Mods.CalamityMod.Items.Potions.hjson | 3 +- Projectiles/CalamityGlobalProjectile.cs | 53 +++++++++++++++++-- 5 files changed, 56 insertions(+), 11 deletions(-) diff --git a/Buffs/Alcohol/GrapeBeerBuff.cs b/Buffs/Alcohol/GrapeBeerBuff.cs index 83504af851..714c912651 100644 --- a/Buffs/Alcohol/GrapeBeerBuff.cs +++ b/Buffs/Alcohol/GrapeBeerBuff.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Buffs.Alcohol { var cplayer = player.Calamity(); cplayer.grapeBeer = true; - cplayer.critDamage -= GrapeBeer.CritLoss * 0.01f; } } } diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index 1fcd4d64cf..b6e73d84d2 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -11,9 +11,11 @@ namespace CalamityMod.Items.Potions.Alcohol public class GrapeBeer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Potions"; - - public static float CritLoss = 50; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritLoss); + public static float CloseRangeDistance = 160; + public static float LongRangeDistance = 800; + public static float CloseRangeDamage = 1f; + public static float LongRangeDamage = 0.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage,LongRangeDistance/16f); public override void SetStaticDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index f9f02b828f..478d7c4177 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -45,7 +45,7 @@ FireballBuff: { GrapeBeerBuff: { DisplayName: Grape Beer - Description: Ranged projectiles gain homing, reduced critical strike damage + Description: Ranged projectiles gain homing, reduced damage to distant foes } ManhattanBuff: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index a4c20d91d5..7dae1908d8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -241,7 +241,8 @@ GrapeBeer: { Tooltip: ''' Bullets, Arrows, Darts, and Rockets gain homing - {0}% reduced critical strike damage + Projectiles deal less damage the further the enemy is. + This reaches a minimum of {0}x damage at {1} tiles away {$Common.AlcoholWarning} ''' } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5aea36abe3..052b17302a 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -201,6 +201,15 @@ namespace CalamityMod.Projectiles /// public bool grapeBeer = false; + /// + /// How strong grape beer homing is on this. It speeds up the longer the target is targeted. + /// + public float grapeBeerHomingPower = 0.01f; + /// + /// ID of last target from grapebeer + /// + public int grapeBeerHomingTarget = -1; + /// /// Variable used for storing the actual amount of extra updates a projectile has.
/// This is NOT set automatically, and must be set whenever it is needed. @@ -327,7 +336,7 @@ namespace CalamityMod.Projectiles void ApplyGrapeBeer() { grapeBeer = true; - conditionalHomingRange = 600; + conditionalHomingRange = 300; if (projectile.timeLeft > 300 * projectile.MaxUpdates) projectile.timeLeft = 300 * projectile.MaxUpdates; //Calamity adds a hybrid iframe system when both local and static are set to true, so this works fine for both global and static projectiles. @@ -4291,16 +4300,43 @@ namespace CalamityMod.Projectiles // Grape beer-specific homing. If the projectile is aligned a certain amount to the direction to the target, it will home in. else if (conditionalHomingRange > 0f && Main.player[projectile.owner].heldProj != projectile.whoAmI && projectile.aiStyle != ProjAIStyleID.HeldProjectile && grapeBeer) { - NPC target = projectile.Center.ClosestNPCAt(conditionalHomingRange); + float npcDistCompare = 25000f; // Initializing the value to a large number so the first entry is basically guaranteed to replace it. + NPC target = null; + foreach (NPC n in Main.ActiveNPCs) + { + float extraDistance = (n.width / 2) + (n.height / 2); + if (!n.CanBeChasedBy(projectile, false) || !projectile.WithinRange(n.Center, conditionalHomingRange + extraDistance) || ((projectile.localNPCImmunity[n.whoAmI] > 0 || projectile.localNPCImmunity[n.whoAmI] == -1 || n.immune[projectile.owner] > 0))) + continue; + + float currentNPCDist = Vector2.Distance(n.Center, projectile.Center); + if (Projectile.perIDStaticNPCImmunity[projectile.type][n.whoAmI] > Main.GameUpdateCount) + currentNPCDist += 1600; //Prioritize things that don't currently have iframes, but still home in on stuff that has static iframes if needed. + if ((currentNPCDist < npcDistCompare) && (!projectile.tileCollide || Collision.CanHit(projectile.Center, 1, 1, n.Center, 1, 1))) + { + npcDistCompare = currentNPCDist; + target = n; + } + } + if (target is not null) { + if (grapeBeerHomingTarget == target.whoAmI) + { + grapeBeerHomingPower += 0.004f; + } else { + grapeBeerHomingPower = 0.015f; + } + + HomingTarget = grapeBeerHomingTarget = target.whoAmI; Vector2 targetDirection = projectile.SafeDirectionTo(target.Center); - float trackingSpeed = Vector2.Dot(targetDirection, projectile.velocity.SafeNormalize(Vector2.UnitX)) > 0.835f ? 0.01325f : 0f; // Delicate values, please test changes you make to them + float trackingSpeed = grapeBeerHomingPower;// Vector2.Dot(targetDirection, projectile.velocity.SafeNormalize(Vector2.UnitX)) > 0.835f ? 0.01325f : 0f; // Delicate values, please test changes you make to them - Vector2 currVelocity = projectile.velocity; + var currVelocity = projectile.velocity.Length(); + if (currVelocity < 8) + currVelocity += grapeBeerHomingPower; - projectile.velocity = projectile.velocity.ToRotation().AngleTowards(targetDirection.ToRotation(), trackingSpeed).ToRotationVector2() * currVelocity.Length(); + projectile.velocity = projectile.velocity.ToRotation().AngleTowards(targetDirection.ToRotation(), trackingSpeed).ToRotationVector2() * currVelocity; } } @@ -4580,6 +4616,13 @@ namespace CalamityMod.Projectiles Player player = Main.player[projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); + if (grapeBeer) + { + var dis = target.Distance(Main.player[projectile.owner].Center); + float remap = Utils.Remap(dis, GrapeBeer.CloseRangeDistance, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage); + modifiers.SourceDamage *= remap; + } + // Old Fashioned buffs (or debuffs) apply if the player has Old Fashioned // IV Drip on the Rocks inherits the same logic as Old Fashioned if (modPlayer.oldFashioned && buffedByOldFashioned.HasValue) From 9a2ef4d6f76c3803224d5fc8f27e7c3777e9f51b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Wed, 4 Mar 2026 19:24:29 -0500 Subject: [PATCH 117/142] Evil and intimidating period --- Localization/en-US/Mods.CalamityMod.Items.Potions.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 7dae1908d8..8b67806f2e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -241,7 +241,7 @@ GrapeBeer: { Tooltip: ''' Bullets, Arrows, Darts, and Rockets gain homing - Projectiles deal less damage the further the enemy is. + Projectiles deal less damage the further the enemy is This reaches a minimum of {0}x damage at {1} tiles away {$Common.AlcoholWarning} ''' From 6520dfd6eb9b842f6bdd372f1901f33df9cd0fdf Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 4 Mar 2026 20:47:03 -0600 Subject: [PATCH 118/142] Baguette now works with Red Wine again --- Buffs/Potions/BaguetteBuff.cs | 6 +++-- Items/Potions/Food/Baguette.cs | 27 +++++++++++++++---- .../en-US/Mods.CalamityMod.Buffs.hjson | 2 +- .../Mods.CalamityMod.Items.Potions.hjson | 1 + 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Buffs/Potions/BaguetteBuff.cs b/Buffs/Potions/BaguetteBuff.cs index 878bca7213..8e6e11aac2 100644 --- a/Buffs/Potions/BaguetteBuff.cs +++ b/Buffs/Potions/BaguetteBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Items.Potions.Food; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Buffs.Potions @@ -7,7 +8,7 @@ namespace CalamityMod.Buffs.Potions { public override void SetStaticDefaults() { - Main.debuff[Type] = false; + Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; } @@ -15,6 +16,7 @@ namespace CalamityMod.Buffs.Potions public override void Update(Player player, ref int buffIndex) { player.Calamity().baguette = true; + player.lifeRegen -= Baguette.RedWineRegenLoss; } } } diff --git a/Items/Potions/Food/Baguette.cs b/Items/Potions/Food/Baguette.cs index 862d4a1da9..d245dca640 100644 --- a/Items/Potions/Food/Baguette.cs +++ b/Items/Potions/Food/Baguette.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.Potions; +using CalamityMod.Buffs.Alcohol; +using CalamityMod.Buffs.Potions; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -12,9 +13,10 @@ namespace CalamityMod.Items.Potions.Food { public new string LocalizationCategory => "Items.Potions"; - public static int RedWineBuffedHealValue = 250; - public static int RedWineBuffedRegenLoss = 4; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RedWineBuffedHealValue, RedWineBuffedRegenLoss.ToRegenPerSecond()); + public static int RedWineHealValue = 200; + public static int RedWineRegenLoss = 4; + public static int RedWineRegenLossDuration = CalamityUtils.SecondsToFrames(15); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RedWineRegenLoss.ToRegenPerSecond()); public override void SetStaticDefaults() { @@ -28,6 +30,20 @@ namespace CalamityMod.Items.Potions.Food ItemID.Sets.IsFood[Type] = true; } + public override void UpdateInventory(Player player) + { + if (player.HasBuff()) + { + Item.healLife = RedWineHealValue; + Item.potion = true; + } + else + { + Item.healLife = 0; + Item.potion = false; + } + } + public override void SetDefaults() { Item.DefaultToFood(52, 38, BuffID.WellFed, CalamityUtils.MinutesToFrames(5)); @@ -45,7 +61,8 @@ namespace CalamityMod.Items.Potions.Food { // 5 minutes for both player.AddBuff(BuffID.WellFed, Item.buffTime); - player.AddBuff(ModContent.BuffType(), Item.buffTime); + if (player.HasBuff()) + player.AddBuff(ModContent.BuffType(), RedWineRegenLossDuration); } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 478d7c4177..8f386dd8d3 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -674,7 +674,7 @@ AstralInjectionBuff: { BaguetteBuff: { DisplayName: Baguette - Description: Goes well with Red Wine + Description: Life regeneration reduced by 2 HP/s } BloodfinBoost: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 8b67806f2e..f87aed0533 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -22,6 +22,7 @@ Baguette: { Tooltip: ''' {$CommonItemTooltip.MinorStats} + Goes well with [cbuff:CalamityMod/RedWineBuff] [c/FCE391:'je suis Monte'] ''' } From cee00b4e7528027664ec33ce28ea9ab4724689e4 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 4 Mar 2026 20:49:18 -0600 Subject: [PATCH 119/142] baguette red wine effect tooltip --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 1 + 1 file changed, 1 insertion(+) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 8f386dd8d3..5e759c4d25 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -76,6 +76,7 @@ OldFashionedBuff: { RedWineBuff: { DisplayName: Red Wine Description: Increased vertical speed, reduced flight time + ItemTooltip: Causes Baguette to heal 200 HP, but reduce regeneration by 2 HP/s for 15 seconds } RumBuff: { From ee7c9587eb0f3c9810fa982a413d4f0a8b7724d3 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 28 Mar 2026 00:52:32 -0400 Subject: [PATCH 120/142] Grape Beer Re-re-revision no.1 --- Items/Potions/Alcohol/GrapeBeer.cs | 7 +++---- Projectiles/CalamityGlobalProjectile.cs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index b6e73d84d2..e356a10ec1 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -11,10 +11,9 @@ namespace CalamityMod.Items.Potions.Alcohol public class GrapeBeer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Potions"; - public static float CloseRangeDistance = 160; - public static float LongRangeDistance = 800; - public static float CloseRangeDamage = 1f; - public static float LongRangeDamage = 0.5f; + public static float LongRangeDistance = 1000; + public static float CloseRangeDamage = 0.8f; + public static float LongRangeDamage = 0.4f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage,LongRangeDistance/16f); public override void SetStaticDefaults() diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 052b17302a..8c979e578f 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4619,7 +4619,7 @@ namespace CalamityMod.Projectiles if (grapeBeer) { var dis = target.Distance(Main.player[projectile.owner].Center); - float remap = Utils.Remap(dis, GrapeBeer.CloseRangeDistance, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage); + float remap = Utils.Remap(dis, 0, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage); modifiers.SourceDamage *= remap; } From 821c7af5ed6d23e3ee9f88447fb97a1ef916a0b6 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 28 Mar 2026 01:50:03 -0400 Subject: [PATCH 121/142] re-re-re-revamp! --- Items/Potions/Alcohol/GrapeBeer.cs | 8 +++++--- Projectiles/CalamityGlobalProjectile.cs | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Items/Potions/Alcohol/GrapeBeer.cs b/Items/Potions/Alcohol/GrapeBeer.cs index e356a10ec1..231f2c2d19 100644 --- a/Items/Potions/Alcohol/GrapeBeer.cs +++ b/Items/Potions/Alcohol/GrapeBeer.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Alcohol; +using System; using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; using Terraria; @@ -11,9 +12,10 @@ namespace CalamityMod.Items.Potions.Alcohol public class GrapeBeer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Potions"; - public static float LongRangeDistance = 1000; - public static float CloseRangeDamage = 0.8f; - public static float LongRangeDamage = 0.4f; + public static float CloseRangeDistance = 80; + public static float LongRangeDistance = 1200; + public static float CloseRangeDamage = 0.75f; + public static float LongRangeDamage = 0.25f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(LongRangeDamage,LongRangeDistance/16f); public override void SetStaticDefaults() diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 8c979e578f..64e0f0e763 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4618,8 +4618,8 @@ namespace CalamityMod.Projectiles if (grapeBeer) { - var dis = target.Distance(Main.player[projectile.owner].Center); - float remap = Utils.Remap(dis, 0, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage); + Vector2 pointToCheck = Vector2.Clamp(player.Center, target.TopLeft, target.BottomRight); + float remap = Utils.Remap(Utils.Distance(player.Center, pointToCheck), GrapeBeer.CloseRangeDistance, GrapeBeer.LongRangeDistance, GrapeBeer.CloseRangeDamage, GrapeBeer.LongRangeDamage); modifiers.SourceDamage *= remap; } From 111d7cda69729de982b843a69d1f7e98dd712eea Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Wed, 8 Apr 2026 20:59:32 -0400 Subject: [PATCH 122/142] Flying Carpet recipe requires Loom instead of Anvil --- Systems/Mechanic/RecipeSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index 741a5fe91b..50e3decbc7 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -1616,7 +1616,7 @@ namespace CalamityMod.Systems r.AddIngredient(ItemID.Silk, 10); r.AddIngredient(ItemID.AntlionMandible, 2); r.AddIngredient(5); - r.AddTile(TileID.Anvils); + r.AddTile(TileID.Loom); r.Register(); r.DisableDecraft(); From 4d2243de1f4698c3b93f7aedbd72ce6099bd398d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 Apr 2026 19:34:41 -0400 Subject: [PATCH 123/142] Reduced damage of Buzzkill and Sup Slaughterer holdouts Increased Sup Slaughterer's use time to kill spam meta Also fixed Sup Slaughterer's lingering saw dealing more damage when fired from the holdout than when fired from a plain right-click --- Items/Weapons/Ranged/Buzzkill.cs | 3 +-- Items/Weapons/Ranged/SuperradiantSlaughterer.cs | 7 +++---- Localization/en-US/Mods.CalamityMod.Items.Tools.hjson | 2 +- Projectiles/Ranged/BuzzkillHoldout.cs | 7 +++++-- Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs | 11 +++++++---- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Items/Weapons/Ranged/Buzzkill.cs b/Items/Weapons/Ranged/Buzzkill.cs index 6c34e7b8ae..0bf1b87ca8 100644 --- a/Items/Weapons/Ranged/Buzzkill.cs +++ b/Items/Weapons/Ranged/Buzzkill.cs @@ -42,8 +42,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // The holdout deals 1.5x base damage. - Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), (int)(damage * 1.5), knockback, player.whoAmI); + Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI); return false; } diff --git a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs index 69a4afb43a..e3e4ed312b 100644 --- a/Items/Weapons/Ranged/SuperradiantSlaughterer.cs +++ b/Items/Weapons/Ranged/SuperradiantSlaughterer.cs @@ -58,8 +58,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.damage = 100; Item.DamageType = DamageClass.Ranged; Item.crit = 21; - Item.useTime = 10; - Item.useAnimation = 10; + Item.useTime = Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.noUseGraphic = true; @@ -124,8 +123,8 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } - // The holdout deals 2x base damage. - Projectile.NewProjectile(source, position, velocity, Item.shoot, damage * 2, knockback, player.whoAmI); + // The holdout deals 1.5x base damage. + Projectile.NewProjectile(source, position, velocity, Item.shoot, (int)(damage * 1.5), knockback, player.whoAmI); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 0f3e79e5de..935171ee91 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -390,7 +390,7 @@ WulfrumDiggingTurtle: { WulfrumDrill: { DisplayName: Wulfrum Drill - Tooltip: {$Common.ArmorPenetration} + Tooltip: "{$Common.ArmorPenetration}" } WulfrumScaffoldKit: { diff --git a/Projectiles/Ranged/BuzzkillHoldout.cs b/Projectiles/Ranged/BuzzkillHoldout.cs index 63e38eac06..cd9a71eb7d 100644 --- a/Projectiles/Ranged/BuzzkillHoldout.cs +++ b/Projectiles/Ranged/BuzzkillHoldout.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Projectiles.Ranged int sawLevel = (SawPower >= 1f).ToInt() + (SawPower >= 0.25f).ToInt(); if (Main.myPlayer == Projectile.owner) { - float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower) / 1.5f; // The damage must be divided by 1.5 to offset the holdout having 1.5x base damage. + float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower); int sawPierce = (int)MathHelper.Lerp(2f, 6f, SawPower); Projectile buzzsaw = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * Owner.HeldItem.shootSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * sawDamageMult), (int)(Projectile.knockBack * (sawDamageMult / 2)), Main.myPlayer, sawLevel); @@ -179,13 +179,16 @@ namespace CalamityMod.Projectiles.Ranged } // The holdout can deal damage; you're literally spinning up a buzzsaw at the end, after all. - public override bool? CanDamage() => !NoSawOnHoldout; + public override bool? CanDamage() => !NoSawOnHoldout && Time % Projectile.localNPCHitCooldown == 0; public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 240); SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/SwiftSlice") { Volume = 0.7f }, GunTipPosition); + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.8f); + int SawLevel = (Time / ChargeupTime >= 1f).ToInt() + (Time / ChargeupTime >= 0.25f).ToInt(); int bloodCount = 4 + 3 * SawLevel; for (int p = 0; p < bloodCount; p++) diff --git a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs index 4d2b48ff8e..af5cd9e286 100644 --- a/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs +++ b/Projectiles/Ranged/SuperradiantSlaughtererHoldout.cs @@ -81,12 +81,12 @@ namespace CalamityMod.Projectiles.Ranged Owner.AddCooldown(SuperradiantSawBoost.ID, SuperradiantSlaughterer.DashCooldown); SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/MeatySlash"), GunTipPosition); - // Throws a lingering saw at the cursor that deals 3x damage (since the holdout already deals 2x) + // Throws a lingering saw at the cursor that deals 2x damage (since the holdout already deals 1.5x) if (Main.myPlayer == Projectile.owner) { float clampedMouseDist = MathHelper.Clamp(Vector2.Distance(GunTipPosition, Owner.Calamity().mouseWorld), 0f, 960f); float adjustedMouseDist = clampedMouseDist / 21f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * adjustedMouseDist, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * adjustedMouseDist, ModContent.ProjectileType(), (int)(Projectile.damage * 4f / 3f), Projectile.knockBack, Projectile.owner); } // End animation early @@ -125,7 +125,7 @@ namespace CalamityMod.Projectiles.Ranged SoundStyle ShootSound = new("CalamityMod/Sounds/Item/SawShot", 2) { PitchVariance = 0.1f, Volume = 0.4f + SawPower * 0.5f }; SoundEngine.PlaySound(ShootSound, GunTipPosition); - float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower) / 2f; // The damage must be divided by 2 to offset the holdout having 2x base damage. + float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower) / 1.5f; // The damage must be divided by 1.5 to offset the holdout having 1.5x base damage. int sawPierce = (int)MathHelper.Lerp(2f, 7f, SawPower); int sawLevel = (SawPower >= 1f).ToInt() + (SawPower >= 0.25f).ToInt(); @@ -240,7 +240,7 @@ namespace CalamityMod.Projectiles.Ranged } // The holdout can deal damage; you're literally spinning up a buzzsaw at the end, after all. - public override bool? CanDamage() => !NoSawOnHoldout; + public override bool? CanDamage() => !NoSawOnHoldout && Time % Projectile.localNPCHitCooldown == 0; public override void ModifyDamageHitbox(ref Rectangle hitbox) { @@ -258,6 +258,9 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(ModContent.BuffType(), 150); SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Custom/SwiftSlice") { Volume = 0.7f }, GunTipPosition); + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.8f); + // EPIC AND COOL RAINBOW PARTICLES WOOOO int SawLevel = (Time / ChargeupTime >= 1f).ToInt() + (Time / ChargeupTime >= 0.25f).ToInt(); int onHitSparkAmount = 4 + 4 * SawLevel; From 6ea9dddc6e236ffaaee12b67af4e60f54d55af28 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 Apr 2026 20:27:23 -0400 Subject: [PATCH 124/142] Biome Blade attunements --- Items/Weapons/Melee/TrueBiomeBlade.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 36b0850ef5..0082fe6841 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float ColdAttunement_ThirdSwingBoost = 1.25f; public static float ColdAttunement_MistDamageReduction = 0.11f; - public static int HotAttunement_BaseDamage = 126; + public static int HotAttunement_BaseDamage = 115; public static int HotAttunement_PlayerShredIFrames = 8; public static float HotAttunement_ShotDamageBoost = 4.5f; public static int HotAttunement_LocalIFrames = 24; //Be warned its got one extra update so all the iframes should be divided in 2 @@ -64,7 +64,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.5f; //It also crits, so be mindful of that public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 - public static int HolyAttunement_BaseDamage = 84; + public static int HolyAttunement_BaseDamage = 88; public static float HolyAttunement_BaseSwingDamageMult = 0.5f; public static float HolyAttunement_FullSwingDamageMult = 1f; public static float HolyAttunement_ThrowDamageBoost = 3f; From 6fb7a45ad133c594b98e5c4b60b0ecd9b7e15a87 Mon Sep 17 00:00:00 2001 From: Doze-Zoze <43045606+Doze-Zoze@users.noreply.github.com> Date: Thu, 9 Apr 2026 19:44:20 -0500 Subject: [PATCH 125/142] Delete en-US.hjson --- 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 1e167d96857d1fdd50687176ff9c02a70bae24bc Mon Sep 17 00:00:00 2001 From: Lion8cake <69915693+Lion8cake@users.noreply.github.com> Date: Sat, 11 Apr 2026 03:30:27 +0930 Subject: [PATCH 126/142] Fixed Sulphuric Sea water lighting not changing based on world height (#113) --- Waters/SulphuricWater.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Waters/SulphuricWater.cs b/Waters/SulphuricWater.cs index 267115e3f5..358282396c 100644 --- a/Waters/SulphuricWater.cs +++ b/Waters/SulphuricWater.cs @@ -59,9 +59,9 @@ namespace CalamityMod.Waters { if (Main.dayTime && !Main.raining) { - float brightness = MathHelper.Clamp(0.2f - (j / 680), 0f, 0.2f); - if (j > 580) - brightness *= 1f - (j - 580) / 100f; + float brightness = MathHelper.Clamp(0.2f - (j / ((int)Main.worldSurface + 120)), 0f, 0.2f); + if (j > (int)Main.worldSurface + 20) + brightness *= 1f - (j - ((int)Main.worldSurface + 20)) / 100f; float time = Main.GameUpdateCount; float waveScale1 = time * 0.014f; @@ -83,9 +83,9 @@ namespace CalamityMod.Waters if (!Main.dayTime && !Main.raining) { - float brightness = MathHelper.Clamp(0.17f - (j / 680), 0f, 0.17f); - if (j > 580) - brightness *= 1f - (j - 580) / 100f; + float brightness = MathHelper.Clamp(0.17f - (j / ((int)Main.worldSurface + 120)), 0f, 0.17f); + if (j > ((int)Main.worldSurface + 20)) + brightness *= 1f - (j - ((int)Main.worldSurface + 20)) / 100f; float waveScale1 = Main.GameUpdateCount * 0.014f; float waveScale2 = Main.GameUpdateCount * 0.1f; @@ -106,9 +106,9 @@ namespace CalamityMod.Waters if (Main.raining) { - float brightness = MathHelper.Clamp(1f - (j / 680), 0f, 1f); - if (j > 580) - brightness *= 1f - (j - 580) / 100f; + float brightness = MathHelper.Clamp(1f - (j / ((int)Main.worldSurface + 120)), 0f, 1f); + if (j > ((int)Main.worldSurface + 20)) + brightness *= 1f - (j - ((int)Main.worldSurface + 20)) / 100f; outputColor = Vector3.Lerp(outputColor, Color.LightSeaGreen.ToVector3(), 0.41f); outputColor *= brightness; From b9a284881e933c9240e82c309a9f3e134a8c670a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 10 Apr 2026 17:08:59 -0400 Subject: [PATCH 127/142] Removed deadcode from Cosmic Purple --- Rarities/CosmicPurple.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Rarities/CosmicPurple.cs b/Rarities/CosmicPurple.cs index 0a38e2d428..abbd9074dc 100644 --- a/Rarities/CosmicPurple.cs +++ b/Rarities/CosmicPurple.cs @@ -27,12 +27,6 @@ namespace CalamityMod.Rarities var sparkle = ModContent.Request("CalamityMod/ExtraTextures/UI/CrystalTextSparkle").Value; var fontSize = font.MeasureString(text); var center = fontSize / 2f; - - // this was intended behavior. i'm commenting it out for now because it seems like people do not like it. - /* - if (Item.expert) - textColor = Main.DiscoColor; - */ var glowPosition = new Vector2(X + center.X, Y + center.Y / 1.5f); textColor.A = 0; From 7d08357b2ee22bfe9b82ccfe73208e00830a56cb Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 10:10:24 +0700 Subject: [PATCH 128/142] hopping on the bandwagon --- Items/Placeables/FurnitureDriftwood/Driftwood.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Items/Placeables/FurnitureDriftwood/Driftwood.cs b/Items/Placeables/FurnitureDriftwood/Driftwood.cs index f041b00d8e..17363b5acd 100644 --- a/Items/Placeables/FurnitureDriftwood/Driftwood.cs +++ b/Items/Placeables/FurnitureDriftwood/Driftwood.cs @@ -22,10 +22,14 @@ namespace CalamityMod.Items.Placeables.FurnitureDriftwood public override void AddRecipes() { CreateRecipe(). - AddIngredient(4). - AddTile(TileID.WorkBenches). - DisableDecraft(). - Register(); + AddIngredient(2). + DisableDecraft(). + Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + DisableDecraft(). + Register(); } } } From 58eb4ef9f600ff409d889601b5f9e83a35a29be5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 10:34:39 +0700 Subject: [PATCH 129/142] Reverted Power/Berserker Glove nerfs --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/CalamityGlobalItem.cs | 8 ++------ Items/CalamityGlobalItemTooltip.cs | 7 +++++-- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 3 +-- Systems/Mechanic/RecipeSystem.cs | 3 --- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3d5996fa8f..614fe2e43d 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3509,7 +3509,7 @@ namespace CalamityMod.CalPlayer if (gloveLevel > 0) { // Determine the glove the player benefits from in priority of latest in progression - float gloveAttackSpeed = (gloveLevel == 5 ? 0.15f : gloveLevel == 4 ? 0.14f : gloveLevel == 3 ? 0.12f : gloveLevel <= 2 ? 0.10f : 0); + float gloveAttackSpeed = (gloveLevel == 5 ? 0.15f : gloveLevel == 4 ? 0.14f : gloveLevel >= 2 ? 0.12f : gloveLevel == 1 ? 0.10f : 0); Player.GetAttackSpeed() += gloveAttackSpeed; // Give the player attack speed based on the glove they have } diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 5f20ad405b..228af0877c 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1153,16 +1153,12 @@ namespace CalamityMod.Items if (modPlayer.gloveLevel < 1) modPlayer.gloveLevel = 1; } - if (item.type == ItemID.PowerGlove) + if (item.type == ItemID.PowerGlove || item.type == ItemID.BerserkerGlove) { - player.GetAttackSpeed() -= 0.12f; // Power Glove 10% + player.GetAttackSpeed() -= 0.12f; // Power/Berserker Glove 12% if (modPlayer.gloveLevel < 2) modPlayer.gloveLevel = 2; } - if (item.type == ItemID.BerserkerGlove) - { - player.GetAttackSpeed() -= 0.12f; // Berserker Glove 0% - } if (item.type == ItemID.MechanicalGlove) { player.GetAttackSpeed() -= 0.12f; // Mechanical Glove 12% diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 314a51650a..1a36871c80 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -782,11 +782,14 @@ namespace CalamityMod.Items EditTooltipByNum(0, (line) => line.Text += AddedTooltip("TitanGloveLine")); if (item.type == ItemID.PowerGlove) { - EditTooltipByNum(1, (line) => line.Text = EditedTooltip("PowerGlove")); + EditTooltipByNum(1, (line) => line.Text = EditedTooltip("PowerBerserkerGlove")); EditTooltipByNum(0, (line) => line.Text += AddedTooltip("TitanGloveLine")); } if (item.type == ItemID.BerserkerGlove) - EditTooltipByNum(1, (line) => line.Text = EditedTooltip("BerserkerGlove")); + { + EditTooltipByNum(1, (line) => line.Text = EditedTooltip("PowerBerserkerGlove")); + EditTooltipByNum(0, (line) => line.Text += AddedTooltip("TitanGloveLine")); + } if (item.type == ItemID.MechanicalGlove) EditTooltipByNum(1, (line) => line.Text = EditedTooltip("MechanicalGlove") + AddedTooltip("TitanGloveLine")); if (item.type == ItemID.FireGauntlet) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 504863dab8..592bd025bc 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -158,8 +158,7 @@ EditedTooltip: { */ SunMoonStones: critical strike chance, life regeneration, CelestialStoneShell: Minor increase to damage, - PowerGlove: 10% increased melee speed, does not stack with downgrades - BerserkerGlove: 10% increased true melee damage + PowerBerserkerGlove: 12% increased melee speed, does not stack with downgrades MechanicalGlove: ''' 12% increased melee damage diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index 741a5fe91b..91362a7e9a 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -794,9 +794,6 @@ namespace CalamityMod.Systems // Add 20 Souls of Flight to vanilla Luminite wings { VanillaEach(ItemID.WingsSolar, ItemID.WingsVortex, ItemID.WingsNebula, ItemID.WingsStardust), LunarWingsRecipeEdits }, - - // Berserker's Glove recipe change now that it doesn't provide melee speed - { Vanilla(ItemID.BerserkerGlove), ReplaceIngredient(ItemID.PowerGlove, ItemID.TitanGlove) }, }; // Apply all recipe changes. From 0d2bd24fedfc5ce712a4cd09cd54d68dec33c4e3 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 10:35:08 +0700 Subject: [PATCH 130/142] TML wanted to indent fix this file --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 5e759c4d25..afe87854fb 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -76,7 +76,7 @@ OldFashionedBuff: { RedWineBuff: { DisplayName: Red Wine Description: Increased vertical speed, reduced flight time - ItemTooltip: Causes Baguette to heal 200 HP, but reduce regeneration by 2 HP/s for 15 seconds + ItemTooltip: Causes Baguette to heal 200 HP, but reduce regeneration by 2 HP/s for 15 seconds } RumBuff: { From 1d6dc5806f6da276aafb0bd18a36e0d7bf337bf6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 10:52:45 +0700 Subject: [PATCH 131/142] Triactis Hammer flares can disappear --- Projectiles/Melee/TriactisHammerFlare.cs | 13 +++++++++++-- Projectiles/Melee/TriactisHammerProj.cs | 2 -- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Projectiles/Melee/TriactisHammerFlare.cs b/Projectiles/Melee/TriactisHammerFlare.cs index 70af4b6ee0..2fed916b9e 100644 --- a/Projectiles/Melee/TriactisHammerFlare.cs +++ b/Projectiles/Melee/TriactisHammerFlare.cs @@ -1,4 +1,5 @@ -using CalamityMod.Particles; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -50,8 +51,10 @@ namespace CalamityMod.Projectiles.Melee Projectile.Kill(); return; } + // You may swap weapons and keep the flares, but only for a short time + if (Owner.HeldItem.type == ModContent.ItemType()) + Projectile.timeLeft = 180; - Projectile.timeLeft = 2; float rotation = Main.GlobalTimeWrappedHourly * 2f + MathHelper.ToRadians(120f) * FlareType; // Transform into smashy hammers @@ -95,6 +98,12 @@ namespace CalamityMod.Projectiles.Melee } } + public override void OnKill(int timeLeft) + { + Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, GetColor(FlareType), Vector2.One, 0f, 0.1f, 0.8f, 10); + GeneralParticleHandler.SpawnParticle(pulse); + } + // Hue-shifted version of the base colours public static Color GetColor(float type) { diff --git a/Projectiles/Melee/TriactisHammerProj.cs b/Projectiles/Melee/TriactisHammerProj.cs index e455e9aff9..1b314721e8 100644 --- a/Projectiles/Melee/TriactisHammerProj.cs +++ b/Projectiles/Melee/TriactisHammerProj.cs @@ -124,8 +124,6 @@ namespace CalamityMod.Projectiles.Melee Particle sparkle = new CritSpark(Projectile.Center, velocity, Color.White, currentColor, 1f * scale, 24, 0.1f, 2.5f * scale); GeneralParticleHandler.SpawnParticle(sparkle); } - Particle pulse = new DirectionalPulseRing(Projectile.Center, Vector2.Zero, currentColor, Vector2.One, 0f, 0.1f, 0.8f, 10); - GeneralParticleHandler.SpawnParticle(pulse); } if (OrbitRadius > 792f) From ba749387d89d34bcfb83e8bd00fa134371b7ffcf Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:01:17 +0700 Subject: [PATCH 132/142] Hydra tooltip fix/tweaks --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 3afeaa551b..e4508e5c1b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -603,10 +603,10 @@ Hydra: { DisplayName: Hydra Tooltip: ''' - Fires a spread of 4 [cbuff:Venom] bullets + Fires a spread of 3 blood globs imbued with [cbuff:Venom] Grows a gun-head every 3 seconds, up to a maximum of 3 heads Press to command any existing heads to fire - Press to launch the heads for powerful explosive damage + Press to launch the heads for powerful explosive damage, briefly inflicting [cbuff:CalamityMod/GalvanicCorrosion] [c/9D80B0:Fusion of heavy machinery and Lernaean blood] ''' } From 5539f2ae12534650a4e51cbcb0cf6d67dd5ee032 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:11:19 +0700 Subject: [PATCH 133/142] Standardised average damage tooltip --- Localization/en-US/Mods.CalamityMod.Common.hjson | 1 + .../en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Common.hjson b/Localization/en-US/Mods.CalamityMod.Common.hjson index 77ec346020..9868158c52 100644 --- a/Localization/en-US/Mods.CalamityMod.Common.hjson +++ b/Localization/en-US/Mods.CalamityMod.Common.hjson @@ -24,6 +24,7 @@ AbyssBreathLevel2: Moderately reduces breath loss in the abyss AbyssBreathLevel3: Greatly reduces breath loss in the abyss AlcoholWarning: Drinking more than 3 different alcohols might not end well with your liver ArmorPenetration: Ignores {0} points of enemy Defense +AverageDamageInfo: This weapon scales with the average of all your damage stats CanMineUelibloom: Can mine Uelibloom Ore NotConsumable: Not consumable SummonTagDamageFlat: "{0} summon tag damage" diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index a93cf238be..6f25f07e11 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -3,7 +3,7 @@ Aestheticus: { Tooltip: ''' Fires crystals that explode and inflict [cbuff:CalamityMod/Vaporfied] - This weapon scales with all your damage stats at once + {$Common.AverageDamageInfo} ''' } @@ -17,6 +17,7 @@ ClaretCannon: { Picking up the blood orbs will reduce [cbuffplr:PotionSickness] when possible If you do not have [cbuffplr:PotionSickness], your natural regeneration will be enhanced Can only fire once every 10 seconds + {$Common.AverageDamageInfo} ''' } @@ -31,7 +32,7 @@ EyeofMagnus: { ''' Fires seeking cosmic masses that restore health and mana on hit Explodes into a nebula cloud which reduces enemy protection - This weapon scales with the average of all your damage stats + {$Common.AverageDamageInfo} ''' } @@ -40,7 +41,7 @@ LunicEye: { Tooltip: ''' Fires seeking energy bolts that reduce enemy protection - This weapon scales with the average of all your damage stats + {$Common.AverageDamageInfo} ''' } @@ -55,6 +56,7 @@ RelicOfDeliverance: { Being inside tiles for too long will warp you back to where you entered Press to dismount Holding out the spear heavily reduces the damage of all summons + {$Common.AverageDamageInfo} [c/FF8C00:Vengeance fueled me, I had no thought other than exactment.] [c/FF8C00:The dragon took everything from me, leaving my broken pieces strewn on the ground.] [c/FF8C00:But when I danced by Her side, I knew there was still something worth fighting for.] @@ -83,6 +85,7 @@ StratusSphere: { Influenced players gain Starbursts over time and will consume Starbursts to fly when out of flight time to cause Starbursts to form a barrier, causing you to lose Starbursts instead of health Launching the singularity deactivates the barrier, and creating a barrier deactivates the singularity + {$Common.AverageDamageInfo} 'Channeling souls into stars, an inane concept' ''' } From c13bebd1937e95d4b7247dab9caf90adac07efc9 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 11:13:33 +0700 Subject: [PATCH 134/142] Astral Injection recipe tweak --- Items/Potions/AstralInjection.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 11496ee727..b184457a0b 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -50,18 +50,10 @@ namespace CalamityMod.Items.Potions public override void AddRecipes() { CreateRecipe(15). - AddIngredient(ItemID.BottledWater, 15). + AddIngredient(ItemID.SuperManaPotion, 15). AddIngredient(4). AddIngredient(). - AddTile(TileID.AlchemyTable). - AddConsumeIngredientCallback(Recipe.IngredientQuantityRules.Alchemy). - Register(); - - CreateRecipe(15). - AddIngredient(ItemID.BottledWater, 15). - AddIngredient(5). - AddIngredient(). - AddTile(TileID.AlchemyTable). + AddTile(TileID.Bottles). Register() .DisableDecraft(); } From 40460e4cd350e4cf08b3be5bac9a8a9bfd9fc23d Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 12:10:42 +0700 Subject: [PATCH 135/142] Internally renamed bobbers --- CalPlayer/CalamityPlayer.cs | 10 ++-- .../{SkylineBobber.cs => AcrobaticBobber.cs} | 5 +- .../{PerennialBobber.cs => FeralBobber.cs} | 5 +- .../{NavystoneBobber.cs => SunkenSinker.cs} | 5 +- .../{ScoriaBobber.cs => VolcanicSinker.cs} | 5 +- .../{ScrapBobber.cs => WulfrumBobber.cs} | 5 +- .../Mods.CalamityMod.Items.Fishing.hjson | 52 +++++++++---------- Projectiles/CalamityGlobalProjectile.cs | 10 ++-- 8 files changed, 51 insertions(+), 46 deletions(-) rename Items/Accessories/{SkylineBobber.cs => AcrobaticBobber.cs} (88%) rename Items/Accessories/{PerennialBobber.cs => FeralBobber.cs} (89%) rename Items/Accessories/{NavystoneBobber.cs => SunkenSinker.cs} (89%) rename Items/Accessories/{ScoriaBobber.cs => VolcanicSinker.cs} (89%) rename Items/Accessories/{ScrapBobber.cs => WulfrumBobber.cs} (88%) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a3a0320242..d03aa7b1be 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -187,11 +187,11 @@ namespace CalamityMod.CalPlayer public enum FishingMinigames { None, - ScrapBobber, - NavystoneBobber, - SkylineBobber, - PerennialBobber, - ScoriaBobber, + WulfrumBobber, + SunkenSinker, + AcrobaticBobber, + FeralBobber, + VolcanicSinker, DevourerofCods //Not a fishing minigame but uses the same code as the rest } public FishingMinigames SelectedFishingMinigame = FishingMinigames.None; diff --git a/Items/Accessories/SkylineBobber.cs b/Items/Accessories/AcrobaticBobber.cs similarity index 88% rename from Items/Accessories/SkylineBobber.cs rename to Items/Accessories/AcrobaticBobber.cs index 47a9fea7a3..ffd5b98001 100644 --- a/Items/Accessories/SkylineBobber.cs +++ b/Items/Accessories/AcrobaticBobber.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Fishing { - internal class SkylineBobber : ModItem, ILocalizedModType + [LegacyName("SkylineBobber")] + internal class AcrobaticBobber : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; public override string Texture => "CalamityMod/Projectiles/Typeless/HeronBobber"; @@ -22,7 +23,7 @@ namespace CalamityMod.Items.Fishing public override void UpdateAccessory(Player player, bool hideVisual) { player.accFishingBobber = true; - player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.SkylineBobber; + player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.AcrobaticBobber; } public override void AddRecipes() { diff --git a/Items/Accessories/PerennialBobber.cs b/Items/Accessories/FeralBobber.cs similarity index 89% rename from Items/Accessories/PerennialBobber.cs rename to Items/Accessories/FeralBobber.cs index 0705e28791..908249614a 100644 --- a/Items/Accessories/PerennialBobber.cs +++ b/Items/Accessories/FeralBobber.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - internal class PerennialBobber : ModItem, ILocalizedModType + [LegacyName("PerennialBobber")] + internal class FeralBobber : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; public override string Texture => "CalamityMod/Projectiles/Typeless/FeralDoubleBobber"; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Accessories { player.accFishingBobber = true; player.fishingSkill += (int)((player.statLifeMax2 - player.statLife) * 0.25f); - player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.PerennialBobber; + player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.FeralBobber; } public override void AddRecipes() { diff --git a/Items/Accessories/NavystoneBobber.cs b/Items/Accessories/SunkenSinker.cs similarity index 89% rename from Items/Accessories/NavystoneBobber.cs rename to Items/Accessories/SunkenSinker.cs index e78241dccd..0563341a47 100644 --- a/Items/Accessories/NavystoneBobber.cs +++ b/Items/Accessories/SunkenSinker.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - internal class NavystoneBobber : ModItem, ILocalizedModType + [LegacyName("NavystoneBobber")] + internal class SunkenSinker : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; public override string Texture => "CalamityMod/Projectiles/Typeless/NavyBobber"; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.accFishingBobber = true; - player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.NavystoneBobber; + player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.SunkenSinker; } public override void AddRecipes() { diff --git a/Items/Accessories/ScoriaBobber.cs b/Items/Accessories/VolcanicSinker.cs similarity index 89% rename from Items/Accessories/ScoriaBobber.cs rename to Items/Accessories/VolcanicSinker.cs index 7ad5e649d2..6843821e45 100644 --- a/Items/Accessories/ScoriaBobber.cs +++ b/Items/Accessories/VolcanicSinker.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - internal class ScoriaBobber : ModItem, ILocalizedModType + [LegacyName("ScoriaBobber")] + internal class VolcanicSinker : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; public override string Texture => "CalamityMod/Projectiles/Typeless/RiftReelerBobber"; @@ -23,7 +24,7 @@ namespace CalamityMod.Items.Accessories { player.accFishingBobber = true; player.accLavaFishing = true; - player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.ScoriaBobber; + player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.VolcanicSinker; } public override void AddRecipes() { diff --git a/Items/Accessories/ScrapBobber.cs b/Items/Accessories/WulfrumBobber.cs similarity index 88% rename from Items/Accessories/ScrapBobber.cs rename to Items/Accessories/WulfrumBobber.cs index 81a7444885..1a6ee66728 100644 --- a/Items/Accessories/ScrapBobber.cs +++ b/Items/Accessories/WulfrumBobber.cs @@ -6,7 +6,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - internal class ScrapBobber : ModItem, ILocalizedModType + [LegacyName("ScrapBobber")] + internal class WulfrumBobber : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Fishing"; public override string Texture => "CalamityMod/Projectiles/Typeless/WulfrumBobber"; @@ -21,7 +22,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.ScrapBobber; + player.Calamity().SelectedFishingMinigame = CalamityPlayer.FishingMinigames.WulfrumBobber; } public override void AddRecipes() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index ebc986797d..5cecca83f7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -1,4 +1,4 @@ -// Quest fish tooltips +// Quest fish tooltips CaughtInAstral: Caught in the Astral Infection CaughtInBrimstoneCrag: Caught in the Brimstone Crag CaughtInSnow: Caught in Tundra @@ -397,29 +397,7 @@ GrandMarquisBait: { } // Bobbers -ScrapBobber: { - DisplayName: Wulfrum Bobber - Tooltip: - ''' - Provides a fishing minigame - Hold movement inputs in the indicated directions while fishing to catch items - The rod empowers the longer you go without a mistake, speeding it up - 'There's supposed to be a fish finder installed, but it only beeps when you point it at yourself...' - ''' -} - -NavystoneBobber: { - DisplayName: Sunken Sinker - Tooltip: - ''' - {$ItemTooltip.FishingBobber} - Provides a fishing minigame - The bobber will float at your height underwater, allowing underwater fishing - Move in the indicated direction while fishing to catch items - ''' -} - -SkylineBobber: { +AcrobaticBobber: { DisplayName: Acrobatic Bobber Tooltip: ''' @@ -432,7 +410,7 @@ SkylineBobber: { ''' } -PerennialBobber: { +FeralBobber: { DisplayName: Feral Bobber Tooltip: ''' @@ -444,7 +422,18 @@ PerennialBobber: { ''' } -ScoriaBobber: { +SunkenSinker: { + DisplayName: Sunken Sinker + Tooltip: + ''' + {$ItemTooltip.FishingBobber} + Provides a fishing minigame + The bobber will float at your height underwater, allowing underwater fishing + Move in the indicated direction while fishing to catch items + ''' +} + +VolcanicSinker: { DisplayName: Volcanic Sinker Tooltip: ''' @@ -456,3 +445,14 @@ ScoriaBobber: { When bobbers touch a rift, they automatically reel in the item within ''' } + +WulfrumBobber: { + DisplayName: Wulfrum Bobber + Tooltip: + ''' + Provides a fishing minigame + Hold movement inputs in the indicated directions while fishing to catch items + The rod empowers the longer you go without a mistake, speeding it up + 'There's supposed to be a fish finder installed, but it only beeps when you point it at yourself...' + ''' +} diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 64e0f0e763..76de535cf0 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -3063,7 +3063,7 @@ namespace CalamityMod.Projectiles //If hooking an NPC, this is set to the NPC ID but negative. Still need to find how this gets treated upon reeling in. switch (owner.Calamity().SelectedFishingMinigame) { - case CalamityPlayer.FishingMinigames.ScrapBobber: + case CalamityPlayer.FishingMinigames.WulfrumBobber: { if (CatchTime < 0 || (isReelingIn == 1 && CaughtItemID > 0)) { @@ -3183,7 +3183,7 @@ namespace CalamityMod.Projectiles } - case CalamityPlayer.FishingMinigames.ScoriaBobber: + case CalamityPlayer.FishingMinigames.VolcanicSinker: { if (PersistentFishingData == -1) { @@ -3308,7 +3308,7 @@ namespace CalamityMod.Projectiles } - case CalamityPlayer.FishingMinigames.PerennialBobber: + case CalamityPlayer.FishingMinigames.FeralBobber: if (projectile.ai[0] == 0) { if (projectile.wet) //Fishing in water @@ -3397,7 +3397,7 @@ namespace CalamityMod.Projectiles break; - case CalamityPlayer.FishingMinigames.NavystoneBobber: + case CalamityPlayer.FishingMinigames.SunkenSinker: { if (CatchTime < 0 || (isReelingIn == 1 && CaughtItemID > 0)) { @@ -3567,7 +3567,7 @@ namespace CalamityMod.Projectiles return false; - case CalamityPlayer.FishingMinigames.SkylineBobber: + case CalamityPlayer.FishingMinigames.AcrobaticBobber: { if (CatchTime < 0 || (isReelingIn == 1 && CaughtItemID > 0)) { From d13f40d5e6ad5de21ada580ff9243b89eaf26287 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 12:21:41 +0700 Subject: [PATCH 136/142] Rift Reeler tooltip tweaks and lava stuff Lava fishing tooltip changed to be verbatim from Hotline Rod --- Items/Fishing/FishingRods/RiftReeler.cs | 3 +-- Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Items/Fishing/FishingRods/RiftReeler.cs b/Items/Fishing/FishingRods/RiftReeler.cs index da0bc6e2f1..7b74df80bf 100644 --- a/Items/Fishing/FishingRods/RiftReeler.cs +++ b/Items/Fishing/FishingRods/RiftReeler.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Items.Fishing.FishingRods { Item.width = 24; Item.height = 28; - Item.useAnimation = 8; - Item.useTime = 8; + Item.useAnimation = Item.useTime = 8; Item.useStyle = ItemUseStyleID.Swing; Item.UseSound = SoundID.Item1; Item.fishingPole = 45; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 5cecca83f7..4070a1c761 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -344,8 +344,8 @@ RiftReeler: { DisplayName: Rift Reeler Tooltip: ''' - Fires four lines at once - Can fish in lava + Fires four lines at once. Bobbers deal damage upon contact with enemies + Allows fishing in lava 'The battlefield is a scene of constant chaos. The winner will be the one who controls that chaos, both the pole and the fish.' ''' @@ -355,7 +355,7 @@ SlurperPole: { DisplayName: Slurper Pole Tooltip: ''' - Can fish in lava + Allows fishing in lava 'It is the burning lava of the soul that has a furnace within--a very volcano of grief and sorrow.' ''' } @@ -364,7 +364,7 @@ TheDevourerofCods: { DisplayName: The Devourer of Cods Tooltip: ''' - Fires ten lines at once. Line never snaps and can fish from lava + Fires ten lines at once. Line never breaks and allows fishing in lava Hooked items stay hooked forever Common fish are automatically consumed while fishing Consuming fish allows a bobber to hook a new item and feeds the user From c7c4285542e770bf9d8d3bae6fbac9010d9116e6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 12:51:40 +0700 Subject: [PATCH 137/142] Transferred several sources of AP to their items --- Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs | 6 ++++++ Items/Weapons/Magic/IonBlaster.cs | 4 ++++ Items/Weapons/Ranged/Infinity.cs | 6 ++++-- Items/Weapons/Ranged/PolarisParrotfish.cs | 13 +++++++------ Items/Weapons/Ranged/Svantechnical.cs | 10 ++++++---- ....CalamityMod.Items.Weapons.DraedonsArsenal.hjson | 1 + .../Mods.CalamityMod.Items.Weapons.Ranged.hjson | 8 ++++++-- Projectiles/DraedonsArsenal/ShrimpPlasmaMissile.cs | 1 - Projectiles/Magic/IonBlast.cs | 2 -- Projectiles/Ranged/ChargedBlast.cs | 4 ---- Projectiles/Ranged/ChargedBlastSplit.cs | 6 ------ Projectiles/Ranged/PolarStar.cs | 1 - 12 files changed, 34 insertions(+), 28 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs index 6aa71e69b2..3e47eb756f 100644 --- a/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs +++ b/Items/Weapons/DraedonsArsenal/AqueousHunterDrone.cs @@ -9,6 +9,7 @@ using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.DraedonsArsenal @@ -21,6 +22,10 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal public static readonly SoundStyle Sound1 = new("CalamityMod/Sounds/Item/ShrimpSound1"); public static readonly SoundStyle Sound2 = new("CalamityMod/Sounds/Item/ShrimpSound2"); public static readonly SoundStyle Surprise = new("CalamityMod/Sounds/Item/ShrimpSurprise"); + + public static int ArmorPenetration = 15; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration); + public override void SetDefaults() { CalamityGlobalItem modItem = Item.Calamity(); @@ -29,6 +34,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.height = 32; Item.shootSpeed = 10f; Item.damage = 24; + Item.ArmorPenetration = ArmorPenetration; Item.mana = 10; Item.useAnimation = Item.useTime = 36; Item.useStyle = ItemUseStyleID.HoldUp; diff --git a/Items/Weapons/Magic/IonBlaster.cs b/Items/Weapons/Magic/IonBlaster.cs index 8126a4a72f..8ed8097342 100644 --- a/Items/Weapons/Magic/IonBlaster.cs +++ b/Items/Weapons/Magic/IonBlaster.cs @@ -11,6 +11,9 @@ namespace CalamityMod.Items.Weapons.Magic public class IonBlaster : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; + + public static int ArmorPenetration = 40; + public override void SetStaticDefaults() { ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; @@ -20,6 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 68; Item.height = 38; Item.damage = 24; + Item.ArmorPenetration = ArmorPenetration; Item.DamageType = DamageClass.Magic; Item.mana = 12; Item.useAnimation = 7; diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 4c6c6151ff..c575c6c3e8 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -18,14 +18,16 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public int SineCounter = 0; + public static int ArmorPenetration = 20; public static int AmmoSavedPercent = 80; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration, AmmoSavedPercent); public override void SetDefaults() { Item.width = 56; Item.height = 24; Item.damage = 75; + Item.ArmorPenetration = ArmorPenetration; Item.DamageType = DamageClass.Ranged; Item.useTime = 1; Item.useAnimation = 4; @@ -57,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Ranged for (int i = -1; i <= 1; i += 2) { Vector2 helixVel = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(i * sine)); - Projectile.NewProjectile(source, position, helixVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, player.altFunctionUse != 2 ? 1 : 0); + Projectile.NewProjectile(source, position, helixVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, 1); } } Particle spark2 = new LineParticle(position + Main.rand.NextVector2Circular(6, 6), (velocity * 4).RotatedByRandom(0.2f) * Main.rand.NextFloat(0.8f, 1.2f), false, Main.rand.Next(15, 25 + 1), Main.rand.NextFloat(1.5f, 2f), new Color(229, 49, 39)); diff --git a/Items/Weapons/Ranged/PolarisParrotfish.cs b/Items/Weapons/Ranged/PolarisParrotfish.cs index 331eec6798..fa94b9ccb1 100644 --- a/Items/Weapons/Ranged/PolarisParrotfish.cs +++ b/Items/Weapons/Ranged/PolarisParrotfish.cs @@ -20,6 +20,9 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle Shot = new("CalamityMod/Sounds/Item/PolarisShot") { Volume = 0.6f }; public static readonly SoundStyle Squeak = new("CalamityMod/Sounds/Custom/CuteSqueak") { Volume = 0.75f }; + + public static int ArmorPenetration = 15; + public override void SetStaticDefaults() { ItemID.Sets.IsRangedSpecialistWeapon[Type] = true; @@ -31,11 +34,9 @@ namespace CalamityMod.Items.Weapons.Ranged Item.width = 36; Item.height = 34; Item.damage = 35; + Item.ArmorPenetration = ArmorPenetration; Item.DamageType = DamageClass.Ranged; - - Item.useTime = 9; - Item.useAnimation = 9; - + Item.useAnimation = Item.useTime = 9; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 0.5f; @@ -46,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 10f; } - public override void ModifyTooltips(List list) => list.FindAndReplace("[GFB]", this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal")); + public override void ModifyTooltips(List list) => list.FindAndReplace("[GFB]", this.GetLocalization(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal").Format(ArmorPenetration)); public override bool AltFunctionUse(Player player) => Main.zenithWorld ? true : false; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { @@ -129,7 +130,7 @@ namespace CalamityMod.Items.Weapons.Ranged SoundEngine.PlaySound(Shot, player.Center); for (int i = 0; i < (Happy ? 3 : 1); i++) - Projectile.NewProjectile(source, position + velocity * 5f, velocity.RotatedByRandom(0.05f * (i != 0 ? 6 : 1)), ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, ShotNumber); + Projectile.NewProjectile(source, position + velocity * 5f, velocity.RotatedByRandom(0.05f * (i != 0 ? 6 : 1)), type, damage, knockback, player.whoAmI, 0f, ShotNumber); if (ShotNumber >= 2) // Cycle the shot color ShotNumber = 0; diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index ae859ea8b6..4a698709e7 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -18,14 +18,16 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public int SineCounter = 0; + public static int ArmorPenetration = 200; public static int AmmoSavedPercent = 80; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ArmorPenetration, AmmoSavedPercent); public override void SetDefaults() { Item.width = 60; Item.height = 26; Item.damage = 232; + Item.ArmorPenetration = ArmorPenetration; Item.DamageType = DamageClass.Ranged; Item.useTime = 1; Item.useAnimation = 4; @@ -61,9 +63,9 @@ namespace CalamityMod.Items.Weapons.Ranged Vector2 helixVel1 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine)); Vector2 helixVel2 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(-sine)); Vector2 helixVel3 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine2)); - Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 2f : 0); - Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 4f : 0); - Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 3f : 0); + Projectile.NewProjectile(source, position, helixVel1, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, 2f); + Projectile.NewProjectile(source, position, helixVel2, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, 4f); + Projectile.NewProjectile(source, position, helixVel3, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0f, 0, 3f); } Particle spark2 = new LineParticle(position + Main.rand.NextVector2Circular(6, 6), (velocity * 4).RotatedByRandom(0.35f) * Main.rand.NextFloat(0.8f, 1.2f), false, Main.rand.Next(15, 25 + 1), Main.rand.NextFloat(1.5f, 2f), Main.rand.NextBool() ? Color.MediumOrchid : Color.DarkViolet); GeneralParticleHandler.SpawnParticle(spark2); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson index 0ab28aaaf8..2d89a62599 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson @@ -18,6 +18,7 @@ AqueousHunterDrone: { while holding any summon weapon to command the shrimp to launch a vertical missile barrage Vertical missiles aim towards your cursor and leave a lingering blast if they hit solid ground Each shrimp uses 4 minion slots + {$Common.ArmorPenetration} [c/1FFBFF:'When pursuing the adherents of gods, Yharim believed no stone should be left unturned.] [c/1FFBFF:Weaponry for underwater contingencies was an unusually heavy focus, but no models ever saw deployment.'] ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index e4508e5c1b..a9ad6db7c2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -616,7 +616,8 @@ Infinity: { Tooltip: ''' Fires a twin stream of energy bolts that split - {$CommonItemTooltip.PercentChanceToSaveAmmo} + {$Common.ArmorPenetration} + {$CommonItemTooltip.PercentChanceToSaveAmmo@1} 'They say infinity is neverending, yet you hold it in your hands' ''' } @@ -925,12 +926,14 @@ PolarisParrotfish: { ''' Rapidly fires an array of colorful star shots Firing speed increases the closer you are to an enemy + {$Common.ArmorPenetration} 'It carries the mark of the Northern Star' ''' TooltipGFB: ''' Rapidly fires an array of colorful star shots Firing speed increases the closer you are to an enemy + {$Common.ArmorPenetration} to give the little girl some attention 'She is a happy girl' ''' @@ -1303,7 +1306,8 @@ Svantechnical: { Tooltip: ''' Fires a trinity of energy bolts that split into beams that track your cursor - {$CommonItemTooltip.PercentChanceToSaveAmmo} + {$Common.ArmorPenetration} + {$CommonItemTooltip.PercentChanceToSaveAmmo@1} 'The age old balance of trading damage for frames' ''' } diff --git a/Projectiles/DraedonsArsenal/ShrimpPlasmaMissile.cs b/Projectiles/DraedonsArsenal/ShrimpPlasmaMissile.cs index ff1bf55236..f9a5e01839 100644 --- a/Projectiles/DraedonsArsenal/ShrimpPlasmaMissile.cs +++ b/Projectiles/DraedonsArsenal/ShrimpPlasmaMissile.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.timeLeft = 300; Projectile.extraUpdates = 3; Projectile.penetrate = -1; - Projectile.ArmorPenetration = 15; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } diff --git a/Projectiles/Magic/IonBlast.cs b/Projectiles/Magic/IonBlast.cs index 9352beef41..ab93bc31bf 100644 --- a/Projectiles/Magic/IonBlast.cs +++ b/Projectiles/Magic/IonBlast.cs @@ -28,7 +28,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; - Projectile.ArmorPenetration = 40; } public override void AI() @@ -105,7 +104,6 @@ namespace CalamityMod.Projectiles.Magic Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), 0, Projectile.owner, blastSize, minMultiplier, hitsToMinMult); blast.timeLeft = 10; blast.DamageType = DamageClass.Magic; - blast.ArmorPenetration = 40; } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Ranged/ChargedBlast.cs b/Projectiles/Ranged/ChargedBlast.cs index 5913c8504c..34655082c4 100644 --- a/Projectiles/Ranged/ChargedBlast.cs +++ b/Projectiles/Ranged/ChargedBlast.cs @@ -52,10 +52,6 @@ namespace CalamityMod.Projectiles.Ranged baseColor = Color.MediumOrchid; } baseVel = Projectile.velocity; - if (Svant) - Projectile.ArmorPenetration = 200; - if (Infinity) - Projectile.ArmorPenetration = 20; } Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; if (Projectile.timeLeft == 2) diff --git a/Projectiles/Ranged/ChargedBlastSplit.cs b/Projectiles/Ranged/ChargedBlastSplit.cs index 6aafc4fdff..a9f615012a 100644 --- a/Projectiles/Ranged/ChargedBlastSplit.cs +++ b/Projectiles/Ranged/ChargedBlastSplit.cs @@ -53,15 +53,9 @@ namespace CalamityMod.Projectiles.Ranged baseColor = Color.MediumOrchid; startVel = Projectile.velocity; if (Infinity) - { Projectile.timeLeft = 340; - Projectile.ArmorPenetration = 20; - } if (Svant) - { Projectile.timeLeft = 640; - Projectile.ArmorPenetration = 200; - } direction = Main.rand.NextBool(); homeSpeed = Main.rand.NextFloat(5, 8); } diff --git a/Projectiles/Ranged/PolarStar.cs b/Projectiles/Ranged/PolarStar.cs index 6490f6fa34..bf2fc16015 100644 --- a/Projectiles/Ranged/PolarStar.cs +++ b/Projectiles/Ranged/PolarStar.cs @@ -34,7 +34,6 @@ namespace CalamityMod.Projectiles.Ranged Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.tileCollide = true; - Projectile.ArmorPenetration = 15; } public override void AI() From 63ccd09494b797ed0b2f69859bcc29e15ed1e083 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 13:23:47 +0700 Subject: [PATCH 138/142] Alcohols can now be removed individually --- Buffs/Alcohol/AlcoholPoisoning.cs | 7 +++---- Buffs/Alcohol/BloodyMaryBuff.cs | 2 -- Buffs/Alcohol/CaribbeanRumBuff.cs | 2 -- Buffs/Alcohol/CinnamonRollBuff.cs | 2 -- Buffs/Alcohol/EverclearBuff.cs | 2 -- Buffs/Alcohol/EvergreenGinBuff.cs | 2 -- Buffs/Alcohol/FireballBuff.cs | 2 -- Buffs/Alcohol/GrapeBeerBuff.cs | 2 -- Buffs/Alcohol/ManhattanBuff.cs | 2 -- Buffs/Alcohol/MargaritaBuff.cs | 2 -- Buffs/Alcohol/MoonshineBuff.cs | 2 -- Buffs/Alcohol/MoscowMuleBuff.cs | 2 -- Buffs/Alcohol/OldFashionedBuff.cs | 2 -- Buffs/Alcohol/PurpleHazeBuff.cs | 2 -- Buffs/Alcohol/RedWineBuff.cs | 2 -- Buffs/Alcohol/RumBuff.cs | 2 -- Buffs/Alcohol/ScrewdriverBuff.cs | 2 -- Buffs/Alcohol/StarBeamRyeBuff.cs | 2 -- Buffs/Alcohol/TequilaBuff.cs | 2 -- Buffs/Alcohol/TequilaSunriseBuff.cs | 2 -- Buffs/Alcohol/VodkaBuff.cs | 2 -- Buffs/Alcohol/WhiskeyBuff.cs | 2 -- Buffs/Alcohol/WhiteWineBuff.cs | 2 -- CalPlayer/CalamityPlayer.cs | 26 -------------------------- CalPlayer/CalamityPlayerLifeRegen.cs | 3 +-- 25 files changed, 4 insertions(+), 76 deletions(-) diff --git a/Buffs/Alcohol/AlcoholPoisoning.cs b/Buffs/Alcohol/AlcoholPoisoning.cs index c1736b0e64..1880e891a1 100644 --- a/Buffs/Alcohol/AlcoholPoisoning.cs +++ b/Buffs/Alcohol/AlcoholPoisoning.cs @@ -1,4 +1,5 @@ using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -10,10 +11,8 @@ namespace CalamityMod.Buffs.Alcohol Main.debuff[Type] = true; Main.buffNoSave[Type] = true; Main.buffNoTimeDisplay[Type] = true; - // The nurse technically cannot get rid of this debuff by herself, as it reapplies immediately after if you have alcohol left - // But she also cleanses excess alcohol if you have Alcohol Poisoning (see CalamityPlayer.PostNurseHeal) - // Removing this set means she costs 1 debuff worth of cost to remove excess alcohol - // BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + // The nurse can remove all alcohol debuffs individually, thus removing this by proxy. + BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/BloodyMaryBuff.cs b/Buffs/Alcohol/BloodyMaryBuff.cs index af35461b47..266bcbf377 100644 --- a/Buffs/Alcohol/BloodyMaryBuff.cs +++ b/Buffs/Alcohol/BloodyMaryBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/CaribbeanRumBuff.cs b/Buffs/Alcohol/CaribbeanRumBuff.cs index fcdb6422b6..ad63c115e5 100644 --- a/Buffs/Alcohol/CaribbeanRumBuff.cs +++ b/Buffs/Alcohol/CaribbeanRumBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/CinnamonRollBuff.cs b/Buffs/Alcohol/CinnamonRollBuff.cs index bb724a3a52..6efc2c936e 100644 --- a/Buffs/Alcohol/CinnamonRollBuff.cs +++ b/Buffs/Alcohol/CinnamonRollBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/EverclearBuff.cs b/Buffs/Alcohol/EverclearBuff.cs index 1629143a7f..fa5f3156fe 100644 --- a/Buffs/Alcohol/EverclearBuff.cs +++ b/Buffs/Alcohol/EverclearBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/EvergreenGinBuff.cs b/Buffs/Alcohol/EvergreenGinBuff.cs index 1821638bad..c3d27d74b9 100644 --- a/Buffs/Alcohol/EvergreenGinBuff.cs +++ b/Buffs/Alcohol/EvergreenGinBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/FireballBuff.cs b/Buffs/Alcohol/FireballBuff.cs index 99c877dc50..94ef554b0f 100644 --- a/Buffs/Alcohol/FireballBuff.cs +++ b/Buffs/Alcohol/FireballBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/GrapeBeerBuff.cs b/Buffs/Alcohol/GrapeBeerBuff.cs index 714c912651..5ab4836351 100644 --- a/Buffs/Alcohol/GrapeBeerBuff.cs +++ b/Buffs/Alcohol/GrapeBeerBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/ManhattanBuff.cs b/Buffs/Alcohol/ManhattanBuff.cs index e724375c25..71872b7153 100644 --- a/Buffs/Alcohol/ManhattanBuff.cs +++ b/Buffs/Alcohol/ManhattanBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MargaritaBuff.cs b/Buffs/Alcohol/MargaritaBuff.cs index 37299b4fb8..d9f0855b5f 100644 --- a/Buffs/Alcohol/MargaritaBuff.cs +++ b/Buffs/Alcohol/MargaritaBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MoonshineBuff.cs b/Buffs/Alcohol/MoonshineBuff.cs index 03faabe66d..32221e2e24 100644 --- a/Buffs/Alcohol/MoonshineBuff.cs +++ b/Buffs/Alcohol/MoonshineBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MoscowMuleBuff.cs b/Buffs/Alcohol/MoscowMuleBuff.cs index 21f7569480..33afd8c8a8 100644 --- a/Buffs/Alcohol/MoscowMuleBuff.cs +++ b/Buffs/Alcohol/MoscowMuleBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/OldFashionedBuff.cs b/Buffs/Alcohol/OldFashionedBuff.cs index 68820059d4..8a31d03b48 100644 --- a/Buffs/Alcohol/OldFashionedBuff.cs +++ b/Buffs/Alcohol/OldFashionedBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/PurpleHazeBuff.cs b/Buffs/Alcohol/PurpleHazeBuff.cs index 16aa30d53f..a786be25fb 100644 --- a/Buffs/Alcohol/PurpleHazeBuff.cs +++ b/Buffs/Alcohol/PurpleHazeBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/RedWineBuff.cs b/Buffs/Alcohol/RedWineBuff.cs index 087086ca68..86acc413e4 100644 --- a/Buffs/Alcohol/RedWineBuff.cs +++ b/Buffs/Alcohol/RedWineBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/RumBuff.cs b/Buffs/Alcohol/RumBuff.cs index ab842e0649..9f98fe704c 100644 --- a/Buffs/Alcohol/RumBuff.cs +++ b/Buffs/Alcohol/RumBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/ScrewdriverBuff.cs b/Buffs/Alcohol/ScrewdriverBuff.cs index f8f97cd0fe..ae2ddec1cc 100644 --- a/Buffs/Alcohol/ScrewdriverBuff.cs +++ b/Buffs/Alcohol/ScrewdriverBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/StarBeamRyeBuff.cs b/Buffs/Alcohol/StarBeamRyeBuff.cs index 50d6ac0bc8..71d4d85c3b 100644 --- a/Buffs/Alcohol/StarBeamRyeBuff.cs +++ b/Buffs/Alcohol/StarBeamRyeBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/TequilaBuff.cs b/Buffs/Alcohol/TequilaBuff.cs index a2b307c605..1db0e76f6c 100644 --- a/Buffs/Alcohol/TequilaBuff.cs +++ b/Buffs/Alcohol/TequilaBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/TequilaSunriseBuff.cs b/Buffs/Alcohol/TequilaSunriseBuff.cs index af5a5f174a..650b4478a4 100644 --- a/Buffs/Alcohol/TequilaSunriseBuff.cs +++ b/Buffs/Alcohol/TequilaSunriseBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/VodkaBuff.cs b/Buffs/Alcohol/VodkaBuff.cs index 46eaee8329..60676048bf 100644 --- a/Buffs/Alcohol/VodkaBuff.cs +++ b/Buffs/Alcohol/VodkaBuff.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Potions.Alcohol; using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -13,7 +12,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/WhiskeyBuff.cs b/Buffs/Alcohol/WhiskeyBuff.cs index 66be5a8a0c..488758eb22 100644 --- a/Buffs/Alcohol/WhiskeyBuff.cs +++ b/Buffs/Alcohol/WhiskeyBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/WhiteWineBuff.cs b/Buffs/Alcohol/WhiteWineBuff.cs index eb47a1056f..f18f1f8cef 100644 --- a/Buffs/Alcohol/WhiteWineBuff.cs +++ b/Buffs/Alcohol/WhiteWineBuff.cs @@ -1,5 +1,4 @@ using Terraria; -using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Alcohol @@ -12,7 +11,6 @@ namespace CalamityMod.Buffs.Alcohol Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; - BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } public override void Update(Player player, ref int buffIndex) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index d03aa7b1be..8f9d1b241b 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5920,32 +5920,6 @@ namespace CalamityMod.CalPlayer price /= vanillaPriceMult; } } - - public override void PostNurseHeal(NPC nurse, int health, bool removeDebuffs, int price) - { - // Remove excess alcohol - if (removeDebuffs && alcoholPoisonLevel > 3) - { - List Alcohol = new List(); - for (int i = 0; i < Player.MaxBuffs; i++) - { - int buff = Player.buffType[i]; - if (CalamityBuffSets.AlcoholStrength.TryGetValue(buff, out int level)) - Alcohol.Insert(0, new int[] { i, level }); - } - - int poison = alcoholPoisonLevel; - do - { - // Obtain the index:level relationship - int[] relation = Alcohol[0]; - Player.DelBuff(relation[0]); // Remove the alcohol - poison -= relation[1]; // Cancel the poison level - Alcohol.RemoveAt(0); - } - while (poison > 3); - } - } #endregion #region Rogue Stealth diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 5e33e56b73..6f769e1c50 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -218,9 +218,8 @@ namespace CalamityMod.CalPlayer // Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning. Player.nebulaLevelLife = 0; - // This has to last over 60 frames for the nurse to count the debuff, so... if (Player.whoAmI == Main.myPlayer) - Player.AddBuff(ModContent.BuffType(), 61, false); + Player.AddBuff(ModContent.BuffType(), 2, false); if (Player.lifeRegen > 0) Player.lifeRegen = 0; From 7274ad319af5617fe290e2694213db64edeecddd Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 6 Apr 2026 22:25:30 -0400 Subject: [PATCH 139/142] Several Storm Weaver tweaks * Decreased size of the worm in Expert+ * Timing of charges and projectile attacks no longer desyncs; projectile attack always triggers right as it charges * Increased speed of frost waves in Expert+ * No longer stops charging in final phase * Slightly revamped tornado attack. Instead of spawning tornadoes evenly spaced apart with little room in between, now spawns tornadoes that are taller but are spaced much farther apart, then spawns extra tornadoes beyond that with less space in between them. This solidifies the attack as a pseudo-arena instead of being a weird mix between pseudo-arena and area denial that fails at both. *Tornadoes last for a shorter amount of time to prevent consecutive tornadoes from overlapping --- NPCs/StormWeaver/StormWeaverBody.cs | 6 +- NPCs/StormWeaver/StormWeaverHead.cs | 186 +++++++++++++--------------- NPCs/StormWeaver/StormWeaverTail.cs | 6 +- Projectiles/Enemy/TornadoHostile.cs | 14 +-- 4 files changed, 102 insertions(+), 110 deletions(-) diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 70d85d9033..f8232470c8 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -63,11 +63,11 @@ namespace CalamityMod.NPCs.StormWeaver NPC.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) - NPC.scale *= 1.2f; - else if (CalamityWorld.revenge) NPC.scale *= 1.15f; - else if (Main.expertMode) + else if (CalamityWorld.revenge) NPC.scale *= 1.1f; + else if (Main.expertMode) + NPC.scale *= 1.05f; if (Main.getGoodWorld) NPC.scale *= 0.7f; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 9c34dbc2f2..430d0562f5 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -116,11 +116,11 @@ namespace CalamityMod.NPCs.StormWeaver NPC.netAlways = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) - NPC.scale *= 1.2f; - else if (CalamityWorld.revenge) NPC.scale *= 1.15f; - else if (Main.expertMode) + else if (CalamityWorld.revenge) NPC.scale *= 1.1f; + else if (Main.expertMode) + NPC.scale *= 1.05f; if (Main.getGoodWorld) NPC.scale *= 0.7f; @@ -186,7 +186,7 @@ namespace CalamityMod.NPCs.StormWeaver // Start calling down frost waves from the sky in sheets and stop firing lightning during the charge bool phase3 = lifeRatio < 0.55f; - // Lightning strike flash phase, stop charging and start summoning tornadoes + // Lightning strike flash phase, start summoning tornadoes bool phase4 = lifeRatio < 0.3f; // Update armored settings to naked settings @@ -336,33 +336,21 @@ namespace CalamityMod.NPCs.StormWeaver // Start charging at the player when in phase 2 if (phase2) { - if (!phase4) - { - calamityGlobalNPC.newAI[0] += 1f; - } - else - { - NPC.localAI[1] = 0f; - if (NPC.localAI[3] > 0f) - NPC.localAI[3] -= 1f; - - calamityGlobalNPC.newAI[0] = 0f; - } - + calamityGlobalNPC.newAI[0] += 1f; calamityGlobalNPC.newAI[2] += 1f; // Only use tornadoes in phase 4 and swap between using them or the frost waves bool useTornadoes = calamityGlobalNPC.newAI[3] % 2f != 0f; // Gate value that decides when Storm Weaver will charge - float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; + float attackGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; if (!phase3) - chargePhaseGateValue *= 0.5f; + attackGateValue *= 0.5f; if (phase4 && expertMode) - chargePhaseGateValue *= 0.9f; + attackGateValue *= 0.9f; // Gate value for when Storm Weaver fires projectiles - float projectileGateValue = (int)(chargePhaseGateValue * 0.25f); + float resetGateValue = attackGateValue + 100f; // Call down frost waves from the sky if (phase3 && !useTornadoes) @@ -436,10 +424,8 @@ namespace CalamityMod.NPCs.StormWeaver } } - if (calamityGlobalNPC.newAI[2] >= projectileGateValue) + if (calamityGlobalNPC.newAI[2] == attackGateValue) { - calamityGlobalNPC.newAI[2] = -projectileGateValue * 4f; - // Dictates whether Storm Weaver will use frost or tornadoes if (phase4) { @@ -471,14 +457,14 @@ namespace CalamityMod.NPCs.StormWeaver // Start fast at index 0, become slower as each projectile spawns and then become faster past the central wave int centralWave = totalWaves / 2; - float velocityY = 8f; + float velocityY = revenge ? 10f : expertMode ? 9f : 8f; int wavePatternType = revenge ? Main.rand.Next(3) : expertMode ? Main.rand.Next(2) + 1 : 2; float delayBeforeFiring = -60f; for (int x = 0; x < totalWaves; x++) { switch (wavePatternType) { - // Starts at 8, central point is 6 and the end is 8 + // Arrow shape case 0: if (x != 0) @@ -491,7 +477,7 @@ namespace CalamityMod.NPCs.StormWeaver break; - // Starts at 8 and alternates between 6 and 8 + // Alternating waves that arrive at different times case 1: if (x != 0) @@ -504,11 +490,8 @@ namespace CalamityMod.NPCs.StormWeaver break; - // Flat line of slower waves + // Flat line case 2: - - velocityY = 7f; - break; } @@ -526,95 +509,98 @@ namespace CalamityMod.NPCs.StormWeaver // Summon tornadoes if (useTornadoes) { - if (calamityGlobalNPC.newAI[2] >= projectileGateValue) + if (calamityGlobalNPC.newAI[2] == attackGateValue) { - calamityGlobalNPC.newAI[2] = -projectileGateValue * 4f; - // Dictates whether Storm Weaver will use frost or tornadoes calamityGlobalNPC.newAI[3] += 1f; if (Main.netMode != NetmodeID.MultiplayerClient) { int projectileType = ModContent.ProjectileType(); - int totalTornadoes = revenge ? 7 : expertMode ? 5 : 3; - float spawnDistance = revenge ? 750f : expertMode ? 900f : 1050f; - for (int i = 0; i < totalTornadoes; i++) + int totalTornadoes = death ? 10 : revenge ? 6 : expertMode ? 4 : 2; + float spawnDistance = revenge ? 720f : expertMode ? 800f : 880f; // Distance to first tornado from the center point, so actual space is twice this number + for (int i = -totalTornadoes / 2; i <= totalTornadoes / 2; i++) { - Vector2 spawnPosition = Main.player[NPC.target].Center + Vector2.UnitX * spawnDistance * (i - totalTornadoes / 2); + if (i == 0) + continue; + + Vector2 spawnPosition = Main.player[NPC.target].Center + Vector2.UnitX * (spawnDistance * Math.Sign(i) + (i - Math.Sign(i)) * spawnDistance * 0.4f); Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnPosition, Vector2.Zero, projectileType, 0, 0f, Main.myPlayer, TornadoDamage, 1f); } } } } + if (calamityGlobalNPC.newAI[2] >= resetGateValue) + calamityGlobalNPC.newAI[2] = 0f; + // Charge - if (!phase4) + if (calamityGlobalNPC.newAI[0] == attackGateValue - 70) { - if (calamityGlobalNPC.newAI[0] == chargePhaseGateValue - 70) + Vector2 soundCenter = Main.player[NPC.target].Center; + SoundStyle lightning = new("CalamityMod/Sounds/Custom/LightningTelegraph") { Volume = 0.7f }; + SoundEngine.PlaySound(lightning, soundCenter); + } + if (calamityGlobalNPC.newAI[0] >= attackGateValue) + { + NPC.localAI[3] = 60f; + + if (NPC.localAI[1] == 0f) + NPC.localAI[1] = 1f; + + if (calamityGlobalNPC.newAI[0] >= resetGateValue) { - Vector2 soundCenter = Main.player[NPC.target].Center; - SoundStyle lightning = new("CalamityMod/Sounds/Custom/LightningTelegraph") { Volume = 0.7f }; - SoundEngine.PlaySound(lightning, soundCenter); + NPC.TargetClosest(); + NPC.localAI[1] = 0f; + calamityGlobalNPC.newAI[0] = 0f; } - if (calamityGlobalNPC.newAI[0] >= chargePhaseGateValue) + + if (NPC.localAI[1] == 2f) { - NPC.localAI[3] = 60f; + velocity += Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) * 0.01f * (1f - (lifeRatio / 0.8f)); + acceleration += Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) * 0.0001f * (1f - (lifeRatio / 0.8f)); + velocity *= 2f; + acceleration *= 0.85f; - if (NPC.localAI[1] == 0f) - NPC.localAI[1] = 1f; - - if (calamityGlobalNPC.newAI[0] >= chargePhaseGateValue + 100f) + float stopChargeDistance = 800f * NPC.localAI[2]; + if (stopChargeDistance < 0) { - NPC.TargetClosest(); - NPC.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - } - - if (NPC.localAI[1] == 2f) - { - velocity += Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) * 0.01f * (1f - (lifeRatio / 0.8f)); - acceleration += Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) * 0.0001f * (1f - (lifeRatio / 0.8f)); - velocity *= 2f; - acceleration *= 0.85f; - - float stopChargeDistance = 800f * NPC.localAI[2]; - if (stopChargeDistance < 0) + if (NPC.Center.X < Main.player[NPC.target].Center.X + stopChargeDistance) { - if (NPC.Center.X < Main.player[NPC.target].Center.X + stopChargeDistance) - { - NPC.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - } - } - else - { - if (NPC.Center.X > Main.player[NPC.target].Center.X + stopChargeDistance) - { - NPC.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - } + NPC.localAI[1] = 0f; + // Prevent the timers from desyncing + calamityGlobalNPC.newAI[0] = calamityGlobalNPC.newAI[2] - resetGateValue; } } - - int dustAmt = 5; - for (int k = 0; k < dustAmt; k++) + else { - Vector2 dustRotation = Vector2.Normalize(NPC.velocity) * new Vector2((NPC.width + 50) / 2f, NPC.height) * 0.75f; - dustRotation = dustRotation.RotatedBy((k - (dustAmt / 2 - 1)) * (double)MathHelper.Pi / (float)dustAmt) + NPC.Center; - Vector2 randDustMovement = ((float)(Main.rand.NextDouble() * MathHelper.Pi) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); - int bluishDust = Dust.NewDust(dustRotation + randDustMovement, 0, 0, DustID.UnusedWhiteBluePurple, randDustMovement.X, randDustMovement.Y, 100, default, 3f); - Main.dust[bluishDust].noGravity = true; - Main.dust[bluishDust].noLight = true; - Main.dust[bluishDust].velocity /= 4f; - Main.dust[bluishDust].velocity -= NPC.velocity; + if (NPC.Center.X > Main.player[NPC.target].Center.X + stopChargeDistance) + { + NPC.localAI[1] = 0f; + // Prevent the timers from desyncing + calamityGlobalNPC.newAI[0] = calamityGlobalNPC.newAI[2] - resetGateValue; + } } } - else + + int dustAmt = 5; + for (int k = 0; k < dustAmt; k++) { - if (NPC.localAI[3] > 0f) - NPC.localAI[3] -= 1f; + Vector2 dustRotation = Vector2.Normalize(NPC.velocity) * new Vector2((NPC.width + 50) / 2f, NPC.height) * 0.75f; + dustRotation = dustRotation.RotatedBy((k - (dustAmt / 2 - 1)) * (double)MathHelper.Pi / (float)dustAmt) + NPC.Center; + Vector2 randDustMovement = ((float)(Main.rand.NextDouble() * MathHelper.Pi) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); + int bluishDust = Dust.NewDust(dustRotation + randDustMovement, 0, 0, DustID.UnusedWhiteBluePurple, randDustMovement.X, randDustMovement.Y, 100, default, 3f); + Main.dust[bluishDust].noGravity = true; + Main.dust[bluishDust].noLight = true; + Main.dust[bluishDust].velocity /= 4f; + Main.dust[bluishDust].velocity -= NPC.velocity; } } + else + { + if (NPC.localAI[3] > 0f) + NPC.localAI[3] -= 1f; + } } if (Main.getGoodWorld) @@ -640,7 +626,7 @@ namespace CalamityMod.NPCs.StormWeaver } } - if (phase2 && !phase4) + if (phase2) { if (NPC.localAI[1] == 1f) { @@ -830,16 +816,19 @@ namespace CalamityMod.NPCs.StormWeaver bool phase2 = lifeRatio < 0.8f && !Main.zenithWorld; bool phase3 = lifeRatio < 0.55f; + bool phase4 = lifeRatio < 0.3f; // Gate value that decides when Storm Weaver will charge - float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; + float attackGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; if (!phase3) - chargePhaseGateValue *= 0.5f; + attackGateValue *= 0.5f; + if (phase4 && expertMode) + attackGateValue *= 0.9f; Texture2D texture = phase2 ? Phase2Texture.Value : TextureAssets.Npc[Type].Value; Vector2 halfSizeTexture = new Vector2(texture.Width / 2, texture.Height / 2); float chargeTelegraphTime = 120f; - float chargeTelegraphGateValue = chargePhaseGateValue - chargeTelegraphTime; + float chargeTelegraphGateValue = attackGateValue - chargeTelegraphTime; Vector2 drawLocation = NPC.Center - screenPos; drawLocation -= new Vector2(texture.Width, texture.Height) * NPC.scale / 2f; @@ -865,13 +854,16 @@ namespace CalamityMod.NPCs.StormWeaver float lifeRatio = NPC.life / (float)NPC.lifeMax; bool phase3 = lifeRatio < 0.55f; + bool phase4 = lifeRatio < 0.3f; // Gate value that decides when Storm Weaver will charge - float chargePhaseGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; + float attackGateValue = death ? 320f : revenge ? 340f : expertMode ? 360f : 400f; if (!phase3) - chargePhaseGateValue *= 0.5f; + attackGateValue *= 0.5f; + if (phase4 && expertMode) + attackGateValue *= 0.9f; - int buffDuration = NPC.Calamity().newAI[0] >= chargePhaseGateValue ? 360 : 240; + int buffDuration = NPC.Calamity().newAI[0] >= attackGateValue ? 360 : 240; if (hurtInfo.Damage > 0) target.AddBuff(BuffID.Electrified, buffDuration); } diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 3608b9cc4d..c0f5aef107 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -62,11 +62,11 @@ namespace CalamityMod.NPCs.StormWeaver NPC.dontCountMe = true; if (CalamityWorld.death || BossRushEvent.BossRushActive) - NPC.scale *= 1.2f; - else if (CalamityWorld.revenge) NPC.scale *= 1.15f; - else if (Main.expertMode) + else if (CalamityWorld.revenge) NPC.scale *= 1.1f; + else if (Main.expertMode) + NPC.scale *= 1.05f; if (Main.getGoodWorld) NPC.scale *= 0.7f; diff --git a/Projectiles/Enemy/TornadoHostile.cs b/Projectiles/Enemy/TornadoHostile.cs index 002c255f37..128d8bb152 100644 --- a/Projectiles/Enemy/TornadoHostile.cs +++ b/Projectiles/Enemy/TornadoHostile.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Enemy public override void AI() { - float projTimer = Projectile.ai[1] == 1f ? 900f : 600f; + float projTimer = Projectile.ai[1] == 1f ? 795f : 600f; if (Projectile.soundDelay == 0) { Projectile.soundDelay = -1; @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Enemy { Projectile.Kill(); } - float expandSizeX = Projectile.ai[1] == 1f ? 90f : 15f; - float expandSizeY = Projectile.ai[1] == 1f ? 90f : 15f; + float expandSizeX = Projectile.ai[1] == 1f ? 150f : 15f; + float expandSizeY = Projectile.ai[1] == 1f ? 150f : 15f; Point projCenterTile = Projectile.Center.ToTileCoordinates(); int sizeMod; int sizeMod2; @@ -101,13 +101,13 @@ namespace CalamityMod.Projectiles.Enemy } } - public override bool CanHitPlayer(Player target) => Projectile.ai[0] >= 60f && Projectile.ai[0] <= (Projectile.ai[1] == 1f ? 840f : 540f); + public override bool CanHitPlayer(Player target) => Projectile.ai[0] >= 60f && Projectile.ai[0] <= (Projectile.ai[1] == 1f ? 735f : 540f); public override bool PreDraw(ref Color lightColor) { - float aiTrackCheck = Projectile.ai[1] == 1f ? 900f : 600f; - float expandSizeX2 = Projectile.ai[1] == 1f ? 90f : 15f; - float expandSizeY2 = Projectile.ai[1] == 1f ? 90f : 15f; + float aiTrackCheck = Projectile.ai[1] == 1f ? 795f : 600f; + float expandSizeX2 = Projectile.ai[1] == 1f ? 150f : 15f; + float expandSizeY2 = Projectile.ai[1] == 1f ? 150f : 15f; float aiTracker = Projectile.ai[0]; float trackerClamp = MathHelper.Clamp(aiTracker / 30f, 0f, 1f); if (aiTracker > aiTrackCheck - 60f) From 4e00a6e983209a822da9741eb546f91ee43907b3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 Apr 2026 15:17:28 -0400 Subject: [PATCH 140/142] Frost wave telegraphs last slightly longer, frost waves take slightly longer to start moving --- NPCs/StormWeaver/StormWeaverHead.cs | 4 ++-- Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 430d0562f5..b87f6185ca 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -459,7 +459,7 @@ namespace CalamityMod.NPCs.StormWeaver int centralWave = totalWaves / 2; float velocityY = revenge ? 10f : expertMode ? 9f : 8f; int wavePatternType = revenge ? Main.rand.Next(3) : expertMode ? Main.rand.Next(2) + 1 : 2; - float delayBeforeFiring = -60f; + float delayBeforeFiring = -70f; // Note the actual delay is half of this number since frost waves have an extra update for (int x = 0; x < totalWaves; x++) { switch (wavePatternType) @@ -496,7 +496,7 @@ namespace CalamityMod.NPCs.StormWeaver } // Telegraph is active for 60 frames - // Frost Waves start moving after 30 frames + // Frost Waves start moving after 35 frames // Frost Waves take 30 frames to reach full velocity Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawnX, Main.player[NPC.target].Center.Y - 1600f, 0f, velocityY * 0.5f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, velocityY); Projectile.NewProjectile(NPC.GetSource_FromAI(), projectileSpawnX, Main.player[NPC.target].Center.Y - 1600f, 0f, velocityY * 0.1f, type, FrostWaveDamage, 0f, Main.myPlayer, delayBeforeFiring, velocityY); diff --git a/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs b/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs index 8682e81876..a9af58188f 100644 --- a/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs +++ b/Projectiles/Boss/StormWeaverFrostWaveTelegraph.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = -1; Projectile.timeLeft = 300; Projectile.tileCollide = false; - Projectile.extraUpdates = 4; + Projectile.extraUpdates = 3; Projectile.Opacity = 1f; } From b9690ada2efc85cccba24d2efacc56925b289a14 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 8 Apr 2026 19:30:47 -0500 Subject: [PATCH 141/142] Dimensional Drive now works with WASD, no longer infinite with DevilsDev --- CalPlayer/CalamityPlayerDashEffects.cs | 8 ++--- CalPlayer/CalamityPlayerMiscEffects.cs | 8 ++--- CalPlayer/Dashes/GodslayerArmorDash.cs | 45 ++++++++++++++++---------- CalPlayer/Dashes/PlayerDashEffect.cs | 2 ++ 4 files changed, 36 insertions(+), 27 deletions(-) diff --git a/CalPlayer/CalamityPlayerDashEffects.cs b/CalPlayer/CalamityPlayerDashEffects.cs index cfc495120f..df08aeb84f 100644 --- a/CalPlayer/CalamityPlayerDashEffects.cs +++ b/CalPlayer/CalamityPlayerDashEffects.cs @@ -149,15 +149,11 @@ namespace CalamityMod.CalPlayer // Handle mid-dash effects. UsedDash.MidDashEffects(Player, ref dashSpeed, ref dashSpeedDecelerationFactor, ref runSpeedDecelerationFactor); - int VerticalOmnidashCap = DashID == GodslayerArmorDash.ID ? 75 : 25; - if (UsedDash.IsOmnidirectional && VerticalOmnidashTimer < VerticalOmnidashCap) + if (UsedDash.ForceEndAt > 0) { - VerticalOmnidashTimer++; - if (VerticalOmnidashTimer >= VerticalOmnidashCap) + if (UsedDash.dashTime >= UsedDash.ForceEndAt) { Player.dashDelay = dashDelayToApply; - // Stop the player from going flying - Player.velocity *= 0.2f; } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index cadb1be151..c652d14afa 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -350,9 +350,9 @@ namespace CalamityMod.CalPlayer if (Player.miscCounter % 4 == 0) Player.HealPlayer(1, HealTextType.None); - if (Player.dashDelay > 0) // Reduced dash cooldown + if (Player.dashDelay > 1) // Reduced dash cooldown { - Player.dashDelay = 0; + Player.dashDelay = 1; } if (Player.dashDelay == -1) { @@ -367,9 +367,9 @@ namespace CalamityMod.CalPlayer if (Player.miscCounter % 5 == 0) Player.HealPlayer(2, HealTextType.None); - if (Player.dashDelay > 0) // Reduced dash cooldown + if (Player.dashDelay > 1) // Reduced dash cooldown { - Player.dashDelay = 0; + Player.dashDelay = 1; } if (Player.dashDelay == -1) { diff --git a/CalPlayer/Dashes/GodslayerArmorDash.cs b/CalPlayer/Dashes/GodslayerArmorDash.cs index eb9c5f921a..f2f9e49477 100644 --- a/CalPlayer/Dashes/GodslayerArmorDash.cs +++ b/CalPlayer/Dashes/GodslayerArmorDash.cs @@ -27,7 +27,8 @@ namespace CalamityMod.CalPlayer.Dashes public override bool IsOmnidirectional => true; - public int Time = 0; + public override int ForceEndAt => 75; + public float Size = 2.2f; public bool SoundOnce = true; @@ -40,7 +41,7 @@ namespace CalamityMod.CalPlayer.Dashes public override void OnDashEffects(Player player) { - Time = 0; + dashTime = 0; Size = 2.2f; GSDashSlot = SoundEngine.PlaySound(DevourerofGodsHead.DeathAnimationSound, player.Center); SoundOnce = true; @@ -60,24 +61,36 @@ namespace CalamityMod.CalPlayer.Dashes if (SoundEngine.TryGetActiveSound(GSDashSlot, out var Dashsound) && Dashsound.IsPlaying) Dashsound.Position = player.Center; - Time++; Size -= 0.01f; - const int totalDashTime = 75; - // Constantly update the player's velocity direction. - float progress = MathHelper.Clamp(Time / (float)totalDashTime, 0f, 1f); + float progress = MathHelper.Clamp(dashTime / (float)ForceEndAt, 0f, 1f); float ease = 1f - (float)Math.Pow(1f - progress, 0.2f); float finalSpeed = MathHelper.Lerp(32f, 11f, ease); Vector2 dashVel = Main.MouseWorld - player.Center; - Vector2 targetDirection = player.velocity.ToRotation().AngleTowards(dashVel.ToRotation(), 0.175f).ToRotationVector2(); - player.velocity = targetDirection * finalSpeed; + + Vector2 direction = Vector2.Zero; + if (player.controlLeft) + direction.X -= 1; + if (player.controlRight) + direction.X += 1; + if (player.controlUp) + direction.Y -= 1; + if (player.controlDown) + direction.Y += 1; + + Vector2 targetDirection = direction == Vector2.Zero ? player.velocity.SafeNormalize(Vector2.Zero) : player.velocity.ToRotation().AngleTowards(direction.ToRotation(), 0.175f).ToRotationVector2(); + + if (targetDirection == Vector2.Zero) + targetDirection = new(player.direction, 0); + + player.velocity = ((dashTime == 1 && direction != Vector2.Zero) ? direction : targetDirection) * finalSpeed; // Fall way, way, faster than usual. player.maxFallSpeed = 50f; - if (Time < 75) + if (dashTime < ForceEndAt) { Particle jaws = new Jaws(player.Center + player.velocity * 0.5f, player.velocity, Color.Fuchsia, new Vector2(0.8f, 1f), player.velocity.ToRotation() + MathHelper.PiOver2, Size, Size, 2); GeneralParticleHandler.SpawnParticle(jaws); @@ -85,11 +98,11 @@ namespace CalamityMod.CalPlayer.Dashes GeneralParticleHandler.SpawnParticle(jaws2); } - float radiusFactor = MathHelper.Lerp(0f, 1f, Utils.GetLerpValue(2f, 2.5f, Time, true)); + float radiusFactor = MathHelper.Lerp(0f, 1f, Utils.GetLerpValue(2f, 2.5f, dashTime, true)); for (int i = 0; i < 3; i++) { - float offsetRotationAngle = player.velocity.ToRotation() + Time / 20f; - float radius = (30f + (float)Math.Cos(Time / 3f) * 24f) * radiusFactor; + float offsetRotationAngle = player.velocity.ToRotation() + dashTime / 20f; + float radius = (30f + (float)Math.Cos(dashTime / 3f) * 24f) * radiusFactor; Vector2 dustPosition = player.Center + player.velocity * 0.8f; dustPosition += offsetRotationAngle.ToRotationVector2().RotatedBy(i / 5f * MathHelper.TwoPi) * radius; Dust dust = Dust.NewDustPerfect(dustPosition, Main.rand.NextBool(5) ? 181 : 295); @@ -100,7 +113,7 @@ namespace CalamityMod.CalPlayer.Dashes dust2.noGravity = true; } - if (Time % 2 == 0) + if (dashTime % 2 == 0) { float sparkscale = Size * 1.3f; Vector2 SparkVelocity1 = player.velocity.RotatedBy(player.direction * -4, default) * 0.08f - player.velocity / 2f; @@ -111,14 +124,12 @@ namespace CalamityMod.CalPlayer.Dashes GeneralParticleHandler.SpawnParticle(spark2); } - if (Time > 75 && Time < 78) + if (dashTime >= ForceEndAt) { Particle pulse = new DirectionalPulseRing(player.Center - player.velocity * 0.52f, player.velocity / 1.5f, Color.Fuchsia, new Vector2(1f, 2f), player.velocity.ToRotation(), 0.82f, 0.32f, 60); GeneralParticleHandler.SpawnParticle(pulse); Particle pulse2 = new DirectionalPulseRing(player.Center - player.velocity * 0.40f, player.velocity / 1.5f * 0.9f, Color.Aqua, new Vector2(0.8f, 1.5f), player.velocity.ToRotation(), 0.58f, 0.28f, 50); GeneralParticleHandler.SpawnParticle(pulse2); - - Time = 95; } // Dash at a much, much faster speed than the default value. @@ -126,7 +137,7 @@ namespace CalamityMod.CalPlayer.Dashes runSpeedDecelerationFactor = 0.8f; // Cooldown for God Slayer Armor dash. - player.AddCooldown(Cooldowns.GodSlayerDash.ID, GodSlayerChestplate.DashCooldown); + player.AddCooldown(Cooldowns.GodSlayerDash.ID, 60);//GodSlayerChestplate.DashCooldown); player.Calamity().godSlayerDashHotKeyPressed = false; } diff --git a/CalPlayer/Dashes/PlayerDashEffect.cs b/CalPlayer/Dashes/PlayerDashEffect.cs index 30e515cd7f..ef477f1cf2 100644 --- a/CalPlayer/Dashes/PlayerDashEffect.cs +++ b/CalPlayer/Dashes/PlayerDashEffect.cs @@ -20,6 +20,8 @@ namespace CalamityMod.CalPlayer.Dashes public abstract bool IsOmnidirectional { get; } + public virtual int ForceEndAt { get; } = -1; + public abstract float CalculateDashSpeed(Player player); /// /// Effects that happen once when the main dash starts From f90454d2951a8b9c3ada42a761ecb962c9f6ce61 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 11 Apr 2026 11:59:46 -0500 Subject: [PATCH 142/142] Fixed int --- CalPlayer/Dashes/GodslayerArmorDash.cs | 2 +- Items/Armor/GodSlayer/GodSlayerChestplate.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CalPlayer/Dashes/GodslayerArmorDash.cs b/CalPlayer/Dashes/GodslayerArmorDash.cs index f2f9e49477..20be36951d 100644 --- a/CalPlayer/Dashes/GodslayerArmorDash.cs +++ b/CalPlayer/Dashes/GodslayerArmorDash.cs @@ -137,7 +137,7 @@ namespace CalamityMod.CalPlayer.Dashes runSpeedDecelerationFactor = 0.8f; // Cooldown for God Slayer Armor dash. - player.AddCooldown(Cooldowns.GodSlayerDash.ID, 60);//GodSlayerChestplate.DashCooldown); + player.AddCooldown(Cooldowns.GodSlayerDash.ID, GodSlayerChestplate.DashCooldown); player.Calamity().godSlayerDashHotKeyPressed = false; } diff --git a/Items/Armor/GodSlayer/GodSlayerChestplate.cs b/Items/Armor/GodSlayer/GodSlayerChestplate.cs index 5230c288c0..cefd8ea258 100644 --- a/Items/Armor/GodSlayer/GodSlayerChestplate.cs +++ b/Items/Armor/GodSlayer/GodSlayerChestplate.cs @@ -12,16 +12,16 @@ namespace CalamityMod.Items.Armor.GodSlayer { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; - public static float DamageBoost = 0.15f; - public static int CritBoost = 11; + public static float DamageBoost => 0.15f; + public static int CritBoost => 11; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), CritBoost); // Common Set Bonus - public static int DashCooldown = CalamityUtils.SecondsToFrames(45); - public static int DashDamage = 3000; - public static float DashKnockback = 15f; - public static int DashIFrames = 12; - public static int DashGodSlayerInfernoDuration = CalamityUtils.SecondsToFrames(5); + public static int DashCooldown => CalamityUtils.SecondsToFrames(45); + public static int DashDamage => 3000; + public static float DashKnockback => 15f; + public static int DashIFrames => 12; + public static int DashGodSlayerInfernoDuration => CalamityUtils.SecondsToFrames(5); public override void SetDefaults() {