From 4366fbc0ee3e89798da723b5b1d4e5dcd349e396 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:27:03 -0800 Subject: [PATCH 001/346] froggy --- Buffs/Pets/StarSwallowerPetBuff.cs | 27 ++ Buffs/Pets/StarSwallowerPetBuff.png | Bin 0 -> 617 bytes Items/Pets/StarSwallowerUnit.cs | 40 +++ Items/Pets/StarSwallowerUnit.png | Bin 0 -> 796 bytes Projectiles/Pets/StarSwallowerPet.cs | 363 ++++++++++++++++++++++++++ Projectiles/Pets/StarSwallowerPet.png | Bin 0 -> 4518 bytes 6 files changed, 430 insertions(+) create mode 100644 Buffs/Pets/StarSwallowerPetBuff.cs create mode 100644 Buffs/Pets/StarSwallowerPetBuff.png create mode 100644 Items/Pets/StarSwallowerUnit.cs create mode 100644 Items/Pets/StarSwallowerUnit.png create mode 100644 Projectiles/Pets/StarSwallowerPet.cs create mode 100644 Projectiles/Pets/StarSwallowerPet.png diff --git a/Buffs/Pets/StarSwallowerPetBuff.cs b/Buffs/Pets/StarSwallowerPetBuff.cs new file mode 100644 index 0000000000..30c26a7850 --- /dev/null +++ b/Buffs/Pets/StarSwallowerPetBuff.cs @@ -0,0 +1,27 @@ +using CalamityMod.Projectiles.Pets; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Pets +{ + public class StarSwallowerPetBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.buffNoTimeDisplay[Type] = true; + Main.vanityPet[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.buffTime[buffIndex] = 18000; + player.Calamity().starSwallowerPetFroge = true; + bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; + if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) + { + Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); + } + } + } +} diff --git a/Buffs/Pets/StarSwallowerPetBuff.png b/Buffs/Pets/StarSwallowerPetBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..2c9ccf32bf410be8f8ef89085a6ba029fb43c1f8 GIT binary patch literal 617 zcmV-v0+#)WP)Px#1ZP1_K>z@;j|==^1poj6`AI}UR9HvVm(43gVHC#iNP|q{V^WOdt3;#7s0k~h z6tSCRqewPnLpCgBWhwuJW=E05SV1ucvOmGw+?n zJgT{rdvfMg z9uHXU&IL1xPEfHNRa11dVCWUp-vMS$?Z)F)q%>Gp1upIEgC*ksfznbdQetiVKL?n3 zcQ6Q^oX5bM>r;^8eQGlj0q;dubj%ci`Z}=O{{+g+ef}n}Je&&@)W^H`08+~hlVl8lwd3u&7q^-+aD^fbLW{Io? zirt`}1BbKuV7gN=Gh;W%(=hK#@%^Fidw_fU*sJ<8lX#*@C%N~0bIOyF{SMgmb)4gL z>hN`J7@u(d@K#D*vpfI*01jnXNoGw=04e|g00;m8000000Mb*F00000NkvXXu0mjf DElwK6 literal 0 HcmV?d00001 diff --git a/Items/Pets/StarSwallowerUnit.cs b/Items/Pets/StarSwallowerUnit.cs new file mode 100644 index 0000000000..93e0d26691 --- /dev/null +++ b/Items/Pets/StarSwallowerUnit.cs @@ -0,0 +1,40 @@ +using CalamityMod.Buffs.Pets; +using CalamityMod.Projectiles.Pets; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Pets +{ + public class StarSwallowerUnit : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Pets"; + public override void SetDefaults() + { + Item.width = 42; + Item.height = 30; + Item.damage = 0; + Item.useAnimation = 20; + Item.useTime = 20; + Item.useStyle = ItemUseStyleID.Swing; + Item.noMelee = true; + + Item.value = Item.sellPrice(gold: 1); + Item.rare = ModContent.RarityType(); + + Item.shoot = ModContent.ProjectileType(); + Item.buffType = ModContent.BuffType(); + Item.UseSound = SoundID.Item10; + } + + public override void UseStyle(Player player, Rectangle heldItemFrame) + { + if (player.whoAmI == Main.myPlayer && player.itemTime == 0) + { + player.AddBuff(Item.buffType, 15, true); + } + } + } +} diff --git a/Items/Pets/StarSwallowerUnit.png b/Items/Pets/StarSwallowerUnit.png new file mode 100644 index 0000000000000000000000000000000000000000..9c51f4ae8622100f6568b37a1117c675b46b7279 GIT binary patch literal 796 zcmV+%1LOROP)Px#1ZP1_K>z@;j|==^1poj7tVu*cR9HvNmfuTLVHn5fh#g}?*Ty!r>HL8!F%q;9 zB^sF&-bO~yWpopCQ}h?~gTM=+{~?I9Zi6oD%AhF0=r;^qt+}(YIctMPOK z40dzg`GLdteKvjfe9!Z|KUy3O5;{9#jU2x%mBC#4<5dL2X{l{A`~&UfRy<_m(LFq* znl9pzvE4z#HHb~0fVLa0sKM<;gpQg1WoS#tjk$7h9WiOXgXzgLP^Y&9trpyHu=mt^ z#LIJ=P!r6RFV@zf`3{B$hoGIEJvEuXT=hZS=?vy5y!nB6_c`bfN1%m54i3g|>_g0V zU$1+JItK?LB2$^d))us~y$uJWqvMEIRz&}6E*Iw5$mbEu*zbUuhk`+p!0-Pn|M0j)4T>ePPCg|PP-4G>$yf{nW`25V3h{?{3i>ti5lZ+ydAhU&b?(vN zMAyataXl!hK~3hvW8&mGe)I_R+Vz{zp@A-_?5sO-5X!Fddi`)>t{cSa9bCS02}+*7 zcm-X2_yj7S1MDiTaE$YF)zrU~mHBscC+b8z*l3~CB zIn>bs9hsPbvb)H;*W&)e&sihZAQ~N17z`(rEKTF0000 "Projectiles.Pets"; + private int playerStill = 0; + private bool idleAnimation = false; + private bool fly = false; + + public override void SetStaticDefaults() + { + Main.projFrames[Projectile.type] = 8; + Main.projPet[Projectile.type] = true; + + ProjectileID.Sets.CharacterPreviewAnimations[Projectile.type] = ProjectileID.Sets.SimpleLoop(1, 8, 6) + .WithOffset(-18f, 0f).WithSpriteDirection(1).WhenNotSelected(0, 0); + } + + public override void SetDefaults() + { + Projectile.netImportant = true; + Projectile.width = 54; + Projectile.height = 48; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.timeLeft *= 5; + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + } + + public override bool PreDraw(ref Color lightColor) + { + /* Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/EidolonSnail").Value; + + int height = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = height * Projectile.frame; + SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY + 2), + new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), lightColor, + Projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), Projectile.scale, spriteEffects, 0);*/ + + return true; + } + + public override void PostDraw(Color lightColor) + { + /* Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/EidolonSnailGlow").Value; + + int height = texture.Height / Main.projFrames[Projectile.type]; + int frameHeight = height * Projectile.frame; + SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY + 2), + new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Color.White, + Projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), Projectile.scale, spriteEffects, 0);*/ + } + + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) + { + Player player = Main.player[Projectile.owner]; + Vector2 projCenter = Projectile.Center; + Vector2 playerDirection = player.Center - projCenter; + float playerDistance = playerDirection.Length(); + fallThrough = playerDistance > 200f; + return true; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + if (!player.active) + { + Projectile.active = false; + return; + } + + CalamityPlayer modPlayer = player.Calamity(); + if (player.dead) + { + modPlayer.starSwallowerPetFroge = false; + } + if (modPlayer.starSwallowerPetFroge) + { + Projectile.timeLeft = 2; + } + + Vector2 projPos = Projectile.position; + if (!fly) + { + Projectile.rotation = 0; + Vector2 projCenter = Projectile.Center; + Vector2 playerDirection = player.Center - projCenter; + float playerDistance = playerDirection.Length(); + if (Projectile.velocity.Y == 0 && ((HoleBelow() && playerDistance > 150f) || (playerDistance > 150f && Projectile.position.X == Projectile.oldPosition.X))) + { + Projectile.velocity.Y = -8f; + } + Projectile.velocity.Y += 0.35f; + if (Projectile.velocity.Y > 15f) + { + Projectile.velocity.Y = 15f; + } + if (playerDistance > 520f) + { + fly = true; + Projectile.velocity.X = 0f; + Projectile.velocity.Y = 0f; + } + if (playerDistance > 100f) + { + if (player.position.X - Projectile.position.X > 0f) + { + Projectile.velocity.X += 0.12f; + if (Projectile.velocity.X > 6f) + { + Projectile.velocity.X = 6f; + } + } + else + { + Projectile.velocity.X -= 0.12f; + if (Projectile.velocity.X < -6f) + { + Projectile.velocity.X = -6f; + } + } + } + if (playerDistance < 100f) + { + if (Projectile.velocity.X != 0f) + { + if (Projectile.velocity.X > 0.8f) + { + Projectile.velocity.X -= 0.25f; + } + else if (Projectile.velocity.X < -0.8f) + { + Projectile.velocity.X += 0.25f; + } + else if (Projectile.velocity.X < 0.8f && Projectile.velocity.X > -0.8f) + { + Projectile.velocity.X = 0f; + } + } + } + if (playerDistance < 70f) + { + Projectile.velocity.X *= 0.5f; + } + + //set frames when idle + if (Projectile.position.X == Projectile.oldPosition.X && Projectile.position.Y == Projectile.oldPosition.Y && Projectile.velocity.X == 0) + { + /*if (Main.rand.NextBool(200) && !idleAnimation) + { + idleAnimation = true; + } + + if (idleAnimation) + { + Projectile.frameCounter++; + if (Projectile.frameCounter > 8) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 4) + { + Projectile.frame = 0; + idleAnimation = false; + } + } + else + { + Projectile.frame = 0; + Projectile.frameCounter = 0; + }*/ + Projectile.frame = 0; + } + //falling frame + else if (Projectile.velocity.Y > 0.3f && Projectile.position.Y != Projectile.oldPosition.Y) + { + Projectile.frame = 7; + Projectile.frameCounter = 0; + } + else if (Projectile.velocity.X != 0) + { + if (Projectile.frame < 4) + { + //Projectile.frame = 4; + } + + //moving animation + Projectile.frameCounter++; + if (Projectile.frameCounter >= 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 7) + { + Projectile.frame = 0; + } + } + + if (Projectile.velocity.X > 0.8f) + { + Projectile.spriteDirection = -1; + } + else if (Projectile.velocity.X < -0.8f) + { + Projectile.spriteDirection = 1; + } + } + else if (fly) + { + float flySpeed = 0.5f; + Projectile.tileCollide = false; + Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); + float horiPos = Main.player[Projectile.owner].position.X + (float)(Main.player[Projectile.owner].width / 2) - flyDirection.X; + float vertiPos = Main.player[Projectile.owner].position.Y + (float)(Main.player[Projectile.owner].height / 2) - flyDirection.Y; + vertiPos += (float)Main.rand.Next(-10, 21); + horiPos += (float)Main.rand.Next(-10, 21); + horiPos += (float)(60 * -(float)player.direction); + vertiPos -= 60f; + float playerDistance = (float)Math.Sqrt((double)(horiPos * horiPos + vertiPos * vertiPos)); + if (playerDistance > 1200f) + { + Projectile.position.X = player.Center.X - (float)(Projectile.width / 2); + Projectile.position.Y = player.Center.Y - (float)(Projectile.height / 2); + Projectile.netUpdate = true; + } + if (playerDistance < 100f) + { + flySpeed = 0.5f; + if (player.velocity.Y == 0f) + { + ++playerStill; + } + else + { + playerStill = 0; + } + if (playerStill > 10 && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) + { + fly = false; + Projectile.velocity *= 0.2f; + Projectile.tileCollide = true; + } + } + if (playerDistance < 50f) + { + if (Math.Abs(Projectile.velocity.X) > 2f || Math.Abs(Projectile.velocity.Y) > 2f) + { + Projectile.velocity *= 0.90f; + } + flySpeed = 0.02f; + } + else + { + if (playerDistance < 100f) + { + flySpeed = 0.35f; + } + if (playerDistance > 300f) + { + flySpeed = 1f; + } + playerDistance = 18f / playerDistance; + horiPos *= playerDistance; + vertiPos *= playerDistance; + } + if (Projectile.velocity.X <= horiPos) + { + Projectile.velocity.X = Projectile.velocity.X + flySpeed; + if (flySpeed > 0.05f && Projectile.velocity.X < 0f) + { + Projectile.velocity.X = Projectile.velocity.X + flySpeed; + } + } + if (Projectile.velocity.X > horiPos) + { + Projectile.velocity.X = Projectile.velocity.X - flySpeed; + if (flySpeed > 0.05f && Projectile.velocity.X > 0f) + { + Projectile.velocity.X = Projectile.velocity.X - flySpeed; + } + } + if (Projectile.velocity.Y <= vertiPos) + { + Projectile.velocity.Y = Projectile.velocity.Y + flySpeed; + if (flySpeed > 0.05f && Projectile.velocity.Y < 0f) + { + Projectile.velocity.Y = Projectile.velocity.Y + flySpeed * 2f; + } + } + if (Projectile.velocity.Y > vertiPos) + { + Projectile.velocity.Y = Projectile.velocity.Y - flySpeed; + if (flySpeed > 0.05f && Projectile.velocity.Y > 0f) + { + Projectile.velocity.Y = Projectile.velocity.Y - flySpeed * 2f; + } + } + + Projectile.rotation += (Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) * 0.01f * (float)Projectile.direction; + + if (Projectile.Center.X < Main.player[Projectile.owner].Center.X) + { + Projectile.spriteDirection = -1; + } + else if (Projectile.Center.X > Main.player[Projectile.owner].Center.X) + { + Projectile.spriteDirection = 1; + } + + //funny flying animation + Projectile.frame = 7; + /*Projectile.frameCounter++; + if (Projectile.frameCounter > 4) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 11) + { + Projectile.frame = 9; + }*/ + } + } + + private bool HoleBelow() + { + int tileWidth = 4; + int tileX = (int)(Projectile.Center.X / 16f) - tileWidth; + if (Projectile.velocity.X > 0) + { + tileX += tileWidth; + } + int tileY = (int)((Projectile.position.Y + Projectile.height) / 16f); + for (int y = tileY; y < tileY + 2; y++) + { + for (int x = tileX; x < tileX + tileWidth; x++) + { + if (Main.tile[x, y].HasTile && (Main.tile[x - 1, y].HasTile || Main.tile[x + 1, y].HasTile)) + { + return false; + } + } + } + return true; + } + } +} diff --git a/Projectiles/Pets/StarSwallowerPet.png b/Projectiles/Pets/StarSwallowerPet.png new file mode 100644 index 0000000000000000000000000000000000000000..275fa4ac5d77d8025b299bb51653fccab09533df GIT binary patch literal 4518 zcmXw72{aVm+a6mq$}%DQnzE+slYNqX9kPc=NYofvhCyW#Wf_h2CqpVK`x28qWNb53 zh#A>u%DyvM=0A15@1FOb_ug~Qx#ynudAH{#+1Z$$1_}cK0KjQ;Gh--2s{;T`=^Q5* ztC>evOBjj?4mE`UDhQU>rABWoi7pgN87@Fp7oz^iF)Y~&c}x$+YERBS}(i&pRI z&!fKEV-K_>K2fe-t{66X?lbH*{K&CNxlRF-mG#jjIgaBaM>(`e`D2_}P@vIWOHO68 z4wnw@0A5GOx=i8AKLlkiCz+FPX^FriYMaIfCj-`+{R>FB{?ryV_}=PZIOV8gp`}(Q zVwJo#5KS2X6Y~RAPjz1UE52wKN>9{X&ose2#M7CcQ!aF4 z#_dabd!IQ$uGKZ5&6jF$xRmTg_u4OU)cvnn)*$Rez3uG&!1I_8>P%-%85)V|OTdiR z1b^rXs>E5$23596Z6x*3FT#F(egKk?h;x|zmi8&*_{)fmkrRg@`gE-F$&VGT3vKWm zNbKE->1>xGI}Z6U>WwKhN8wO~n2xM;iFgbI@@?d3&)nl6vq^S$Ss(lZ+mplmS zAQaDmig>cHll7K9I86*v?~>;Ee&KQFfX@cph3A+QcN0yI<#>VCVn38&Q`cKSDiUx~ z(@LuQIsL<-P7sqKt4l7Rrjiycf1eAs!rI-q%Tl^i$T95^y*218`zouGcB0VffJk>^ z%|veFD_Zu;^*v)8%VzP=^dHMxOog{3NUb-dEkH|wI2IRh z2xkp+P|*qBI!GIHe#IMP;u!yF}Y@Z#}d-I?BSh{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rF*Zv{ z8pL;L@6$DjqGn6r;4P{^?nbn6Jxq2hAHB6 z@!*7^lSRMS7u^#5cX8Z`B3HFCE{<8Of|%^ z8-53)k%WaP#+Mxa9Q9kCK-TX~zq~1Uh+uaZ)CyqkRXQh6u`jk1{l4a!u z86yXA(l@dv4$6^$@wu~;&)h0vQe51kw@v%)P;w3;l#WChCO{=s8}7$4OjW+Ahpv*g ziske9O38|{Su*xP8MdU+5HG-}|0A`3d2Jxnvdu%GP9OD}WJ|h$#XGY)%PCGUv+(oxkCkDQQt4_B>{d>nhcMru1>vZuRK%I@(b@y|v}4!BN9QsnD8Dv>}G zsFn8yxhR*PGQVbHTmkWZ^grFn B)zJU| literal 0 HcmV?d00001 From d07c7993fddca7e0837a784b87be8f7513d3f07b Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Sat, 26 Apr 2025 15:26:20 -0700 Subject: [PATCH 002/346] 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 003/346] 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 004/346] 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 005/346] 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 006/346] 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 007/346] 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..a795ce0c9695d0e0c89d3cc1d434c31b34f00b01 GIT binary patch literal 1025 zcmV+c1pfPpP)Px#1ZP1_K>z@;j|==^1poj8t4TybR9Hvdm|I8`Q5?p{C?AS2Dv&TDx3Z{6rB$#< zk}$g1MJdcnwiXFm(nTYR6tT!2G&HTqqU=giS)?Qyktimp;TkEe;aXxuZ)W6!J=pf0 z`8Ma^>?+a2%%74xCfA6;>Q`AieXp((`bgG6J`Dip2E@4|dOx z$E1y4!(pN8alnKZDf8i8WdPu69%CQg`WlID{yv8;qYI^V;@ z+xex-tgs%g?x2o5CreC`Fd4TmM{bCOy=8DJHjj7RzGVZ;ZFJZk} zUb=b(?0DM+%QY-_8*i{*kN%9nJ^9RN!RP-Oss`ri5*IO4l&fl@J`R58? zCN0x=JPK~U(FFIadyE|+F)-;+`}TEvH_XIcm?vRPvP@vpkocA}*`%GZa8F+!oD`c3 zZ;#V<4M%ss@P~HzACfkH!XA?)ZT4n$B)I?VDO{Xa2+Osdnvx0!1_Z-$(%jVzH;MCl zWZ3IrCT-k=d!=OAXZw13;7!rnVB+}ffNLIA!bJWp*!QIq=IftVi4`$j?b``unXor( zhp)lLO_&T0eTS0|q`~a3at)u&FM^pESGt(p@o?^$Q*cmVAiQ>+SozXY)8YOB(G3C$ z^I>n)DZa3A`><>6N7A-qq6V)NmB3w{9q{El?tQBUb_w5^(_oU3bwnKr_nos*jd z-@Yln3;Xtq8R9W1yL1UQZo;lz7!qbuBR_t@a&6{iYP&^VX*Dc&ixt74>PWzulHtr9 zN)a>5F2lY}T=!wjK0H;mo9R>h;4Y`w|1yEv>RQ+uDfSM8$@A}6)0`nava)m4k-)vr zUcLZk!c3MJw}xGyhWVuYKZ5^af7qHR_6F?_Zox!8ulEatwaEkt`#67H^Lo+W{%oFv zi6&_h6)$Qv(K;O_588*}@`4#0p28@0>7` vCQf(^e2w0D;F=N5bvZ$A*Yz-1!iw@6Tb7emu=TL=00000NkvXXu0mjfuH5n5 literal 0 HcmV?d00001 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.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 008/346] 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 009/346] 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 010/346] 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 011/346] 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(WJXGLkbW8ANo*8OZ_y!jN+Y0nw41b51I# zWDs-aZuED~ci#8zy7#Sh*Zc2on_k`3)m^(QbXV8z@w$tP5da1Lc}i9O7VhMeKZkHY z0&n`-yZN1ipxEwzP<;L(KZaaC@A>cNye9;#X#s4Tv?^!+?MZ|E9ZC|!Fmt=*Dt6u1 z1>xytkNHCYp@~3=qr}B8i%TK|44oVU9NfHJ5USpRZoW6Yy_~%L1<%Pq2>*^DsHBX6 z03;v;se>56PN$jx05t&E@(5C8IBN=)WflvBoE7=LWI~li5oD-gM5GRCuQWqXZm+T=MQ&f9by|sBv~^ZX z2f2W8sP7@NzT-D3yOaM-L~b$WrCK zDXOA>IQKl>_#uC1RnEgd67-y8-UekUIGQ_9lsld0H>pXHSN69QLi>=ou4)#9G4JG4 z4Kmw-cy6PyLZP7xwEYna+u=w<#OV67wCdO6_5QrL^7DcRd?b%N9zx|{=118XN zRDF5=!*cLQHf7M7nniR!{GFr149HM_Ri^(G007`qDYXBrBL;?|3x-k)hN33M3jb@1 z0b3U&b>}2O#%2KkGXT6UEuX(lMQfib8?Wd}qS?)PV#^L{7+~Z zNI|au2Q9RuF4|c4|D4kQ9pV3S;D5^jP{kos;2)z>F{dyTD+2*yx6$bc&3BSm2lIFG z!7Ms-FU=U`FXR!={m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HrG06;?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_b7Z4LI_n#fY3Cd8L9~c1T0VJ5Q_8;(xppRtf5MmE?o${3ZV!n8hYR6I)}MFTwHcWTp!9M5#Rr> z1Wj<|1^^g9#xf?CZ0UN9D_=kzPYx_n_B2$gKr_S}uPHNj?~A+ml{c4r`;AM8Ay}>H zK>`3o9ZWRR$Ygyg=qUP z(N3tCf8y8ct6vV|@2R69K#_=Y)`kQ{n4hw)OreX4sf7Zrha^EWrU^@=mFSkcd)0g9 zwR+UF`i@YgN2n~nK|uDx4&MeS^2{y&e?@oeEVuuCBzg==0z{CO0|9~q0iv2Fq62}_ z48JKn2!K2#nn?Er610N|13{<3s2!{^l%YTNN&m>dm~hB;03hN8`vL@qKx&xC%mgY} z2A!D?GMEQRaY&K>bqN10FW^Kl1@2j1WQ2T*({Hkn!C_Iw2z8b}m_UHo;!Sk!WbVf? zWwzWGMODbWnXWjqyyNXv*?GS?=rhi@0rFB}IH#{DXEHZvT$d%c>`yL?GmoLJY8tHL zdzsJH&*ucfc~0jtR4rP8eXS>Rw<_C_U@k5r?|4hQ*`M+L5sNB^{P8a3=U|Vxr9AI; zMtd;#%{Bk+7~^5xe-|Gj$Tz12RDVGP`g$_l8Hp*!q#q5w&6Zw-ACxFPnv|?Xs){r+ z;X7Uy9PxYRXaI;}|1HJ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^w=ZmHA}w7f3Vtr zsQbp8**vkJ-!B;I`#IW!0?*3{>q?UEzuQ5fKmbiT-AM)9Ii%`2G6MYn?bBr~xaYE)#aqW;6z;8XNSlX>p`Rcu;1LV+*KHEbI})xS_VPiVcGpg`mIC-m2S4^k z4k-F*ck#~LR@)AGC*NHuKcVKkXacw8uZ_K{dmHu#EtGn(@k_RpANh<>sfUuh^Hk^2 zH?EC!N~I*zMh{bHAWM9MO=?6{i>|N)PfnqzqIn6Hrggatqfu{V1!y|j@sk@73P{-u zsUZ`o@><&e2(?~+_LVN){k%rGD4`yuST7W1a+gP+ zg)B&TI%1_1t2_;sV#QSzi?y}(ETL#4$3e$vaNwcokJ|p#1fp`vmO@CZ00i}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 012/346] 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 013/346] 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 014/346] 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 015/346] 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 016/346] 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 017/346] 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 47f2013365aca2593ceede1a40dbfbf33df5a5d2 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 19 Feb 2026 21:46:37 -0500 Subject: [PATCH 018/346] they would never make step stool 2 --- CalPlayer/CalamityPlayer.cs | 51 +++++++++++++++ CalPlayer/CalamityPlayerHitHurt.cs | 19 ++++++ CalPlayer/DrawLayers/SpringStoolLayer.cs | 75 +++++++++++++++++++++++ Cooldowns/Stooldown.cs | 19 ++++++ Cooldowns/Stooldown.png | Bin 0 -> 270 bytes Cooldowns/StooldownOutline.png | Bin 0 -> 185 bytes Cooldowns/StooldownOverlay.png | Bin 0 -> 166 bytes ExtraJumps/SpringStoolBottom.png | Bin 0 -> 376 bytes ExtraJumps/SpringStoolJump.cs | 51 +++++++++++++++ ExtraJumps/SpringStoolJump.png | Bin 0 -> 2853 bytes ExtraJumps/SpringStoolSpring.png | Bin 0 -> 255 bytes ExtraJumps/SpringStoolTop.png | Bin 0 -> 232 bytes Items/Accessories/SpringStool.cs | 36 +++++++++++ Items/Accessories/SpringStool.png | Bin 0 -> 719 bytes 14 files changed, 251 insertions(+) create mode 100644 CalPlayer/DrawLayers/SpringStoolLayer.cs create mode 100644 Cooldowns/Stooldown.cs create mode 100644 Cooldowns/Stooldown.png create mode 100644 Cooldowns/StooldownOutline.png create mode 100644 Cooldowns/StooldownOverlay.png create mode 100644 ExtraJumps/SpringStoolBottom.png create mode 100644 ExtraJumps/SpringStoolJump.cs create mode 100644 ExtraJumps/SpringStoolJump.png create mode 100644 ExtraJumps/SpringStoolSpring.png create mode 100644 ExtraJumps/SpringStoolTop.png create mode 100644 Items/Accessories/SpringStool.cs create mode 100644 Items/Accessories/SpringStool.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3003008d01..eb2fb927bf 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8,6 +8,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; +using CalamityMod.CalPlayer.DrawLayers; using CalamityMod.Cooldowns; using CalamityMod.DataStructures; using CalamityMod.Dusts; @@ -72,6 +73,7 @@ using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -863,6 +865,7 @@ namespace CalamityMod.CalPlayer public bool tesla = false; public bool teslaVisuals = true; public bool cryogenSoul = false; + public bool springStool = false; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2411,6 +2414,7 @@ namespace CalamityMod.CalPlayer tesla = false; teslaVisuals = true; cryogenSoul = false; + springStool = false; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -4966,6 +4970,37 @@ namespace CalamityMod.CalPlayer Lighting.AddLight(Player.Center, Light * (0.55f + (oceanCrestTimer * 0.0035f))); } + if (springStool) + { + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Player.velocity.X == 0; + + if (holdingUp && standingStill && !Player.mount.Active) + { + // Vertical displacement when using Spring Stool + int boost = 61; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + Player.UpdatePortableStoolUsage(); + + } + else + { + // Stool still exists even if not being used + Player.portableStoolInfo.HasAStool = true; + } + + } + } + if (rampartOfDeities) { // Ice Barrier buff inherited from Frozen Turtle Shell @@ -5022,6 +5057,8 @@ namespace CalamityMod.CalPlayer public override void PostUpdate() { + Main.NewText(Main.LocalPlayer.Top.Y); + if (ZoneAbyss && Main.netMode != NetmodeID.Server) { //Main aura @@ -6244,6 +6281,20 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square1); GeneralParticleHandler.SpawnParticle(square2); } + + public override void Load() + { + // Hook into the vanilla stool drawing method to remove it + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HideStepStool; + } + + private void HideStepStool(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + if (drawInfo.drawPlayer.GetModPlayer().springStool) + return; + + orig(ref drawInfo); + } #endregion #region Mana Consumption Effects diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index df6c24e6df..e4b66643bd 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -461,6 +461,25 @@ namespace CalamityMod.CalPlayer #endregion #region Modify Hit NPC + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool) + { + if (Main.LocalPlayer.Top.Y < target.Top.Y) + { + // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + + if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) + modifiers.SetCrit(); + + else + modifiers.DisableCrit(); + } + } + } + public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers) { modifiers.CritDamage += critDamage; diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs new file mode 100644 index 0000000000..395674947a --- /dev/null +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.ExtraJumps; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using static Terraria.ModLoader.PlayerDrawLayer; + +namespace CalamityMod.CalPlayer.DrawLayers +{ + public class SpringStoolLayer : PlayerDrawLayer + { + private Asset stoolTexture; + private Asset springTexture; + private Asset topTexture; + + public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.Leggings); + + public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) + { + // Only draw if the player is holding Up and still + return drawInfo.drawPlayer.GetModPlayer().springStool && + drawInfo.drawPlayer.portableStoolInfo.IsInUse; + } + + protected override void Draw(ref PlayerDrawSet drawInfo) + { + Player drawPlayer = drawInfo.drawPlayer; + + // Load textures if null + stoolTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolBottom"); + springTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolSpring"); + topTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolTop"); + + Texture2D stoolTex = stoolTexture.Value; + Texture2D springTex = springTexture.Value; + Texture2D topTex = topTexture.Value; + + // Bottom Position + Vector2 bottomPosition = new Vector2( + (int)(drawInfo.Position.X - Main.screenPosition.X + drawPlayer.width / 2f), + (int)(drawInfo.Position.Y - Main.screenPosition.Y + drawPlayer.height + drawPlayer.portableStoolInfo.HeightBoost) + ); + Rectangle bottomSource = stoolTex.Frame(); + Vector2 bottomOrigin = new Vector2(bottomSource.Width / 2f, bottomSource.Height - 2); + + // Spring + Vector2 springPosition = bottomPosition - new Vector2(0, bottomSource.Height); + Rectangle springSource = springTex.Frame(); + Vector2 springOrigin = new Vector2(springSource.Width / 2f, springSource.Height - 2); + + // Top + Vector2 topPosition = springPosition - new Vector2(0, springSource.Height - 5); + Rectangle topSource = topTex.Frame(); + Vector2 topOrigin = new Vector2(topSource.Width / 2f, topSource.Height); + + // Add all to cache + DrawPart(ref drawInfo, stoolTex, bottomPosition, bottomSource, bottomOrigin); + DrawPart(ref drawInfo, springTex, springPosition, springSource, springOrigin); + DrawPart(ref drawInfo, topTex, topPosition, topSource, topOrigin); + } + + private void DrawPart(ref PlayerDrawSet drawInfo, Texture2D tex, Vector2 pos, Rectangle src, Vector2 origin) + { + drawInfo.DrawDataCache.Add(new DrawData(tex, pos, src, drawInfo.colorArmorLegs, drawInfo.drawPlayer.bodyRotation, origin, 1f, drawInfo.playerEffect, 0) + { shader = drawInfo.cPortableStool }); + } + } +} diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs new file mode 100644 index 0000000000..3482f788ac --- /dev/null +++ b/Cooldowns/Stooldown.cs @@ -0,0 +1,19 @@ +using Microsoft.Xna.Framework; +using Terraria.Audio; +using Terraria.Localization; + +namespace CalamityMod.Cooldowns +{ + public class Stooldown : CooldownHandler + { + public static new string ID => "Stooldown"; + public override bool ShouldDisplay => true; + public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); + public override string Texture => "CalamityMod/Cooldowns/AscendEffect"; + public override Color OutlineColor => new Color(197, 165, 108); + public override Color CooldownStartColor => new Color(144, 84, 29); + public override Color CooldownEndColor => Color.Khaki; + + public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff"); + } +} diff --git a/Cooldowns/Stooldown.png b/Cooldowns/Stooldown.png new file mode 100644 index 0000000000000000000000000000000000000000..60913ece6932c4dc47cb5ce9889ea27a10c7a954 GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lf=o-U3d7XHa84NW23i~k3xMJ9afEKb-w z^e16f#D?VWyav9t;#nU)H^oXkSimo)Af97UAn0@XT65u$X-JtOGc!YUfpZue+na4b PKQMT@`njxgN@xNA#3EeV literal 0 HcmV?d00001 diff --git a/Cooldowns/StooldownOutline.png b/Cooldowns/StooldownOutline.png new file mode 100644 index 0000000000000000000000000000000000000000..93ce7852e028b04103acbbb33a549234bf12215e GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|ialK%Lp(a) zP7UNbpupoi{o&vBcmC=mv$(BZXO;NgUspF%`=Hv4nJ;5`84B#*+n!vtVeca>8AiuD$oEb9C6q~zj` jk6a#C7Vq6r!piP^BKi&I#^)J8>lr*<{an^LB{Ts5ZMRCO literal 0 HcmV?d00001 diff --git a/Cooldowns/StooldownOverlay.png b/Cooldowns/StooldownOverlay.png new file mode 100644 index 0000000000000000000000000000000000000000..e9226d6904366a4d515bbb32cc51d9ff3ff6ba1c GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%LfjPZ!4!3;*PlhNk}x45^b?B^nuAj2kOMSbC=H;*kxw+q#%7h>v5LbHuME zMyFRV-a92Ro{h1PIz6TNV7>wyL#rT%!%hpv5Xm+xt=$tE85w@>)#2N>Ksp3yHiM_D KpUXO@geCxKOE2yK literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolBottom.png b/ExtraJumps/SpringStoolBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..9c11a5cf0d3bb93770ee5e869edf5fbb4af45c4d GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^Qa~)j!3HGjh1XvOQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1eDS5g$hIn`G)XBPB-!Rg}QPyi&~V zzoW#dqYN)Tz4(>bkY|_Fc&UKl^hE=P)9j-E%o4)Ob8MLSiY4U5rW-V@lV@X#U*+r{ z+VX_mf7M}Dhg3z5<{G9$26h`0KK$UA=I^kQzs0c-Bv55{h?T9s|3WR3=&=uyiUtLC zOj{)<+~$2@=g1DWD&av5OV-y3w?8p5#{6PG=WbngpCP%3QSWcbCqZUrhFPa)yE7zx R;|7KvgQu&X%Q~loCIEJWjYa?f literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolJump.cs b/ExtraJumps/SpringStoolJump.cs new file mode 100644 index 0000000000..efdc34dcb9 --- /dev/null +++ b/ExtraJumps/SpringStoolJump.cs @@ -0,0 +1,51 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.ExtraJumps +{ + public class SpringStoolJump : ExtraJump + { + public override Position GetDefaultPosition() => BeforeBottleJumps; + public override float GetDurationMultiplier(Player player) => 1f; + public override void UpdateHorizontalSpeeds(Player player) + { + player.runAcceleration *= 2f; + player.maxRunSpeed *= 1.35f; + } + + public override void OnStarted(Player player, ref bool playSound) + { + playSound = true; + if (player.wingsLogic <= 0) + { + player.velocity.Y *= player.slowFall ? 2.0f : 2.75f; + } + else + { + player.velocity.Y *= 1.7f; + } + player.StopExtraJumpInProgress(); + for (int i = 0; i < 3; i++) + { + Vector2 position = player.Center; + Vector2 velocity = (Vector2.UnitY * -(2.5f + 2f * i)) * player.gravDir; + int lifetime = 120; + float scale = MathHelper.Lerp(0.05f, 0.1f, i / 3f); + Color color = new Color(94, 229, 163); + Vector2 stretch = new Vector2(0.5f, 1.5f); + float shrink = -0.3f; + Particle boostRing = new CustomSpark(position, velocity, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, lifetime, scale, color, stretch, shrinkSpeed: shrink); + GeneralParticleHandler.SpawnParticle(boostRing); + } + } + public override void ShowVisuals(Player player) + { + player.StopExtraJumpInProgress(); + } + } +} diff --git a/ExtraJumps/SpringStoolJump.png b/ExtraJumps/SpringStoolJump.png new file mode 100644 index 0000000000000000000000000000000000000000..cbe569b76bf50bb521b58b30136d2bf0f758e8f6 GIT binary patch literal 2853 zcmV+=3)=LFP)Px#1ZP1_K>z@;j|==^1pojF&q+idK@0^+3dC>#A*!k)mAM19+?@s->TR;5!KXvOlx#{h1?$%h!a`@=+#V$4w$of5d zu3cR5x>sKC##Mkpp8MNB7r#FJWViqL*%x+o;)F!zIP;22`Yk`Z|N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LflT0}ORT+e|-u}yG?h!Zgs4^4ayY+Me!u{o&zAi`|;%f{ry z+ByW{2!ExI|JV^xCP3g^!w9$!koq0$=wU>4oK|=ZRo`scNo|OK<-HYQ2;iYTLkW-; z!k|iA8l=v#whnwEt<6TWay{1Vmgx-*5AYM<*jXPNLt@c|Gv_k=I1 z#4Q_2T6To01KDPUxhDT6-!k<J5! zlqfQVO2`ok^Q4H%BLu789uDQY$WlXXhp6&7EQ2sCWrblOYbB-GYjJf5g;!HivY3}@aab*l z1q+E@YmR?vUZR#NacV+6OCpW3i?tRYFnq|rZ0dZdxl5@Q$MAp%H7&hXk#|s?rmQGGi(IgAa83pxR-uLh;E`e;j5ygB<6n!YOGnGlrep}An3;6CE(C10 zx|T^km+KUo!k8_-cI3$7;y*so3Debyg4eZ)V3_p5p-zz#ra<+r8~eJHrsrR|6@N%R zNK+&1eV3l=L`WDjfqV^t%IeeztolakiMmW8rEcd>+YuzNMqF`xPQqwLMBV%Shq4p9 z-LK7mRRs?@8OY+PVs!NW(7cdsvl=k$C3&tVaWBmr!F z%x()_)6%~*3D>vaWLS@8*3aZ?FD!FZ`JAvK=#?#nflD0VLmJC=Bs4EQk^di2>Q~Ef zTMk+_Tg$82LGs_D%00000NkvXXu0mjf DE^l^B literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolSpring.png b/ExtraJumps/SpringStoolSpring.png new file mode 100644 index 0000000000000000000000000000000000000000..ae305c7263e498e5f50150144f8b0985ec4aff7d GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9T!3HFAj=Wa~QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`S9-cQhIn`?(ORuRWlcu9A(JU+SU6)LEE0+XSSqt z^UIbU6$ZS;l3!z3iaB@n8Wg;G6KPL=9+}uV2evHR#y6vFXT`%s ztqE2C=hY_6`j=Sp_mwD6DmdKI;Vst02oJI AOaK4? literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolTop.png b/ExtraJumps/SpringStoolTop.png new file mode 100644 index 0000000000000000000000000000000000000000..0cdc45e3eff43d47b281002c6bfa6107e787baf2 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^YCz1z!3HF61nWEoQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`CwaO!hFJI~rz{Xy5+(7s-Do9Ko_#&*vY7{-D6sSx$a8lWH?n%LE~_dE z5KDb "Items.Accessories"; + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 46; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.rare = ItemRarityID.Green; + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.springStool = true; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.PortableStool). + AddIngredient(ItemID.CopperBar, 3). + AddTile(TileID.Anvils). + Register(); + } + } +} diff --git a/Items/Accessories/SpringStool.png b/Items/Accessories/SpringStool.png new file mode 100644 index 0000000000000000000000000000000000000000..1b7c3fd9182085737762d64e1331917911386f45 GIT binary patch literal 719 zcmV;=0xPx#1ZP1_K>z@;j|==^1poj7c}YY;R9HvVn7d0{K@`SUn}GNTKGtj$ABd@12~%<4K(%=ZQ&L>Tx5^%1wcjjImCI`5AD|P;FHK{9|wlZXR)OeGQ1?k*fDe zs?)dGO}IJ4Y86w=6^YhECvY99`gxL`o?G{KF0KqC9_VVs4V}&+vDdRo%6MkMB34N$ z=ZMQQ(m?#`rS*%|bxaa>=Hr~|#C5C7E#>?=rZ@u>XTq-Hky7Rmt12ii!3^XT7a@L~ zlMSz^d;_oZdg1;31MokWm+(mVcY+f80|5}fA09!xe{cX_3x(jpsW0%_x_9vIu5Nfw z)OF3RF>_s3U4{5~ z-y&8Cxvp8&O|8xF@ahVjJ6qxq_YDmq4*30W=6X6f4gazB6V90+Y5iMk=Ud&dK5s5D z-&P$yt0!B$dI4vSDemPhJ|BE}@-v*IYM*UB@#tVX;<@=9xK6sxh0lH8-h(Gjj_vkf zDj}a|_h~+HLq#cKo`<;u4Ru=mI8PcRRAmgY?Jt&Ul_7mMdvB4P9C&(oDCtfgcBoPt ztPhd7#Pa@>A$zQh8m|X~L~>r1!TXfd0P7%@%+IloK&m)aC3B`YCcZAYWH5G&*!KIF z;(40?X>gr$JqwjcsBoc?W5oYVLQZ-+a){XFx(CR9FfAD7{^9@t002ovPDHLkV1gF; BPv`&u literal 0 HcmV?d00001 From f4b8d1db3d83c9ad204c4d2d2d330c7c11f75c9a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Feb 2026 20:35:30 -0500 Subject: [PATCH 019/346] 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 6eba677ed96ce0f648b0317759a604c6bd635def Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 22 Feb 2026 20:42:03 -0500 Subject: [PATCH 020/346] updates --- CalPlayer/CalamityPlayer.cs | 130 ++++++++++++------ CalamityKeybinds.cs | 3 + Cooldowns/Stooldown.cs | 7 +- ExtraJumps/SpringStoolJump.cs | 51 ------- Items/Accessories/SpringStool.cs | 6 +- .../Mods.CalamityMod.Items.Accessories.hjson | 8 ++ .../en-US/Mods.CalamityMod.Keybinds.hjson | 1 + Localization/en-US/Mods.CalamityMod.UI.hjson | 1 + 8 files changed, 112 insertions(+), 95 deletions(-) delete mode 100644 ExtraJumps/SpringStoolJump.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index eb2fb927bf..173aa77e71 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -866,6 +866,7 @@ namespace CalamityMod.CalPlayer public bool teslaVisuals = true; public bool cryogenSoul = false; public bool springStool = false; + public int springStoolTimer = 0; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2415,6 +2416,7 @@ namespace CalamityMod.CalPlayer teslaVisuals = true; cryogenSoul = false; springStool = false; + springStoolTimer = 0; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -3660,6 +3662,7 @@ namespace CalamityMod.CalPlayer } } } + if (CalamityKeybinds.BoosterDashHotKey.JustPressed && hasJetpack && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(RogueBooster.ID) && !Player.mount.Active) { @@ -4571,6 +4574,27 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { + if (springStoolTimer > 0) + { + springStoolTimer--; + + if (Player.whoAmI == Main.myPlayer) + { + float launchPower = 18f * Utils.GetLerpValue(0, 10, springStoolTimer, true); + Player.velocity.Y = -launchPower; + + // Prevent vanilla jump logic from interfering + Player.jump = 0; + Player.fallStart = (int)(Player.position.Y / 16f); + + if (Main.rand.NextBool(2)) + { + Dust d = Dust.NewDustDirect(Player.BottomLeft, Player.width, 4, DustID.Cloud, 0, 2f); + d.velocity.X *= 0.5f; + d.noGravity = true; + } + } + } // Rain armor set effects if (rainSet) @@ -4970,37 +4994,6 @@ namespace CalamityMod.CalPlayer Lighting.AddLight(Player.Center, Light * (0.55f + (oceanCrestTimer * 0.0035f))); } - if (springStool) - { - - if (springStool) - { - bool holdingUp = Player.controlUp; - bool standingStill = Player.velocity.Y == 0 && Player.velocity.X == 0; - - if (holdingUp && standingStill && !Player.mount.Active) - { - // Vertical displacement when using Spring Stool - int boost = 61; - - Player.portableStoolInfo.HasAStool = true; - Player.portableStoolInfo.IsInUse = true; - Player.portableStoolInfo.HeightBoost = boost; - Player.portableStoolInfo.VisualYOffset = boost; - Player.portableStoolInfo.MapYOffset = boost; - - Player.UpdatePortableStoolUsage(); - - } - else - { - // Stool still exists even if not being used - Player.portableStoolInfo.HasAStool = true; - } - - } - } - if (rampartOfDeities) { // Ice Barrier buff inherited from Frozen Turtle Shell @@ -5041,6 +5034,68 @@ namespace CalamityMod.CalPlayer if (gSabaton && Player.whoAmI == Main.myPlayer) Player.jumpSpeedBoost += 2f; } + + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + { + springStoolTimer = 12; + + Player.AddCooldown(Stooldown.ID, SpringStool.JumpCooldown, true); + + SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); + } + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; + + if (holdingUp && standingStill && !Player.mount.Active) + { + int boost = 61; + if (IsVanillaStoolEquipped(Player)) + boost += 24; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + // Forces the player into the stool-standing frame + Player.UpdatePortableStoolUsage(); + } + else + { + // Ensures the player can use the stool if they stop moving/hold up + Player.portableStoolInfo.HasAStool = true; + } + } + } + + + private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + if (springStool) + { + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + return; + } + + orig(ref drawInfo); + } + + private bool IsVanillaStoolEquipped(Player player) + { + for (int k = 2; k < 12; k++) + { + if (player.armor[k].type == ItemID.PortableStool) + return true; + } + return false; } #endregion @@ -5057,8 +5112,6 @@ namespace CalamityMod.CalPlayer public override void PostUpdate() { - Main.NewText(Main.LocalPlayer.Top.Y); - if (ZoneAbyss && Main.netMode != NetmodeID.Server) { //Main aura @@ -6284,17 +6337,10 @@ namespace CalamityMod.CalPlayer public override void Load() { - // Hook into the vanilla stool drawing method to remove it - On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HideStepStool; + // Hook directly into vanilla's stool drawing + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; } - private void HideStepStool(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) - { - if (drawInfo.drawPlayer.GetModPlayer().springStool) - return; - - orig(ref drawInfo); - } #endregion #region Mana Consumption Effects diff --git a/CalamityKeybinds.cs b/CalamityKeybinds.cs index 235da907f4..99b1ba8dd1 100644 --- a/CalamityKeybinds.cs +++ b/CalamityKeybinds.cs @@ -18,6 +18,7 @@ namespace CalamityMod public static ModKeybind NormalityRelocatorHotKey { get; private set; } public static ModKeybind RageHotKey { get; private set; } public static ModKeybind SpectralVeilHotKey { get; private set; } + public static ModKeybind SpringStoolJumpHotKey { get; private set; } public static ModKeybind TransformerHotKey { get; private set; } public static ModKeybind SwitchGravityHotkey {get; private set;} public static ModKeybind ExpandDebuffInfo { get; private set; } @@ -40,6 +41,7 @@ namespace CalamityMod NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z"); RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V"); SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z"); + SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "Q"); TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K"); SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T"); ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl"); @@ -62,6 +64,7 @@ namespace CalamityMod NormalityRelocatorHotKey = null; RageHotKey = null; SpectralVeilHotKey = null; + SpringStoolJumpHotKey = null; TransformerHotKey = null; ExpandDebuffInfo = null; } diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs index 3482f788ac..3d20c80fc5 100644 --- a/Cooldowns/Stooldown.cs +++ b/Cooldowns/Stooldown.cs @@ -8,8 +8,13 @@ namespace CalamityMod.Cooldowns { public static new string ID => "Stooldown"; public override bool ShouldDisplay => true; + public override bool CanTickDown => true; + public override void Tick() + { + base.Tick(); + } public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); - public override string Texture => "CalamityMod/Cooldowns/AscendEffect"; + public override string Texture => "CalamityMod/Cooldowns/Stooldown"; public override Color OutlineColor => new Color(197, 165, 108); public override Color CooldownStartColor => new Color(144, 84, 29); public override Color CooldownEndColor => Color.Khaki; diff --git a/ExtraJumps/SpringStoolJump.cs b/ExtraJumps/SpringStoolJump.cs deleted file mode 100644 index efdc34dcb9..0000000000 --- a/ExtraJumps/SpringStoolJump.cs +++ /dev/null @@ -1,51 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.DataStructures; -using Terraria.ModLoader; - -namespace CalamityMod.ExtraJumps -{ - public class SpringStoolJump : ExtraJump - { - public override Position GetDefaultPosition() => BeforeBottleJumps; - public override float GetDurationMultiplier(Player player) => 1f; - public override void UpdateHorizontalSpeeds(Player player) - { - player.runAcceleration *= 2f; - player.maxRunSpeed *= 1.35f; - } - - public override void OnStarted(Player player, ref bool playSound) - { - playSound = true; - if (player.wingsLogic <= 0) - { - player.velocity.Y *= player.slowFall ? 2.0f : 2.75f; - } - else - { - player.velocity.Y *= 1.7f; - } - player.StopExtraJumpInProgress(); - for (int i = 0; i < 3; i++) - { - Vector2 position = player.Center; - Vector2 velocity = (Vector2.UnitY * -(2.5f + 2f * i)) * player.gravDir; - int lifetime = 120; - float scale = MathHelper.Lerp(0.05f, 0.1f, i / 3f); - Color color = new Color(94, 229, 163); - Vector2 stretch = new Vector2(0.5f, 1.5f); - float shrink = -0.3f; - Particle boostRing = new CustomSpark(position, velocity, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, lifetime, scale, color, stretch, shrinkSpeed: shrink); - GeneralParticleHandler.SpawnParticle(boostRing); - } - } - public override void ShowVisuals(Player player) - { - player.StopExtraJumpInProgress(); - } - } -} diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index d9aad7eaed..5e0be2ecb2 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,6 +9,9 @@ namespace CalamityMod.Items.Accessories public class SpringStool : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); + + public static int JumpCooldown = CalamityUtils.SecondsToFrames(5); public override void SetDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 3f2c0e5765..1b0f5f58f3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2214,3 +2214,11 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } + +SpringStool: { + DisplayName: Spring Stool + Tooltip: + ''' + sfdoredsfjuertj9irtjire + ''' +} diff --git a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson index 8c950f3fd4..e172a3d1ed 100644 --- a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson +++ b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson @@ -16,3 +16,4 @@ TransformerHotKey.DisplayName: Transformer Hot Key GravitySwapOverride.DisplayName: Gravity Swap Override ExpandDebuffInfo.DisplayName: See Debuff Information ThePointerLock.DisplayName: The Pointer Lock On +SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hot Key diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index c912701a81..a4019f203f 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -151,6 +151,7 @@ Cooldowns: { SpongeDurability: Sponge Barrier Durability SpongeRecharge: Sponge Barrier Recharge Starburst: Stratus Starbursts + Stooldown: Stooldown SuperradiantSawBoost: Superradiant Saw Boost TarragonCloak: Tarragon Cloak Cooldown TarragonImmunity: Tarragon Immunity Cooldown From 2085d7d3c1af6ca973767c95790809692778458f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 02:23:49 -0500 Subject: [PATCH 021/346] most fearsome tool of war --- CalPlayer/CalamityPlayer.cs | 42 ++++++----- .../DrawLayers}/SpringStoolBottom.png | Bin CalPlayer/DrawLayers/SpringStoolLayer.cs | 6 +- .../DrawLayers}/SpringStoolSpring.png | Bin .../DrawLayers}/SpringStoolTop.png | Bin ExtraJumps/SpringStoolJump.png | Bin 2853 -> 0 bytes .../Mods.CalamityMod.Items.Accessories.hjson | 5 +- Projectiles/Typeless/SpringStoolJumpFX.cs | 68 ++++++++++++++++++ Projectiles/Typeless/SpringStoolJumpFX.png | Bin 0 -> 4324 bytes 9 files changed, 101 insertions(+), 20 deletions(-) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolBottom.png (100%) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolSpring.png (100%) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolTop.png (100%) delete mode 100644 ExtraJumps/SpringStoolJump.png create mode 100644 Projectiles/Typeless/SpringStoolJumpFX.cs create mode 100644 Projectiles/Typeless/SpringStoolJumpFX.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 173aa77e71..eab05f8d8d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4586,13 +4586,6 @@ namespace CalamityMod.CalPlayer // Prevent vanilla jump logic from interfering Player.jump = 0; Player.fallStart = (int)(Player.position.Y / 16f); - - if (Main.rand.NextBool(2)) - { - Dust d = Dust.NewDustDirect(Player.BottomLeft, Player.width, 4, DustID.Cloud, 0, 2f); - d.velocity.X *= 0.5f; - d.noGravity = true; - } } } @@ -5039,7 +5032,11 @@ namespace CalamityMod.CalPlayer { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, SpringStool.JumpCooldown, true); + Player.AddCooldown(Stooldown.ID, (int) SpringStool.JumpCooldown / 10, true); + + Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); + + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); } @@ -5075,24 +5072,37 @@ namespace CalamityMod.CalPlayer private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) { - if (springStool) + bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; + var modPlayer = drawInfo.drawPlayer.GetModPlayer(); + bool hasSpring = modPlayer.springStool; + + if (!isUsingStool) { - if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) - { - orig(ref drawInfo); - return; - } + orig(ref drawInfo); return; } - orig(ref drawInfo); + if (!hasSpring) + { + orig(ref drawInfo); + return; + } + + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + + return; } private bool IsVanillaStoolEquipped(Player player) { - for (int k = 2; k < 12; k++) + for (int k = 3; k <= 12; k++) { if (player.armor[k].type == ItemID.PortableStool) + return true; } return false; diff --git a/ExtraJumps/SpringStoolBottom.png b/CalPlayer/DrawLayers/SpringStoolBottom.png similarity index 100% rename from ExtraJumps/SpringStoolBottom.png rename to CalPlayer/DrawLayers/SpringStoolBottom.png diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs index 395674947a..00a2891c11 100644 --- a/CalPlayer/DrawLayers/SpringStoolLayer.cs +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -34,9 +34,9 @@ namespace CalamityMod.CalPlayer.DrawLayers Player drawPlayer = drawInfo.drawPlayer; // Load textures if null - stoolTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolBottom"); - springTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolSpring"); - topTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolTop"); + stoolTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolBottom"); + springTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolSpring"); + topTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolTop"); Texture2D stoolTex = stoolTexture.Value; Texture2D springTex = springTexture.Value; diff --git a/ExtraJumps/SpringStoolSpring.png b/CalPlayer/DrawLayers/SpringStoolSpring.png similarity index 100% rename from ExtraJumps/SpringStoolSpring.png rename to CalPlayer/DrawLayers/SpringStoolSpring.png diff --git a/ExtraJumps/SpringStoolTop.png b/CalPlayer/DrawLayers/SpringStoolTop.png similarity index 100% rename from ExtraJumps/SpringStoolTop.png rename to CalPlayer/DrawLayers/SpringStoolTop.png diff --git a/ExtraJumps/SpringStoolJump.png b/ExtraJumps/SpringStoolJump.png deleted file mode 100644 index cbe569b76bf50bb521b58b30136d2bf0f758e8f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2853 zcmV+=3)=LFP)Px#1ZP1_K>z@;j|==^1pojF&q+idK@0^+3dC>#A*!k)mAM19+?@s->TR;5!KXvOlx#{h1?$%h!a`@=+#V$4w$of5d zu3cR5x>sKC##Mkpp8MNB7r#FJWViqL*%x+o;)F!zIP;22`Yk`Z|NXCi>p~FKZ*EyG z$Hp~RudI`tc2oP1_mOxY{2DoK(GLj*ke%$Y9sru`3n@cL|%Po+A8V=acLr=C8$ zIQN$8x`lngm#C#moK7eUA&8jqEgKu%!afl13x? z6OW$iEb67YS(W8cl>J?w`QqZYCr@_5uG_b_i?(|+K-J<1Oe?O7#o*ib9_@s|S}iB1 zKX!U68-vy03wPbst>5_J+q<=gYH=y}+UM@Pqu*^%DOs;| z`WiylaxJU|u5k#K-5+?13|t>Z*ny93m1E@QTW=LalV(L2^DXxkEG;h4!6ok6t9Ey5 zZV|cL=e~l4Z3L!OH>J3mmAiTFC2}Gt4dV4&8PHVR&8jjYL};)($wc#HYvEpDWaY- z^m-5k!HQ`%Xim+ma^EraMtib2PQEO6I`y8RBnmKD99O-cKlt8$Z#%lfC#|Wg;q=ao z8*nn$hmRhgJk3oOrys8kO-ng3U@r#vJV}*)ca+I*gdctR6Pt)Dx!Sc>`p)ei*(}LR zR89PxkcA(ry=MQ7-NLpO{oM+K(#t53c_kZB##i4_T7WW;y zuYYy=6eo(rjX5-;NRrT$685W~|MGkyr4+a25F}CG`;QovZsdgBu>Y!lYX%tM`^^qS z-FD!>=1=c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Qk^di2>Q~Ef zTMk+_Tg$82LGs_D%00000NkvXXu0mjf DE^l^B diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 1b0f5f58f3..8549a1bc8a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2219,6 +2219,9 @@ SpringStool: { DisplayName: Spring Stool Tooltip: ''' - sfdoredsfjuertj9irtjire + Hold Up to reach higher + Press [KEY] to jump super high + This jump has a cooldown and can only be used once per time airborne + +10% critical strike chance when striking enemies below you ''' } diff --git a/Projectiles/Typeless/SpringStoolJumpFX.cs b/Projectiles/Typeless/SpringStoolJumpFX.cs new file mode 100644 index 0000000000..f60434dfb2 --- /dev/null +++ b/Projectiles/Typeless/SpringStoolJumpFX.cs @@ -0,0 +1,68 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class SpringStoolJumpFX : ModProjectile, ILocalizedModType + { + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } + + public override void SetDefaults() + { + Projectile.width = 78; + Projectile.height = 142; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = false; + Projectile.penetrate = -1; + Projectile.alpha = 0; + Projectile.timeLeft = 120; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + + + Projectile.rotation -= 0.005f; + + if (Projectile.frame < 4) + { + Projectile.frameCounter++; + + if (Projectile.frameCounter >= 5) + { + Projectile.frameCounter = 0; + Projectile.frame++; + + if (Projectile.frame > 4) + Projectile.frame = 4; // clamp to last frame + } + } + + + Projectile.ai[0]++; + + /* if (Projectile.ai[0] < 10f) // Stick to bottom of player initially + { + Projectile.Center = player.Bottom + new Vector2(0f, -50f); + Projectile.velocity = Vector2.Zero; + } */ + + if (Projectile.ai[0] >= 20f) // Begin fading + { + Projectile.alpha += 8; + Projectile.scale *= 0.985f; + } + + if (Projectile.alpha >= 255 || !player.active || player.dead) + Projectile.Kill(); + } + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Typeless/SpringStoolJumpFX.png b/Projectiles/Typeless/SpringStoolJumpFX.png new file mode 100644 index 0000000000000000000000000000000000000000..4d21337bde04e020922e2668feaa995adb09b7e2 GIT binary patch literal 4324 zcmb7Hd03KZyLXytnzFHS$uV2zluNnfjONm!ewCAM` z_t%?tY|_)y`x3xnc~K8A*2r()bo>&|8L-73JK3Dkr+(ozShhKD^`R3oj^qQ(icQT%zeT$f0XltP<5(kC6 zr)rKee}QntN-O%YelTu~i)pDf0}B1Wf13pltamph{)n3ER@F}LUq;^fSGz3AhnQ6? z{%t+(-K{H4+KD0*>PAwG^mTWvdNDOO!D;81vxmnKgvG%Lt7XaiwoBkMVe-?Ho((J? zM{=3f5swq%TQ??t_Ef(OaY>WJ)h=C_n)y^NSX@R?>~?y(sm~$Lb!vK7UfyqQ8{J>I zBwECK8&D`iiWb&mrkhdt?UiRMi&Aa@WvI&*1Ffx&wZ*nurS`>{(dS%*Z58G~sN^Svz9gEJ$0;rBei z+r|6S>4>v3uB;+#ZZ169da@?5Ho!et`=?4?p4&i+)8d;O@K+5@2Zp}#rf)vRjURg2 zMoEi*-wG??UkcPm5T2*uUWrP%n?3W3IqGI+^rm!ubYyj}FFxGTA99);=m#;Roq>?E z7I#OIK0b8&pTe>EoHJ&jV$f(t$O!0j9o)5X3R_-a<#X;lUyucVc+Ai=cloKarCfMa zq8>enNa}Y<5$QWH@=ea{PS@`Y{=?bQZ{rc%H5!Fd(~^u`md+>C?9=?Ve7BPD$VLSW zoC|Y?R~)#&7JXy==_eu^Glj=+xo8w>%iH%=Qu4bIaHOGi;m3JLzl}$KB{l~yR<-Cu zmBfx^j~Y?+7Y+!ar{D;u;0N)olz_ruj2cA%8rhIiePr^s| z%40#6JhS$9*W(i^sOhnbK1A;U`JE&G3hg z_C2lzPa-`R-m%&pmOh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&%k;7Z3}h)|pd1~d zo6CmsSsUKC#1Ph_<=>Qy9wc79(p-U3d;ks_<7LN5tLET+D|qP!l+ngd5S45tBO7!X zNM3#?($+LBsy~WchPeY(l~#q?(~cR2yci3yn}uNL&IOCqD#y6@^T(H+x>h29D~5Ma zeEyyNF;(vkvxn!9sVsf`c3W@k-buW!+9RvscuJYA1NZ9qMG`g!)7DgN9?&-VT+#7ZY{lt~fuWUQAiAW84mJgJ`|RUDH)G*$!Zp6 z>spNYsYN6CQ%Xm*377&Zmi}TsRR#_O59*+UEZiT+5;b9>Ce)RGXc@ i#r*?^|K(+()l*L~SdzW6FLqvc4Dy4&7vseFTmJ!voWv~v literal 0 HcmV?d00001 From 1b57c3b050b3392a91a718b49b061799e1c5091f Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 23 Feb 2026 14:02:10 -0800 Subject: [PATCH 022/346] 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 5e7c162e90df3f6e5fa3042a55c19dbe10688d03 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 20:30:56 -0500 Subject: [PATCH 023/346] Core functionality done --- CalPlayer/CalamityPlayer.cs | 104 ----------- CalPlayer/CalamityPlayerHitHurt.cs | 19 --- CalPlayer/DrawLayers/SpringStoolLayer.cs | 3 +- Cooldowns/Stooldown.cs | 12 +- Items/Accessories/SpringStool.cs | 161 +++++++++++++++++- Projectiles/Typeless/SpringStoolFX.cs | 137 +++++++++++++++ ...pringStoolJumpFX.png => SpringStoolFX.png} | Bin Projectiles/Typeless/SpringStoolJumpFX.cs | 68 -------- Projectiles/Typeless/StepStoolBonusFX.cs | 51 ++++++ Sounds/Item/Springy.ogg | Bin 0 -> 29702 bytes 10 files changed, 355 insertions(+), 200 deletions(-) create mode 100644 Projectiles/Typeless/SpringStoolFX.cs rename Projectiles/Typeless/{SpringStoolJumpFX.png => SpringStoolFX.png} (100%) delete mode 100644 Projectiles/Typeless/SpringStoolJumpFX.cs create mode 100644 Projectiles/Typeless/StepStoolBonusFX.cs create mode 100644 Sounds/Item/Springy.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index eab05f8d8d..04901ed854 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -865,8 +865,6 @@ namespace CalamityMod.CalPlayer public bool tesla = false; public bool teslaVisuals = true; public bool cryogenSoul = false; - public bool springStool = false; - public int springStoolTimer = 0; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2415,8 +2413,6 @@ namespace CalamityMod.CalPlayer tesla = false; teslaVisuals = true; cryogenSoul = false; - springStool = false; - springStoolTimer = 0; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -4574,21 +4570,6 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { - if (springStoolTimer > 0) - { - springStoolTimer--; - - if (Player.whoAmI == Main.myPlayer) - { - float launchPower = 18f * Utils.GetLerpValue(0, 10, springStoolTimer, true); - Player.velocity.Y = -launchPower; - - // Prevent vanilla jump logic from interfering - Player.jump = 0; - Player.fallStart = (int)(Player.position.Y / 16f); - } - } - // Rain armor set effects if (rainSet) { @@ -5027,85 +5008,6 @@ namespace CalamityMod.CalPlayer if (gSabaton && Player.whoAmI == Main.myPlayer) Player.jumpSpeedBoost += 2f; } - - if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) - { - springStoolTimer = 12; - - Player.AddCooldown(Stooldown.ID, (int) SpringStool.JumpCooldown / 10, true); - - Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); - - Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); - - SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); - } - - if (springStool) - { - bool holdingUp = Player.controlUp; - bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; - - if (holdingUp && standingStill && !Player.mount.Active) - { - int boost = 61; - if (IsVanillaStoolEquipped(Player)) - boost += 24; - - Player.portableStoolInfo.HasAStool = true; - Player.portableStoolInfo.IsInUse = true; - Player.portableStoolInfo.HeightBoost = boost; - Player.portableStoolInfo.VisualYOffset = boost; - Player.portableStoolInfo.MapYOffset = boost; - - // Forces the player into the stool-standing frame - Player.UpdatePortableStoolUsage(); - } - else - { - // Ensures the player can use the stool if they stop moving/hold up - Player.portableStoolInfo.HasAStool = true; - } - } - } - - - private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) - { - bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; - var modPlayer = drawInfo.drawPlayer.GetModPlayer(); - bool hasSpring = modPlayer.springStool; - - if (!isUsingStool) - { - orig(ref drawInfo); - return; - } - - if (!hasSpring) - { - orig(ref drawInfo); - return; - } - - if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) - { - orig(ref drawInfo); - return; - } - - return; - } - - private bool IsVanillaStoolEquipped(Player player) - { - for (int k = 3; k <= 12; k++) - { - if (player.armor[k].type == ItemID.PortableStool) - - return true; - } - return false; } #endregion @@ -6345,12 +6247,6 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square2); } - public override void Load() - { - // Hook directly into vanilla's stool drawing - On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; - } - #endregion #region Mana Consumption Effects diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index e4b66643bd..df6c24e6df 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -461,25 +461,6 @@ namespace CalamityMod.CalPlayer #endregion #region Modify Hit NPC - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (springStool) - { - if (Main.LocalPlayer.Top.Y < target.Top.Y) - { - // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; - - if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) - modifiers.SetCrit(); - - else - modifiers.DisableCrit(); - } - } - } - public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers) { modifiers.CritDamage += critDamage; diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs index 00a2891c11..5343d50ce5 100644 --- a/CalPlayer/DrawLayers/SpringStoolLayer.cs +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using CalamityMod.ExtraJumps; +using CalamityMod.Items.Accessories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -25,7 +26,7 @@ namespace CalamityMod.CalPlayer.DrawLayers public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) { // Only draw if the player is holding Up and still - return drawInfo.drawPlayer.GetModPlayer().springStool && + return drawInfo.drawPlayer.GetModPlayer().springStool && drawInfo.drawPlayer.portableStoolInfo.IsInUse; } diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs index 3d20c80fc5..888044482c 100644 --- a/Cooldowns/Stooldown.cs +++ b/Cooldowns/Stooldown.cs @@ -1,6 +1,12 @@ -using Microsoft.Xna.Framework; +using System; +using CalamityMod.Items.Accessories; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; using Terraria.Localization; +using Terraria.ModLoader; namespace CalamityMod.Cooldowns { @@ -15,8 +21,8 @@ namespace CalamityMod.Cooldowns } public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); public override string Texture => "CalamityMod/Cooldowns/Stooldown"; - public override Color OutlineColor => new Color(197, 165, 108); - public override Color CooldownStartColor => new Color(144, 84, 29); + public override Color OutlineColor => Color.SandyBrown; + public override Color CooldownStartColor => Color.Brown; public override Color CooldownEndColor => Color.Khaki; public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff"); diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 5e0be2ecb2..c34d2befd8 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -1,6 +1,11 @@ -using System.Collections.Generic; -using CalamityMod.CalPlayer; +using System; +using System.Collections.Generic; +using CalamityMod.Cooldowns; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -11,7 +16,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); - public static int JumpCooldown = CalamityUtils.SecondsToFrames(5); + public static int JumpCooldown = CalamityUtils.SecondsToFrames(25); public override void SetDefaults() { @@ -24,8 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.springStool = true; + player.GetModPlayer().springStool = true; } public override void AddRecipes() @@ -37,4 +41,151 @@ namespace CalamityMod.Items.Accessories Register(); } } + + + public class SpringStoolPlayer : ModPlayer + { + public bool springStool = false; + public int springStoolTimer = 0; + public bool hasGroundedSinceJump = true; + + public override void Load() + { + // Hook directly into vanilla's stool drawing + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; + } + + public override void PostUpdateEquips() + { + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + { + springStoolTimer = 12; + + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); + hasGroundedSinceJump = false; + + + Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); + + // Spawn stool with downward and randomly angled force + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 1.2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.7f }, Player.Center); + + if (IsVanillaStoolEquipped(Player)) + { + // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + } + + } + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; + + if (holdingUp && standingStill && !Player.mount.Active) + { + int boost = 61; + if (IsVanillaStoolEquipped(Player)) + boost += 24; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + // Forces the player into the stool-standing frame + Player.UpdatePortableStoolUsage(); + } + else + { + // Ensures the player can use the stool if they stop moving/hold up + Player.portableStoolInfo.HasAStool = true; + } + } + } + + private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; + var modPlayer = drawInfo.drawPlayer.GetModPlayer(); + bool hasSpring = modPlayer.springStool; + + if (!isUsingStool) + { + orig(ref drawInfo); + return; + } + + if (!hasSpring) + { + orig(ref drawInfo); + return; + } + + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + + return; + } + + private bool IsVanillaStoolEquipped(Player player) + { + for (int k = 3; k <= 12; k++) + { + if (player.armor[k].type == ItemID.PortableStool) + + return true; + } + return false; + } + + public override void PreUpdateMovement() + { + if (Player.velocity.Y == 0 || Player.sliding || Player.grappling[0] >= 0) + hasGroundedSinceJump = true; + + if (springStoolTimer > 0) + { + springStoolTimer--; + + if (Player.whoAmI == Main.myPlayer) + { + float launchPower = 20f * Utils.GetLerpValue(0, 10, springStoolTimer, true); + Player.velocity.Y = -launchPower; + + // Prevent vanilla jump logic from interfering + Player.jump = 0; + Player.fallStart = (int)(Player.position.Y / 16f); + } + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool) + { + if (Main.LocalPlayer.Top.Y < target.Top.Y) + { + // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + + if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) + modifiers.SetCrit(); + + else + modifiers.DisableCrit(); + } + } + } + public override void ResetEffects() + { + springStool = false; + springStoolTimer = 0; + } + } } diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs new file mode 100644 index 0000000000..48570ab1e8 --- /dev/null +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -0,0 +1,137 @@ +using System; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class SpringStoolFX : ModProjectile, ILocalizedModType + { + float rotationFactor = 0.015f; + public static float EaseOutElastic(float x, float amplitude = 1f, float period = 0.3f) + { + if (x == 0f) return 0f; + if (x == 1f) return 1f; + + amplitude = Math.Max(1f, amplitude); + + float s = (float)(period / (2 * Math.PI) * Math.Asin(1f / amplitude)); + + return (float)( + amplitude * + Math.Pow(2, -10f * x) * + Math.Sin((x - s) * (2 * Math.PI) / period) + + 1f + ); + } + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } + + public override void SetDefaults() + { + Projectile.width = 78; + Projectile.height = 142; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = false; + Projectile.penetrate = -1; + Projectile.alpha = 0; + Projectile.timeLeft = 120; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + + if (Projectile.frame < 4) + { + Projectile.frameCounter++; + + if (Projectile.frameCounter >= 4) + { + Projectile.frameCounter = 0; + Projectile.frame++; + + if (Projectile.frame > 4) + { + { + Projectile.frame = 4; // clamp to last frame + } + } + } + } + + float progress = MathHelper.Clamp(Projectile.ai[0] / 70f, 0f, 1f); + + Projectile.ai[1] = EaseOutElastic(progress); + + + Projectile.ai[0]++; + + if (Projectile.ai[0] < 3f) // Stick to bottom of player initially + { + Projectile.Center = player.Bottom + new Vector2(0f, -25f); + } + + else + { + // Begin rotating after initial launch at an increasingly fast rate + rotationFactor *= 1.033f; + Projectile.rotation -= rotationFactor; + } + + if (Projectile.ai[0] == 4f) + { + { + SoundStyle boing = new("CalamityMod/Sounds/Item/Springy"); + SoundEngine.PlaySound(boing with { Volume = 1f, PitchVariance = 0.1f }); + } + } + + if (Projectile.ai[0] == 16) // About when the spring retracts into itself, spawn dusts and sparks + { + for (int k = 0; k < 6; k++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 7 : 8); + dust.scale = Main.rand.NextFloat(0.8f, 1.3f); + dust.velocity = new Vector2(8, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.25f, 1.2f); + dust.noGravity = false; + Particle spark = new AltLineParticle(Projectile.Center, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.9f), true, 15, 0.8f, Color.Lerp(Color.LightGray, Color.Brown, Main.rand.NextFloat(0.3f, 0.7f)) * 0.75f); + GeneralParticleHandler.SpawnParticle(spark); + } + } + + if (Projectile.ai[0] >= 28f) // Begin fading + { + Projectile.alpha += 10; + Projectile.scale *= 0.98f; + + } + + if (Projectile.alpha >= 255 || !player.active || player.dead) + Projectile.Kill(); + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; + Rectangle sourceRect = new Rectangle(0, frameHeight * Projectile.frame, texture.Width, frameHeight); + Vector2 drawOrigin = new Vector2(texture.Width * 0.5f, frameHeight * 0.5f); + Vector2 drawPos = Projectile.Center - Main.screenPosition; + + Vector2 scale = new Vector2(Projectile.scale, Projectile.scale * Projectile.ai[1]); + + Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation, drawOrigin, scale, SpriteEffects.None, 0); + return false; + } + } +} diff --git a/Projectiles/Typeless/SpringStoolJumpFX.png b/Projectiles/Typeless/SpringStoolFX.png similarity index 100% rename from Projectiles/Typeless/SpringStoolJumpFX.png rename to Projectiles/Typeless/SpringStoolFX.png diff --git a/Projectiles/Typeless/SpringStoolJumpFX.cs b/Projectiles/Typeless/SpringStoolJumpFX.cs deleted file mode 100644 index f60434dfb2..0000000000 --- a/Projectiles/Typeless/SpringStoolJumpFX.cs +++ /dev/null @@ -1,68 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class SpringStoolJumpFX : ModProjectile, ILocalizedModType - { - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 5; - } - - public override void SetDefaults() - { - Projectile.width = 78; - Projectile.height = 142; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.friendly = false; - Projectile.penetrate = -1; - Projectile.alpha = 0; - Projectile.timeLeft = 120; - } - - public override void AI() - { - Player player = Main.player[Projectile.owner]; - - - Projectile.rotation -= 0.005f; - - if (Projectile.frame < 4) - { - Projectile.frameCounter++; - - if (Projectile.frameCounter >= 5) - { - Projectile.frameCounter = 0; - Projectile.frame++; - - if (Projectile.frame > 4) - Projectile.frame = 4; // clamp to last frame - } - } - - - Projectile.ai[0]++; - - /* if (Projectile.ai[0] < 10f) // Stick to bottom of player initially - { - Projectile.Center = player.Bottom + new Vector2(0f, -50f); - Projectile.velocity = Vector2.Zero; - } */ - - if (Projectile.ai[0] >= 20f) // Begin fading - { - Projectile.alpha += 8; - Projectile.scale *= 0.985f; - } - - if (Projectile.alpha >= 255 || !player.active || player.dead) - Projectile.Kill(); - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs new file mode 100644 index 0000000000..36f665921a --- /dev/null +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class StepStoolBonusFX : ModProjectile + { + public override string Texture => "Calamitymod/Projectiles/InvisibleProj"; + public float OpacityMultiplier = 1f; + public override void SetDefaults() + { + Projectile.width = 28; + Projectile.height = 28; + + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + Projectile.friendly = false; + Projectile.penetrate = -1; + + Projectile.timeLeft = 100; + Projectile.alpha = 0; + } + + public override void AI() + { + // Gravity! + Projectile.velocity.Y += 0.15f; + + Projectile.rotation += 0.1f; + Projectile.scale -= 0.01f; + OpacityMultiplier -= 0.02f; + + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Extra[102].Value; + Vector2 origin = texture.Size() / 2f; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation, origin, Projectile.scale * 1.25f, SpriteEffects.None); + + return false; + } + } +} diff --git a/Sounds/Item/Springy.ogg b/Sounds/Item/Springy.ogg new file mode 100644 index 0000000000000000000000000000000000000000..09fa4c4f8d8e3c997347e7ffc2fb67124f8c297a GIT binary patch literal 29702 zcmeFZWmud&*C=`q4y9OeDN>3RcW2N7h2j)K~V?#vn5 z=Y7BTd}m*K|M;%+Z)Y-@WMw5QS(2<|?imGha}@v%_$O4O|IN%>eR>9Z4sx@1GO~1j z1i?XC|3Pv5i`)cKcx?Ia@YoUrD@o8N@Z#h{|67QK|JxNO3`4`x!Gc-A$(+K*(n$Re z0SXxkc2;&)RvuPP3OZ#|6IWwPJ97$2J2y)wdplcGI~RI*SUY0a+r`qw##G4J($>Mo zRNv6hSl`Li*xtzmhEDQGTTNM1RYu{h5GyM`EON0k^KtUA{t3@v)uwjF_9muILUM*~ z#@uYo9L#L2tdE2EJ2VjD-%olmadi-Y0>fvMqv(Tt{ip^2SO8!^O^*?8CPQDCkW1&0 zk|6z<>thW|NeJsBG>&BJ|5rl6X@Um;2mpi*H9CJw#%i3;oRBu!DTmMUE$=4^$G{$yCbw$>8$J?^QegPe)8qP z2L_kJ0Vao8f; z52yC!q<&3v9+yE+EBu@Dz)450DES715p8E+^b;Av@GQTjA(t#@z}jklP1`DN#)aj= z64Ghwn^phz_m5hX=w*y|@vXsHge|69H>2vpa@QsqhhwOZu>Y<;V3^zt=L!2W11Nl= zk&JLDizwrtyTo9`=dcaZ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9E-CxpW#E`6hn^dt)OqiGLWi=X?dufRp6)h%QCANU_8*R}Q;>*KR!Yb);zHA12JB+QYA=S2Cgj+u70wBBAJi8ekY@IPm^Omzr6S>E01R zpDD|nrpT&d0kVlJ`YT?hOLTH2M;9>(bjambD>f3C33o__I zD$Cxh9z1Zo;x*E9PS4#rk&4#dL3n3EBI%HJ6LEC%QDCJISn<9KCI>JvmxQA^ghXLx J009BP{{bjmGKByD literal 0 HcmV?d00001 From 2ec5be54d1ba33fa231233ad97888be78446fe8d Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 21:01:43 -0500 Subject: [PATCH 024/346] removed debug settings --- Items/Accessories/SpringStool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index c34d2befd8..f054e0915f 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown * 2, true); hasGroundedSinceJump = false; @@ -172,7 +172,7 @@ namespace CalamityMod.Items.Accessories if (Main.LocalPlayer.Top.Y < target.Top.Y) { // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 10f; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) modifiers.SetCrit(); From b0b12d6de457a51d6aea9fbad4ec8ecd408edd9f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 22:08:59 -0500 Subject: [PATCH 025/346] Fix --- Items/Accessories/SpringStool.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index f054e0915f..214e861300 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown * 2, true); + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); hasGroundedSinceJump = false; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 8549a1bc8a..c2fdf69d92 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1666,6 +1666,17 @@ SpiritGlyph: { ''' } +SpringStool: { + DisplayName: Spring Stool + Tooltip: + ''' + Hold Up to reach higher + Press [KEY] to jump super high + Super jumps can only be performed once every 25 seconds + +10% critical strike chance when striking enemies below you + ''' +} + StarbusterCore: { DisplayName: Starbuster Core Tooltip: @@ -2214,14 +2225,3 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } - -SpringStool: { - DisplayName: Spring Stool - Tooltip: - ''' - Hold Up to reach higher - Press [KEY] to jump super high - This jump has a cooldown and can only be used once per time airborne - +10% critical strike chance when striking enemies below you - ''' -} From 173535fc23c1fa9258d98f8192e168d886a6d784 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 26 Feb 2026 00:11:57 -0500 Subject: [PATCH 026/346] Updated spring sprite --- CalPlayer/DrawLayers/SpringStoolSpring.png | Bin 255 -> 202 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/CalPlayer/DrawLayers/SpringStoolSpring.png b/CalPlayer/DrawLayers/SpringStoolSpring.png index ae305c7263e498e5f50150144f8b0985ec4aff7d..82271ba49b0eff4f7def2a7b7ff96c54c1b389b4 100644 GIT binary patch delta 145 zcmV;C0B-;P0m=c8L4R~fL_t(YOJfug7X8lv1X=lcAd11v*ceR1z^Sum!Swa3SHSfC zJ^R2k47_{$nh``Zfq7H_VADVV<}!5P=;8#XHMMoXG|a^d7cB(SFc(tKMWbOv5DdXE zf&p|FkA@K@7!9M*Fv0@}hS6wwH0Z*JfdK$m`Hi|qr7QXX015yANkvXXu0mjf+N(Z< delta 198 zcmV;%06G840sjGzL4T=9L_t(YOJigp5(o*4{)aNb;N9ETD0-QoG{pdJD!Ps6AS*u) zOq&@SgXx60crXof8TDKQa|ybQFmUSZSuj0q;v_JQ4yf-UD2+3W99^8iw5GNWn1;D{ z;i83LdjFn%V4D76bp7fTFb#774A4J}U;y34qhW*zM#E?{j6d)IqQeLVU@k{@A@yAZ z12C7tO2&9-ZGo%ord=4J16*MSa{)S_l8YD^0FqRDNWGudF#rGn07*qoM6N<$f{YMT AkN^Mx From e906624b989918cddc69443c9de9121db04b4a18 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 27 Feb 2026 21:27:47 -0500 Subject: [PATCH 027/346] Added many buff tags to accessories Gave God Slayer Inferno a unique color for buff tags Fixed Mushy being classified as a debuff --- Buffs/StatBuffs/Mushy.cs | 1 - .../en-US/Mods.CalamityMod.Buffs.hjson | 1 + .../Mods.CalamityMod.Items.Accessories.hjson | 76 +++++++++---------- Utilities/ItemUtils.cs | 12 +++ 4 files changed, 51 insertions(+), 39 deletions(-) diff --git a/Buffs/StatBuffs/Mushy.cs b/Buffs/StatBuffs/Mushy.cs index 0ae91c9625..53a0e6b247 100644 --- a/Buffs/StatBuffs/Mushy.cs +++ b/Buffs/StatBuffs/Mushy.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Buffs.StatBuffs public override void SetStaticDefaults() { - Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 75dab61d8c..d8f7921ce2 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1099,6 +1099,7 @@ MarkedforDeath: { PearlAura: { DisplayName: Pearl Aura Description: Slowed down + ItemTooltip: Slows enemies } ProfanedWeakness: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 131259954e..6afe9e31a2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -220,8 +220,8 @@ AsgardianAegis: { Tooltip: ''' {$Common.KnockbackImmunity} - Allows the ability to dash, empowered by a cosmic inferno - This dash can ram through enemies without taking damage + Allows the ability to ram dash, empowered by a cosmic inferno + This dash can ram through enemies without taking damage, inflicting [cbuff:CalamityMod/GodSlayerInferno] ''' } @@ -258,7 +258,7 @@ Baroclaw: { Tooltip: ''' 10% increased damage and 5% increased damage reduction - Attackers take high damage and are inflicted with Armor Crunch and Crush Depth + Attackers take high damage and are inflicted with [cbuff:CalamityMod/ArmorCrunch] and [cbuff:CalamityMod/CrushDepth] ''' } @@ -364,9 +364,9 @@ Calamity: { Tooltip: ''' Lights your cursor ablaze with the Witch's flames, engulfing it in a blazing aura - Enemies touching the blaze take immense damage and are inflicted with Vulnerability Hex + Enemies touching the blaze take immense damage and are inflicted with [cbuff:CalamityMod/VulnerabilityHex] Focusing an enemy for 2.5 seconds curses them, ascending Vulnerability Hex to its True form - Foes afflicted with True Vulnerability Hex take 1.15x damage from all sources + Foes afflicted with [cbuff:CalamityMod/TrueVulnerabilityHex] take 1.15x damage from all sources This effect is increased to 2.5x for the blazing cursor itself Equip in a vanity slot to change the cursor without dealing damage These changes work in conjunction with the Rainbow Cursor @@ -425,7 +425,7 @@ CorrosiveSpine: { ''' 5% increased movement speed 25% increased Sickness and Water debuff damage - All attacks irradiate enemies and reduces the severity of the sulphuric waters + All attacks inflict [cbuff:CalamityMod/Irradiated] and reduces the severity of the sulphuric waters You burst into radioactive clouds when struck ''' } @@ -444,7 +444,7 @@ CrawCarapace: { Tooltip: ''' 7% increased damage - Attackers take damage and are inflicted with Crumbling + Attackers take damage and are inflicted with [cbuff:CalamityMod/Crumbling] ''' } @@ -569,9 +569,9 @@ DiamondOfTheDeep: { Dash to disperse the spirits and have them attack enemies When dispersed [c/CB7AD7:below 50% life], the spirits support you instead The spirits appear in order and have different effects based on color: - [c/3CB371: Explodes on impact and inflicts Crush Depth] / [c/CB7AD7:Heals for 8 HP] - [c/FF4500: Pierces enemies and inflicts Hellfire] / [c/CB7AD7:Increases defense by 10 temporarily] - [c/1E90FF: Hits multiple times and inflicts Hadopelagic Pressure] / [c/CB7AD7:Heals 5% of max HP] + [c/3CB371: Explodes on impact and inflicts] [cbuff:CalamityMod/CrushDepth] / [c/CB7AD7:Heals for 8 HP] + [c/FF4500: Pierces enemies and inflicts] [cbuff:OnFire3] / [c/CB7AD7:Increases defense by 10 temporarily] + [c/1E90FF: Hits multiple times and inflicts] [cbuff:CalamityMod/HadopelagicPressure] / [c/CB7AD7:Heals 5% of max HP] Spirits are transparent and silent when visibility is toggled off ''' } @@ -669,7 +669,7 @@ ElementalGauntlet: { DisplayName: Elemental Gauntlet Tooltip: ''' - Melee attacks and projectiles inflict Elemental Mix + Melee attacks and projectiles inflict [cbuff:CalamityMod/ElementalMix] 15% increased melee damage and melee speed 5% increased melee critical strike chance 20% increased true melee damage and increased melee knockback @@ -689,7 +689,7 @@ ElysianAegis: { ''' {$Common.KnockbackImmunity} Allows the ability to dash, empowered by holy fire - This dash can ram through enemies without taking damage + This dash can ram through enemies without taking damage, inflicting [cbuff:CalamityMod/HolyFlames] 'Blessed by the Profaned Flame' ''' } @@ -811,7 +811,7 @@ FungalSymbiote: { Tooltip: ''' You grow mushrooms on the grass beneath you - Consuming mushrooms provides the Mushy buff, granting 5 defense and +1 HP/s life regen + Consuming mushrooms provides the [cbuff:CalamityMod/Mushy] buff, granting 5 defense and +1 HP/s life regen 10% increased damage while you have the Mushy buff ''' } @@ -821,7 +821,7 @@ GiantPearl: { Tooltip: ''' You have a light aura around you - Enemies within the aura are slowed down + Enemies within the aura are afflicted with [cbuff:CalamityMod/PearlAura] and slowed down Enemies that remain within the aura are bombarded by homing prism shards {$Common.AbyssGlow} ''' @@ -925,7 +925,7 @@ HideofAstrumDeus: { True melee strikes drops astral stars from the sky Releases an explosion and temporarily increases true melee damage by 30% when damaged Boost duration scales with the amount of damage you took, up to 10 seconds - Nullifies the Astral Infection debuff + Nullifies the Astral Infection ''' } @@ -934,7 +934,7 @@ HoneyDew: { Tooltip: ''' +10 max life - Grants the Honey buff + Grants the [cbuff:Honey] buff Sickness debuff durations are halved ''' } @@ -966,7 +966,7 @@ InfectedJewel: { Grants 12 defense and +2 HP/s life regen while afflicted with any debuff Granted defense fades away quickly when not afflicted with any debuffs Each debuff beyond the first grants 4 additional defense - Nullifies the Astral Infection debuff + Nullifies the Astral Infection 'A beautiful gemstone tarnished by spaceborne rot' ''' } @@ -1024,7 +1024,7 @@ JellyChargedBattery: { Tooltip: ''' Increases your max number of minions by 1, and summon damage by 7% - Minion attacks create orbs of static discharge + Minion attacks create orbs of [cbuff:CalamityMod/StaticDischarge] ''' } @@ -1047,7 +1047,7 @@ LeviathanAmbergris: { Tooltip: ''' 120% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration - Your dashes are empowered by water, knocking back and damaging nearby enemies with viscous currents + Your dashes are empowered by water, knocking back and damaging enemies with viscous currents that inflict [cbuff:CalamityMod/RiptideDebuff] Visual effects are reduced if visibility is disabled ''' } @@ -1066,7 +1066,7 @@ LivingDew: { Tooltip: ''' +25 max life - Grants the Honey buff + Grants the [cbuff:Honey] buff Fire and sickness debuff durations are halved ''' } @@ -1163,8 +1163,8 @@ NuclearFuelRod: { Tooltip: ''' Increases your max number of minions by 1 - Minions release an irradiated aura on enemy hits - Grants immunity to Irradiated + Minions release an [cbuff:CalamityMod/Irradiated] aura on enemy hits + Grants immunity to [cbuff:CalamityMod/Irradiated] ''' } @@ -1173,7 +1173,7 @@ Nucleogenesis: { Tooltip: ''' Increases your max number of minions by 4 - Grants immunity to Shadowflame and Irradiated + Grants immunity to [cbuff:ShadowFlame] and [cbuff:CalamityMod/Irradiated] 15% increased summon damage, and increased minion knockback Minions inflict a variety of debuffs Minions spawn damaging sparks on enemy hits @@ -1243,7 +1243,7 @@ OrnateShield: { Tooltip: ''' Allows the ability to dash - This dash can ram through enemies without taking damage + This dash can ram through enemies without taking damage, inflicting [cbuff:Frostburn2] ''' } @@ -1338,7 +1338,7 @@ ProfanedSoulCrystal: { ''' Provides passive buffs depending on the time of day Greatly boosts the power of the Guardian's relics - Grants additional effects if you have {0} minion slots + Grants additional effects if you have {0} unused minion slots Summons your own personal Guardians to fight alongside you All non-summon attacks are transformed, and are empowered if no minions are active [c/ffa680:Melee] [c/ffd2bf:attacks become a barrage of spears] @@ -1477,7 +1477,7 @@ RottenBrain: { RottenDogtooth: { DisplayName: Rotten Dogtooth - Tooltip: Stealth strikes inflict Crumbling for 2.5 seconds and deal 8% more damage + Tooltip: Stealth strikes inflict [cbuff:CalamityMod/Crumbling] and deal 8% more damage } RoverDrive: { @@ -1632,9 +1632,9 @@ SlagsplitterPauldron: { DisplayName: Slagsplitter Pauldron Tooltip: ''' - Your dashes become empowered by flame, erupting on contact with enemies + Your dashes become empowered by [cbuff:OnFire3], erupting on contact with enemies Grants immunity to knockback and 10% damage reduction while dashing - Enemies hit by your dashes have their armor crushed + Enemies hit by your dashes are afflicted with [cbuff:CalamityMod/ArmorCrunch] Visual effects are reduced if visibility is disabled ''' } @@ -1672,7 +1672,7 @@ StarbusterCore: { Tooltip: ''' Increases your max number of minions by 1 - Summons release an astral explosion on enemy hits + Summons release an [cbuff:CalamityMod/AstralInfectionDebuff] explosion on enemy hits ''' } @@ -1682,7 +1682,7 @@ StarTaintedGenerator: { ''' Increases your max number of minions by 2, and summon damage by 7% Minion attacks spawn astral explosions and inflict several debuffs - Grants immunity to Irradiated + Grants immunity to [cbuff:CalamityMod/Irradiated] Does not stack with downgrades ''' } @@ -1702,7 +1702,7 @@ StatisCurse: { ''' Increases your max number of minions by 3, and summon damage by 12% Increased minion knockback - Minion attacks inflict Shadowflame, and grants immunity to Shadowflame + Minion attacks inflict [cbuff:ShadowFlame], and grants immunity to [cbuff:ShadowFlame] Does not stack with downgrades ''' } @@ -1835,7 +1835,7 @@ TeslasAmulet: { ''' Generates an electrifying field that slows enemies The field has reduced opacity if visibility is disabled - Reduces the duration of the Static Discharge debuff + Reduces the duration of [cbuff:CalamityMod/StaticDischarge] ''' } @@ -1845,7 +1845,7 @@ TheAbsorber: { ''' {$Common.KnockbackImmunity} {0}% increased movement and jump speed - Attackers take immense damage and are afflicted with a crippling sickness debuff + Attackers take immense damage and are afflicted with [cbuff:CalamityMod/AbsorberAffliction] Using a healing potion will spawn a green aura that lasts for {1} seconds Walking into the aura removes all debuffs once and grants {2} HP/s regen, {3}% damage, and {4}% damage reduction {5}% of the damage from enemy attacks is converted into healing @@ -1923,7 +1923,7 @@ TheFirstShadowflame: { Tooltip: ''' Increases your max number of minions by 1 - Minion attacks inflict Shadowflame, and grants immunity to Shadowflame + Minion attacks inflict [cbuff:ShadowFlame], and grants immunity to [cbuff:ShadowFlame] ''' } @@ -1977,7 +1977,7 @@ ToxicHeart: { DisplayName: Toxic Heart Tooltip: ''' - Your heart beats with the plague, pulsing outside of your body + Your heart beats with the [cbuff:CalamityMod/Plague], pulsing outside of your body Pulse frequency scale with regen, and pulses that kill enemies pulse again to heal you 50% increased Sickness debuff damage Effects are transparent and silent if visibility is disabled @@ -2018,7 +2018,7 @@ VampiricTalisman: { ''' Rogue critical strikes steal enemy life Stealth strikes grant 15% critical strike chance and increased lifesteal to non-stealth strikes for 10 seconds - Stealth strikes inflict Heavy Bleeding and Armor Crunch, and deal 8% more damage + Stealth strikes inflict [cbuff:CalamityMod/HeavyBleeding] and [cbuff:CalamityMod/ArmorCrunch], and deal 8% more damage 'Possessing the talisman makes you yearn for blood' ''' YearningForBlood: THIS ENDLESS HUNGER WON'T END @@ -2073,7 +2073,7 @@ VoltaicJelly: { Tooltip: ''' Increases your max number of minions by 1 - Minion attacks inflict Static Discharge + Minion attacks inflict [cbuff:CalamityMod/StaticDischarge] ''' } @@ -2083,7 +2083,7 @@ WarbanneroftheRighteous: { ''' Multiplies all damage based on how close you are to enemies Maximum damage boost is 15%, minimum damage boost is -15% - Emit a blazing aura that burns and repels nearby enemies + Emit a blazing aura that burns and repels nearby enemies with [cbuff:CalamityMod/HolyFlames] Enemies take increasing damage the closer they are to you and the longer they are near you Effects are transparent and silent if visibility is disabled ''' diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 3c29818724..713a3fdaad 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -127,6 +127,7 @@ namespace CalamityMod public static Color ElectricDebuffColor => new(255, 245, 0); public static Color BuffColor => new(255, 105, 237); public static Color TypelessDebuffColor => new(230, 202, 250); + public static Color GodSlayerInfernoColor => new(241, 107, 250); public static Color VulnHexDebuffColor => new(196, 35, 43); public static Color MiracleBlightDebuffColor => Main.DiscoColor; @@ -136,6 +137,7 @@ namespace CalamityMod { var color = TypelessDebuffColor; + // God Slayer Inferno, Vulnerability Hex, and Miracle Blight receive special colors if (debuffId == ModContent.BuffType() || debuffId == ModContent.BuffType()) { color = Color.Lerp(VulnHexDebuffColor, FireDebuffColor, (MathF.Sin(Main.GlobalTimeWrappedHourly * 2) + 1) / 4f); @@ -144,6 +146,13 @@ namespace CalamityMod { color = MiracleBlightDebuffColor; } + else if (debuffId == ModContent.BuffType()) + { + color = GodSlayerInfernoColor; + } + // Color debuffs based on their element type in the vulnerability and resistance system + // If a debuff has multiple types, the colors are mixed + // If a debuff is typeless, is gets the typeless color else if (BuffDatasets.DebuffDataset[debuffId] is not null) { if (!debuffColorWeightsCache.TryGetValue(debuffId, out var weights)) @@ -180,6 +189,9 @@ namespace CalamityMod color = new Color(normalColor); } } + // If this is actually a beneficial buff, color it as so + else if (!Main.debuff[debuffId]) + color = BuffColor; return color; } From 70b5c9c8b48b8c8e4fd73117513b4f5e45765bfe Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Feb 2026 11:25:13 -0500 Subject: [PATCH 028/346] Created a separate buff tag effect that displays player effects Enemy info still uses cbuff, player info is now obtained by using a cbuffplr tag Apologies if I mutilated the beautiful tag insertion code --- ...andler.cs => BuffTagEnemyEffectHandler.cs} | 2 +- ChatTags/BuffTagPlayerEffectHandler.cs | 79 +++++++++ Items/CalamityGlobalItemTooltip.cs | 55 ++++-- .../en-US/Mods.CalamityMod.Buffs.hjson | 160 ++++++++++++------ .../Mods.CalamityMod.Items.Accessories.hjson | 60 +++---- Localization/en-US/Mods.Terraria.Buffs.hjson | 48 ++++-- 6 files changed, 289 insertions(+), 115 deletions(-) rename ChatTags/{CalamityBuffTagHandler.cs => BuffTagEnemyEffectHandler.cs} (97%) create mode 100644 ChatTags/BuffTagPlayerEffectHandler.cs diff --git a/ChatTags/CalamityBuffTagHandler.cs b/ChatTags/BuffTagEnemyEffectHandler.cs similarity index 97% rename from ChatTags/CalamityBuffTagHandler.cs rename to ChatTags/BuffTagEnemyEffectHandler.cs index d8f36a5862..c7f9735176 100644 --- a/ChatTags/CalamityBuffTagHandler.cs +++ b/ChatTags/BuffTagEnemyEffectHandler.cs @@ -11,7 +11,7 @@ using Terraria.UI.Chat; namespace CalamityMod.ChatTags { - public sealed class CalamityBuffTagHandler : AbstractTagHandler + public sealed class BuffTagEnemyEffectHandler : AbstractTagHandler { public sealed class Snippet(int buffId) : TextSnippet { diff --git a/ChatTags/BuffTagPlayerEffectHandler.cs b/ChatTags/BuffTagPlayerEffectHandler.cs new file mode 100644 index 0000000000..7a2c145c4f --- /dev/null +++ b/ChatTags/BuffTagPlayerEffectHandler.cs @@ -0,0 +1,79 @@ +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.ChatTags +{ + public sealed class BuffTagPlayerEffectHandler : AbstractTagHandler + { + public sealed class Snippet(int buffId) : TextSnippet + { + private const float IconSize = 26f; + + public int BuffId => buffId; + + public bool DrawIcon => true; + + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = default, Color color = default, float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), IconSize); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + // Avoid re-drawing the icon when drawing borders. + if (DrawIcon) + { + // Tomat: I would love to support + // BuffLoader.[Pre/Post]Draw here, but it's not vaible + // because: + // 1. Main.DrawBuffIcon relies on LocalPlayer's buffs, + // 2. we can't control the source or destination + // rectangles. + + if (Main.netMode != NetmodeID.Server && !Main.dedServ) + { + var texture = TextureAssets.Buff[BuffId]; + spriteBatch.Draw(texture.Value, new Rectangle((int)position.X, (int)position.Y - 2, (int)IconSize, (int)IconSize), null, Color.White); + } + + position.X += IconSize; + } + + var buffColor = CalamityUtils.GetDebuffTooltipNameColor(buffId); + var name = $"{(DrawIcon ? " " : "")}{Lang.GetBuffName(buffId)}"; + ChatManager.DrawColorCodedStringWithShadow(spriteBatch, FontAssets.MouseText.Value, name, position, buffColor, 0f, Vector2.Zero, new Vector2(scale)); + } + return true; + } + + public override float GetStringLength(DynamicSpriteFont font) + { + float iconSize = !DrawIcon ? 0f : IconSize + font.MeasureString(" ").X; + float size = iconSize + font.MeasureString(Lang.GetBuffName(buffId)).X; + return size * Scale; + } + } + + protected override string[] TagNames { get; } = ["cbuffplr"]; + + public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) + { + if (int.TryParse(text, out int buffId) && buffId >= 0 && buffId < BuffLoader.BuffCount) + { + return new Snippet(buffId); + } + + if (BuffID.Search.TryGetId(text, out buffId)) + { + return new Snippet(buffId); + } + + return new TextSnippet(text); + } + } +} diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index e783511cf0..26dd79a6ff 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -278,8 +278,9 @@ namespace CalamityMod.Items tooltips.Insert(++difficultyTooltipIndex, donorLine); } - var buffIdsInTooltip = new HashSet(); - + // The int is the buff ID + // The byte determines what information to show; 0 = enemy, 1 = player, 2 = both + var buffIdsInTooltip = new Dictionary(); foreach (var tooltip in tooltips) { // Parse the tags of each line of text to find our buff tags' @@ -287,9 +288,17 @@ namespace CalamityMod.Items var snippets = ChatManager.ParseMessage(tooltip.Text, Color.White); foreach (var snippet in snippets) { - if (snippet is CalamityBuffTagHandler.Snippet buffSnippet) + if (snippet is BuffTagEnemyEffectHandler.Snippet enemy) { - buffIdsInTooltip.Add(buffSnippet.BuffId); + buffIdsInTooltip.Add(enemy.BuffId, 0); + } + else if (snippet is BuffTagPlayerEffectHandler.Snippet player) + { + if (!buffIdsInTooltip.TryAdd(player.BuffId, 1)) + { + buffIdsInTooltip.Remove(player.BuffId); + buffIdsInTooltip.Add(player.BuffId, 2); + } } } } @@ -298,26 +307,36 @@ namespace CalamityMod.Items { bool showTheTip = false; bool foundDebuff = false; - foreach (int buffId in buffIdsInTooltip) + foreach (var buffInfo in buffIdsInTooltip) { string tooltipKey = ""; - if (buffId < BuffID.Count) + string secondTooltipKey = ""; + // Change the localization based on whether it should display player or enemy info, or both + string locKey = buffInfo.Value == 1 ? "ItemTooltipPlayer" : "ItemTooltipEnemy"; + string secondLocKey = buffInfo.Value == 2 ? "ItemTooltipPlayer" : ""; + + if (buffInfo.Key < BuffID.Count) { - tooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffId)}.ItemTooltip"; + tooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffInfo.Key)}.{locKey}"; + if (buffInfo.Value == 2) + secondTooltipKey = $"Mods.Terraria.Buffs.{BuffID.Search.GetName(buffInfo.Key)}.{secondLocKey}"; } else { - var modBuff = BuffLoader.GetBuff(buffId); - tooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.ItemTooltip"; + var modBuff = BuffLoader.GetBuff(buffInfo.Key); + tooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.{locKey}"; + if (buffInfo.Value == 2) + secondTooltipKey = $"Mods.{modBuff.Mod.Name}.Buffs.{modBuff.Name}.{secondLocKey}"; } - if (!Language.Exists(tooltipKey)) - { - continue; - } + var text = ""; + var secondText = ""; + if (Language.Exists(tooltipKey)) + text = Language.GetTextValue(tooltipKey); + if (Language.Exists(secondTooltipKey)) + secondText = Language.GetTextValue(secondTooltipKey); - var text = Language.GetTextValue(tooltipKey); - if (string.IsNullOrWhiteSpace(text)) + if (string.IsNullOrWhiteSpace(text) && string.IsNullOrWhiteSpace(secondText)) { continue; } @@ -329,7 +348,11 @@ namespace CalamityMod.Items break; } - tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffId, $"[cbuff:{buffId}]\n{text}")); + string extraLoc = GetTextValue(buffInfo.Value == 1 ? "Buffs.OnPlayer" : "Buffs.OnEnemy"); + if (!string.IsNullOrWhiteSpace(text)) + tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffInfo.Key, $"[cbuff:{buffInfo.Key}] {extraLoc}\n{text}")); + if (buffInfo.Value == 2 && !string.IsNullOrWhiteSpace(secondText)) + tooltips.Insert(++lastTooltipIndex, new TooltipLine(Mod, "CalamityMod:AltExpandTooltip" + buffInfo.Key, $"[cbuff:{buffInfo.Key}] {GetTextValue("Buffs.OnPlayer")}\n{secondText}")); } if (showTheTip) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index d8f7921ce2..8483877229 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1,3 +1,7 @@ +// General (Player) and (Enemy) indicators for buff tags +OnPlayer: (Player) +OnEnemy: (Enemy) + // Alcohols (including Odd Mushroom) AlcoholPoisoning: { DisplayName: Alcohol Poisoning @@ -129,85 +133,111 @@ Withered: { AstralInfectionDebuff: { DisplayName: Astral Infection Description: Your flesh is melting off - ItemTooltip: Sickness - 37.5 DPS + ItemTooltipPlayer: Sickness - 12 DPS + ItemTooltipEnemy: Sickness - 37.5 DPS } AuricRebuke: { DisplayName: Auric Rebuke Description: Your cells are violently bouncing off each other - ItemTooltip: Electric - 100 DPS. Deals 4x damage against moving targets + ItemTooltipPlayer: Electric - 8 DPS. Deals 5x damage against moving players + ItemTooltipEnemy: Electric - 100 DPS. Deals 4x damage against moving targets } BanishingFire: { DisplayName: Banishing Fire Description: You shall not be forgiven for your sins - ItemTooltip: Heat - Deals DPS equal to 0.1% of max HP or 2000, whichever is greater + ItemTooltipEnemy: Heat - Deals DPS equal to 0.1% of max HP or 2000, whichever is greater } BrimstoneFlames: { DisplayName: Brimstone Flames Description: Incinerating both body and mind - ItemTooltip: Heat - 30 DPS + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: Heat - 30 DPS } BurningBlood: { DisplayName: Burning Blood Description: Your blood is on fire - ItemTooltip: Sickness - 20 DPS + ItemTooltipPlayer: Sickness - 4 DPS + ItemTooltipEnemy: Sickness - 20 DPS } BrainRot: { DisplayName: Brain Rot Description: Your neurons are popping like corn kernels - ItemTooltip: Sickness - 20 DPS + ItemTooltipPlayer: Sickness - 4 DPS + ItemTooltipEnemy: Sickness - 20 DPS } DemonicFlames: { DisplayName: Demonic Flames Description: Immolating flames sear your soul - ItemTooltip: Heat - DPS depends on inflicting item + ItemTooltipEnemy: Heat - DPS depends on inflicting item } ElementalMix: { DisplayName: Elemental Mix Description: A beautiful elemental symphony is flaying you alive - ItemTooltip: Typeless - 200 DPS + ItemTooltipEnemy: Typeless - 200 DPS } CrushDepth: { DisplayName: Crush Depth Description: Crushed by aquatic pressure - ItemTooltip: Water - 50 DPS + ItemTooltipPlayer: + ''' + Water - 9 DPS + Increases breath loss rate in the Abyss + ''' + ItemTooltipEnemy: Water - 50 DPS } RiptideDebuff: { DisplayName: Riptide Description: Lashed at by powerful waters - ItemTooltip: Water - 15 DPS + ItemTooltipPlayer: Water - 3 DPS + ItemTooltipEnemy: Water - 15 DPS } Dragonfire: { DisplayName: Dragonfire Description: Engulfed by roaring flames - ItemTooltip: Heat - 480 DPS + ItemTooltipPlayer: Heat - 25 DPS + ItemTooltipEnemy: Heat - 480 DPS } GodSlayerInferno: { DisplayName: God Slayer Inferno Description: Your flesh is burning off - ItemTooltip: Heat - 250 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 250 DPS +} + +HadopelagicPressure: { + DisplayName: Hadopelagic Pressure + Description: Rapidly sinking to a watery grave + ItemTooltipPlayer: + ''' + Water - 20 DPS + Increases breath loss rate in the Abyss + ''' + ItemTooltipEnemy: Water - 200 DPS } HeavyBleeding: { DisplayName: Heavy Bleeding Description: That's gonna need stitches - ItemTooltip: Typeless - 40 DPS + ItemTooltipPlayer: Typeless - 8 DPS + ItemTooltipEnemy: Typeless - 40 DPS } HolyFlames: { DisplayName: Holy Flames Description: Dissolving from holy light - ItemTooltip: Heat - 150 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 150 DPS } HolyInferno: { @@ -218,13 +248,14 @@ HolyInferno: { Laceration: { DisplayName: Laceration Description: You're a bloody mess - ItemTooltip: Typeless - 200 DPS + ItemTooltipPlayer: Typeless - 18 DPS + ItemTooltipEnemy: Typeless - 200 DPS } ManaBurn: { DisplayName: Mana Burn Description: The excess of mana sears your body and mind - ItemTooltip: + ItemTooltipEnemy: ''' Typeless Every 100 negative mana reduces your life regen by 4 HP/s, but burns enemies for 3% of dealt damage @@ -234,25 +265,28 @@ ManaBurn: { MiracleBlight: { DisplayName: Miracle Blight Description: Exotic resonance shreds your corporeal form - ItemTooltip: Typeless - 1500 DPS + ItemTooltipPlayer: Typeless - 30 DPS + ItemTooltipEnemy: Typeless - 1500 DPS } Nightwither: { DisplayName: Nightwither Description: Incinerated by lunar rays - ItemTooltip: Cold - 100 DPS + ItemTooltipPlayer: Cold - 20 DPS + ItemTooltipEnemy: Cold - 100 DPS } Plague: { DisplayName: Plague Description: Rotting from the inside - ItemTooltip: Sickness - 50 DPS + ItemTooltipPlayer: Sickness - 15 DPS + ItemTooltipEnemy: Sickness - 50 DPS } SagePoison: { DisplayName: Sage Poison Description: Poisoned - ItemTooltip: + ItemTooltipEnemy: ''' Sickness - 25 DPS per Viral Sprout / 50 DPS per Virid Vanguard Ignores 75% of enemy sickness weaknesses and resistances @@ -262,7 +296,8 @@ SagePoison: { SearingLava: { DisplayName: Searing Lava Description: The brimstone lava sears your flesh - ItemTooltip: + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: ''' Heat - 20 DPS Ignores enemy heat weaknesses and resistances @@ -278,7 +313,7 @@ ShellfishClaps: { Shred: { DisplayName: Shred Description: Someone built ten Tri-Tip Daggers... - ItemTooltip: "" + ItemTooltipEnemy: "" } SnapClamDebuff: { @@ -289,19 +324,26 @@ SnapClamDebuff: { StaticDischarge: { DisplayName: Static Discharge Description: Shocked by static electricity - ItemTooltip: Electric - 2.5 DPS. 4x damage to moving targets + ItemTooltipPlayer: Electric - 1.5 DPS. 4x damage to moving players + ItemTooltipEnemy: Electric - 2.5 DPS. 4x damage to moving targets } SulphuricPoisoning: { DisplayName: Sulphuric Poisoning Description: The acidic water burns away your flesh - ItemTooltip: Sickness - 120 DPS + ItemTooltipPlayer: Sickness - 3 DPS + ItemTooltipEnemy: Sickness - 120 DPS } TrueVulnerabilityHex: { DisplayName: True Vulnerability Hex Description: The end has come - ItemTooltip: + ItemTooltipPlayer: + ''' + Heat - 25 DPS + Increases damage taken from all sources + ''' + ItemTooltipEnemy: ''' Heat - 1998 DPS Increases damage taken from all sources @@ -312,7 +354,7 @@ TrueVulnerabilityHex: { Vaporfied: { DisplayName: Vaporfied Description: Vape - ItemTooltip: + ItemTooltipEnemy: ''' Typeless - 15 DPS Slows enemies @@ -322,19 +364,26 @@ Vaporfied: { VermillionFlux: { DisplayName: Vermillion Flux Description: Sharp arcs of scarlet course through you - ItemTooltip: Electric - 50 DPS. Deals 4x damage against moving targets + ItemTooltipPlayer: Electric - 5 DPS. Deals 5x damage against moving players + ItemTooltipEnemy: Electric - 50 DPS. Deals 4x damage against moving targets } Voidfrost: { DisplayName: Voidfrost Description: The emptiness of space devours all warmth and life - ItemTooltip: Cold - 200 DPS + ItemTooltipPlayer: Cold - 20 DPS + ItemTooltipEnemy: Cold - 200 DPS } VulnerabilityHex: { DisplayName: Vulnerability Hex Description: Your mental fortitude is fading - ItemTooltip: + ItemTooltipPlayer: + ''' + Heat - 15 DPS + Reduces defense and damage reduction + ''' + ItemTooltipEnemy: ''' Heat - 1332 DPS Slows enemies @@ -713,7 +762,7 @@ AbsorberRegen: { You are blessed by the culmimation of nature's powers Life regen increased by {0} HP/s, damage increased by {1}%, damage reduction increased by {2}% ''' - ItemTooltip: Increases life regeneration, damage, and damage reduction + ItemTooltipPlayer: Increases life regeneration, damage, and damage reduction } AbyssalDivingSuitBuff: { @@ -809,7 +858,7 @@ CoralSymbiosis: { CosmicFreeze: { DisplayName: Cosmic Freeze Description: You feel as cold as the empty expanse of outer space - ItemTooltip: Increases regeneration, especially when standing still, and freezes nearby enemies + ItemTooltipPlayer: Increases regeneration, especially when standing still, and freezes nearby enemies } DivineBless: { @@ -870,7 +919,7 @@ IceShieldBuff: { Mushy: { DisplayName: Mushy Description: Increased defense by {0} and life regen by {1} HP/s - ItemTooltip: Increases defense and life regeneration + ItemTooltipPlayer: Increases defense and life regeneration } PhantomicEmpowerment: { @@ -941,7 +990,7 @@ ReaverRage: { Rage of the earth Defense increased by {0} and damage increased by {1}% ''' - ItemTooltip: Increased defense and damage + ItemTooltipPlayer: Increased defense and damage } SandsWindBuff: { @@ -986,14 +1035,14 @@ TarragonImmunity: { TarraLifeRegen: { DisplayName: Tarra Life Description: Rapid healing - ItemTooltip: "" + ItemTooltipPlayer: "" } // Stat debuffs AbsorberAffliction: { DisplayName: Absorber Affliction Description: Damn nature, you scary! - ItemTooltip: Sickness - 200 DPS + ItemTooltipEnemy: Sickness - 200 DPS } AndromedaCripple: { @@ -1004,13 +1053,14 @@ AndromedaCripple: { ArmorCrunch: { DisplayName: Armor Crunch Description: Your armor is shredded - ItemTooltip: Damage Reduction is 15% less effective + ItemTooltipPlayer: Reduces defense and damage reduction + ItemTooltipEnemy: Damage Reduction is 15% less effective } Crumbling: { DisplayName: Crumbling Description: Your armor is damaged - ItemTooltip: Damage Reduction is 8% less effective + ItemTooltipEnemy: Damage Reduction is 8% less effective } Clamity: { @@ -1035,7 +1085,7 @@ Enraged: { Eutrophication: { DisplayName: Eutrophication Description: Excessive nutrients restrict your movement - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } ExoFreeze: { @@ -1056,19 +1106,13 @@ FrozenLungs: { GalvanicCorrosion: { DisplayName: Galvanic Corrosion Description: Your limbs have begun to corrode - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } GlacialState: { DisplayName: Glacial State Description: Cannot move - ItemTooltip: Freezes enemies -} - -HadopelagicPressure: { - DisplayName: Hadopelagic Pressure - Description: Rapidly sinking to a watery grave - ItemTooltip: Water - 200 DPS + ItemTooltipEnemy: Freezes enemies } IcarusFolly: { @@ -1083,7 +1127,12 @@ IcarusFolly: { Irradiated: { DisplayName: Irradiated Description: Your skin is burning off - ItemTooltip: + ItemTooltipPlayer: + ''' + Typeless - 2 DPS + Reduces defense and damage reduction + ''' + ItemTooltipEnemy: ''' Typeless - 10 DPS Increases damage taken from Sickness debuffs @@ -1093,13 +1142,13 @@ Irradiated: { MarkedforDeath: { DisplayName: Marked for Death Description: Damage reduction reduced - ItemTooltip: Damage reduction is 50% less effective + ItemTooltipEnemy: Damage reduction is 50% less effective } PearlAura: { DisplayName: Pearl Aura Description: Slowed down - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } ProfanedWeakness: { @@ -1110,13 +1159,13 @@ ProfanedWeakness: { TemporalSadness: { DisplayName: Temporal Sadness Description: You are crying - ItemTooltip: Freezes enemies + ItemTooltipEnemy: Freezes enemies } TimeDistortion: { DisplayName: Time Distortion Description: Time is slowed - ItemTooltip: Slows enemies + ItemTooltipEnemy: Slows enemies } Warped: { @@ -1132,7 +1181,8 @@ WeakPetrification: { WhisperingDeath: { DisplayName: Whispering Death Description: Death approaches; attack power and life regen reduced - ItemTooltip: Reduced contact damage + ItemTooltipPlayer: Negates life regen, reduces damage + ItemTooltipEnemy: Reduced contact damage } WitherDebuff: { @@ -1680,12 +1730,14 @@ PopoNoselessBuff: { Daybroken: { DisplayName: Daybroken - ItemTooltip: Heat - 100 DPS + ItemTooltipPlayer: Heat - 20 DPS + ItemTooltipEnemy: Heat - 100 DPS } Shadowflame: { DisplayName: Shadowflame - ItemTooltip: Heat - 30 DPS + ItemTooltipPlayer: Heat - 15 DPS + ItemTooltipEnemy: Heat - 30 DPS } ForbiddenStealthSummonTagBuff: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 6afe9e31a2..c5813e380f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -4,7 +4,7 @@ Abaddon: { ''' {$CommonItemTooltip.PercentIncreasedCritChance} Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames] - Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}% + Reduces damage taken from [cbuffplr:CalamityMod/BrimstoneFlames] by {1}% ''' } @@ -28,8 +28,8 @@ AbyssalDivingSuit: { Grants the ability to swim, extends underwater breathing, emits light underwater, and improves mobility on ice Provides a moderate amount of light, reduces breath loss, and reduces damage caused by drowning in the abyss Abyss creatures are less likely to see you, mitigates the abyss' defense reduction, and lets you sink faster in liquids - Grants immunity to the sulphurous waters and [cbuff:CalamityMod/CrushDepth]'s increased breath loss - Grants resistance to the increased breath loss caused by [cbuff:CalamityMod/HadopelagicPressure] + Grants immunity to the sulphurous waters and [cbuffplr:CalamityMod/CrushDepth]'s increased breath loss + Grants resistance to the increased breath loss caused by [cbuffplr:CalamityMod/HadopelagicPressure] ''' } @@ -65,9 +65,9 @@ AlchemicalDecanter: { DisplayName: Alchemical Decanter Tooltip: ''' - All attacks inflict the [cbuff:CalamityMod/Plague] and reduces damage taken from the [cbuff:CalamityMod/Plague] by {0}% + All attacks inflict the [cbuff:CalamityMod/Plague] and reduces damage taken from the [cbuffplr:CalamityMod/Plague] by {0}% Projectiles spawn plague seekers on enemy hits - Releases plague bees and douses you in [cbuff:Honey] when damaged + Releases plague bees and douses you in [cbuffplr:Honey] when damaged ''' } @@ -98,7 +98,7 @@ AmbrosialAmpoule: { ''' +{0} max life Grants +{1} to +{2} HP/s life regen based on missing health - Grants the [cbuff:Honey] buff + Grants the [cbuffplr:Honey] buff Current boost: +[REGEN] HP/s Fire and sickness debuff durations are halved You emit yellow light if visibility is enabled @@ -351,7 +351,7 @@ BlunderBooster: { ''' 12% increased rogue damage and 15% increased rogue projectile velocity Stealth generates 10% faster - Summons a red lightning aura around the player that electrifies nearby enemies + Summons a red lightning aura around the player that electrifies nearby enemies with [cbuff:CalamityMod/VermillionFlux] The aura has reduced opacity if visibility is disabled Press [KEY] to consume 25% of your maximum stealth to perform a swift upwards diagonal dash This dash leaves a trail of red lightning bolts @@ -544,7 +544,7 @@ DeificAmulet: { DisplayName: Deific Amulet Tooltip: ''' - Releases a burst of homing star-bees[TOGGLE] and drenches you in [cbuff:Honey] after taking damage + Releases a burst of homing star-bees[TOGGLE] and drenches you in [cbuffplr:Honey] after taking damage Increases the length of invincibility, with it increasing even more when at low health [c/aaaaaa:Shift- this item in your inventory to toggle] [i:PanicNecklace] [c/aaaaaa:Panic Necklace's effect] ''' @@ -556,7 +556,7 @@ DepthCharm: { Tooltip: ''' Reduces the damage caused by drowning in the abyss - Removes the increased breath loss of Crush Depth + Removes the increased breath loss of [cbuffplr:CalamityMod/CrushDepth] ''' } @@ -615,7 +615,7 @@ DragonScales: { Rogue projectiles spawn slow fireballs as they travel Stealth strikes create infernados where they hit +10% max run speed and acceleration - Grants immunity to Dragonfire + Grants immunity to [cbuffplr:CalamityMod/Dragonfire] 'Only a living dragon holds true treasure' ''' } @@ -626,7 +626,7 @@ DynamoStemCells: { ''' 10% increased ranged damage and movement speed Ranged weapons fire a powerful mini swarmer every 3 seconds - Reduces damage taken from Dragonfire + Reduces damage taken from [cbuffplr:CalamityMod/Dragonfire] ''' } @@ -651,7 +651,7 @@ EldritchSoulArtifact: { Tooltip: ''' Boosts melee speed by 10%, ranged velocity by 25%, rogue stealth regen by 15%, max minions by 1 and reduces mana cost by 25% - Grants immunity to Whispering Death + Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] Knowledge ''' } @@ -789,7 +789,7 @@ FrostFlare: { DisplayName: Frost Flare Tooltip: ''' - All attacks and projectiles inflict Frostbite + 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 @@ -811,8 +811,8 @@ FungalSymbiote: { Tooltip: ''' You grow mushrooms on the grass beneath you - Consuming mushrooms provides the [cbuff:CalamityMod/Mushy] buff, granting 5 defense and +1 HP/s life regen - 10% increased damage while you have the Mushy buff + Consuming mushrooms provides [cbuffplr:CalamityMod/Mushy], granting 5 defense and +1 HP/s life regen + 10% increased damage while you have [cbuffplr:CalamityMod/Mushy] ''' } @@ -925,7 +925,7 @@ HideofAstrumDeus: { True melee strikes drops astral stars from the sky Releases an explosion and temporarily increases true melee damage by 30% when damaged Boost duration scales with the amount of damage you took, up to 10 seconds - Nullifies the Astral Infection + Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] ''' } @@ -934,7 +934,7 @@ HoneyDew: { Tooltip: ''' +10 max life - Grants the [cbuff:Honey] buff + Grants the [cbuffplr:Honey] buff Sickness debuff durations are halved ''' } @@ -952,7 +952,7 @@ IlmerisSpark: { DisplayName: Ilmeris' Spark Tooltip: ''' - Attacks inflict Static Discharge while underwater + Attacks inflict [cbuff:CalamityMod/StaticDischarge] while underwater Taking damage causes the enemy to be shocked Shocked enemies constantly release sparks ''' @@ -966,7 +966,7 @@ InfectedJewel: { Grants 12 defense and +2 HP/s life regen while afflicted with any debuff Granted defense fades away quickly when not afflicted with any debuffs Each debuff beyond the first grants 4 additional defense - Nullifies the Astral Infection + Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] 'A beautiful gemstone tarnished by spaceborne rot' ''' } @@ -1066,7 +1066,7 @@ LivingDew: { Tooltip: ''' +25 max life - Grants the [cbuff:Honey] buff + Grants the [cbuffplr:Honey] buff Fire and sickness debuff durations are halved ''' } @@ -1164,7 +1164,7 @@ NuclearFuelRod: { ''' Increases your max number of minions by 1 Minions release an [cbuff:CalamityMod/Irradiated] aura on enemy hits - Grants immunity to [cbuff:CalamityMod/Irradiated] + Grants immunity to [cbuffplr:CalamityMod/Irradiated] ''' } @@ -1173,7 +1173,7 @@ Nucleogenesis: { Tooltip: ''' Increases your max number of minions by 4 - Grants immunity to [cbuff:ShadowFlame] and [cbuff:CalamityMod/Irradiated] + Grants immunity to [cbuffplr:CalamityMod/Shadowflame] and [cbuffplr:CalamityMod/Irradiated] 15% increased summon damage, and increased minion knockback Minions inflict a variety of debuffs Minions spawn damaging sparks on enemy hits @@ -1416,7 +1416,7 @@ RampartofDeities: { Tooltip: ''' {$Common.KnockbackImmunity} - Releases a blast of homing star-bees[TOGGLE] and drenches you in [cbuff:Honey] after taking damage + Releases a blast of homing star-bees[TOGGLE] and drenches you in [cbuffplr:Honey] after taking damage Increases the length of invincibility, with it increasing even more when at low health or taking high damage attacks Reduces damage taken by 25% when below 50% life Absorbs 25% of damage done to players on your team when you are above 25% life @@ -1682,7 +1682,7 @@ StarTaintedGenerator: { ''' Increases your max number of minions by 2, and summon damage by 7% Minion attacks spawn astral explosions and inflict several debuffs - Grants immunity to [cbuff:CalamityMod/Irradiated] + Grants immunity to [cbuffplr:CalamityMod/Irradiated] Does not stack with downgrades ''' } @@ -1702,7 +1702,7 @@ StatisCurse: { ''' Increases your max number of minions by 3, and summon damage by 12% Increased minion knockback - Minion attacks inflict [cbuff:ShadowFlame], and grants immunity to [cbuff:ShadowFlame] + Minion attacks inflict [cbuff:CalamityMod/Shadowflame], and grants immunity to [cbuffplr:CalamityMod/Shadowflame] Does not stack with downgrades ''' } @@ -1835,7 +1835,7 @@ TeslasAmulet: { ''' Generates an electrifying field that slows enemies The field has reduced opacity if visibility is disabled - Reduces the duration of [cbuff:CalamityMod/StaticDischarge] + Reduces the duration of [cbuffplr:CalamityMod/StaticDischarge] ''' } @@ -1923,7 +1923,7 @@ TheFirstShadowflame: { Tooltip: ''' Increases your max number of minions by 1 - Minion attacks inflict [cbuff:ShadowFlame], and grants immunity to [cbuff:ShadowFlame] + Minion attacks inflict [cbuff:CalamityMod/Shadowflame], and grants immunity to [cbuffplr:CalamityMod/Shadowflame] ''' } @@ -1999,7 +1999,7 @@ UnholyTonic: { Tooltip: ''' Increases damage reduction by 4% and defense by 6 while in the corruption - Grants immunity to Brain Rot + Grants immunity to [cbuffplr:CalamityMod/BrainRot] ''' } @@ -2040,7 +2040,7 @@ ViciousTonic: { Tooltip: ''' Increases damage reduction by 4% and defense by 6 while in the crimson - Grants immunity to Burning Blood + Grants immunity to [cbuffplr:CalamityMod/BurningBlood] ''' } @@ -2064,7 +2064,7 @@ VoidofExtinction: { ''' {$CommonItemTooltip.PercentIncreasedCritChance} Critical strikes explode, igniting nearby foes with [cbuff:CalamityMod/BrimstoneFlames] - Reduces damage taken from [cbuff:CalamityMod/BrimstoneFlames] by {1}% + Reduces damage taken from [cbuffplr:CalamityMod/BrimstoneFlames] by {1}% ''' } diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index ea70752e4b..05fcfbb547 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -1,22 +1,42 @@ -Venom.ItemTooltip: Sickness - 30 DPS +Venom: { + ItemTooltipPlayer: Sickness - 15 DPS + ItemTooltipEnemy: Sickness - 30 DPS +} + BetsysCurse.ItemTooltip: -40 defense -CursedInferno.ItemTooltip: Heat - 24 DPS -Frostburn2.ItemTooltip: Cold - 50 DPS -Frostburn.ItemTooltip: Cold - 8 DPS -OnFire3.ItemTooltip: Heat - 15 DPS -OnFire.ItemTooltip: Heat - 6 DPS -Ichor.ItemTooltip: -10 defense -Oiled.ItemTooltip: + +CursedInferno: { + ItemTooltipPlayer: Heat - 12 DPS + ItemTooltipEnemy: Heat - 24 DPS +} + +Frostburn2: { + ItemTooltipPlayer: Cold - 8 DPS + ItemTooltipEnemy: Cold - 50 DPS +} + +// Frostburn deals the same damage to players and enemies +Frostburn.ItemTooltipEnemy: Cold - 8 DPS +OnFire3.ItemTooltipEnemy: Heat - 15 DPS +// On Fire deals the same damage to players and enemies +OnFire.ItemTooltipEnemy: Heat - 6 DPS +Ichor.ItemTooltipEnemy: -10 defense +Oiled.ItemTooltipEnemy: ''' Heat - 25 DPS. Recieves 2x the effect from Heat multipliers Only does damage when paired with another Heat debuff ''' -Poisoned.ItemTooltip: Sickness - 6 DPS -PotionSickness.ItemTooltip: "" -Slimed.ItemTooltip: Enhances Heat debuff damage -Wet.ItemTooltip: Enhances Electric debuff damage -Electrified.ItemTooltip: Electric - 10.5 DPS. Deals 4x damage to moving targets -Honey.ItemTooltip: +Poisoned.ItemTooltipEnemy: Sickness - 6 DPS +PotionSickness.ItemTooltipEnemy: "" +Slimed.ItemTooltipEnemy: Enhances Heat debuff damage +Wet.ItemTooltipEnemy: Enhances Electric debuff damage + +Electrified: { + ItemTooltipPlayer: Electric - 4 DPS. Deals 5x damage to moving players + ItemTooltipEnemy: Electric - 10.5 DPS. Deals 4x damage to moving targets +} + +Honey.ItemTooltipPlayer: ''' Increases health regeneration by 1 HP/s Increases natural regeneration acceleration by 300% From 05d84cc13f22d6e9e901b7855605b93948f398b5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Feb 2026 11:39:17 -0500 Subject: [PATCH 029/346] More buff tag edits --- .../Mods.CalamityMod.Items.Armor.Hardmode.hjson | 8 ++++---- ...ods.CalamityMod.Items.Armor.PostMoonLord.hjson | 2 +- .../Mods.CalamityMod.Items.Weapons.Magic.hjson | 4 ++-- .../Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 ++-- .../Mods.CalamityMod.Items.Weapons.Ranged.hjson | 4 ++-- .../Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- .../Mods.CalamityMod.Items.Weapons.Summon.hjson | 2 +- .../Mods.CalamityMod.Items.Weapons.Typeless.hjson | 4 ++-- Localization/en-US/Mods.Terraria.Buffs.hjson | 15 ++++++++++++--- 9 files changed, 27 insertions(+), 18 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index 35c60fa863..b81dcfd367 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -45,7 +45,7 @@ BrimflameCowl: { ''' {$CommonItemTooltip.IncreasesMaxManaBy} and {$CommonItemTooltip.PercentReducedManaCost@1} {$CommonItemTooltip.PercentIncreasedMagicDamageCritChance@2} - Immunity to [cbuff:OnFire], [cbuff:CalamityMod/BrimstoneFlames] and [cbuff:Frostburn] + Immunity to [cbuffplr:OnFire], [cbuffplr:CalamityMod/BrimstoneFlames] and [cbuffplr:Frostburn] ''' SetBonus: ''' @@ -197,7 +197,7 @@ HydrothermicArmor: { Tooltip: ''' {$CommonItemTooltip.PercentIncreasedDamage} - Grants immunity to lava and [cbuff:OnFire] + Grants immunity to lava and [cbuffplr:OnFire] ''' CommonSetBonus: ''' @@ -365,7 +365,7 @@ PlaguebringerCarapace: { ''' {$CommonItemTooltip.IncreasesMaxMinionsBy} {$CommonItemTooltip.PercentIncreasedSummonDamage@1} - Grants immunity to [cbuff:CalamityMod/Plague] + Grants immunity to [cbuffplr:CalamityMod/Plague] ''' } @@ -472,7 +472,7 @@ ReaverHeadTank: { {$Common.AggroBoost} Reduces the life regen lost from damage over time debuffs by {0}% {1}% decreased movement speed and flight time - Grants [cbuff:CalamityMod/ReaverRage] for {2} {^2:second;seconds} after taking damage + Grants [cbuffplr:CalamityMod/ReaverRage] for {2} {^2:second;seconds} after taking damage ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 10cdedab20..427b2d5468 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -669,7 +669,7 @@ TarragonHeadMelee: { ''' SetBonusEffect: ''' - Taking damage gives [cbuff:CalamityMod/TarraLifeRegen], which grants +{0} HP/s life regen + Taking damage gives [cbuffplr:CalamityMod/TarraLifeRegen], which grants +{0} HP/s life regen {1} to cloak yourself in life energy that heavily reduces enemy contact damage for {2} seconds This has a {3} second cooldown {$TarragonBreastplate.CommonSetBonus} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index ee8d2c7dd1..5dea70d776 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -727,7 +727,7 @@ SanguineFlare: { ''' Charges up a sanguine flare that gains power over time When striking an enemy, this flare causes a bloodsplosion and splits into blood orbs - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } @@ -1007,7 +1007,7 @@ Viscera: { ''' Fires a rapid barrage of piercing blood beams The first enemy struck by each beam will burst into blood orbs - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Each successive beam in the barrage deals more damage The last beam of the barrage instead explodes upon hitting an enemy ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 55706016b7..b09762dda7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -773,7 +773,7 @@ Lacerator: { Striking enemies conjures a bloody saw to shred them The saw does more damage the more often the yoyo hits, and fades away when not striking enemies Enemies touching the edge of the sawblade get blood orbs torn out of them - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] The direction of the saw's spin depends on which direction you originally threw the yoyo [GFB] ''' @@ -1363,7 +1363,7 @@ TheMutilator: { ''' Striking enemies empowers The Mutilator, increasing its damage At full charge, striking enemies causes a blood orb explosion - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 5a5f9f648a..802cf460ba 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -109,7 +109,7 @@ ArterialAssault: { ''' Fires a group of 5 homing blood arrows These blood arrows burst into blood orbs upon striking an enemy - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] ''' } @@ -191,7 +191,7 @@ BloodBoiler: { Tooltip: ''' Fires twin streams of bloodfire that returns to you - Returning bloodfire reduces [cbuff:PotionSickness] if it struck an enemy + Returning bloodfire reduces [cbuffplr:PotionSickness] if it struck an enemy Uses your health as ammo 20% chance to save health ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index a3aaa437db..60550cf8cf 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -79,7 +79,7 @@ BloodsoakedCrasher: { Throws a bloody axe that is affected by gravity and can bounce twice The axe speeds up over time, but will slow down upon hitting an enemy Spews blood orbs upon enemy hits - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Stealth strikes spawn homing blood bolts on hit ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 21a0c5eb27..a30008cd9d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -304,7 +304,7 @@ DragonbloodDisgorger: { ''' Summons a skeletal dragon and her two children Baby spits burst into blood orbs upon hitting an enemy - Picking up these blood orbs reduces the duration of [cbuff:PotionSickness] + Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] Requires 6 minion slots to be summoned There can only be one family at a time ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index 9a4e9142f1..2032f07136 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -14,8 +14,8 @@ ClaretCannon: { Fires a hypercondensed claret round The round explodes upon striking an enemy and releases blood orbs The explosion shreds enemies, inflicting [cbuff:CalamityMod/Laceration] and dramatically reducing their defense - Picking up the blood orbs will reduce [cbuff:PotionSickness] when possible - If you do not have [cbuff:PotionSickness], your natural regeneration will be enhanced + 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 ''' } diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index 05fcfbb547..21ca4bf66c 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -16,10 +16,19 @@ Frostburn2: { } // Frostburn deals the same damage to players and enemies -Frostburn.ItemTooltipEnemy: Cold - 8 DPS +Frostburn: { + ItemTooltipPlayer: Cold - 8 DPS + ItemTooltipEnemy: Cold - 8 DPS +} + OnFire3.ItemTooltipEnemy: Heat - 15 DPS + // On Fire deals the same damage to players and enemies -OnFire.ItemTooltipEnemy: Heat - 6 DPS +OnFire: { + ItemTooltipPlayer: Heat - 6 DPS + ItemTooltipEnemy: Heat - 6 DPS +} + Ichor.ItemTooltipEnemy: -10 defense Oiled.ItemTooltipEnemy: ''' @@ -27,7 +36,7 @@ Oiled.ItemTooltipEnemy: Only does damage when paired with another Heat debuff ''' Poisoned.ItemTooltipEnemy: Sickness - 6 DPS -PotionSickness.ItemTooltipEnemy: "" +PotionSickness.ItemTooltipPlayer: "" Slimed.ItemTooltipEnemy: Enhances Heat debuff damage Wet.ItemTooltipEnemy: Enhances Electric debuff damage From 7c6ea902fe6a98606dc4b3ca59a098a7b289f143 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Feb 2026 16:40:37 -0500 Subject: [PATCH 030/346] More buff tags --- Items/Armor/Empyrean/EmpyreanMask.cs | 4 ++-- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 1 + .../en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson | 2 +- Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson | 6 +++--- .../en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson | 2 +- .../en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 4 ++-- .../en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Items/Armor/Empyrean/EmpyreanMask.cs b/Items/Armor/Empyrean/EmpyreanMask.cs index 18a2b1abd4..08759c2a23 100644 --- a/Items/Armor/Empyrean/EmpyreanMask.cs +++ b/Items/Armor/Empyrean/EmpyreanMask.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.StatBuffs; +using CalamityMod.Buffs.StatBuffs; using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; @@ -76,7 +76,7 @@ namespace CalamityMod.Items.Armor.Empyrean var modPlayer = player.Calamity(); modPlayer.xerocSet = true; modPlayer.rogueStealthMax += SetBonusRogueStealth; - player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth()); + player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), PermanentWrathHealthRatio.ToPercent()); if (player.statLife <= (int)(player.statLifeMax2 * PermanentWrathHealthRatio)) player.AddBuff(ModContent.BuffType(), 2); modPlayer.wearingRogueArmor = true; diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 8483877229..fe898e6c73 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -869,6 +869,7 @@ DivineBless: { EmpyreanWrath: { DisplayName: Empyrean Wrath Description: Wrath of the cosmos + ItemTooltipPlayer: Increases damage and critical strike chance } Encased: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson index 100e290574..367ad5e519 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.Wings.hjson @@ -22,7 +22,7 @@ ExodusWings: { Tooltip: ''' {$CommonItemTooltip.FlightAndSlowfall} - Grants permanent Empyrean Wrath while wearing the Empyrean armor + Grants permanent [cbuffplr:CalamityMod/EmpyreanWrath] while wearing the Empyrean armor Pulsing with an alien heartbeat ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 3ba3ea1a9b..8046622dfb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson @@ -38,7 +38,7 @@ BloodRune: { BubonicRound: { DisplayName: Bubonic Round - Tooltip: Spreads the plague on hit and ignores 10% of enemy defense + Tooltip: Spreads the [cbuff:CalamityMod/Plague] on hit and ignores 10% of enemy defense } CinderArrow: { @@ -96,7 +96,7 @@ HolyFireBullet: { DisplayName: Holy Fire Bullet Tooltip: ''' - Profaned bullets that deal 1.15x damage and explode on impact + Profaned bullets that deal 1.15x damage and explode on impact, inflicting [cbuff:CalamityMod/HolyFlames] The explosion is larger and the bullet deals increased damage if impact occurs immediately after firing The extra damage bonus caps at 1.15x ''' @@ -165,7 +165,7 @@ VanquisherArrow: { DisplayName: Vanquisher Arrow Tooltip: ''' - Pierces through tiles and homes in on enemies + Pierces through tiles and homes in on enemies, inflicting [cbuff:CalamityMod/GodSlayerInferno] Tears a rift in space on enemy hits ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index b81dcfd367..e4105c7021 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -425,7 +425,7 @@ PlagueReaperVest: { Tooltip: ''' {$CommonItemTooltip.PercentIncreasedRangedDamage} - Grants immunity to the Plague + Grants immunity to [cbuffplr:CalamityMod/Plague] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 427b2d5468..5a9ad82524 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -338,7 +338,7 @@ EmpyreanMask: { ''' {$Common.RogueStealth} Rogue projectiles have special effects on enemy hits - Imbued with cosmic wrath when you are damaged + Imbued with [cbuffplr:CalamityMod/EmpyreanWrath] when you are damaged or while below {1}% life ''' } @@ -500,7 +500,7 @@ OmegaBlueChestplate: { ''' {$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1} {$CommonItemTooltip.PercentChanceToSaveAmmo@2} - Your attacks inflict Hadopelagic Pressure + Your attacks inflict [cbuff:CalamityMod/HadopelagicPressure] No positive life regen ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 040f049fb8..a3bcceedcc 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -91,7 +91,7 @@ DesertProwlerPants: { Tooltip: ''' {$Common.RogueCrit} - Grants immunity to {$BuffName.WindPushed} + Grants immunity to [cbuffplr:WindPushed] ''' } From 051e8eb807647861683d72e00fab5e1fcac38081 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Feb 2026 21:25:05 -0500 Subject: [PATCH 031/346] Buff tags on a bunch of weapons Added buff tag tips for several buffs that were missing it Fixed Frostbite listing the wrong enemy DoT --- Items/CalamityGlobalItemTooltip.cs | 3 +- .../en-US/Mods.CalamityMod.Buffs.hjson | 8 +- ...ods.CalamityMod.Items.Armor.Hardmode.hjson | 2 +- .../Mods.CalamityMod.Items.Fishing.hjson | 6 +- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 65 ++++++------ ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 54 +++++----- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 84 ++++++++-------- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 98 +++++++++---------- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 22 ++--- ...s.CalamityMod.Items.Weapons.Typeless.hjson | 2 +- Localization/en-US/Mods.Terraria.Buffs.hjson | 4 +- 11 files changed, 186 insertions(+), 162 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 26dd79a6ff..9a29265148 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -290,7 +290,8 @@ namespace CalamityMod.Items { if (snippet is BuffTagEnemyEffectHandler.Snippet enemy) { - buffIdsInTooltip.Add(enemy.BuffId, 0); + if (!buffIdsInTooltip.ContainsKey(enemy.BuffId)) + buffIdsInTooltip.Add(enemy.BuffId, 0); } else if (snippet is BuffTagPlayerEffectHandler.Snippet player) { diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index fe898e6c73..cdffbaf6e4 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -308,6 +308,7 @@ SearingLava: { ShellfishClaps: { DisplayName: Shellfish Claps Description: Clamfest + ItemTooltipEnemy: Typeless - 75 DPS for each Shellfish minion } Shred: { @@ -319,6 +320,7 @@ Shred: { SnapClamDebuff: { DisplayName: Clammed Description: Clapped by Snap Clams + ItemTooltipEnemy: Typeless - 7.5 DPS for each latched clam } StaticDischarge: { @@ -787,6 +789,7 @@ AeolianEarthBuff: { You are strengthened by primordial powers Damage reduction increased by {0}%, damage increased by {1}%, and massively buffed mana regen ''' + ItemTooltipPlayer: Increases damage, damage reduction, and mana regeneration } Afflicted: { @@ -853,6 +856,7 @@ ChiRegenBuff: { CoralSymbiosis: { DisplayName: Coral Symbiosis Description: Coral Spout charges up faster and deals {0} extra damage + ItemTooltipPlayer: Increases Coral Spout's charge rate and damage } CosmicFreeze: { @@ -1001,6 +1005,7 @@ SandsWindBuff: { You are strengthened by the powers of sand Defense increased by {0}, damage increased by {1}%, and greatly buffed mana regen ''' + ItemTooltipPlayer: Increases damage, defense, and mana regeneration } SilvaRevival: { @@ -1160,7 +1165,7 @@ ProfanedWeakness: { TemporalSadness: { DisplayName: Temporal Sadness Description: You are crying - ItemTooltipEnemy: Freezes enemies + ItemTooltipEnemy: Slows enemies } TimeDistortion: { @@ -1193,6 +1198,7 @@ WitherDebuff: { Withered... Defense decreased by {0} ''' + ItemTooltipPlayer: Decreases defense } // Summons diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index e4105c7021..53dfc279cd 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -346,7 +346,7 @@ MolluskShellmet: { SetBonus: ''' {0}% increased damage reduction - Two shellfishes aid you in combat + Two shellfishes aid you in combat, inflicting [cbuff:CalamityMod/ShellfishClaps] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 44d944cf2c..9875d18c4d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -46,8 +46,8 @@ UrsaSergeant: { DisplayName: Ursa Sergeant Tooltip: ''' - Attacks maul enemies with astral claw swipes - Taking damage reduces the cooldown, but inflicts you with {$Buffs.AstralInfectionDebuff.DisplayName} + Attacks maul enemies with astral claw swipes that inflict [cbuff:CalamityMod/AstralInfectionDebuff] + Taking damage reduces the cooldown, but inflicts you with [cbuffplr:CalamityMod/AstralInfectionDebuff] Enemy kills also reduce the cooldown Swipes will be translucent and silent if visibility is disabled ''' @@ -336,7 +336,7 @@ NavyFishingRod: { DisplayName: Navy Fishing Rod Tooltip: ''' - Fires bobbers that inflict Static Discharge on nearby enemies + Fires bobbers that inflict [cbuff:CalamityMod/StaticDischarge] on nearby enemies 'The sea is a city. Just below are highways, boulevards, streets, and roundabouts bustling with submarine traffic.' ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 5dea70d776..e25db9b537 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -22,7 +22,7 @@ AethersWhisper: { DisplayName: Aether's Whisper Tooltip: ''' - Inflicts long-lasting shadowflame and splits on tile hits + Inflicts long-lasting [cbuff:CalamityMod/Shadowflame] and splits on tile hits Projectiles gain damage as they travel ''' } @@ -161,21 +161,21 @@ BlackAnurian: { BloodBath: { DisplayName: Blood Bath - Tooltip: Drenches your foes in blood + Tooltip: Drenches your foes in blood that inflicts [cbuff:CalamityMod/BurningBlood] } BrimroseStaff: { DisplayName: Brimrose Staff - Tooltip: Fires a spread of brimstone beams + Tooltip: Fires a spread of splitting beams of [cbuff:CalamityMod/BrimstoneFlames] } BurningSea: { DisplayName: Burning Sea Tooltip: ''' - Conjures a massive brimstone fireball that hovers near you and incinerates foes + Conjures a massive fireball that hovers near you and incinerates foes with [cbuff:CalamityMod/BrimstoneFlames] Holding the fireball for too long causes it to burn out - This burns you with Brimstone Flames and gives a long delay before another can be cast + This burns you with [cbuffplr:CalamityMod/BrimstoneFlames] and gives a long delay before another can be cast ''' } @@ -204,7 +204,7 @@ CoralSpout: { Keep the attack button held down to narrow the spread 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 a buff that increases the coral's damage and the convergence speed + The mana-charged coral also provides the [cbuffplr:CalamityMod/CoralSymbiosis] buff [c/5C95A1:'Knowledge is important, and the Old Sea Kingdom's many scribes knew it had to be preserved at any cost.] [c/5C95A1:Their libraries were much larger than most, because of the water-proof stone tablets occupying them.'] ''' @@ -238,8 +238,8 @@ DeathValleyDuster: { Tooltip: ''' Casts an enchanted blast of sand that passes through enemies and tiles - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the Sand's Wind Buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/SandsWindBuff] buff + [cbuffplr:CalamityMod/SandsWindBuff] increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } @@ -298,7 +298,7 @@ EventHorizon: { EvergladeSpray: { DisplayName: Everglade Spray - Tooltip: Fires a stream of burning green ichor + Tooltip: Fires a stream of [cbuff:CursedInferno] and [cbuff:Ichor] } FaceMelter: { @@ -511,7 +511,7 @@ MadAlchemistsCocktailGlove: { Tooltip: ''' Fires a variety of high-velocity flasks - Press to throw a prismatic flask that inflicts Elemental Mix + Press to throw a prismatic flask that inflicts [cbuff:CalamityMod/ElementalMix] Red flasks explode violently Blue flasks contain poison gas Green flasks summon lunar flares @@ -592,7 +592,11 @@ Omicron: { ParasiticSceptor: { DisplayName: Parasitic Scepter - Tooltip: Fires a spread of radioactive water leeches that latch onto enemies, increasing damage over time per leech + Tooltip: + ''' + Fires a spread of radioactive water leeches that latch onto enemies + Deals stacking [cbuff:CalamityMod/Irradiated] damage over time per leech + ''' } PhantasmalFury: { @@ -604,7 +608,7 @@ PhoenixFlameBarrage: { DisplayName: Phoenix Flame Barrage Tooltip: ''' - Casts a barrage of fire from the sky + Casts a barrage of [cbuff:CalamityMod/Dragonfire] from the sky 'Baptism by draconic fire' ''' } @@ -616,7 +620,7 @@ Photosynthesis: { PlagueStaff: { DisplayName: Plague Staff - Tooltip: Fires a tight spread of 4 plague fangs + Tooltip: Fires a tight spread of 4 plague fangs that inflict [cbuff:CalamityMod/Plague] } PlasmaRifle: { @@ -634,7 +638,7 @@ PlasmaRod: { ''' Casts a low-damage plasma bolt Shooting a tile will cause several bolts with increased damage to fire - Shooting an enemy will inflict shadowflame + Shooting an enemy will inflict [cbuff:CalamityMod/Shadowflame] ''' } @@ -648,8 +652,8 @@ PrimordialAncient: { Tooltip: ''' Casts five primordial sand blasts that converge at your cursor after a moment and create a giant explosion - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.AeolianEarthBuff.DisplayName} buff - The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}%, damage by {1}%, and massively buffs mana regen + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/AeolianEarthBuff] buff + [cbuffplr:CalamityMod/AeolianEarthBuff] increases your damage reduction by {0}%, damage by {1}%, and massively buffs mana regen ''' } @@ -658,8 +662,8 @@ PrimordialEarth: { Tooltip: ''' Casts two enchanted blasts of sand that coverge with each other and explode - Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.SandsWindBuff.DisplayName} buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen + Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the [cbuffplr:CalamityMod/SandsWindBuff] buff + [cbuffplr:CalamityMod/SandsWindBuff] increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } @@ -709,7 +713,7 @@ RelicofRuin: { RougeSlash: { DisplayName: Rouge Slash - Tooltip: Fires a wave of 3 rouge air slashes + Tooltip: Fires a wave of 3 rouge air slashes that inflict [cbuff:CalamityMod/VermillionFlux] } SandstreamScepter: { @@ -821,7 +825,11 @@ SnowstormStaff: { SoulPiercer: { DisplayName: Soul Piercer - Tooltip: Casts a powerful ray that summons extra rays on its first hit + Tooltip: + ''' + Casts a powerful ray that summons extra rays on its first hit + Inflicts [cbuff:CalamityMod/GodSlayerInferno] + ''' } StaffofBlushie: { @@ -831,7 +839,7 @@ StaffofBlushie: { StarShower: { DisplayName: Star Shower - Tooltip: Casts a spread of astral stars from the sky that converge at the cursor + Tooltip: Casts a spread of astral stars from the sky that converge at the cursor and inflict [cbuff:CalamityMod/AstralInfectionDebuff] } SubsumingVortex: { @@ -843,6 +851,7 @@ SubsumingVortex: { When enemies are near the vortex, it sends multiple fast-moving smaller vortices towards them Releasing fires the vortex towards the mouse if enough time has passed Damage scales based on how long the vortex was held out + Inflicts [cbuff:CalamityMod/MiracleBlight] ''' } @@ -859,7 +868,7 @@ TacticiansTrumpCard: { DisplayName: Tactician's Trump Card Tooltip: ''' - Fires a sword beam that electrifies enemies on hit + Fires a sword beam that inflicts [cbuff:Electrified] on hit 'Faint memories of a Princess from the future cross your mind...' ''' } @@ -961,8 +970,8 @@ UnstableCastersGauntlet: { ''' [c/DBD7CA:Ordo] sigils always land critical strikes [c/ABB6D4:Perdito] sigils ignore 25 points of enemy defense - [c/E89B8E:Ignis] sigils inflict Daybroken - [c/8ECBE8:Aqua] sigils inflict Crush Depth + [c/E89B8E:Ignis] sigils inflict [cbuff:CalamityMod/Daybroken] + [c/8ECBE8:Aqua] sigils inflict [cbuff:CalamityMod/CrushDepth] [c/E1E88E:Aer] sigils boast substantial knockback [c/ACCF9F:Terra] sigils split into sharp rocks ''' @@ -1017,8 +1026,8 @@ VitriolicViper: { DisplayName: Vitriolic Viper Tooltip: ''' - Charges up and fires a slithering beam of radiation - If fully charged, instead fires a huge spread of short range fangs which quickly vanish + Charges up and fires a slithering [cbuff:CalamityMod/Irradiated] beam + If fully charged, instead fires a huge spread of short range fangs which inflict [cbuff:CalamityMod/SulphuricPoisoning] ''' } @@ -1027,8 +1036,8 @@ VividClarity: { Tooltip: ''' Fires five randomized rays of exo-energy towards the cursor - On enemy and tile hits, beams either explode into a big flash, - summon an additonal laser from the sky, or split into energy orbs + Enemy and tile hits either cause a big flash explosion, an additional laser from the sky, or split into energy orbs + Inflicts [cbuff:CalamityMod/MiracleBlight] 'Its majesty inspires a stroke of unparalleled genius' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index b09762dda7..5cc321e052 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -168,7 +168,7 @@ Basher: { DisplayName: Basher Tooltip: ''' - Swings a rotten club that poisons and irradiates enemies on hit + Swings a rotten club that inflicts [cbuff:Poisoned] and [cbuff:CalamityMod/Irradiated] on hit Holding while swinging will increase the club's damage, but will also knock you back on hit ''' } @@ -195,7 +195,11 @@ BlightedCleaver: { Bonebreaker: { DisplayName: Bonebreaker - Tooltip: Fires javelins that stick to enemies before bursting into shrapnel + Tooltip: + ''' + Fires javelins that stick to enemies before bursting into shrapnel + Javelins cause [cbuff:CalamityMod/HeavyBleeding], [cbuff:Venom], and [cbuff:CalamityMod/ArmorCrunch] + ''' } BotanicPiercer: { @@ -270,7 +274,7 @@ Carnage: { CelestialClaymore: { DisplayName: Celestial Claymore - Tooltip: Spawns cosmic energy stars near the cursor that inflict several debuffs + Tooltip: Spawns cosmic energy stars near the cursor that inflict [cbuff:Frostburn2], [cbuff:OnFire3], or [cbuff:Ichor] } ClamCrusher: { @@ -291,8 +295,8 @@ CosmicDischarge: { DisplayName: Cosmic Discharge Tooltip: ''' - Striking an enemy with the whip causes glacial explosions and grants the player the cosmic freeze buff - This buff gives the player +2 HP/s life regen while standing still and freezes enemies near the player + Striking an enemy with the whip causes glacial explosions and grants the player the [cbuffplr:CalamityMod/CosmicFreeze] buff + [cbuffplr:CalamityMod/CosmicFreeze] gives the player +2 HP/s life regen while standing still and freezes enemies near the player ''' } @@ -404,7 +408,7 @@ DragonRage: { DisplayName: Dragon Rage Tooltip: ''' - Twirls a baton that causes explosions on enemy hits + Twirls a baton that causes explosions of [cbuff:CalamityMod/Dragonfire] on enemy hits Every ten hits will summon a ring of fireballs ''' } @@ -420,7 +424,7 @@ Earth: { ''' A beautiful prismatic blade with unrivaled close combat proficiency Heals you greatly on hit - Every other swing will summon three Gaia meteors to fall upon nearby enemies + Every other swing will summon three Gaia meteors to annihilate nearby enemies with [cbuff:CalamityMod/MiracleBlight] 'All Its spawn shall know the beauty and wrath of their creator' ''' } @@ -430,7 +434,7 @@ EarthenPike: { Tooltip: ''' Sprays fossil shards on swing - Crushes enemy defenses + Inflicts [cbuff:CalamityMod/ArmorCrunch] ''' } @@ -495,6 +499,7 @@ Exoblade: { Enemy hits from the blade during the dash result in massive damage and a rebound Press immediately after a rebound to perform a powerful slash Powerful slashes are larger, heal you, and create a large explosion + Inflicts [cbuff:CalamityMod/MiracleBlight] ''' } @@ -760,7 +765,7 @@ InsidiousImpaler: { DisplayName: Insidious Impaler Tooltip: ''' - Throws self-propelling radioactive harpoons which chase foes + Throws self-propelling radioactive harpoons which chase foes and cause [cbuff:CalamityMod/SulphuricPoisoning] Harpoons ricochet at close range for additional hits ''' } @@ -894,14 +899,14 @@ Murasama: { MycelialClaws: { DisplayName: Mycelial Claws - Tooltip: Grants the Mushy buff for 6 seconds on enemy hits + Tooltip: Grants the [cbuffplr:CalamityMod/Mushy] buff for 6 seconds on enemy hits } Nadir: { DisplayName: Nadir Tooltip: ''' - Fires void essences which flay nearby enemies with tentacles + Fires void essences which flay nearby enemies with [cbuff:CalamityMod/Nightwither] tentacles 'The abyss has stared back at you long enough. It now speaks, and it does not speak softly' ''' } @@ -931,7 +936,7 @@ Oblivion: { OldLordClaymore: { DisplayName: Old Lord Claymore - Tooltip: A slow but powerful blade that sets enemies ablaze and has substantial knockback + Tooltip: A slow but powerful blade that lights enemies with [cbuff:OnFire3] and has substantial knockback HoldShiftTooltip: ''' [c/df4420:A gift to outstanding Demons, a replica of the sword used by the greatest of all Demon Lords.] @@ -1012,7 +1017,7 @@ PhotonRipper: { DisplayName: Photon Ripper Tooltip: ''' - Projects a directed stream of hardlight teeth at ultra high velocity + Projects a directed stream of hardlight teeth at ultra high velocity which cause [cbuff:CalamityMod/MiracleBlight] This weapon and its projectiles function as a chainsaw Press to use without chopping down trees ''' @@ -1060,7 +1065,8 @@ RemsRevenge: { DisplayName: Rem's Revenge Tooltip: ''' - Summons blood explosions and lowers enemy defense by {0} on hit + Summons blood explosions and inflicts [cbuff:CalamityMod/WitherDebuff] on hit + [cbuff:CalamityMod/WitherDebuff] lowers enemy defense by {0} 'A deadly morning star befitting its demonic owner' ''' } @@ -1110,7 +1116,7 @@ SaharaSlicers: { SausageMaker: { DisplayName: Sausage Maker - Tooltip: Sprays homing blood on hit + Tooltip: Sprays homing blood and causes [cbuff:CalamityMod/BurningBlood] on hit } ScourgeoftheCosmos: { @@ -1163,7 +1169,7 @@ SolsticeClaymore: { Tooltip: ''' Changes projectile color based on the time of year - Inflicts daybroken during the day and nightwither during the night + Inflicts [cbuff:CalamityMod/Daybroken] during the day and [cbuff:CalamityMod/Nightwither] during the night ''' } @@ -1172,7 +1178,7 @@ SoulHarvester: { Tooltip: ''' Shoots a soul scythe - Enemies explode when on low health, spreading the plague + Enemies explode when on low health, spreading the [cbuff:CalamityMod/Plague] ''' } @@ -1272,12 +1278,12 @@ Swordsplosion: { TaintedBlade: { DisplayName: Tainted Blade - Tooltip: Inflicts poison on enemy hits + Tooltip: Inflicts [cbuff:Poisoned] on enemy hits } TeardropCleaver: { DisplayName: Teardrop Cleaver - Tooltip: Makes your enemies cry + Tooltip: Gives your enemies [cbuff:CalamityMod/TemporalSadness] } TenebreusTides: { @@ -1314,7 +1320,7 @@ TheBurningSky: { DisplayName: The Burning Sky Tooltip: ''' - Rains down a stream of draconic fire at the cursor + Rains down a stream of [cbuff:CalamityMod/Dragonfire] at the cursor 'Hold the blade to the sky, and witness Armageddon' ''' } @@ -1383,7 +1389,7 @@ TheOracle: { Tooltip: ''' {$Common.YoyoStatsInfinite} - Emits an aura of lightning which charges up when hitting enemies + Emits an aura of [cbuff:CalamityMod/AuricRebuke] lightning which charges up when hitting enemies Fires auric orbs when supercharged 'Gaze into the past, the present, the future... and the circumstances of your inevitable demise' ''' @@ -1448,7 +1454,7 @@ TrueCausticEdge: { Tooltip: ''' Fires a bouncing caustic beam - Inflicts acid venom and slows down on enemy hits + Inflicts [cbuff:Venom] and slows down on enemy hits ''' } @@ -1512,13 +1518,13 @@ Violence: { ''' A demonic pitchfork, cursed to cause endless bloodshed commands the trident to follow your cursor and shred enemies with devastating speed - throws the trident, violently tearing through enemies with immense power and inflicting Vulnerability Hex + throws the trident, violently tearing through enemies with immense power and inflicting [cbuff:CalamityMod/VulnerabilityHex] ''' } Virulence: { DisplayName: Virulence - Tooltip: Fires a plague cloud + Tooltip: Fires a [cbuff:CalamityMod/Plague] cloud } VoidEdge: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 802cf460ba..f272922918 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -33,7 +33,7 @@ AngelicShotgun: { DisplayName: Angelic Shotgun Tooltip: ''' - Each shot casts a radiant beam of holy light from the sky + Each shot casts a radiant beam of [cbuff:CalamityMod/HolyFlames] from the sky Musket balls convert into hallow-point rounds which also empower the beam 'Fighting 'til the war's won' ''' @@ -45,8 +45,8 @@ Animosity: { Tooltip: "[GFB]" TooltipNormal: ''' - Fires a shotgun blast with a tight spread which is imbued with Brimstone Flames - Press to fire a powerful brimstone round that inflicts Whispering Death + Fires a shotgun blast with a tight spread which is imbued with [cbuff:CalamityMod/BrimstoneFlames] + Press to fire a powerful brimstone round that inflicts [cbuff:CalamityMod/WhisperingDeath] ''' TooltipGFB: ''' @@ -127,7 +127,7 @@ Auralis: { DisplayName: Auralis Tooltip: ''' - Fires a high speed glowing bullet that reduces enemy protection + Fires a high speed glowing bullet that inflicts [cbuff:CalamityMod/MarkedforDeath] Press to zoom out Standing still provides increasing damage bonuses up to 25% Standing still for 5 or more seconds while using the scope ability will summon an aurora @@ -171,7 +171,7 @@ BlightSpewer: { DisplayName: Blight Spewer Tooltip: ''' - Fires clouds of plague nanomachines that stick to tiles + Fires clouds of [cbuff:CalamityMod/Plague] nanomachines that stick to tiles Nanomachines aggressively lock onto nearby enemies {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -182,7 +182,7 @@ BlissfulBombardier: { Tooltip: ''' Launches a crystalline missile high into the sky, raining holy fire on the cursor - The missile relentlessly seeks out a target before bursting into a massive explosion + The missile relentlessly seeks out a target before bursting into a massive [cbuff:CalamityMod/HolyFlames] explosion ''' } @@ -236,7 +236,7 @@ Buzzkill: { Tooltip: ''' Hold to rev up a buzzsaw that deals close-range damage - Release to fire the buzzsaw, which bounces off tiles and lacerates foes + Release to fire the buzzsaw, which bounces off tiles and causes [cbuff:CalamityMod/HeavyBleeding] in foes Revving up the saws increases their damage and allows them to pierce more enemies 'Not to be confused with the Sawed-On Shotgun' ''' @@ -244,7 +244,7 @@ Buzzkill: { ChickenCannon: { DisplayName: Chicken Cannon - Tooltip: Fires chicken flares which create enormous incendiary explosions + Tooltip: Fires chicken flares which create enormous incendiary explosions of [cbuff:CalamityMod/Dragonfire] } ChromaticEruption: { @@ -266,7 +266,7 @@ CleansingBlaze: { DisplayName: Cleansing Blaze Tooltip: ''' - Unleashes a torrent of flames which can pass through tiles + Unleashes a torrent of [cbuff:CalamityMod/GodSlayerInferno] flames which can pass through tiles Uses gel for ammo ''' } @@ -328,7 +328,7 @@ CorinthPrime: { CorrodedCaustibow: { DisplayName: Corroded Caustibow - Tooltip: Converts wooden arrows into slow, powerful shells that trail an irradiated aura + Tooltip: Converts wooden arrows into slow, powerful shells that trail an [cbuff:CalamityMod/Irradiated] aura } CrackshotColt: { @@ -384,9 +384,9 @@ DragonsBreath: { DisplayName: Dragon's Breath Tooltip: ''' - Fires dragon fireballs at an accelerating pace + Fires [cbuff:CalamityMod/Dragonfire] fireballs at an accelerating pace Upon firing for long enough, you will begin using a cartridge of energy - While using a cartridge you will shoot a draconic beam of fire that doesn't consume ammo + While using a cartridge you will shoot a draconic beam of [cbuff:CalamityMod/Dragonfire] that doesn't consume ammo Once a cartridge has been ejected you will return to the original fire rate {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -416,7 +416,7 @@ EternalBlizzard: { Eviscerator: { DisplayName: Eviscerator - Tooltip: Converts musket balls into fast-moving blood clots + Tooltip: Converts musket balls into fast-moving blood clots that cause [cbuff:CalamityMod/BurningBlood] } FetidEmesis: { @@ -554,7 +554,7 @@ HavocsBreath: { DisplayName: Havoc's Breath Tooltip: ''' - Projects cone-shaped blasts of scorching brimstone fire + Projects cone-shaped blasts of scorching [cbuff:CalamityMod/BrimstoneFlames] Uses gel for ammo ''' } @@ -563,7 +563,7 @@ HeavenlyGale: { DisplayName: Heavenly Gale Tooltip: ''' - Fires a rapid stream of supercharged exo-crystals + Fires a rapid stream of supercharged exo-crystals that inflict [cbuff:CalamityMod/MiracleBlight] Holding the bow and waiting for some time before firing causes the crystals to become more powerful If the crystals are sufficiently powerful enough they will summon torrents of exo-lightning above whatever target they hit ''' @@ -603,7 +603,7 @@ Hydra: { DisplayName: Hydra Tooltip: ''' - Fires a spread of 4 toxic bullets + Fires a spread of 4 [cbuff:Venom] bullets 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 @@ -633,7 +633,7 @@ Kingsbane: { ''' After revving up, rapidly fire bullets When you stop firing you will release a barrage of auric bullets - Auric bullets aggressively home in on enemies and ignore 50 points of defense + Auric bullets aggressively home in on enemies, ignore 50 points of defense, and inflict [cbuff:CalamityMod/AuricRebuke] Constantly consumes ammo while in use {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -644,7 +644,7 @@ Leviatitan: { Tooltip: ''' Fires high velocity aqua blasts - Releases homing aberrations that shred enemy defense every six shots + Releases homing aberrations that cause [cbuff:CalamityMod/ArmorCrunch] every six shots to vomit a meteor that explodes on hit 'The L in LMG stands for Leviathan' ''' @@ -684,7 +684,7 @@ MagnomalyCannon: { DisplayName: Magnomaly Cannon Tooltip: ''' - Launches a powerful exo rocket to nuke anything and everything + Launches a powerful exo rocket to nuke anything and everything with [cbuff:CalamityMod/MiracleBlight] Rockets are surrounded by an invisible damaging aura and split into damaging beams on hit {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -695,7 +695,7 @@ Malevolence: { Tooltip: ''' Fires two arrows at once - Converts wooden arrows into plague arrows that explode into bees + Converts wooden arrows into [cbuff:CalamityMod/Plague] arrows that explode into bees ''' } @@ -885,14 +885,14 @@ PearlGod: { PestilentDefiler: { DisplayName: Pestilent Defiler - Tooltip: Converts musket balls into plague rounds that explode and split apart on hit + Tooltip: Converts musket balls into [cbuff:CalamityMod/Plague] rounds that explode and split apart on hit } Photoviscerator: { DisplayName: Photoviscerator Tooltip: ''' - Emits a continuous beam of exo radiation that disintegrates everything + Emits a continuous beam of [cbuff:CalamityMod/MiracleBlight] radiation that disintegrates everything Press to fire homing exo flares which stick to and incinerate enemies Uses gel for ammo The beam has a {0}% chance to save ammo @@ -903,7 +903,7 @@ PlagueTaintedSMG: { DisplayName: Plague Tainted SMG Tooltip: ''' - Shoots plague bullets that spawn drones on critical hits + Shoots [cbuff:CalamityMod/Plague] bullets that spawn drones on critical hits Bullets deal more damage and knockback the closer the enemy is Drones have a much higher crit chance upon hitting a plagued enemy Press to fire a drone swarm @@ -942,7 +942,7 @@ PridefulHuntersPlanarRipper: { Tooltip: ''' Every fourth shot deals 135% damage - Converts musket balls into lightning bolts + Converts musket balls into [cbuff:Electrified] lightning bolts Lightning bolts travel extremely fast and explode on enemy kills Lightning bolt crits grant a stacking speed boost to the player This stacks up to 20 percent bonus movement speed and acceleration @@ -955,7 +955,7 @@ PristineFury: { DisplayName: Pristine Fury Tooltip: ''' - Fires an intense helix of flames that burst into a column of smoke + Fires an intense helix of [cbuff:CalamityMod/HolyFlames] that burst into a column of smoke to disperse a limited supply of flammable crystalline powder that restores over time Powder can be ignited, causing it to explode for extra damage Both helix flames and other nearby explosions can ignite the powder @@ -1078,7 +1078,7 @@ SepticSkewer: { Tooltip: ''' Launches a vile chained harpoon infested with toxins - Harpoons stick into enemies and inflict Sulphuric Poisoning for a long time + Harpoons stick into enemies and inflict [cbuff:CalamityMod/SulphuricPoisoning] for a long time After being impaled for one second, harpoons rip themselves back out and spray damaging gores Press to manually rip out all harpoons, dealing bonus damage Enemies close to death are dragged back with returning harpoons and executed when they reach you @@ -1090,7 +1090,7 @@ Shadethrower: { DisplayName: Shadethrower Tooltip: ''' - Spits clouds of shade which afflict enemies with brain rot + Spits clouds of shade which afflict enemies with [cbuff:CalamityMod/BrainRot] Uses gel for ammo ''' } @@ -1151,10 +1151,10 @@ SomaPrime: { Tooltip: ''' This weapon can supercrit if its crit chance is over 100% - All bullets fired have a 5% chance to inflict Shred, a stacking bleed debuff - Critical strikes deal 3x damage instead of 2x by default and have a 30% chance to inflict Shred - Shred deals 600 DPS per stack and scales with your ranged stats - Damage ticks of Shred can critically strike for 3x damage and can supercrit + All bullets fired have a 5% chance to inflict [cbuff:CalamityMod/Shred], a stacking bleed debuff + Critical strikes deal 3x damage instead of 2x by default and have a 30% chance to inflict [cbuff:CalamityMod/Shred] + [cbuff:CalamityMod/Shred] deals 600 DPS per stack and scales with your ranged stats + Damage ticks of [cbuff:CalamityMod/Shred] can critically strike for 3x damage and can supercrit Replaces musket balls with enhanced High Velocity Bullets {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' @@ -1264,7 +1264,7 @@ SulphuricAcidCannon: { Tooltip: ''' Fires homing Acid Rockets - Acid Rockets stick to enemies and explode into toxic mist after a short delay + Acid Rockets stick to enemies and explode into [cbuff:CalamityMod/SulphuricPoisoning] mist after a short delay ''' } @@ -1280,6 +1280,7 @@ SuperradiantSlaughterer: { ''' Hold to rev up an elemental buzzsaw that deals close-range damage Release to fire the buzzsaw which bounces off tiles, releasing homing bolts when returning depending on hits + Buzzsaws inflict [cbuff:CalamityMod/ElementalMix] and [cbuff:CalamityMod/Laceration] Revving up the saw increases its damage and allows it to pierce more enemies ''' AltInfo: @@ -1335,7 +1336,7 @@ TelluricGlare: { TheBallista: { DisplayName: The Ballista - Tooltip: Converts wooden arrows into greatarrows that crush enemy armor and break into shards + Tooltip: Converts wooden arrows into greatarrows that cause [cbuff:CalamityMod/ArmorCrunch] and break into shards } TheBlunderbass: { @@ -1351,9 +1352,9 @@ TheHive: { DisplayName: The Hive Tooltip: ''' - Launches a wide spread of 4 missiles that explode on contact with enemies and tiles + Launches a wide spread of 4 [cbuff:CalamityMod/Plague] missiles that explode on contact with enemies and tiles Charging the launcher decreases the spread and increases the velocity of the missile barrage - Fully charging the launcher will cause it to fire a nuke to decimate a massive area on impact + Fully charging the launcher will cause it to fire a [cbuff:CalamityMod/Plague] nuke to decimate a massive area on impact ''' } @@ -1364,7 +1365,7 @@ TheJailor: { TheMaelstrom: { DisplayName: The Maelstrom - Tooltip: Fires charged Reaper Sharks that explode into water + Tooltip: Fires charged Reaper Sharks that cause [cbuff:CalamityMod/HadopelagicPressure] water explosions } ThePack: { @@ -1376,7 +1377,7 @@ ThermoclineBlaster: { DisplayName: Thermocline Blaster Tooltip: ''' - Alternates between firing bullets imbued with fire and ice + Alternates between firing bullets imbued with [cbuff:OnFire3] and [cbuff:Frostburn2] Any bullet type can be imbued when fired from this gun ''' } @@ -1426,7 +1427,7 @@ TitaniumRailgun: { Toxibow: { DisplayName: Toxibow - Tooltip: Converts wooden arrows into slow arrows that inflict irradiated + Tooltip: Converts wooden arrows into slow arrows that inflict [cbuff:CalamityMod/Irradiated] } TyrannysEnd: { @@ -1434,7 +1435,7 @@ TyrannysEnd: { Tooltip: ''' Converts musket balls into .70 caliber sniper rounds that deal devastating damage - Inflicts Marked for Death on enemy hits and bypasses defense + Inflicts [cbuff:CalamityMod/MarkedforDeath] on enemy hits and bypasses defense Critical hits summon a swarm of 6 additional bullets 'Pierce the heart of even the most heavily-armored foe' ''' @@ -1445,8 +1446,7 @@ Ultima: { Tooltip: ''' Casts a continuous stream of plasma bolts - Over time the bolts are replaced with powerful lasers - Bolts power up into solid beams as you continue shooting + Over time bolts power up into solid beams that inflict [cbuff:CalamityMod/ElementalMix] as you continue shooting {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' } @@ -1474,7 +1474,7 @@ Voidragon: { DisplayName: Voidragon Tooltip: ''' - Fires void blasts that explode every other shot + Fires [cbuff:CalamityMod/Voidfrost] blasts that explode every other shot Shoots demon flame tentacles alongside every shot Void blasts consume no ammo and bullets have a {0}% chance to save ammo ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 60550cf8cf..79545b4952 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -47,8 +47,8 @@ BallisticPoisonBomb: { DisplayName: Ballistic Poison Bomb Tooltip: ''' - Throws a sticky bomb that explodes into spikes and venomous clouds - Stealth strikes erupt into more clouds with a longer lasting venom + Throws a sticky bomb that explodes into spikes and [cbuff:Venom] clouds + Stealth strikes erupt into more clouds with a longer lasting [cbuff:Venom] ''' } @@ -107,7 +107,7 @@ BurningStrife: { DisplayName: Burning Strife Tooltip: ''' - Throws a shadowflame spiky ball that explodes into flames + Throws a [cbuff:CalamityMod/Shadowflame] spiky ball that explodes into flames Stealth strikes make the ball erupt into tentacles on hit 'Definitely not pocket safe' ''' @@ -157,7 +157,7 @@ ContaminatedBile: { DisplayName: Contaminated Bile Tooltip: ''' - Throws a flask of irradiated bile which shatters and lingers in a cloud + Throws a flask of [cbuff:CalamityMod/Irradiated] bile which shatters and lingers in a cloud Stealth strikes cause sulphuric bubbles to quickly rise from the cloud ''' } @@ -259,8 +259,8 @@ CursedDagger: { DisplayName: Cursed Dagger Tooltip: ''' - Throws a fast cursed dagger and two inaccurate weaker daggers - Stealth strikes throw a single dagger that bursts into a vortex of cursed flames + Throws a fast cursed dagger and two inaccurate weaker daggers that inflict [cbuff:CursedInferno] + Stealth strikes throw a single dagger that bursts into a [cbuff:CursedInferno] vortex ''' } @@ -278,7 +278,7 @@ DeepWounder: { DisplayName: Deep Wounder Tooltip: ''' - Throws an abyssal hatchet that inflicts Heavy Bleeding and Crush Depth to the enemies it hits + Throws an abyssal hatchet that inflicts [cbuff:CalamityMod/HeavyBleeding] and [cbuff:CalamityMod/CrushDepth] to the enemies it hits Stealth strikes cause the hatchet to stick to struck enemies, releasing a barrage of water projectiles Water projectiles launch at the closest enemy after a brief delay ''' @@ -299,7 +299,7 @@ DesecratedWater: { Tooltip: ''' Throws an unholy flask of water that explodes into an explosion of evil bubbles - Stealth strikes spawn additional bubbles that inflict Ichor and Cursed Inferno + Stealth strikes spawn additional bubbles that inflict [cbuff:Ichor] and [cbuff:CursedInferno] ''' } @@ -378,7 +378,7 @@ EpidemicShredder: { DisplayName: Epidemic Shredder Tooltip: ''' - Throws a plagued boomerang that releases plague seekers when it hits tiles or enemies + Throws a [cbuff:CalamityMod/Plague] boomerang that releases plague seekers when it hits tiles or enemies Stealth strikes cause the boomerang to release plague seekers constantly as it travels Contrary to its name, it will probably cause an epidemic if used incorrectly ''' @@ -388,7 +388,7 @@ Equanimity: { DisplayName: Equanimity Tooltip: ''' - Throws a confusing boomerang that ricochets between enemies + Throws a boomerang that ricochets between enemies and makes them [cbuff:Confused] Enemy hits alternate summoning homing light shards or piercing dark shards Stealth strikes cause an alternating explosion of light or dark on every ricochet, empowering the opposite color of shard ''' @@ -398,7 +398,7 @@ ExecutionersBlade: { DisplayName: Executioner's Blade Tooltip: ''' - Throws a stream of homing blades + Throws a stream of homing blades that inflict [cbuff:CalamityMod/GodSlayerInferno] Stealth strikes summon a guillotine of blades on hit ''' } @@ -477,7 +477,7 @@ GelDart: { DisplayName: Gel Dart Tooltip: ''' - Throws bouncing gel darts that cover struck enemies in slime + Throws bouncing gel darts that cover enemies in [cbuff:Slimed] Stealth strikes ignore gravity, bounce more vigorously, and constantly leak slime ''' } @@ -537,7 +537,7 @@ GraveGrimreaver: { Hurls a cursed scythe which homes in The scythe summons skulls as it flies and explodes into bats on hit Stealth strikes spawn a flood of bats and falling skulls when destroyed - Inflicts cursed flames and confusion + Inflicts [cbuff:CursedInferno] and [cbuff:Confused] 'A dapper skeleton's weapon of choice' ''' } @@ -593,7 +593,7 @@ IchorSpear: { DisplayName: Ichor Spear Tooltip: ''' - Throws a high-velocity ichor tipped javelin that pierces through enemies + Throws a high-velocity [cbuff:Ichor] tipped javelin that pierces through enemies Stealth strikes impale enemies and deal repeated damage ''' } @@ -612,7 +612,7 @@ InfestedClawmerang: { Tooltip: ''' Fires a slow, long-ranged boomerang - Stealth strikes grant the Mushy buff to the user on enemy hits and summon homing spores + Stealth strikes grant the [cbuffplr:CalamityMod/Mushy] buff to the user on enemy hits and summon homing spores ''' } @@ -629,9 +629,9 @@ JawsOfOblivion: { DisplayName: Jaws of Oblivion Tooltip: ''' - Throws a tight spread of six venomous reaper teeth that stick in enemies - This venom can stack when more teeth are stuck in an enemy - Stealth strikes cause the teeth to emit a crushing shockwave on impact + Throws a tight spread of six reaper teeth with [cbuff:Venom] that stick in enemies + The [cbuff:Venom] can stack when more teeth are stuck in an enemy + Stealth strikes cause the teeth to emit a crushing [cbuff:CalamityMod/HadopelagicPressure] shockwave on impact 'You're gonna need a bigger boat' ''' } @@ -688,8 +688,8 @@ Lionfish: { DisplayName: Lionfish Tooltip: ''' - Sticks to enemies and injects a potent venom - This venom can stack when more lionfish are stuck in an enemy + Sticks to enemies and injects a potent [cbuff:Venom] + The [cbuff:Venom] can stack when more lionfish are stuck in an enemy Stealth strikes spawn homing urchin spikes as they travel ''' } @@ -698,7 +698,7 @@ LunarKunai: { DisplayName: Lunar Kunai Tooltip: ''' - Throws out a set of three kunai that ignore gravity and slightly home in on enemies + Throws out a set of three kunai that ignore gravity and slightly home in on enemies, inflicting [cbuff:CalamityMod/Nightwither] After traveling enough distance, the kunai supercharge with lunar energy, homing in far more aggressively and exploding on impact Stealth strikes instantly throw ten supercharged Kunai ''' @@ -708,7 +708,7 @@ Malachite: { DisplayName: Malachite Tooltip: ''' - Throws a stream of kunai that stick to enemies and explode + Throws a stream of kunai that stick to enemies and explode into [cbuff:CalamityMod/Plague] Press to throw a single kunai that pierces, after piercing an enemy it emits a massive explosion on the next enemy hit Stealth strikes fire three kunai that home in, stick to enemies, and explode ''' @@ -773,13 +773,13 @@ Mycoroot: { ''' Fires a stream of short-range fungal roots Stealth strikes spawn an explosion of fungi spores - This grants you and nearby players on your team the Mushy buff for 15 seconds + This grants you and nearby players on your team the [cbuffplr:CalamityMod/Mushy] buff for 15 seconds ''' } MythrilKnife: { DisplayName: Mythril Knife - Tooltip: Stealth strikes are coated in deadly toxins, inflicting irradiated, poison, and acid venom + Tooltip: Stealth strikes are coated in deadly toxins, inflicting [cbuff:CalamityMod/Irradiated], [cbuff:Poisoned], and [cbuff:Venom] } NanoblackReaper: { @@ -847,7 +847,7 @@ Plaguenade: { DisplayName: Plaguenade Tooltip: ''' - Releases a swarm of angry plague bees + Releases a swarm of angry [cbuff:CalamityMod/Plague] bees Stealth strikes spawn more bees and generate a larger explosion ''' } @@ -975,8 +975,8 @@ ScourgeoftheSeas: { DisplayName: Scourge of the Seas Tooltip: ''' - Snaps apart into irradiated clouds upon striking an enemy - Stealth strikes irradiate for longer and are additionally coated with venomous toxins + Snaps apart into [cbuff:CalamityMod/Irradiated] clouds upon striking an enemy + Stealth strikes cause a longer [cbuff:CalamityMod/Irradiated] and are additionally coated with [cbuff:Venom] ''' } @@ -1068,8 +1068,8 @@ SnapClam: { DisplayName: Snap Clam Tooltip: ''' - Can latch on enemies and deal damage over time - Stealth strikes throw five clams at once that cause increased damage over time + Can latch on enemies and inflict [cbuff:CalamityMod/SnapClamDebuff] + Stealth strikes throw five clams at once ''' } @@ -1098,7 +1098,7 @@ SpentFuelContainer: { ''' Throws a fuel container with trace amounts of plutonium that causes a nuclear explosion The explosion does not occur if there are no tiles below it - Stealth strikes leave a lingering irradiated zone after the explosion dissipates + Stealth strikes leave a lingering [cbuff:CalamityMod/Irradiated] zone after the explosion dissipates 'War Never Changes' ''' } @@ -1107,7 +1107,7 @@ SporeKnife: { DisplayName: Spore Knife Tooltip: ''' - Throws an overgrown dagger that bursts into a cloud of poisonous spores + Throws an overgrown dagger that bursts into a cloud of [cbuff:Poisoned] spores Stealth strikes erupt into hungry homing buds that stick to enemies and gnaw them ''' } @@ -1137,7 +1137,7 @@ StormfrontRazor: { DisplayName: Stormfront Razor Tooltip: ''' - Throws a knife that summons lightning on hit + Throws a knife that summons [cbuff:CalamityMod/StaticDischarge] lightning on hit Stealth strikes cause the knife to be faster and summon multiple lightning bolts on hit [c/24C7F0:'Strike and stem the flow'] ''' @@ -1158,7 +1158,7 @@ Supernova: { ''' Tosses a smart bomb that locks onto and tracks targets If no target is found it will return to you - Each bomb creates a miniature supernova that drags in weak enemies and chases strong enemies + Each bomb creates a miniature [cbuff:CalamityMod/MiracleBlight] supernova that drags in weak enemies and chases strong enemies Stealth strikes create a blast that shakes the foundations of reality itself ''' } @@ -1206,10 +1206,10 @@ TheOldReaper: { DisplayName: The Old Reaper Tooltip: ''' - Throws an irradiated scythe that cuts through enemies + Throws a [cbuff:CalamityMod/SulphuricPoisoning] scythe that cuts through enemies Deposits unstable isotopes on hit, which create delayed nuclear explosions when they decay Stealth strikes are thrown into the sky and fall upon enemies a few seconds later - On hit, stealth strikes create a focused deluge of acid rain + On hit, stealth strikes create a focused deluge of [cbuff:CalamityMod/SulphuricPoisoning] acid rain ''' } @@ -1218,8 +1218,8 @@ TheSyringe: { Tooltip: ''' Throws a high velocity syringe that increases damage as it travels - Shatters into glass and plague cinders on impact - Stealth strikes also shatter into plague bees + Shatters into glass and [cbuff:CalamityMod/Plague] cinders on impact + Stealth strikes also shatter into [cbuff:CalamityMod/Plague] bees 'I'm pretty sure this isn't healthy' ''' } @@ -1237,7 +1237,7 @@ TimeBolt: { DisplayName: Time Bolt Tooltip: ''' - Throws a temporal knife that distorts time around enemies + Throws a temporal knife that causes [cbuff:CalamityMod/TimeDistortion] around enemies Stealth strikes can hit more enemies and create a larger time field 'There should be no boundary to human endeavor' ''' @@ -1258,7 +1258,7 @@ TotalityBreakers: { Tooltip: ''' Explodes into highly flammable black tar - Black tar oils enemies and sets them alight + Black tar makes enemies [cbuff:Oiled] and lights them with [cbuff:OnFire3] Stealth strikes leak black tar as they fly 'I need a bigger breaker' ''' @@ -1268,8 +1268,8 @@ ToxicantTwister: { DisplayName: Toxicant Twister Tooltip: ''' - Throws a fan of four spinning disks that swirl around your cursor - Stealth strikes swirl in a wider range and create a vortex of toxic raindrops that home in on enemies + Throws a fan of four spinning disks that swirl around your cursor and inflict [cbuff:CalamityMod/SulphuricPoisoning] + Stealth strikes swirl in a wider range and create a vortex of [cbuff:CalamityMod/SulphuricPoisoning] raindrops that home in on enemies ''' } @@ -1287,7 +1287,7 @@ TwistingThunder: { DisplayName: Twisting Thunder Tooltip: ''' - Fires a lightning bolt to electrocute enemies + Fires an [cbuff:Electrified] lightning bolt to electrocute enemies The lightning bolt travels faster while it is raining Summons lightning from the sky on impact Stealth strikes summon more lightning and travel faster @@ -1298,9 +1298,9 @@ UrchinStinger: { DisplayName: Urchin Stinger Tooltip: ''' - Sticks into enemies and injects an extremely potent poison - Stealth strikes stick into and poison enemies for longer - Sticking seven stingers in an enemy with a stealth strike stuck in it spawns an irradiated blast + Sticks into enemies and injects an extremely potent [cbuff:Poisoned] effect + Stealth strikes stick into and make enemies [cbuff:Poisoned] for longer + Sticking seven stingers in an enemy with a stealth strike stuck in it spawns an [cbuff:CalamityMod/Irradiated] blast ''' } @@ -1308,8 +1308,8 @@ UtensilPoker: { DisplayName: Utensil Poker Tooltip: ''' - Fires utensils in bursts of three - Stealth strikes replace any utensil with a powerful butcher knife + Fires utensils in bursts of three that cause [cbuff:CalamityMod/HeavyBleeding] + Stealth strikes replace any utensil with a powerful butcher knife that causes [cbuff:CalamityMod/Laceration] 'Space chickens, that is all' ''' } @@ -1349,7 +1349,7 @@ WebBall: { DisplayName: Web Ball Tooltip: ''' - Throws a web-covered ball that covers enemies in cobwebs to slow them down + Throws a web-covered ball that gets enemies [cbuff:Webbed] and slows them down Stealth strikes slow enemies down longer ''' } @@ -1370,7 +1370,7 @@ Wrathwing: { DisplayName: Wrathwing Tooltip: ''' - Throws an agile, homing winged spear that constantly spits fire + Throws an agile, homing winged spear of [cbuff:CalamityMod/Dragonfire] that constantly spits fire Stealth strikes create an eruption of cinders on hit ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index a30008cd9d..b643f107d9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -73,7 +73,7 @@ AtlasMunitionsBeacon: { BelladonnaSpiritStaff: { DisplayName: Belladonna Spirit Staff - Tooltip: Summons a cute forest spirit that flings magical toxic petals + Tooltip: Summons a cute forest spirit that flings magical [cbuff:Poisoned] petals } BlackHawkRemote: { @@ -91,7 +91,7 @@ BorealisBomber: { Tooltip: ''' Summons aureus bombers to chase down your enemies - Aureus bombers explode violently on enemy impact + Aureus bombers explode violently on enemy impact, inflicting [cbuff:CalamityMod/AstralInfectionDebuff] Does not consume minion slots ''' } @@ -205,7 +205,7 @@ CosmicImmaterializer: { Tooltip: ''' Summons a cosmic energy spiral to fight for you - The orb will fire swarms of homing energy bolts when enemies are detected by it + The orb will fire swarms of homing energy bolts that cause [cbuff:CalamityMod/MiracleBlight] Requires 10 minion slots to use and there can only be one energy spiral ''' } @@ -292,7 +292,7 @@ DormantBrimseeker: { ''' Summons a brimseeker to keep you company Firing another brimseeker when all minion slots are filled summons a brimstone aura - The aura empowers your brimseeker summons and produces damaging fireballs + The aura empowers your brimseeker summons and produces damaging [cbuff:CalamityMod/BrimstoneFlames] fireballs Only one aura can persist at a time You could've sworn that they turned even scarier when you looked at their reflections in a mirror ''' @@ -401,7 +401,7 @@ FlowersOfMortality: { DisplayName: Flowers of Mortality Tooltip: ''' - Summons five rainbow flowers over your head + Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] The combined flowers consume three minion slots ''' } @@ -514,7 +514,7 @@ InfectedRemote: { Summons a humanoid-hybrid Plaguebringer, codenamed 'Virili', to aid you in battle Virili requires 3 minion slots to summon, and can only be summoned once Virili uses a variety of attacks which she cycles through on a timer - All attacks spread the plague, as was her original design intention + All attacks spread the [cbuff:CalamityMod/Plague], as was her original design intention 'There's a single label on the back: [c/1FFBFF:WARNING: Subject is extremely corrosive and contagious. Avoid direct contact.'] ''' @@ -599,7 +599,7 @@ OrthoceraShell: { Tooltip: ''' {$CommonItemTooltip.Sentry} - Summons a flying orthocera to spit acid streams at your enemies + Summons a flying orthocera to spit [cbuff:CalamityMod/Irradiated] and [cbuff:Venom] streams at your enemies ''' } @@ -652,7 +652,7 @@ RustyBeaconPrototype: { Tooltip: ''' {$CommonItemTooltip.Sentry} - Summons a long-abandoned drone that passively emits irradiated waves + Summons a long-abandoned drone that passively emits [cbuff:CalamityMod/Irradiated] waves ''' } @@ -662,7 +662,7 @@ SanctifiedSpark: { ''' {$CommonItemTooltip.Sentry} Summons a friendly immolator that will float towards you - Immolators rapidly fire homing flares at nearby enemies, before continuing to float near you again + Immolators rapidly fire homing flares of [cbuff:CalamityMod/HolyFlames] at nearby enemies, before continuing to float near you again After firing, Immolators will fire one healing bolt at you for every 4 summon slots you have 'They might be a bit clingy, but at least they're warm' ''' @@ -704,7 +704,7 @@ ShellfishStaff: { DisplayName: Shellfish Staff Tooltip: ''' - Summons a shellfish to fight for you + Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] Each shellfish takes 2 minion slots ''' } @@ -920,7 +920,7 @@ WitherBlossomsStaff: { DisplayName: Wither Blossoms Staff Tooltip: ''' - Summons four decaying flowers over your head + Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head The combined flowers consume two minion slots ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson index 2032f07136..a93cf238be 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Typeless.hjson @@ -2,7 +2,7 @@ Aestheticus: { DisplayName: Aestheticus Tooltip: ''' - Fires crystals that explode and slow enemies down + Fires crystals that explode and inflict [cbuff:CalamityMod/Vaporfied] This weapon scales with all your damage stats at once ''' } diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index 21ca4bf66c..15b85127e0 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -12,7 +12,7 @@ CursedInferno: { Frostburn2: { ItemTooltipPlayer: Cold - 8 DPS - ItemTooltipEnemy: Cold - 50 DPS + ItemTooltipEnemy: Cold - 25 DPS } // Frostburn deals the same damage to players and enemies @@ -39,6 +39,8 @@ Poisoned.ItemTooltipEnemy: Sickness - 6 DPS PotionSickness.ItemTooltipPlayer: "" Slimed.ItemTooltipEnemy: Enhances Heat debuff damage Wet.ItemTooltipEnemy: Enhances Electric debuff damage +Confused.ItemTooltipEnemy: Reverses movement +Webbed.ItemTooltipEnemy: Slows enemies Electrified: { ItemTooltipPlayer: Electric - 4 DPS. Deals 5x damage to moving players From 92cd0a7a9582f917886a5ed274f881e5d2cfb39a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 3 Mar 2026 23:37:35 -0600 Subject: [PATCH 032/346] some DD source changes --- CalPlayer/CalamityPlayerHitHurt.cs | 4 +- NPCs/DevourerofGods/DevourerofGodsBody.cs | 1 + .../Boss/BrainOfCthulhu/BloodScythe.cs | 1 + .../BrainOfCthulhu/TelekineticEnemyGrab.cs | 1 + Projectiles/CalamityGlobalProjectileTweaks.cs | 43 +++++++++++++++---- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 5fc1264631..b38406624c 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1888,8 +1888,8 @@ namespace CalamityMod.CalPlayer CombatText.NewText(location, Color.LightBlue, Language.GetTextValue(shieldDamageText)); // Give the player iframes for taking a shield hit, regardless of whether or not the shields broke. - int shieldHitIFrames = Player.ComputeHitIFrames(info); - Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); + //int shieldHitIFrames = Player.ComputeHitIFrames(info); + //Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); // Spawn particles when hit with the shields up, regardless of whether or not the shields broke. // More particles spawn if a shield broke. diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 96898e2192..052bd98c2d 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -83,6 +83,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.boss = true; NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.dontCountMe = true; + NPC.Calamity().canBreakPlayerDefense = true; if (Main.zenithWorld) NPC.scale *= 1.5f; diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs index c956e3bf77..93eef1ad99 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs @@ -44,6 +44,7 @@ public class BloodScythe : ModProjectile, ILocalizedModType Projectile.damage = 10; Projectile.scale = 0.1f; Projectile.hostile = true; + Projectile.Calamity().DealsDefenseDamage = true; } public override void OnSpawn(IEntitySource source) diff --git a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs index 8e6996e16b..961f091fb3 100644 --- a/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs +++ b/Projectiles/Boss/BrainOfCthulhu/TelekineticEnemyGrab.cs @@ -46,6 +46,7 @@ public class TelekineticEnemyGrab : ModProjectile, ILocalizedModType Projectile.hostile = true; if(NPC.crimsonBoss != -1) MyTarget = Main.npc[NPC.crimsonBoss].target; + Projectile.Calamity().DealsDefenseDamage = true; } public override void OnSpawn(IEntitySource source) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index e906bedf4b..38d739208f 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -249,18 +249,45 @@ namespace CalamityMod.Projectiles #endregion #region CATEGORY 4: Defense Damage support - { ProjectileID.Cthulunado, defenseDamage }, // Duke Fishron's larger Sharknados - { ProjectileID.DD2BetsyFlameBreath, defenseDamage }, + + //Deerclops { ProjectileID.DeerclopsIceSpike, defenseDamage }, - { ProjectileID.FairyQueenSunDance, defenseDamage }, // Empress of Light's Sun Dance - { ProjectileID.FlamingScythe, defenseDamage }, // Pumpking orange spinning scythes - { ProjectileID.InfernoHostileBlast, defenseDamage }, // Diabolist inferno fork explosions - { ProjectileID.PaladinsHammerHostile, defenseDamage }, + { ProjectileID.DeerclopsRangedProjectile, defenseDamage }, + + //Skeletron Prime + { ProjectileID.BombSkeletronPrime, defenseDamage }, + { ProjectileID.RocketSkeleton, defenseDamage }, // Skeleton Commando rockets, reused by Rev+ Skeletron Prime + //Fishron + { ProjectileID.Cthulunado, defenseDamage }, + { ProjectileID.Sharknado, defenseDamage }, + //Betsy + { ProjectileID.DD2BetsyFireball, defenseDamage }, + { ProjectileID.DD2BetsyFlameBreath, defenseDamage }, + //Cultist + { ProjectileID.CultistBossFireBall, defenseDamage }, + { ProjectileID.CultistBossLightningOrbArc, defenseDamage }, // Also used by storm weaver + // Empress of Light + { ProjectileID.FairyQueenLance, defenseDamage }, + { ProjectileID.FairyQueenSunDance, defenseDamage }, + { ProjectileID.HallowBossRainbowStreak, defenseDamage }, + { ProjectileID.HallowBossLastingRainbow, defenseDamage }, + //Storm Weaver + { ProjectileID.FrostWave, defenseDamage }, // Ice Queen frost waves, reused by Storm Weaver + //Moon Lord { ProjectileID.PhantasmalDeathray, defenseDamage }, { ProjectileID.PhantasmalSphere, defenseDamage }, + //Queen Slime + { ProjectileID.QueenSlimeSmash, defenseDamage }, + //Martian Saucer { ProjectileID.SaucerDeathray, defenseDamage }, - { ProjectileID.Sharknado, defenseDamage }, - { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, // Plantera bouncing thorn balls + { ProjectileID.SaucerMissile, defenseDamage }, + //Plantera + { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, + //Misc + { ProjectileID.FlamingScythe, defenseDamage }, //Pumpking scythes + { ProjectileID.CannonballHostile, defenseDamage }, + { ProjectileID.Spike, defenseDamage }, // Santank spike balls + { ProjectileID.Present, defenseDamage }, //Santank presents #endregion #region CATEGORY 5: ID-Static Immunity Frame changes From 8d9c7d742e121fd354227da2b1681e810d65327d Mon Sep 17 00:00:00 2001 From: Doze-Zoze <43045606+Doze-Zoze@users.noreply.github.com> Date: Tue, 3 Mar 2026 23:49:40 -0600 Subject: [PATCH 033/346] Reverted file left in commit on accident --- CalPlayer/CalamityPlayerHitHurt.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index b38406624c..5fc1264631 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1888,8 +1888,8 @@ namespace CalamityMod.CalPlayer CombatText.NewText(location, Color.LightBlue, Language.GetTextValue(shieldDamageText)); // Give the player iframes for taking a shield hit, regardless of whether or not the shields broke. - //int shieldHitIFrames = Player.ComputeHitIFrames(info); - //Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); + int shieldHitIFrames = Player.ComputeHitIFrames(info); + Player.GiveIFrames(info.CooldownCounter, shieldHitIFrames, true); // Spawn particles when hit with the shields up, regardless of whether or not the shields broke. // More particles spawn if a shield broke. From 2ccd6f57e348d7cb5a9d42b1fd5a014f833e8837 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Mar 2026 17:47:57 -0500 Subject: [PATCH 034/346] SHPC tooltip uses --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 432d733ff1..14c6d3bf51 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -781,7 +781,7 @@ SHPC: { {0} Press to use the machine as a vacuum, pulling in lingering souls Once released, a torrent of soul lasers is discharged scaling with the number of souls pulled in - Shift-Right Click this item in your inventory to eject the currently loaded Soul + Shift- this item in your inventory to eject the currently loaded Soul ''' // These are the soul effect descriptions, the number is the item ID of the soul NoSoul: "[c/808080:There is currently no soul type injected into the weapon]" From 7a4b5f7ee97cd1f2820b6a42c143703c539d609e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Mar 2026 19:16:09 -0500 Subject: [PATCH 035/346] Fixed The Transformer's cooldown not having localization --- Localization/en-US/Mods.CalamityMod.UI.hjson | 1 + 1 file changed, 1 insertion(+) diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index c912701a81..dd4585b266 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -154,6 +154,7 @@ Cooldowns: { SuperradiantSawBoost: Superradiant Saw Boost TarragonCloak: Tarragon Cloak Cooldown TarragonImmunity: Tarragon Immunity Cooldown + TransformerCooldown: The Transformer Cooldown UniverseSplitter: Universe Splitter Cooldown WarbanneroftheRighteousBuff: Warbanner Strength WardingWave: Warding Wave Cooldown From 3ae8b358a63474ec4efddfb6c98ab7503e36cf56 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Mar 2026 21:55:43 -0500 Subject: [PATCH 036/346] Fixed Vile Feeder minions not targeting enemies --- Projectiles/Summon/VileFeederSummon.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Projectiles/Summon/VileFeederSummon.cs b/Projectiles/Summon/VileFeederSummon.cs index 13b0cb3416..3c7ed0682c 100644 --- a/Projectiles/Summon/VileFeederSummon.cs +++ b/Projectiles/Summon/VileFeederSummon.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Projectiles.Summon if (spawnDust) { - Projectile.ai[1] = -1; + Projectile.ai[2] = -1; int dustAmt = 36; for (int d = 0; d < dustAmt; d++) { @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Summon { spawnDust = true; } - int npcIndex = (int)Projectile.ai[1]; + int npcIndex = (int)Projectile.ai[2]; if (Projectile.localAI[0] >= 600000f) //tryna make it stay on there "forever" without glitching { breakAway = true; @@ -193,7 +193,7 @@ namespace CalamityMod.Projectiles.Summon //let the projectile know it is sticking and the npc it is sticking too Projectile.ai[0] = 3f; - Projectile.ai[1] = npcIndex; + Projectile.ai[2] = npcIndex; //follow the NPC Projectile.velocity = (npc.Center - Projectile.Center) * 0.75f; @@ -203,12 +203,11 @@ namespace CalamityMod.Projectiles.Summon //Count how many projectiles are attached, delete as necessary Point[] array2 = new Point[10]; int projCount = 0; - for (int projIndex = 0; projIndex < Main.maxProjectiles; projIndex++) + foreach (Projectile p in Main.ActiveProjectiles) { - Projectile proj = Main.projectile[projIndex]; - if (projIndex != Projectile.whoAmI && proj.active && proj.owner == Main.myPlayer && proj.type == Projectile.type && proj.ai[0] == 3f && proj.ai[1] == npcIndex) + if (p.whoAmI != Projectile.whoAmI && p.owner == Main.myPlayer && p.type == Projectile.type && p.ai[0] == 3f && p.ai[2] == npcIndex) { - array2[projCount++] = new Point(projIndex, proj.timeLeft); + array2[projCount++] = new Point(p.whoAmI, p.timeLeft); if (projCount >= array2.Length) { break; From 179b1c1583f764d6e841c4372558065151927fd7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Mar 2026 21:39:03 -0500 Subject: [PATCH 037/346] Update ItemUtils.cs --- Utilities/ItemUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Utilities/ItemUtils.cs b/Utilities/ItemUtils.cs index 5368aaae9d..7ad793f3ad 100644 --- a/Utilities/ItemUtils.cs +++ b/Utilities/ItemUtils.cs @@ -152,14 +152,14 @@ namespace CalamityMod { color = GodSlayerInfernoColor; } - // Color debuffs based on their element type in the vulnerability and resistance system - // If a debuff has multiple types, the colors are mixed - // If a debuff is typeless, is gets the typeless color - else if (debuffId == ModContent.BuffType() && CalamityClientConfig.Instance.TextEffects) { color = SmashedEvilDebuffColor; } + + // Color debuffs based on their element type in the vulnerability and resistance system + // If a debuff has multiple types, the colors are mixed + // If a debuff is typeless, is gets the typeless color else if (BuffDatasets.DebuffDataset[debuffId] is not null) { if (!debuffColorWeightsCache.TryGetValue(debuffId, out var weights)) From a59644df5fb4f874ae6c8f96cc608a451cef14fd Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Mar 2026 21:46:53 -0500 Subject: [PATCH 038/346] Smashed Evil uses separate cbuff and cbuffplr --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 9 +++++---- .../en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 13e071dd36..0052479c47 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1765,12 +1765,13 @@ CnidarianSummonTagBuff: { SmashedEvil: { DisplayName: Smashed Evil Description: Increased damage, movement speed, and regeneration - ItemTooltip: + ItemTooltipEnemy: ''' - - On Enemies - - All Types - 20 DPS + All types - 20 DPS +5 damage taken - - On Players - + ''' + ItemTooltipPlayer: + ''' Regen returns to full strength 200% faster 10% increased damage 20% increased movement speed diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index ca687e3d1a..08137c2b85 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -461,7 +461,7 @@ EvilSmasher: { Channels a powerful hammer strike with the capability to crush all evil Striking a tile with the hammer strike will cause an explosion and push you back Striking enemies inflicts [cbuff:CalamityMod/SmashedEvil] on both the user and target - Charging strikes increases damage, explosion radius, and [cbuff:CalamityMod/SmashedEvil] duration + Charging strikes increases damage, explosion radius, and [cbuffplr:CalamityMod/SmashedEvil] duration 'EViL! sMaSH eVIl! SmAsh... ER!' ''' //All damage and kill dialogue has the capitalization randomized when said From 25d9668a297b86faedd3799953fafc069c6201cd Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Mar 2026 12:54:34 -0500 Subject: [PATCH 039/346] Updated Bane for Enemy vs. Player system Also clarified its item tooltip --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index d445d7d909..fcfea801d8 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1066,10 +1066,11 @@ ArmorCrunch: { Bane: { DisplayName: Bane Description: An ancient curse envelops you - ItemTooltip: + ItemTooltipEnemy: ''' - Typeless - Variable DPS + Typeless - 45 DPS Does not scale with debuff multipliers + Scales based on your critical strike chance ''' } From 490226406268076613c548d1f09c6f93de33946e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Mar 2026 13:45:46 -0500 Subject: [PATCH 040/346] Updated tooltips for buffs who have had their damage changed this hotfix --- .../en-US/Mods.CalamityMod.Buffs.hjson | 22 +++++++++---------- Localization/en-US/Mods.Terraria.Buffs.hjson | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index fcfea801d8..ea11e676df 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -194,13 +194,6 @@ CrushDepth: { ItemTooltipEnemy: Water - 50 DPS } -RiptideDebuff: { - DisplayName: Riptide - Description: Lashed at by powerful waters - ItemTooltipPlayer: Water - 3 DPS - ItemTooltipEnemy: Water - 15 DPS -} - Dragonfire: { DisplayName: Dragonfire Description: Engulfed by roaring flames @@ -223,7 +216,7 @@ HadopelagicPressure: { Water - 20 DPS Increases breath loss rate in the Abyss ''' - ItemTooltipEnemy: Water - 200 DPS + ItemTooltipEnemy: Water - 175 DPS } HeavyBleeding: { @@ -283,6 +276,13 @@ Plague: { ItemTooltipEnemy: Sickness - 50 DPS } +RiptideDebuff: { + DisplayName: Riptide + Description: Lashed at by powerful waters + ItemTooltipPlayer: Water - 3 DPS + ItemTooltipEnemy: Water - 15 DPS +} + SagePoison: { DisplayName: Sage Poison Description: Poisoned @@ -334,7 +334,7 @@ SulphuricPoisoning: { DisplayName: Sulphuric Poisoning Description: The acidic water burns away your flesh ItemTooltipPlayer: Sickness - 3 DPS - ItemTooltipEnemy: Sickness - 120 DPS + ItemTooltipEnemy: Sickness - 175 DPS } TrueVulnerabilityHex: { @@ -367,14 +367,14 @@ VermillionFlux: { DisplayName: Vermillion Flux Description: Sharp arcs of scarlet course through you ItemTooltipPlayer: Electric - 5 DPS. Deals 5x damage against moving players - ItemTooltipEnemy: Electric - 50 DPS. Deals 4x damage against moving targets + ItemTooltipEnemy: Electric - 37.5 DPS. Deals 4x damage against moving targets } Voidfrost: { DisplayName: Voidfrost Description: The emptiness of space devours all warmth and life ItemTooltipPlayer: Cold - 20 DPS - ItemTooltipEnemy: Cold - 200 DPS + ItemTooltipEnemy: Cold - 250 DPS } VulnerabilityHex: { diff --git a/Localization/en-US/Mods.Terraria.Buffs.hjson b/Localization/en-US/Mods.Terraria.Buffs.hjson index 15b85127e0..d3195fabe8 100644 --- a/Localization/en-US/Mods.Terraria.Buffs.hjson +++ b/Localization/en-US/Mods.Terraria.Buffs.hjson @@ -44,7 +44,7 @@ Webbed.ItemTooltipEnemy: Slows enemies Electrified: { ItemTooltipPlayer: Electric - 4 DPS. Deals 5x damage to moving players - ItemTooltipEnemy: Electric - 10.5 DPS. Deals 4x damage to moving targets + ItemTooltipEnemy: Electric - 15 DPS. Deals 4x damage to moving targets } Honey.ItemTooltipPlayer: From 1455a40c5ed0565e0cfcca901a0a570f507e346a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Mar 2026 13:48:57 -0500 Subject: [PATCH 041/346] Oh, Mana Burn never got updated even for 2.1.2 --- 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 ea11e676df..fe97ac67a8 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -251,7 +251,7 @@ ManaBurn: { ItemTooltipEnemy: ''' Typeless - Every 100 negative mana reduces your life regen by 4 HP/s, but burns enemies for 3% of dealt damage + Every 100 negative mana reduces your life regen by 4 HP/s, but burns enemies for 5% of dealt damage ''' } From 6d4a96adac9362f8ad156a42371a3a1aa8a98588 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Mar 2026 17:13:14 -0500 Subject: [PATCH 042/346] A couple of resprites --- Gores/AquaticScourgeGores/AquaticUrchin.png | Bin 445 -> 786 bytes Gores/AquaticScourgeGores/AquaticUrchin2.png | Bin 401 -> 366 bytes Gores/AquaticScourgeGores/AquaticUrchin3.png | Bin 290 -> 463 bytes Items/Weapons/Rogue/SpearofDestiny.cs | 4 ++-- Items/Weapons/Rogue/SpearofDestiny.png | Bin 3424 -> 1703 bytes Projectiles/Rogue/LanceofDestiny.cs | 2 +- Projectiles/Rogue/LanceofDestiny.png | Bin 3466 -> 0 bytes Projectiles/Rogue/SpearofDestinyProjectile.cs | 1 - .../Rogue/SpearofDestinyProjectile.png | Bin 0 -> 738 bytes Projectiles/Rogue/SpearofDestinyStealth.cs | 2 +- 10 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 Projectiles/Rogue/LanceofDestiny.png create mode 100644 Projectiles/Rogue/SpearofDestinyProjectile.png diff --git a/Gores/AquaticScourgeGores/AquaticUrchin.png b/Gores/AquaticScourgeGores/AquaticUrchin.png index 356efb49f0a403d3d0b5ab77a172817572cbdae4..ce015fb455103ac1e8847c14425b6372e35864c4 100644 GIT binary patch literal 786 zcmV+t1MU2YP)g6%yjN`zEGw=R+@7(j=+&5J!@#k$gg@C)$KeE+<&OFM1R4 zO(<1+Xd>4h_X$>=utc)IYK7|PMqy_1vp^es^FtHyOA<*9iAcugSyu#~yCW!<&c=ELRK?VKs#;0q!rj-(a;U9LslB z3&wysu=BW)DxmdPHi94#cVM}X7bL=}5U;5hZV#peRtHv#^Sucn*4!a{UA0ee7eE`L zA5y~9>luM6z{W2~#5&3ygG4gvR}nm$m=@ebo=>h7ti7wHOXxUQD_DD2tlwEJxZ{FE z+>UY|2Z`9u$#Vhr5ODutiSeA^efu#4is=nsK8uyMXvITf)CdlOfLyB7z9x1-|% z_aE#Xu<<-6c$B;&>^RgZTC;F{iMKu7w}xc z=COx>bHds!R(?e+Q;SputP0j%*RWOK4UKnCM+AOJ;Eg+L|9VCLvUzS?c@?o0P!&)W zoZUPmTyA|Y%&z|5e-FOfys)^86`7w}(TVU698_g7doFAcs8%6JnVY(_ z--=FzCm+5vST)>gv75p-ujoX4C;H#^KL7v#|Nq5kiKhSn00v1!K~w_(U-PJt1YaDs Q00000NkvXXu0mjf0O|Z~G5`Po literal 445 zcmV;u0Yd(XP)KL=7=gXt9aL!o(6Q8wwslAHrxawGUt~k6>X#g{29Ff1%JA5+rIi z6tG4jn_Y|93Cy|>6J0pf%>A2l=HAJOo&2%K0A{iXfUi0uaea9@I>1NlS5bd}p%&?V zd6rdjJ%IF5R{&UVaZTZ8_eB7hxk6~c+SP@&AD@DQHF;Lie()`(2XJ^ILyAXtl2I}x z-8PyskiFZ=NdHZCZ{UMJeEue0HZAx&L&L&cJii{Ke-+R5u6q^O^W$2j88#u zTGU?MeRiV>^rveWRGwAx^Z$wHPzW;ZKAfJ9 nI8KK_^j;qUxb=Uw$Q678?Rs_xwh))E00000NkvXXu0mjf9Pz-e diff --git a/Gores/AquaticScourgeGores/AquaticUrchin2.png b/Gores/AquaticScourgeGores/AquaticUrchin2.png index 44a021dbe469070c3548909aa549c5f6783ab910..93e0dba709850ce8488e7b2fcf3e0b5adfebda51 100644 GIT binary patch literal 366 zcmV-!0g?WRP)z5ee964>`mtu@^+4x@Cw}>EjsKT)FWi? zXARkTuTXZwxYu5xzmJ|k*R;#+IS1Cje^?{0kS$C)7C0GD9ai9?QWS2!_JoJ|veMqV zJ3><0bO@J-lfm-(j9^_CR*S;c%D2)QKcB)<(h=+l!X>hbhqwO`_M4A_rHGS~VEb%* zdT$H0>T87XiL8^2FTZO-y;c=SH8k5)JU|NA{_u(TmT>yqionT$_W)Ai`07k3ZzK-W zOT@PX>%jA;kqXx*=Ys9CG1xom0{{U3|D$Q}(*OVf21!IgR09C=Y_ZM5%ck-G0000< MMNUMnLSTXb0J+ns;{X5v literal 401 zcmV;C0dD?@P)3g-%90`oB58tJh+wIe78d#j+KLZgDcCEv+xrR@Hde6|?39265haKT z8py`zn#@?t&YE3pBy+3TJKxSZ-2D;6s=T@txgINy1Mpe@PyiFTG5~F_3P2)$z<(>b zvUvc&^~G^~PX%NE=Jw|Sc)Ts@-HIgxVHUX9 z@$LlVLL_L&@fzMBT(r6hptC#!fI}UC2lq|~P8I<;t4RiP!yEXSJ^-oi2mrGSQF3B! zJ&5WVn5U7wdA4Nm)wovx-vO!ZUPc1O$gm8#pGyln24*2Enw-c@3jpc8DS+LQW|--R z`Br1VYe)kTY54lgbnxAqGSioyHch1*I|d@&SlZYFU^JOm0M3qPgm0u%(DyW7?HDBE v4Jm!#_n+5xbw69m3xG~dldD(fb_{+1nV4>O+0;ZF00000NkvXXu0mjfH?pYA diff --git a/Gores/AquaticScourgeGores/AquaticUrchin3.png b/Gores/AquaticScourgeGores/AquaticUrchin3.png index 8d8532f28877c65d968a75bb0ebee2b649a469fe..4bf306fc2bd6f27f01c99bff2322eba6c72ffe6e 100644 GIT binary patch literal 463 zcmV;=0WkiFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0c1%;K~zXf#g#it z!%!4}zZhKVV`v8lO_eNdaS#-wpj2>iaM0DqAPBk%{snOr5hn-1MeF7)g${Ko+6uZf zI%G(7aL_?V32_Lw+*2c|MK?~-jpLLH;Z>^`x-H*n{9E3=NuS^2&Kc!-uhkFI-U@W<)*FxZ zgj14AXXNt6bi}SNm3(x@;)~M}^DGc&g;TEskhUy{^mG$@yR`Rg$ni&eeg4n~z{~xu zXaUl6G|yQ7W9aDSg2a#s(h7B&X8dDH`BWfQ`58?!eghj!gPCtUnCeIIw)ljj*T$&y2fOa?A zH64u8qP(Y9lBq#xCLvi o?3}zR$$8fQ6aSL)-&0xq1>wa<@!-KRvH$=807*qoM6N<$g1QEQO#lD@ diff --git a/Items/Weapons/Rogue/SpearofDestiny.cs b/Items/Weapons/Rogue/SpearofDestiny.cs index 17823595ac..5bd53ebda4 100644 --- a/Items/Weapons/Rogue/SpearofDestiny.cs +++ b/Items/Weapons/Rogue/SpearofDestiny.cs @@ -16,8 +16,8 @@ namespace CalamityMod.Items.Weapons.Rogue private bool BigSpear = false; public override void SetDefaults() { - Item.width = 52; - Item.height = 52; + Item.width = 100; + Item.height = 100; Item.damage = 70; Item.noMelee = true; Item.noUseGraphic = true; diff --git a/Items/Weapons/Rogue/SpearofDestiny.png b/Items/Weapons/Rogue/SpearofDestiny.png index 4e198d9042efe2c97e5e50ba2ff043bd1862e95d..0fb7e725de019f4bc38d93af5c99b53a4b71f446 100644 GIT binary patch literal 1703 zcmXX{dpz4`7yqd?b4%Sqt7)Vu>Ry^C722#MDXk$tMN3gC2~Fm@)@$Chx@Et{P|*cR z(S0b&kXCI7Z^O*3b!koADx&V4mN2E8%ct)zwm+Wde4g_;-*cYxe9t*gny>d6q{aaa z005Al9%K-fk;2jmtoiczM=E?kE772s0R;%pJqfx@uDn&w2R%#aZl;Fl?=D*JF))%? zMdn(Fpknol76B|eaUPB!P!r7lTf($%rmLdAax zV_d&L;=QK6*EJ{dMpPcwIE<>8hgIp;pBl!dS`IMVZzmVgF%7uMNeIR5v0%27Ms_-Ud((5>CeYDKDRJDHkS8R6Z!GJ4M#0*{N{ zX~(&@b|NdXZ3qYo)zx{D0pva%*k#G+5-MJ7y@R+sG-!5_VG+pV^uO>slGGzgGHdJ6 z*$HI;_GOfsoA0vcEUT2aXiY-9sS7r1jI#A6hnmesa}%%~*}siH)SZzVb$pPsjP|H- zdM?7r_$>`@*lR~3J1{;ZjTWX|vx+6urAF)1n$7U1^_36pILcxyMzm1t4ujK$!9%Lc zbB!UumSmd)cy~xu?IWlavHh-B4*@T}s)A62Tn@M~C%+S2%JNGKyb8s+?|M)?s;O&a zKbNbXwqg=y>~#ryii1eqmuClE*ef}VpURdbxu0d)b!X&!`7Q2tL3lh2`RSsT3ag`{ zOKp}5ZryLbaVRLn(wz6y<*bA(nY|zg<{mdu{9{=*$~MK5vu}Pif%ABVaqF;Ps)k*J}Bl5~%t(zB>R|XImAf-*tAZ zfBUsRYUK(u%rH}M;(sexo~Y)}qNTR^LfX+9gPTftc6XJdUT~4-Y%U8DtPADATec;_ zW25i=)kQ1k1t#n;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<8f#h{fLHHcCT)Kl-4*zMGx+Nd z@eo)6e-v1pzT5^tN5@G3wr!s7>3`|$u;=&1tJMJ1g>M5;G-oPc1^lTjuW|quFI?gY z9DDvAfby~h05okp95~LVMcVF>4zfv9-JiE~E)82xo07<*U~DrWT;UB|Bh{=tP65E4)j z9o{M{YLoV_S{?>mf&Pcxp7vBzM_2(B>(Ut&fV=$FH#7jy+}H|?T?QpQ{NpnKTkAFe z@Gbr)t>9L`PeADDPxx&_<~TY84#uKZAP_x7=?Zw}=^;;hs=(vLc+t??M>a-HfqBUi|O zf#P{34#42hEdXlPwE*cKXR}S=2#8EC6xk;41^xp3MT`aa-5B!#0000 "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Rogue/LanceofDestiny"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public bool posthit = false; public int Time = 0; public int hitsDust = 7; diff --git a/Projectiles/Rogue/LanceofDestiny.png b/Projectiles/Rogue/LanceofDestiny.png deleted file mode 100644 index 72395d8fa78e1f7bad4d5b45d81e57a74e438e58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3466 zcmV;54R!K~P)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M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l~C$_EME#ht=|^w3EC}b1iX;L z*yOLbK(duYVgy`+>#xnzJ)HnVqt5_%`d~EW{IU2;rC!iC!tS%@ zjX+BD#VbMd7LY|PNUMo}9R38a;DQm57FttaZ~e!Et;+bZ_D&$VSS7F^VsZ$SdckS& z3PwN|5ah2v9jTLXeert**2!G~S-jgz8vqCnop256bQJhsa!@~07*qoM6N<$f|GK75&!@I diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.cs b/Projectiles/Rogue/SpearofDestinyProjectile.cs index 3a8948bad7..ceee3c72a8 100644 --- a/Projectiles/Rogue/SpearofDestinyProjectile.cs +++ b/Projectiles/Rogue/SpearofDestinyProjectile.cs @@ -11,7 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class SpearofDestinyProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public static readonly SoundStyle Hitsound = new("CalamityMod/Sounds/Item/WulfrumKnifeTileHit2") { PitchVariance = 0.3f, Volume = 0.5f }; public int framesInAir = 0; diff --git a/Projectiles/Rogue/SpearofDestinyProjectile.png b/Projectiles/Rogue/SpearofDestinyProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..8efaf3998f365aaf5f4d970194ba3a125bd5ffd9 GIT binary patch literal 738 zcmV<80v-K{P)W^00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj7j7da6RA@u(m`z9&VHn4M8}xDN(4pv1CkcWy#Kl6` zLxfS71iML=VJ`G(Cj|{6Auxgpv_l4cx*a0JJcNajbZMblQKB{oN(j*Gj9Z+5KnYk=6HoU@DmX|QE9{vv{(S$$2$PHnR)@C z@iJ1kYNZ8G(|Qi{@EI1GmAKU3QQ7|))B(0B<* zUDk#LH`5=Nen$w6dq50#ckKmW_kKImubw>uAd{H^U@rR=fcnLQP{6bh8h1lX>w5h7 z>WE`q&AvU3acI0)bfzW4V){dF34lw{6c}dPYHvHn+O!ZF*XTMerp0LAk0t=FZFmEQ z;hFWH0BHQV4MO7{kly1^|5+$tS|g@wckBcpn|TMzm=;3gVp@=HZ+_C=86~@dWLQk! z`*zncU%ke)NjDRzkwy#PNFwf-PqsY=BfG+t6SDwpY}x`qXL2np^L$P4jrR`M12EL{ z9t<-bv6uxgI^F_6bo0Q!n~nRX$5sPywC)A~=k7!u>%5v4f^S^9x3OC>C}4JI!tVZh z6UV@)7R~KB`+ELM3B?-L1lPFWmUZ1n%ZbzC_v>I}+v|?#mFh9Bvo5rsN&_%I^%9JX zKTM}RzoQtc$G9L_mz`2qnQ~>>jo=y=({6QH=4D6R^>hss(dCs&@QiEI$^J6{yuD}} z*MH%9ecx%jx)j^>c_lc;rP~uE(+l@)YL~3;9PN UmegMMGXMYp07*qoM6N<$f;nJOKmY&$ literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/SpearofDestinyStealth.cs b/Projectiles/Rogue/SpearofDestinyStealth.cs index 15bca9c5e9..25d93e1e7e 100644 --- a/Projectiles/Rogue/SpearofDestinyStealth.cs +++ b/Projectiles/Rogue/SpearofDestinyStealth.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue { public static readonly SoundStyle Hitsound = new("CalamityMod/Sounds/Item/BlazingCoreParry") { Volume = 0.7f, PitchVariance = 0.3f }; public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Rogue/LanceofDestiny"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofDestiny"; public bool posthit = false; public int Time = 0; public ref float Timer => ref Projectile.ai[0]; From a1eba3b0d69a2d83cb2d6d920f1e3cc75be93113 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 7 Mar 2026 23:37:08 -0500 Subject: [PATCH 043/346] Yet More - Reduced Lucrecia's base damage from 150 to 132 - Reduced Lightspeed's base damage from 220 to 200 - Both weapons pause energy drain whenever they gain energy instead of only pausing when reaching 100 energy - Reduced energy gain on Lucrecia's M1 from 25 to 20 - Upscaled hitbox of Lightspeed's dash attack - Moved logic related to Lucrecia and Lightspeed from CalamityPlayer to their own separate ModPlayer classes --- CalPlayer/CalamityPlayer.cs | 11 -- CalPlayer/CalamityPlayerMiscEffects.cs | 193 ---------------------- Items/Weapons/Melee/Lightspeed.cs | 130 ++++++++++++++- Items/Weapons/Melee/Lucrecia.cs | 134 ++++++++++++++- Projectiles/Melee/LightspeedDashHitbox.cs | 6 +- Projectiles/Melee/LightspeedHoldout.cs | 7 +- Projectiles/Melee/LightspeedM1Hitbox.cs | 2 +- Projectiles/Melee/LucreciaHoldout.cs | 13 +- 8 files changed, 273 insertions(+), 223 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3b28f81093..a53649bd48 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -326,15 +326,6 @@ namespace CalamityMod.CalPlayer public int deadSunCounter = 6; public int DragonsBreathAudioCooldown = 0; public int DragonsBreathAudioCooldown2 = 0; - public int darklightEnergy = 0; - public int darklightEnergyTimer = 0; - public bool darklightEnergyPaused = false; - public bool darklightEnergyMaxFXPlayed = false; - private int lucreciaParticleTimer = 0; - public int elementalMastery = 0; - public int elementalMasteryTimer = 0; - public bool elementalMasteryPaused = false; - public bool elementalMasterySFXPlayed = false; public float unstableCastersGauntletVis = 0; public int unstableCastersGauntletVisTimer = 0; public int PhotoAudioCooldown = 0; @@ -3453,8 +3444,6 @@ namespace CalamityMod.CalPlayer burningSeaBurnOut = 0; flareGunOverheat = 0; hellbornShots = 0; - darklightEnergy = 0; - elementalMastery = 0; garandShots = 0; persecutedEnchantSummonTimer = 0; momentumCapacitorTime = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8bdb1af27c..17c9bcf1e9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -154,9 +154,6 @@ namespace CalamityMod.CalPlayer // Drawing parameters UpdateDrawingParameters(); - // Handle Lucrecia's passive energy effects - HandleLucreciaLineEffects(); - // Update all particle sets for items. // This must be done here instead of in the item logic because these sets are not properly instanced // in the global classes. Attempting to update them there will cause multiple updates to one set for multiple items. @@ -408,120 +405,6 @@ namespace CalamityMod.CalPlayer Player.wingTime++; } - if (Player.HeldItem.type == ModContent.ItemType() && darklightEnergy > 0) - { - if (darklightEnergy == Lucrecia.MaxEnergy && !darklightEnergyPaused) - { - darklightEnergyPaused = true; - darklightEnergyTimer = 0; - } - - darklightEnergyTimer++; - - // If the energy is at max, pause for 180 ticks - if (darklightEnergyPaused) - { - if (darklightEnergyTimer >= 1 && !darklightEnergyMaxFXPlayed) - { - SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); - SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, 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 * 14f; - - CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); - GeneralParticleHandler.SpawnParticle(spark); - } - darklightEnergyMaxFXPlayed = true; - } - - // If the pause is Done, resume decrementing. - if (darklightEnergyTimer >= 180) - { - darklightEnergyPaused = false; - darklightEnergyTimer = 0; - darklightEnergy--; - } - } - else // Decrementing - { - darklightEnergyMaxFXPlayed = false; - // Once every 20 ticks - if (darklightEnergyTimer >= 20) - { - darklightEnergy--; - darklightEnergyTimer = 0; - } - } - } - else - { - // Reset all energy variables when not holding the weapon - darklightEnergyTimer = 0; - darklightEnergyPaused = false; - darklightEnergy = 0; - } - - if (Player.HeldItem.type == ModContent.ItemType() && elementalMastery > 0) - { - if (elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryPaused) - { - elementalMasteryPaused = true; - elementalMasteryTimer = 0; - } - - elementalMasteryTimer++; - - // If the mastery is at max, pause for 180 ticks - if (elementalMasteryPaused) - { - if (elementalMasteryTimer >= 1 && !elementalMasterySFXPlayed) - { - SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); - SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, 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 * 14f; - - CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); - GeneralParticleHandler.SpawnParticle(spark); - } - elementalMasterySFXPlayed = true; - } - // If the pause is Done, resume decrementing. - if (elementalMasteryTimer >= 180) - { - elementalMasteryPaused = false; - elementalMasteryTimer = 0; - elementalMastery--; - } - } - else // Decrementing - { - elementalMasterySFXPlayed = false; - // Once every 30 ticks - if (elementalMasteryTimer >= 30) - { - elementalMastery--; - elementalMasteryTimer = 0; - } - } - } - else - { - // Reset all EM variables when not holding the weapon - elementalMasteryTimer = 0; - elementalMasteryPaused = false; - elementalMastery = 0; - } - - if (Player.HeldItem.type == ModContent.ItemType() && unstableCastersGauntletVis < 100) { @@ -4466,82 +4349,6 @@ namespace CalamityMod.CalPlayer } #endregion - #region Lucrecia Line Effects - - public void HandleLucreciaLineEffects() - { - int lucreciaItemID = ModContent.ItemType(); - int lightspeedItemID = ModContent.ItemType(); - - if (Player.HeldItem.type == lucreciaItemID && darklightEnergy > 0) - { - lucreciaParticleTimer--; - - // If the timer is at or below zero, spawn a particle. - if (lucreciaParticleTimer <= 0) - { - // Reset the timer (spawn rate depends on energy) - lucreciaParticleTimer = (int)(20 - 15 * (darklightEnergy / 60)); - - float radius = Main.rand.NextFloat(160f, 190f); // Distance from center - float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius - - Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; - - // Scale opacity with energy - float opacity = darklightEnergy / (float)Lucrecia.MaxEnergy; - Color color = Main.rand.NextBool() ? Color.MediumPurple : Color.CornflowerBlue; - color *= opacity * 0.5f; - - if (darklightEnergy >= 100) - { - color *= 2.4f; // Way brighter - } - - Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path - float rotationSpeed = 0.04f; - - var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); - GeneralParticleHandler.SpawnParticle(particle); - } - } - - if (Player.HeldItem.type == lightspeedItemID && elementalMastery > 0) - { - lucreciaParticleTimer--; - - // If the timer is at or below zero, spawn a particle. - if (lucreciaParticleTimer <= 0) - { - // Reset the timer (spawn rate depends on energy) - lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60)); - - float radius = Main.rand.NextFloat(160f, 190f); // Distance from center - float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius - - Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; - - // Scale opacity with energy - float opacity = elementalMastery / (float)Lightspeed.MaxEnergy; - Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed; - color *= opacity * 0.5f; - - if (elementalMastery >= 100) - { - color *= 2.4f; // Way brighter - } - - Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path - float rotationSpeed = 0.04f; - - var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); - GeneralParticleHandler.SpawnParticle(particle); - } - } - } - #endregion - - #region Energy Shields private void EnergyShields() { diff --git a/Items/Weapons/Melee/Lightspeed.cs b/Items/Weapons/Melee/Lightspeed.cs index 4c0551e7cb..28e525dd29 100644 --- a/Items/Weapons/Melee/Lightspeed.cs +++ b/Items/Weapons/Melee/Lightspeed.cs @@ -1,7 +1,10 @@ using CalamityMod.Cooldowns; using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -19,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 74; Item.height = 94; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 220; + Item.damage = 200; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 20; Item.shootSpeed = 10f; @@ -37,13 +40,13 @@ namespace CalamityMod.Items.Weapons.Melee } // You can only use the right-click if you have sufficient Elemental Mastery - public override bool AltFunctionUse(Player player) => player.Calamity().elementalMastery >= 100; + public override bool AltFunctionUse(Player player) => player.GetModPlayer().elementalMastery >= MaxEnergy; public override void HoldItem(Player player) { if (player.Calamity().cooldowns.TryGetValue(ElementalMastery.ID, out var cooldown)) { - cooldown.timeLeft = player.Calamity().elementalMastery; + cooldown.timeLeft = player.GetModPlayer().elementalMastery; } else { @@ -62,4 +65,125 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } + + public class LightspeedPlayer : ModPlayer + { + public int elementalMastery = 0; + public int elementalMasteryPrevious = 0; + public int elementalMasteryTimer = 0; + public bool elementalMasteryPaused = false; + public bool elementalMasteryMaxFXPlayed = false; + private int lucreciaParticleTimer = 0; + + public override void PostUpdateMiscEffects() + { + if (Player.HeldItem.type == ModContent.ItemType() && elementalMastery > 0) + { + lucreciaParticleTimer--; + + // If the timer is at or below zero, spawn a particle. + if (lucreciaParticleTimer <= 0) + { + // Reset the timer (spawn rate depends on energy) + lucreciaParticleTimer = (int)(20 - 15 * (elementalMastery / 60)); + + float radius = Main.rand.NextFloat(160f, 190f); // Distance from center + float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius + + Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; + + // Scale opacity with energy + float opacity = elementalMastery / (float)Lightspeed.MaxEnergy; + Color color = Main.rand.NextBool() ? Color.Aqua : Color.OrangeRed; + color *= opacity * 0.5f; + + if (elementalMastery >= 100) + { + color *= 2.4f; // Way brighter + } + + Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path + float rotationSpeed = 0.04f; + + var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); + GeneralParticleHandler.SpawnParticle(particle); + } + } + + + if (Player.HeldItem.type == ModContent.ItemType()) + { + if (elementalMastery == 0) + elementalMasteryPrevious = 0; + + if (elementalMastery > 0) + { + if (elementalMastery > elementalMasteryPrevious) + { + elementalMasteryPaused = true; + elementalMasteryTimer = 0; + } + + elementalMasteryTimer++; + + // Pause for 180 ticks + if (elementalMasteryPaused) + { + if (elementalMasteryTimer >= 1 && elementalMastery == Lightspeed.MaxEnergy && !elementalMasteryMaxFXPlayed) + { + SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); + SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, 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 * 14f; + + CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); + GeneralParticleHandler.SpawnParticle(spark); + } + elementalMasteryMaxFXPlayed = true; + } + + // If the pause is Done, resume decrementing. + if (elementalMasteryTimer >= 180) + { + elementalMasteryTimer = 0; + elementalMastery--; + } + } + else // Decrementing + { + // Once every 30 ticks + if (elementalMasteryTimer >= 30) + { + elementalMastery--; + elementalMasteryTimer = 0; + } + } + + if (elementalMastery != Lightspeed.MaxEnergy) + elementalMasteryMaxFXPlayed = false; + } + + // Update for next loop. + elementalMasteryPrevious = elementalMastery; + + } + else + { + // Reset all EM variables when not holding the weapon + elementalMasteryTimer = 0; + elementalMasteryPaused = false; + elementalMastery = 0; + } + } + + public override void UpdateDead() + { + elementalMastery = 0; + elementalMasteryPrevious = 0; + } + } } diff --git a/Items/Weapons/Melee/Lucrecia.cs b/Items/Weapons/Melee/Lucrecia.cs index 6fd7a2d0d9..e2160af239 100644 --- a/Items/Weapons/Melee/Lucrecia.cs +++ b/Items/Weapons/Melee/Lucrecia.cs @@ -1,8 +1,11 @@ using CalamityMod.Cooldowns; using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Projectiles.Melee; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -21,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 54; Item.height = 54; Item.useStyle = ItemUseStyleID.Shoot; - Item.damage = 150; + Item.damage = 132; Item.DamageType = DamageClass.Melee; Item.useAnimation = Item.useTime = 34; Item.shootSpeed = 10f; @@ -37,13 +40,13 @@ namespace CalamityMod.Items.Weapons.Melee } - public override bool AltFunctionUse(Player player) => player.Calamity().darklightEnergy >= MaxEnergy; + public override bool AltFunctionUse(Player player) => player.GetModPlayer().darklightEnergy >= MaxEnergy; public override void HoldItem(Player player) { if (player.Calamity().cooldowns.TryGetValue(DarklightEnergy.ID, out var cooldown)) { - cooldown.timeLeft = player.Calamity().darklightEnergy; + cooldown.timeLeft = player.GetModPlayer().darklightEnergy; } else { @@ -64,4 +67,129 @@ namespace CalamityMod.Items.Weapons.Melee Register(); } } + + public class LucreciaPlayer : ModPlayer + { + private int lucreciaParticleTimer = 0; + public int darklightEnergy = 0; + public int darklightEnergyPrevious = 0; + public int darklightEnergyTimer = 0; + public bool darklightEnergyPaused = false; + public bool darklightEnergyMaxFXPlayed = false; + + + public override void PostUpdateMiscEffects() + { + if (Player.HeldItem.type == ModContent.ItemType()) + { + if (darklightEnergy == 0) + darklightEnergyPrevious = 0; + + if (darklightEnergy > 0) + { + // If the player's energy has increased since last tick + if (darklightEnergy > darklightEnergyPrevious) + { + darklightEnergyPaused = true; + darklightEnergyTimer = 0; + } + + darklightEnergyTimer++; + + // Pause for 180 ticks + if (darklightEnergyPaused) + { + if (darklightEnergyTimer >= 1 && darklightEnergy == Lucrecia.MaxEnergy && !darklightEnergyMaxFXPlayed) + { + SoundStyle maxEnergyReached = new("CalamityMod/Sounds/Custom/AbilitySounds/DarklightEnergyCharged"); + SoundEngine.PlaySound(maxEnergyReached with { Volume = 0.9f }, 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 * 14f; + + CritSpark spark = new CritSpark(Player.Center + spawnDirection * 3f, velocity, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); + GeneralParticleHandler.SpawnParticle(spark); + } + darklightEnergyMaxFXPlayed = true; + } + + // If the pause is Done, resume decrementing. + if (darklightEnergyTimer >= 180) + { + darklightEnergyPaused = false; + darklightEnergyTimer = 0; + darklightEnergy--; + } + } + else // Decrementing + { + darklightEnergyMaxFXPlayed = false; + // Once every 20 ticks + if (darklightEnergyTimer >= 20) + { + darklightEnergy--; + darklightEnergyTimer = 0; + } + } + } + + if (darklightEnergy != Lucrecia.MaxEnergy) + darklightEnergyMaxFXPlayed = false; + + // Update for next loop. + darklightEnergyPrevious = darklightEnergy; + + } + else + { + // Reset all energy variables when not holding the weapon + darklightEnergyTimer = 0; + darklightEnergyPaused = false; + darklightEnergy = 0; + } + + + if (Player.HeldItem.type == ModContent.ItemType() && darklightEnergy > 0) + { + lucreciaParticleTimer--; + + // If the timer is at or below zero, spawn a particle. + if (lucreciaParticleTimer <= 0) + { + // Reset the timer (spawn rate depends on energy) + lucreciaParticleTimer = (int)(20 - 15 * (darklightEnergy / 60)); + + float radius = Main.rand.NextFloat(160f, 190f); // Distance from center + float spawnAngle = Main.rand.NextFloat(MathHelper.TwoPi); // Random angle along the whole radius + + Vector2 spawnPosition = Player.Center + spawnAngle.ToRotationVector2() * radius; + + // Scale opacity with energy + float opacity = darklightEnergy / (float)Lucrecia.MaxEnergy; + Color color = Main.rand.NextBool() ? Color.MediumPurple : Color.CornflowerBlue; + color *= opacity * 0.5f; + + if (darklightEnergy >= 100) + { + color *= 2.4f; // Way brighter + } + + Vector2 dummyVelocity = Vector2.Zero; // We dont want the argument where this is used to have influence on the actual path + float rotationSpeed = 0.04f; + + var particle = new RoundedStarParticle(spawnPosition, dummyVelocity, color with { A = 0 }, Main.rand.NextFloat(0.05f, 0.065f), Main.rand.Next(30, 60), rotationSpeed, 1f, true, Player.Center, Player.whoAmI); + GeneralParticleHandler.SpawnParticle(particle); + } + } + } + + public override void UpdateDead() + { + darklightEnergy = 0; + darklightEnergyPrevious = 0; + } + } } diff --git a/Projectiles/Melee/LightspeedDashHitbox.cs b/Projectiles/Melee/LightspeedDashHitbox.cs index 198524c45c..546b3f3247 100644 --- a/Projectiles/Melee/LightspeedDashHitbox.cs +++ b/Projectiles/Melee/LightspeedDashHitbox.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 84; - Projectile.height = 64; + Projectile.width = 150; + Projectile.height = 75; Projectile.friendly = true; Projectile.tileCollide = false; Projectile.DamageType = TrueMeleeNoSpeedDamageClass.Instance; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound with { Volume = CommonCalamitySounds.SwiftSliceSound.Volume * 0.33f }, Projectile.Center); var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); // Refund 30 energy if dash hits. Can get energy from multiple enemies. modPlayer.elementalMastery += 30; diff --git a/Projectiles/Melee/LightspeedHoldout.cs b/Projectiles/Melee/LightspeedHoldout.cs index 26e85a1eed..074be3fa64 100644 --- a/Projectiles/Melee/LightspeedHoldout.cs +++ b/Projectiles/Melee/LightspeedHoldout.cs @@ -171,6 +171,9 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + var player = Main.player[Projectile.owner]; + var modPlayer = player.GetModPlayer(); + Projectile.scale = 0.6f; if (!Owner.channel && DashState == 0) @@ -187,7 +190,7 @@ namespace CalamityMod.Projectiles.Melee if (Owner.altFunctionUse == 2 && Owner.Calamity().mouseRight) { // Check if the player has enough EM - if (Owner.Calamity().elementalMastery < 100) + if (modPlayer.elementalMastery < 100) { Projectile.Kill(); return; @@ -196,7 +199,7 @@ namespace CalamityMod.Projectiles.Melee DashState = 1; DashTimer = DashPrepTime; Projectile.localAI[0] = Owner.direction; - Owner.Calamity().elementalMastery = 0; // Reset EM to zero + modPlayer.elementalMastery = 0; // Reset EM to zero } } diff --git a/Projectiles/Melee/LightspeedM1Hitbox.cs b/Projectiles/Melee/LightspeedM1Hitbox.cs index cf1c27cfa3..3e27b0a648 100644 --- a/Projectiles/Melee/LightspeedM1Hitbox.cs +++ b/Projectiles/Melee/LightspeedM1Hitbox.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee { gotEnergyThisSwing = true; var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); // +4 energy on hit modPlayer.elementalMastery += 4; diff --git a/Projectiles/Melee/LucreciaHoldout.cs b/Projectiles/Melee/LucreciaHoldout.cs index 7268276580..222b21699d 100644 --- a/Projectiles/Melee/LucreciaHoldout.cs +++ b/Projectiles/Melee/LucreciaHoldout.cs @@ -56,8 +56,7 @@ namespace CalamityMod.Projectiles.Melee public override void Spawn() { var player = Main.player[Projectile.owner]; - var modplayer = player.GetModPlayer(); - var calamityPlayer = player.Calamity(); + var lucreciaPlayer = player.GetModPlayer(); // Store the base use time from the item int baseUseTime = BaseItem.useTime; @@ -65,7 +64,7 @@ namespace CalamityMod.Projectiles.Melee if (player.altFunctionUse == 2) { // Check for energy before the projectile exists - if (calamityPlayer.darklightEnergy < 100) + if (lucreciaPlayer.darklightEnergy < 100) { Projectile.Kill(); return; @@ -87,7 +86,7 @@ namespace CalamityMod.Projectiles.Melee RotateInCooldown = 1f; Projectile.knockBack = 15f; - calamityPlayer.darklightEnergy = 0; // Remove energy for startup + lucreciaPlayer.darklightEnergy = 0; // Remove energy for startup } else { @@ -323,10 +322,10 @@ namespace CalamityMod.Projectiles.Melee gotEnergyThisSwing = true; var player = Main.player[Projectile.owner]; - var modPlayer = player.Calamity(); + var modPlayer = player.GetModPlayer(); - // +25 energy on hit - modPlayer.darklightEnergy += 25; + // +20 energy on hit + modPlayer.darklightEnergy += 20; modPlayer.darklightEnergy = Math.Min(modPlayer.darklightEnergy, Lucrecia.MaxEnergy); // On-hit cut FX From 6082804fe59a453c2d486f74fe63032bb09e6b29 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 00:09:12 -0500 Subject: [PATCH 044/346] cleanup --- CalPlayer/CalamityPlayer.cs | 5 +---- Localization/en-US/Mods.CalamityMod.Keybinds.hjson | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 6b401c9c85..3a005c1529 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8,7 +8,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; -using CalamityMod.CalPlayer.DrawLayers; using CalamityMod.Cooldowns; using CalamityMod.DataStructures; using CalamityMod.Dusts; @@ -73,7 +72,6 @@ using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -3659,7 +3657,6 @@ namespace CalamityMod.CalPlayer } } } - if (CalamityKeybinds.BoosterDashHotKey.JustPressed && hasJetpack && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(RogueBooster.ID) && !Player.mount.Active) { @@ -4571,6 +4568,7 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { + // Rain armor set effects if (rainSet) { @@ -6254,7 +6252,6 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square1); GeneralParticleHandler.SpawnParticle(square2); } - #endregion #region Mana Consumption Effects diff --git a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson index e172a3d1ed..b139893fdb 100644 --- a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson +++ b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson @@ -16,4 +16,4 @@ TransformerHotKey.DisplayName: Transformer Hot Key GravitySwapOverride.DisplayName: Gravity Swap Override ExpandDebuffInfo.DisplayName: See Debuff Information ThePointerLock.DisplayName: The Pointer Lock On -SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hot Key +SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hotkey From 1b27ee681a9bc451c7f8bdce58eae87d7bb93c8b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 00:16:03 -0500 Subject: [PATCH 045/346] copper bar -> any copper bar --- Items/Accessories/SpringStool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 214e861300..eeb44a15eb 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.PortableStool). - AddIngredient(ItemID.CopperBar, 3). + AddRecipeGroup("AnyCopperBar", 3). AddTile(TileID.Anvils). Register(); } From 47550a9c80277b4c82fe1990ddc67c27c4ea97f2 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 03:58:03 -0400 Subject: [PATCH 046/346] how could they nerf him --- Items/Accessories/SpringStool.cs | 37 ++++++++++++++----- .../Mods.CalamityMod.Items.Accessories.hjson | 4 +- Projectiles/Typeless/SpringStoolFX.cs | 3 +- Projectiles/Typeless/StepStoolBonusFX.cs | 2 +- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index eeb44a15eb..42e53207fa 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -7,6 +7,7 @@ using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -15,8 +16,10 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((JumpCooldown).FramesToSeconds(), (CritRateBoostAboveTargets)); - public static int JumpCooldown = CalamityUtils.SecondsToFrames(25); + public static int JumpCooldown = CalamityUtils.SecondsToFrames(20); + public static float CritRateBoostAboveTargets = 5f; public override void SetDefaults() { @@ -55,16 +58,23 @@ namespace CalamityMod.Items.Accessories On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; } + public override void PostUpdate() + { + bool theCollisionCheck = Collision.TileCollision(Player.position + Vector2.UnitY, Vector2.Zero, Player.width, Player.height, fallThrough: false, fall2: false).Y == 0f; + + if ((Player.velocity.Y == 0 && theCollisionCheck) || Player.grappling[0] >= 0) + hasGroundedSinceJump = true; + } + public override void PostUpdateEquips() { - if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active && hasGroundedSinceJump) { springStoolTimer = 12; Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); hasGroundedSinceJump = false; - Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); // Spawn stool with downward and randomly angled force @@ -76,7 +86,6 @@ namespace CalamityMod.Items.Accessories // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); } - } if (springStool) @@ -99,6 +108,7 @@ namespace CalamityMod.Items.Accessories // Forces the player into the stool-standing frame Player.UpdatePortableStoolUsage(); } + else { // Ensures the player can use the stool if they stop moving/hold up @@ -147,9 +157,6 @@ namespace CalamityMod.Items.Accessories public override void PreUpdateMovement() { - if (Player.velocity.Y == 0 || Player.sliding || Player.grappling[0] >= 0) - hasGroundedSinceJump = true; - if (springStoolTimer > 0) { springStoolTimer--; @@ -157,7 +164,7 @@ namespace CalamityMod.Items.Accessories if (Player.whoAmI == Main.myPlayer) { float launchPower = 20f * Utils.GetLerpValue(0, 10, springStoolTimer, true); - Player.velocity.Y = -launchPower; + Player.velocity.Y = -launchPower * Player.gravDir; // Prevent vanilla jump logic from interfering Player.jump = 0; @@ -165,14 +172,16 @@ namespace CalamityMod.Items.Accessories } } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (springStool) { + // When hitting a target below you if (Main.LocalPlayer.Top.Y < target.Top.Y) { - // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 10f; + // Effective +8% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) modifiers.SetCrit(); @@ -182,10 +191,18 @@ namespace CalamityMod.Items.Accessories } } } + public override void ResetEffects() { springStool = false; springStoolTimer = 0; } + + public override void UpdateDead() + { + springStool = false; + springStoolTimer = 0; + hasGroundedSinceJump = true; + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 7ea64c36a5..92a010c0c2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1673,8 +1673,8 @@ SpringStool: { ''' Hold Up to reach higher Press [KEY] to jump super high - Super jumps can only be performed once every 25 seconds - +10% critical strike chance when striking enemies below you + Super jumps can only be performed once every {0} seconds and after touching the ground + +{1}% critical strike chance when striking enemies below you ''' } diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs index 48570ab1e8..40d3451bcf 100644 --- a/Projectiles/Typeless/SpringStoolFX.cs +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -2,6 +2,7 @@ using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using rail; using Terraria; using Terraria.Audio; using Terraria.ModLoader; @@ -130,7 +131,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 scale = new Vector2(Projectile.scale, Projectile.scale * Projectile.ai[1]); - Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation, drawOrigin, scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), drawOrigin, scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index 36f665921a..42f2c8a900 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Typeless Texture2D texture = TextureAssets.Extra[102].Value; Vector2 origin = texture.Size() / 2f; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation, origin, Projectile.scale * 1.25f, SpriteEffects.None); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); return false; } From 9021c3bd5c1133da3cf702c89a0c424af0b4a8c5 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 03:58:47 -0400 Subject: [PATCH 047/346] updated comment --- Items/Accessories/SpringStool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 42e53207fa..5cbac7f78f 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Items.Accessories // When hitting a target below you if (Main.LocalPlayer.Top.Y < target.Top.Y) { - // Effective +8% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way + // Effective +5% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) From 6a347e56e3a6c8f0ee10b5a27dfc04ced7945065 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 05:06:33 -0400 Subject: [PATCH 048/346] basher hand adjustment --- Projectiles/Melee/BasherHoldout.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 1658497495..d67dfede5c 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -268,13 +268,13 @@ namespace CalamityMod.Projectiles.Melee Vector2 rotationPoint = (Owner.direction == -1) ? new Vector2(texture.Width, texture.Height) : new Vector2(0, texture.Height); SpriteEffects flipSprite = (Owner.direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f; Color clr = Color.Tan; int swingCountFlip = (swingCount % 2 == 0 ? 1 : 3) + Owner.direction == 0 ? 2 : 0; Vector2 vel2 = Projectile.velocity.RotatedBy(MathHelper.PiOver2); float extraRot = MathHelper.PiOver4 * 1.2f * (swingCount % 2 == 0 ? (Owner.direction == -1 ? 1 : -1) : (Owner.direction == -1 ? -1 : 1)); float swooshDrawRotation = vel2.ToRotation() + extraRot; SpriteEffects swooshFlipSprite = (swingCount % 2 == 0 ? (Owner.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None) : (Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally)); + Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f + ((swingCount % 2 == 0 ? new Vector2(-6, 0) : new Vector2(-2, 0)).RotatedBy(drawRotation) * Owner.direction); Main.EntitySpriteDraw(swoosh, drawPosition + Projectile.velocity.RotatedBy(extraRot) * 12.5f, null, clr with { A = 0 } * bladefx * 0.4f, swooshDrawRotation, swoosh.Size() * 0.5f, Projectile.scale * 0.5f, swooshFlipSprite); //flipSprite | (swingCount % 2 == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally) From a4183d00b7806dd292754ef1b821f6c21b97d2ef Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 06:13:45 -0400 Subject: [PATCH 049/346] Update BasherHoldout.cs --- Projectiles/Melee/BasherHoldout.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index d67dfede5c..0050590376 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -63,6 +63,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile.knockBack = 0; attackTimer = cooldown; + swingCount = 1; } } public void ResetVariables() // After a swing, reset/adjust many stats @@ -82,7 +83,7 @@ namespace CalamityMod.Projectiles.Melee float angleVariation = (float)Math.Sin(time * 0.06f / Projectile.MaxUpdates) * 0.1f; - float outwardDistance = 5 * Projectile.scale; + float outwardDistance = 5; Owner.ChangeDir(Math.Sign(toMouse.X)); Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, (toMouse.ToRotation() + (bladeRot + angleVariation) * Owner.direction + MathHelper.PiOver2 * -Owner.direction) + (Owner.direction == -1 ? MathHelper.Pi : 0)); Vector2 handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.None, Owner.compositeFrontArm.rotation) + (Owner.compositeFrontArm.rotation + MathHelper.PiOver2).ToRotationVector2() * outwardDistance; @@ -267,6 +268,7 @@ namespace CalamityMod.Projectiles.Melee float drawRotation = Projectile.rotation + ((Owner.direction == -1) ? MathHelper.Pi - MathHelper.PiOver4 : MathHelper.PiOver4); Vector2 rotationPoint = (Owner.direction == -1) ? new Vector2(texture.Width, texture.Height) : new Vector2(0, texture.Height); SpriteEffects flipSprite = (Owner.direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f + ((swingCount % 2 == 0 ? new Vector2(-6, 0) : new Vector2(-2, 0)).RotatedBy(drawRotation) * Owner.direction); Color clr = Color.Tan; int swingCountFlip = (swingCount % 2 == 0 ? 1 : 3) + Owner.direction == 0 ? 2 : 0; @@ -274,7 +276,6 @@ namespace CalamityMod.Projectiles.Melee float extraRot = MathHelper.PiOver4 * 1.2f * (swingCount % 2 == 0 ? (Owner.direction == -1 ? 1 : -1) : (Owner.direction == -1 ? -1 : 1)); float swooshDrawRotation = vel2.ToRotation() + extraRot; SpriteEffects swooshFlipSprite = (swingCount % 2 == 0 ? (Owner.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None) : (Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally)); - Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f + ((swingCount % 2 == 0 ? new Vector2(-6, 0) : new Vector2(-2, 0)).RotatedBy(drawRotation) * Owner.direction); Main.EntitySpriteDraw(swoosh, drawPosition + Projectile.velocity.RotatedBy(extraRot) * 12.5f, null, clr with { A = 0 } * bladefx * 0.4f, swooshDrawRotation, swoosh.Size() * 0.5f, Projectile.scale * 0.5f, swooshFlipSprite); //flipSprite | (swingCount % 2 == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally) From 161a43d7b068a2810e72f6492e1a194bb148fc83 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Sun, 8 Mar 2026 12:37:38 -0400 Subject: [PATCH 050/346] Fix minor localization issues in debuff description PR --- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 4 ++-- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index fe97ac67a8..52a94b32e7 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -366,8 +366,8 @@ Vaporfied: { VermillionFlux: { DisplayName: Vermillion Flux Description: Sharp arcs of scarlet course through you - ItemTooltipPlayer: Electric - 5 DPS. Deals 5x damage against moving players - ItemTooltipEnemy: Electric - 37.5 DPS. Deals 4x damage against moving targets + ItemTooltipPlayer: Electric - 5 DPS. 5x damage to moving players + ItemTooltipEnemy: Electric - 37.5 DPS. 4x damage to moving targets } Voidfrost: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 01ec5a9a41..42afaa422e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1058,7 +1058,7 @@ LeviathanAmbergris: { Tooltip: ''' 120% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration - Your dashes are empowered by water, knocking back and damaging enemies with viscous currents that inflict [cbuff:CalamityMod/RiptideDebuff] + Your dashes are empowered by water, knocking back and damaging enemies with vicious currents that inflict [cbuff:CalamityMod/RiptideDebuff] Visual effects are reduced if visibility is disabled ''' } From 132f3645a9eda6af3735ac9d966312c53110954d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 13:22:42 -0400 Subject: [PATCH 051/346] Abaddon and Apollyon tooltip line about Bane damage changes if the accessory is unequipped --- Items/Accessories/Abaddon.cs | 4 ++-- Items/Accessories/Apollyon.cs | 4 ++-- .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Items/Accessories/Abaddon.cs b/Items/Accessories/Abaddon.cs index 75eaac9461..63d4fcde2c 100644 --- a/Items/Accessories/Abaddon.cs +++ b/Items/Accessories/Abaddon.cs @@ -30,9 +30,9 @@ namespace CalamityMod.Items.Accessories } public override void ModifyTooltips(List list) { - Player player = Main.LocalPlayer; if (Main.LocalPlayer != null) - list.FindAndReplace("[DAMAGE]", ((int)(Bane.debuffData.EnemyLostRegen / 2 * player.Calamity().playerBaneDebuffDamage)).ToString()); + list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().abaddon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString()) + : this.GetLocalizedValue("Unequipped")); } } } diff --git a/Items/Accessories/Apollyon.cs b/Items/Accessories/Apollyon.cs index 1003190c09..52426a24c6 100644 --- a/Items/Accessories/Apollyon.cs +++ b/Items/Accessories/Apollyon.cs @@ -42,9 +42,9 @@ namespace CalamityMod.Items.Accessories } public override void ModifyTooltips(List list) { - Player player = Main.LocalPlayer; if (Main.LocalPlayer != null) - list.FindAndReplace("[DAMAGE]", ((int)(Bane.debuffData.EnemyLostRegen / 2 * player.Calamity().playerBaneDebuffDamage)).ToString()); + list.FindAndReplace("[DAMAGELINE]", Main.LocalPlayer.Calamity().apollyon ? this.GetLocalization("Equipped").Format(((int)(Bane.debuffData.EnemyLostRegen / 2 * Main.LocalPlayer.Calamity().playerBaneDebuffDamage)).ToString()) + : this.GetLocalizedValue("Unequipped")); } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 42afaa422e..e0d5223d76 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -4,8 +4,10 @@ Abaddon: { ''' Critical strikes curse enemies with [cbuff:CalamityMod/Bane] that scales off of your critical strike chance When critically hit, enemies spread all debuffs they are afflicted with that are weaker than your [cbuff:CalamityMod/Bane] to nearby enemies - Current [cbuff:CalamityMod/Bane] damage: [DAMAGE] DPS + [DAMAGELINE] ''' + Equipped: Current [cbuff:CalamityMod/Bane] damage: {0} DPS + Unequipped: Equip this accessory to view your current [cbuff:CalamityMod/Bane] damage } AbyssalDivingGear: { @@ -159,8 +161,10 @@ Apollyon: { Critical strikes curse enemies with [cbuff:CalamityMod/Bane] that greatly scales off of your critical strike chance When critically hit, enemies spread all debuffs they are afflicted with that are weaker than your [cbuff:CalamityMod/Bane] to nearby enemies Critical strikes deal an additional 3% damage per debuff on the enemy - Current [cbuff:CalamityMod/Bane] damage: [DAMAGE] DPS + [DAMAGELINE] ''' + Equipped: Current [cbuff:CalamityMod/Bane] damage: {0} DPS + Unequipped: Equip this accessory to view your current [cbuff:CalamityMod/Bane] damage } AquaticEmblem: { From 3662a83e355982887b8359a9283dfba15fd70724 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 16:01:40 -0400 Subject: [PATCH 052/346] Two minor fixes 1. Removed debug text from Holy Collider's flames 2. Fixed Basher's tooltip still saying it inflicts Poisoned --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- Projectiles/Melee/HolyColliderHolyFire.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 08137c2b85..c5383d7d53 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -166,7 +166,7 @@ BansheeHook: { Basher: { DisplayName: Basher - Tooltip: Swings a rotten club that inflicts [cbuff:Poisoned] and [cbuff:CalamityMod/Irradiated] while knocking you back in the process + Tooltip: Swings a rotten club that inflicts [cbuff:CalamityMod/Irradiated] while knocking you back in the process } BladecrestOathsword: { diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index 46e0e0485c..85a8a361da 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -144,7 +144,6 @@ namespace CalamityMod.Projectiles.Melee } if (Projectile.frame > 3) Projectile.frame = 0; - Main.NewText(Projectile.timeLeft); time++; } From 9bbfbfd2fb67802471c5003191feb8a4bd8b6c1b Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 8 Mar 2026 15:23:52 -0500 Subject: [PATCH 053/346] Bane Balancing, Glaive shred gets Vodka 45 -> 20 base dps Abaddon 3.5x -> 3x crit to bane damage Apollyon 7.5x -> 8x crit to bane damage Abaddon with 40% crit (6 lucky, 12% gear crit): 44 DPS (Tier expects ~550 DPS total) Apollyon with 55% crit (6 lucky, 27% gear crit): 108 DPS (Tier expects ~1300 DPS total. It's very easy to critmax further then this at this tier.) --- Buffs/DamageOverTime/Bane.cs | 2 +- Items/Accessories/Abaddon.cs | 2 +- Items/Accessories/Apollyon.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Buffs/DamageOverTime/Bane.cs b/Buffs/DamageOverTime/Bane.cs index a31e16ea46..c429af3dda 100644 --- a/Buffs/DamageOverTime/Bane.cs +++ b/Buffs/DamageOverTime/Bane.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Buffs.DamageOverTime public static Color baneColor2 = new Color(0, 232, 146); public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 90, + EnemyLostRegen = 40, NPCLifeRegenMethod = BaneNPCLifeRegen }; public override void SetStaticDefaults() diff --git a/Items/Accessories/Abaddon.cs b/Items/Accessories/Abaddon.cs index 63d4fcde2c..cb9c3ab317 100644 --- a/Items/Accessories/Abaddon.cs +++ b/Items/Accessories/Abaddon.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static float BrimstoneFlamesReduction = 0.5f; - public static float critScaling = 3.5f; // How effective crit chance is at increasing debuff damage + public static float critScaling = 3f; // How effective crit chance is at increasing debuff damage public override void SetDefaults() { Item.width = 26; diff --git a/Items/Accessories/Apollyon.cs b/Items/Accessories/Apollyon.cs index 52426a24c6..6a886f3eff 100644 --- a/Items/Accessories/Apollyon.cs +++ b/Items/Accessories/Apollyon.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static float critScaling = 7.5f; // How effective crit chance is at increasing debuff damage + public static float critScaling = 8f; // How effective crit chance is at increasing debuff damage public static float critDamageBoostPerDebuff = 0.03f; // 3% increased crit damage per debuff public override void SetDefaults() { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 729cf87c18..163b7a2a5b 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1017,6 +1017,7 @@ namespace CalamityMod.NPCs dmg += 480; // 240 DPS blazingStarShredTimer--; } + dmg = (int)ActiveTypelessDebuffMultiplier.ApplyTo(dmg); npc.lifeRegenCount -= dmg; if (damage < dmg / 12) // 1/6th of the DPS dealt by Glaive Shred shows up as the indicator, unless another debuff does more per tick damage = dmg / 12; From 4435841ea2d098db7101bbb741520004ca3a5428 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 16:47:08 -0400 Subject: [PATCH 054/346] Rearranged projectile tweaks in alphabetical order --- Projectiles/CalamityGlobalProjectileTweaks.cs | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 38d739208f..08c1a5a016 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -249,45 +249,31 @@ namespace CalamityMod.Projectiles #endregion #region CATEGORY 4: Defense Damage support - - //Deerclops - { ProjectileID.DeerclopsIceSpike, defenseDamage }, - { ProjectileID.DeerclopsRangedProjectile, defenseDamage }, - - //Skeletron Prime { ProjectileID.BombSkeletronPrime, defenseDamage }, - { ProjectileID.RocketSkeleton, defenseDamage }, // Skeleton Commando rockets, reused by Rev+ Skeletron Prime - //Fishron + { ProjectileID.CannonballHostile, defenseDamage }, { ProjectileID.Cthulunado, defenseDamage }, - { ProjectileID.Sharknado, defenseDamage }, - //Betsy + { ProjectileID.CultistBossFireBall, defenseDamage }, + { ProjectileID.CultistBossLightningOrbArc, defenseDamage }, // Also used by Storm Weaver { ProjectileID.DD2BetsyFireball, defenseDamage }, { ProjectileID.DD2BetsyFlameBreath, defenseDamage }, - //Cultist - { ProjectileID.CultistBossFireBall, defenseDamage }, - { ProjectileID.CultistBossLightningOrbArc, defenseDamage }, // Also used by storm weaver - // Empress of Light - { ProjectileID.FairyQueenLance, defenseDamage }, - { ProjectileID.FairyQueenSunDance, defenseDamage }, - { ProjectileID.HallowBossRainbowStreak, defenseDamage }, - { ProjectileID.HallowBossLastingRainbow, defenseDamage }, - //Storm Weaver + { ProjectileID.DeerclopsIceSpike, defenseDamage }, + { ProjectileID.DeerclopsRangedProjectile, defenseDamage }, + { ProjectileID.FairyQueenLance, defenseDamage }, // EoL lance + { ProjectileID.FairyQueenSunDance, defenseDamage }, // EoL sun dance + { ProjectileID.FlamingScythe, defenseDamage }, // Pumpking scythes { ProjectileID.FrostWave, defenseDamage }, // Ice Queen frost waves, reused by Storm Weaver - //Moon Lord + { ProjectileID.HallowBossRainbowStreak, defenseDamage }, // EoL rainbow bolt + { ProjectileID.HallowBossLastingRainbow, defenseDamage }, // EoL everlasting rainbow { ProjectileID.PhantasmalDeathray, defenseDamage }, { ProjectileID.PhantasmalSphere, defenseDamage }, - //Queen Slime + { ProjectileID.Present, defenseDamage }, // Santa-NK1 presents { ProjectileID.QueenSlimeSmash, defenseDamage }, - //Martian Saucer + { ProjectileID.RocketSkeleton, defenseDamage }, // Skeleton Commando rockets, reused by Rev+ Skeletron Prime { ProjectileID.SaucerDeathray, defenseDamage }, { ProjectileID.SaucerMissile, defenseDamage }, - //Plantera + { ProjectileID.Sharknado, defenseDamage }, + { ProjectileID.Spike, defenseDamage }, // Santa-NK1 spike balls { ProjectileID.ThornBall, Do(Main.zenithWorld ? IgnoreWater : DontIgnoreWater, DefenseDamage) }, - //Misc - { ProjectileID.FlamingScythe, defenseDamage }, //Pumpking scythes - { ProjectileID.CannonballHostile, defenseDamage }, - { ProjectileID.Spike, defenseDamage }, // Santank spike balls - { ProjectileID.Present, defenseDamage }, //Santank presents #endregion #region CATEGORY 5: ID-Static Immunity Frame changes From 21d076bd3a30c1aba059a0fef733ac7ab8ba0b9d Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 8 Mar 2026 19:20:53 -0700 Subject: [PATCH 055/346] 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-%0j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Su({um+`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 056/346] 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 057/346] 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 058/346] 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 059/346] 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 3421b1a54a9c3c92a5e06f394948435cb180efc7 Mon Sep 17 00:00:00 2001 From: Big E Date: Mon, 9 Mar 2026 21:49:45 -0400 Subject: [PATCH 060/346] + Yeah........ --- Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs index 686fb8adac..9caa3a9e92 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodBomb.cs @@ -29,6 +29,7 @@ public class BloodBomb : ModNPC, ILocalizedModType { NPCID.Sets.ProjectileNPC[Type] = true; BloodBombYellow = ModContent.Request("CalamityMod/Projectiles/Boss/BrainOfCthulhu/BloodBomb2"); + this.HideFromBestiary(); } internal static Texture2D GetBombGlow() From 5615569d7bd64796db8b05b066ada77003ef1a1b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 11 Mar 2026 07:01:02 +0700 Subject: [PATCH 061/346] Removed Death-only World Feeder loot manip --- NPCs/CalamityGlobalNPCLoot.cs | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index 8576c9b207..e6347cc0b9 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -498,37 +498,6 @@ namespace CalamityMod.NPCs npcLoot.Add(ItemID.HallowedKey, 10); break; - // World Feeder - // 6-15 Cursed Flame INSTEAD OF 2-5 in Death Mode - // 4-8 Souls of Night in Death Mode - // Also let World Feeders drop their other loot in Death Mode, as only the Head contains loot normally but it may not be killed last - // Monster Meat is already dropped by all 3 segments - case NPCID.SeekerHead: - npcLoot.RemoveWhere( - // The following expression returns true if the following conditions are met: - rule => rule is CommonDrop drop // If the rule is an CommonDrop instance - && drop.itemId == ItemID.CursedFlame // And that instance drops a Cursed Flame - ); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => !CalamityWorld.death, () => !CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 2, 5); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 6, 15); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death, CalamityUtils.GetTextValue("Condition.Drops.IsDeath"))).Add(ItemID.SoulofNight, 1, 4, 8); - break; - case NPCID.SeekerBody: - case NPCID.SeekerTail: - npcLoot.RemoveWhere( - // The following expression returns true if the following conditions are met: - rule => rule is CommonDrop drop // If the rule is an CommonDrop instance - && drop.itemId == ItemID.CursedFlame // And that instance drops a Cursed Flame - ); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => !CalamityWorld.death, () => !CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 2, 5); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death)).Add(ItemID.CursedFlame, 1, 6, 15); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, () => CalamityWorld.death, CalamityUtils.GetTextValue("Condition.Drops.IsDeath"))).Add(ItemID.SoulofNight, 1, 4, 8); - - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death, false)).Add(ItemID.MeatGrinder, 200); - npcLoot.DefineConditionalDropSet(DropHelper.If(() => CalamityWorld.death && Main.WindyEnoughForKiteDrops, false)).Add(ItemID.KiteWorldFeeder, 25); - break; - #endregion - #region Jungle // Moss Hornet // Needler @ 4% Normal, 6.67% Expert+ From 4f8cf0ca6ea3b8cbd55bf2d84c999608d85889a6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 11 Mar 2026 08:19:03 +0700 Subject: [PATCH 062/346] Tweaks to base stats --- Items/Accessories/Wings/HadalMantle.cs | 2 +- Items/Accessories/Wings/StarlightWings.cs | 2 +- Items/CalamityGlobalItem.cs | 30 +++++++++++------------ Items/CalamityGlobalItemTooltip.cs | 8 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Items/Accessories/Wings/HadalMantle.cs b/Items/Accessories/Wings/HadalMantle.cs index 23778456c2..a0de1808f7 100644 --- a/Items/Accessories/Wings/HadalMantle.cs +++ b/Items/Accessories/Wings/HadalMantle.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings public override float MaxAscentSpeed => 1.805f; public override float BaseAscent => 0.125f; - public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(150, 8f, 2f); + public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(130, 8f, 2f); public override void SetDefaults() { diff --git a/Items/Accessories/Wings/StarlightWings.cs b/Items/Accessories/Wings/StarlightWings.cs index b255d4609c..4f3b1fb1ec 100644 --- a/Items/Accessories/Wings/StarlightWings.cs +++ b/Items/Accessories/Wings/StarlightWings.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories.Wings [AutoloadEquip(EquipType.Wings)] public class StarlightWings : BaseWings { - public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(160, 7.5f, 1.5f); + public override void SetStaticDefaults() => ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(170, 7.5f, 1.5f); public override void SetDefaults() { diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index c75db9fbc2..eab16f4ab7 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -192,9 +192,9 @@ namespace CalamityMod.Items stats[(int)VanillaWingID.FrozenWings].AccRunAccelerationMult = 1.5f; // 160 -> 130 flight time stats[(int)VanillaWingID.FlameWings].FlyTime = 130; - // 160 -> 180 flight time, 7.5 -> 6.25 horizontal speed + // 160 -> 180 flight time, 7.5 -> 6.75 horizontal speed stats[(int)VanillaWingID.BatWings].FlyTime = 180; - stats[(int)VanillaWingID.BatWings].AccRunSpeedOverride = 6.25f; + stats[(int)VanillaWingID.BatWings].AccRunSpeedOverride = 6.75f; // 1 -> 1.5 acceleration multiplier stats[(int)VanillaWingID.ButterflyWings].AccRunAccelerationMult = 1.5f; @@ -204,13 +204,13 @@ namespace CalamityMod.Items stats[(int)VanillaWingID.LeafWings].FlyTime = 170; stats[(int)VanillaWingID.LeafWings].AccRunSpeedOverride = 9f; stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 1.5f; - // (Spectre Wings) 1 -> 2 acceleration multiplier - stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 2f; + // (Spectre Wings) 1 -> 1.5 acceleration multiplier + stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 1.5f; // 170 -> 210 flight time stats[(int)VanillaWingID.BeetleWings].FlyTime = 210; - // 180 -> 210 flight time - stats[(int)VanillaWingID.TatteredFairyWings].FlyTime = 210; + // 180 -> 300 flight time + stats[(int)VanillaWingID.TatteredFairyWings].FlyTime = 300; // (Empress Wings) 150 -> 120 flight time stats[(int)VanillaWingID.RainbowWings].FlyTime = 120; @@ -1228,12 +1228,12 @@ namespace CalamityMod.Items } if (item.type == ItemID.DemonWings && !player.mount.Active) - player.maxFallSpeed *= 1.3f; + player.maxFallSpeed *= 1.2f; if (item.type == ItemID.BeeWings && !player.mount.Active && !player.controlDown) { - player.gravity *= 0.6f; - player.maxFallSpeed *= 0.6f; + player.gravity *= 0.75f; + player.maxFallSpeed *= 0.75f; } if (item.type == ItemID.FinWings) @@ -1314,8 +1314,8 @@ namespace CalamityMod.Items switch (item.type) { case ItemID.AngelWings: - maxAscentMultiplier *= 1.3f; - constantAscend *= 1.5f; + maxAscentMultiplier *= 1.2f; + constantAscend *= 1.35f; break; case ItemID.DemonWings: ascentWhenFalling *= 2f; @@ -1323,15 +1323,15 @@ namespace CalamityMod.Items maxCanAscendMultiplier *= 2f; break; case ItemID.FlameWings: - maxAscentMultiplier *= 1.2f; - constantAscend *= 1.35f; + maxAscentMultiplier *= 1.1067f; + constantAscend *= 1.25f; break; case ItemID.ButterflyWings: - maxAscentMultiplier *= 0.9f; + maxAscentMultiplier *= 0.6667f; constantAscend *= 5f; break; case ItemID.GhostWings: - maxAscentMultiplier *= 0.904f; + maxAscentMultiplier *= 0.6025f; constantAscend *= 5f; break; default: diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index e783511cf0..d61e7dff7d 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1122,7 +1122,7 @@ namespace CalamityMod.Items AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); if (item.type == ItemID.AngelWings) - AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.95f, 0.15f); + AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.8f, 0.135f); if (item.type == ItemID.DemonWings) AddWingStats(item.wingSlot, 1f, 0.2f, 1f, 1.5f, 0.1f, "DemonWings"); @@ -1131,7 +1131,7 @@ namespace CalamityMod.Items AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); if (item.type == ItemID.ButterflyWings) - AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.35f, 0.5f); + AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1f, 0.5f); if (item.type == ItemID.FairyWings) AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); @@ -1146,13 +1146,13 @@ namespace CalamityMod.Items AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.66f, 0.1f, "BoneWings"); if (item.type == ItemID.FlameWings) - AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.8f, 0.135f); + AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.66f, 0.125f); if (item.type == ItemID.FrozenWings) AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); if (item.type == ItemID.GhostWings) - AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.5f); + AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1f, 0.5f); if (item.type == ItemID.BeetleWings) AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.66f, 0.1f); From e46fb185662cb490a3cddf63580ae095cacd1a00 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 10 Mar 2026 21:38:04 -0400 Subject: [PATCH 063/346] Readded endregion --- NPCs/CalamityGlobalNPCLoot.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalNPCLoot.cs b/NPCs/CalamityGlobalNPCLoot.cs index e6347cc0b9..5fa1266546 100644 --- a/NPCs/CalamityGlobalNPCLoot.cs +++ b/NPCs/CalamityGlobalNPCLoot.cs @@ -497,6 +497,7 @@ namespace CalamityMod.NPCs npcLoot.Add(ItemDropRule.NormalvsExpert(ModContent.ItemType(), 7, 4)); npcLoot.Add(ItemID.HallowedKey, 10); break; + #endregion #region Jungle // Moss Hornet From 46a9f172d3c003832931595d7fbd3fd6044e52f2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 16:12:44 -0400 Subject: [PATCH 064/346] Changed Tesla's Amulet tooltip --- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index e0d5223d76..6aa3b7186e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1848,7 +1848,8 @@ TeslasAmulet: { DisplayName: Tesla's Amulet Tooltip: ''' - Generates an electrifying field that slows enemies + Generates an electrifying field around you + The field inflicts [cbuff:CalamityMod/StaticDischarge] and [cbuff:CalamityMod/GalvanicCorrosion] The field has reduced opacity if visibility is disabled Reduces the duration of [cbuffplr:CalamityMod/StaticDischarge] ''' From 417ad035e1bb501a838295ce6218649fc4c59039 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 16:37:50 -0400 Subject: [PATCH 065/346] Removed unused evilSmasherBoost variable --- CalPlayer/CalamityPlayer.cs | 6 ------ CalPlayer/CalamityPlayerHitHurt.cs | 3 --- CalPlayer/CalamityPlayerMiscEffects.cs | 5 ----- Items/CalamityGlobalItem.cs | 7 ------- 4 files changed, 21 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a53649bd48..e155649c21 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -334,11 +334,6 @@ namespace CalamityMod.CalPlayer public int arpeggioCooldown = 0; /// Cooldown variable which prevents using Burning Sea during its "burn-out" mechanic. public int burningSeaBurnOut = 0; - /// - /// How many stacks of Evil Smasher's boost the player has. This increases the weapon's damage, use speed, and knockback.
- /// Getting hit decreases this by 1. Switching to a different item resets this to 0. - ///
- public int evilSmasherBoost = 0; /// Cooldown variable for spawning Plague Tainted SMG's drones from left-click bullets. public int plagueTaintedSMGDroneCooldown = 0; /// Cooldown variable which prevents using Firestorm Cannon or Spectralstorm Cannon during their overheat periods. @@ -3440,7 +3435,6 @@ namespace CalamityMod.CalPlayer CurrentlyViewedHologramText = string.Empty; #endregion - evilSmasherBoost = 0; burningSeaBurnOut = 0; flareGunOverheat = 0; hellbornShots = 0; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 38b829bd1e..c97adf9412 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2220,9 +2220,6 @@ namespace CalamityMod.CalPlayer LoseAdrenalineOnHurt(hurtInfo, false); } - if (evilSmasherBoost > 0) - evilSmasherBoost -= 1; - if (trinketOfChi) chiBuffTimer = 0; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 17c9bcf1e9..085ae24558 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3543,11 +3543,6 @@ namespace CalamityMod.CalPlayer if (Player.HeldItem.type != ModContent.ItemType()) planarSpeedBoost = 0; } - if (evilSmasherBoost > 0) - { - if (Player.HeldItem.type != ModContent.ItemType()) - evilSmasherBoost = 0; - } // Flight time boosts double flightTimeMult = 1D + diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 62313a8039..2131540ce1 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -562,13 +562,6 @@ namespace CalamityMod.Items #region Use Item Changes public override void HoldItem(Item item, Player player) { - // Clear Evil Smasher buffs if not holding Evil Smasher - if (player.Calamity().evilSmasherBoost > 0) - { - if (item.type != ItemType()) - player.Calamity().evilSmasherBoost = 0; - } - if (player.Calamity().ChaosStone && item.mana == 0 && !player.ItemTimeIsZero) { player.manaRegenDelay = player.maxRegenDelay; From 68314d7b673779f01913141f62a0fe1ceb3484fe Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 18:04:42 -0400 Subject: [PATCH 066/346] Betsy's fireballs no longer deal DD --- Projectiles/CalamityGlobalProjectileTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 08c1a5a016..6f3860270f 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -254,7 +254,6 @@ namespace CalamityMod.Projectiles { ProjectileID.Cthulunado, defenseDamage }, { ProjectileID.CultistBossFireBall, defenseDamage }, { ProjectileID.CultistBossLightningOrbArc, defenseDamage }, // Also used by Storm Weaver - { ProjectileID.DD2BetsyFireball, defenseDamage }, { ProjectileID.DD2BetsyFlameBreath, defenseDamage }, { ProjectileID.DeerclopsIceSpike, defenseDamage }, { ProjectileID.DeerclopsRangedProjectile, defenseDamage }, From 503b9b6406942a4496962b179d810ef0ab6fc6d4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Mar 2026 18:38:49 -0400 Subject: [PATCH 067/346] Valkyrie Ray balance --- Items/Weapons/Magic/ValkyrieRay.cs | 8 ++++---- Projectiles/Magic/ValkyrieRayBeam.cs | 2 +- Projectiles/Magic/ValkyrieRayStaff.cs | 21 +++++++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Items/Weapons/Magic/ValkyrieRay.cs b/Items/Weapons/Magic/ValkyrieRay.cs index 3dfcc3b6cd..10aff81ac9 100644 --- a/Items/Weapons/Magic/ValkyrieRay.cs +++ b/Items/Weapons/Magic/ValkyrieRay.cs @@ -10,11 +10,11 @@ namespace CalamityMod.Items.Weapons.Magic public class ValkyrieRay : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; - // The base use time of the weapon is 28: 18 charge frames + 10 cooldown frames. + // The base use time of the weapon is 36: 24 charge frames + 12 cooldown frames. // The rate at which it progresses through its charge and discharge cycle is dynamically sped up by reforges. // This math is handled in its holdout projectile, ValkyrieRayStaff. - public const int ChargeFrames = 18; - public const int CooldownFrames = 10; + public const int ChargeFrames = 24; + public const int CooldownFrames = 12; public const float GemDistance = 18f; public static readonly Color LightColor = new Color(235, 40, 121); @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 54; Item.height = 52; - Item.damage = 115; + Item.damage = 90; Item.knockBack = 8.5f; Item.DamageType = DamageClass.Magic; Item.crit = 11; diff --git a/Projectiles/Magic/ValkyrieRayBeam.cs b/Projectiles/Magic/ValkyrieRayBeam.cs index 61bf80969b..8c6f71bd4a 100644 --- a/Projectiles/Magic/ValkyrieRayBeam.cs +++ b/Projectiles/Magic/ValkyrieRayBeam.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.Magic // The beam itself still stops on tiles, but its invisible "source" projectile ignores them. Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; + Projectile.localNPCHitCooldown = Lifetime / 2; // The beam lasts for only some frames and fades out over that time. Projectile.timeLeft = Lifetime; diff --git a/Projectiles/Magic/ValkyrieRayStaff.cs b/Projectiles/Magic/ValkyrieRayStaff.cs index 64143f3e25..05285981d6 100644 --- a/Projectiles/Magic/ValkyrieRayStaff.cs +++ b/Projectiles/Magic/ValkyrieRayStaff.cs @@ -13,6 +13,9 @@ namespace CalamityMod.Projectiles.Magic public override string Texture => "CalamityMod/Items/Weapons/Magic/ValkyrieRay"; private const float AimResponsiveness = 0.66f; + public ref float Timer => ref Projectile.ai[0]; + public ref float Fired => ref Projectile.ai[1]; + public ref float TimeRate => ref Projectile.ai[2]; public override void SetDefaults() { @@ -25,8 +28,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.timeLeft = 900; } - // ai[0] is a time-dilated frame counter. ai[1] is whether the beam has already fired. - // localAI[0] is the rate at which the "frame" counter increases. public override void AI() { Player player = Main.player[Projectile.owner]; @@ -34,20 +35,20 @@ namespace CalamityMod.Projectiles.Magic // Calculate how quickly the staff should charge. Charge increases by some number close to 1 every frame. // Speed increasing reforges make this number greater than 1. Slowing reforges make it smaller than 1. - if (Projectile.localAI[0] == 0f) - Projectile.localAI[0] = (ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime; + if (TimeRate == 0f) + TimeRate = (ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime; // Increment the timer for the staff. If the timer has passed the total time, destroy it. - Projectile.ai[0] += Projectile.localAI[0]; + Timer += TimeRate; int maxTime = ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames; - if (Projectile.ai[0] > maxTime) + if (Timer > maxTime) { Projectile.Kill(); return; } // Compute the weapon's charge. - float chargeLevel = MathHelper.Clamp(Projectile.ai[0] / ValkyrieRay.ChargeFrames, 0f, 1f); + float chargeLevel = MathHelper.Clamp(Timer / ValkyrieRay.ChargeFrames, 0f, 1f); // Common code among holdouts to keep the holdout projectile directly in the player's hand UpdatePlayerVisuals(player, rrp); @@ -58,9 +59,9 @@ namespace CalamityMod.Projectiles.Magic Vector2 gemPos = Projectile.Center + gemOffset.RotatedBy(angle); // Firing or charging? - if (chargeLevel >= 1f && Projectile.ai[1] == 0f) + if (chargeLevel >= 1f && Fired == 0f) { - Projectile.ai[1] = 1f; // so it never fires again + Fired = 1f; // so it never fires again FiringEffects(gemPos); if (Projectile.owner == Main.myPlayer) { @@ -68,7 +69,7 @@ namespace CalamityMod.Projectiles.Magic laser.Center = gemPos; } } - else if (Projectile.ai[1] == 0f) + else if (Fired == 0f) { // The player can constantly re-aim the staff while it's charging, but once it fires it is locked in place. UpdateAim(rrp, Projectile.velocity.Length()); From fe18cfbd9fd489afe97fd058f6b9ca624e9b86e3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 9 Mar 2026 18:49:04 -0400 Subject: [PATCH 068/346] Galvanic Corrosion gets electric color in item tooltips --- Buffs/StatDebuffs/GalvanicCorrosion.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Buffs/StatDebuffs/GalvanicCorrosion.cs b/Buffs/StatDebuffs/GalvanicCorrosion.cs index 018e738c30..204c4884d9 100644 --- a/Buffs/StatDebuffs/GalvanicCorrosion.cs +++ b/Buffs/StatDebuffs/GalvanicCorrosion.cs @@ -1,4 +1,5 @@ -using CalamityMod.NPCs; +using CalamityMod.DataStructures; +using CalamityMod.NPCs; using CalamityMod.Systems.Collections; using Terraria; using Terraria.ID; @@ -14,7 +15,13 @@ namespace CalamityMod.Buffs.StatDebuffs Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; BuffID.Sets.LongerExpertDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } + // Purely to make it get electric color in tooltips + public static DebuffData debuffData = new DebuffData() + { + ElectricDebuffScaling = 1 + }; public override void Update(NPC npc, ref int buffIndex) { From aaf65e9dae228f968adcaec17985b2a932ffbd09 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 9 Mar 2026 21:02:40 -0400 Subject: [PATCH 069/346] Axe of Regrowth can now replant Spine Trees --- Tiles/Crags/Tree/SpineSapling.cs | 26 ++++++++++++++++++++++++++ Tiles/Crags/Tree/SpineTree.cs | 10 +++++----- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Tiles/Crags/Tree/SpineSapling.cs b/Tiles/Crags/Tree/SpineSapling.cs index e122340eb9..aed63f0f69 100644 --- a/Tiles/Crags/Tree/SpineSapling.cs +++ b/Tiles/Crags/Tree/SpineSapling.cs @@ -10,6 +10,32 @@ namespace CalamityMod.Tiles.Crags.Tree { public class SpineSapling : ModTile { + public override void Load() + { + On_Player.TryReplantingTree += LetAxeofRegrowthReplant; + } + + private static void LetAxeofRegrowthReplant(On_Player.orig_TryReplantingTree orig, Player self, int x, int y) + { + if (Main.tile[x, y + 1].TileType == ModContent.TileType()) + { + // Destroy the Spine Tree tile above the base to give space for the Small Spine to place + WorldGen.KillTile(x, y - 1); + if (!TileObject.CanPlace(Player.tileTargetX, Player.tileTargetY, ModContent.TileType(), 0, self.direction, out var objectData)) + return; + bool placed = TileObject.Place(objectData); + WorldGen.SquareTileFrame(Player.tileTargetX, Player.tileTargetY); + if (placed) + { + TileObjectData.CallPostPlacementPlayerHook(Player.tileTargetX, Player.tileTargetY, ModContent.TileType(), 0, self.direction, objectData.alternate, objectData); + if (Main.netMode == NetmodeID.MultiplayerClient) + NetMessage.SendObjectPlacement(-1, Player.tileTargetX, Player.tileTargetY, objectData.type, objectData.style, objectData.alternate, objectData.random, self.direction); + } + } + else + orig(self, x, y); + } + public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; diff --git a/Tiles/Crags/Tree/SpineTree.cs b/Tiles/Crags/Tree/SpineTree.cs index 06d6eaffc3..d58e40d647 100644 --- a/Tiles/Crags/Tree/SpineTree.cs +++ b/Tiles/Crags/Tree/SpineTree.cs @@ -171,14 +171,14 @@ namespace CalamityMod.Tiles.Crags.Tree public override void NearbyEffects(int i, int j, bool closer) { - //kill the tree tiles if there are no tiles below it - if (!Framing.GetTileSafely(i, j + 1).HasTile) + // Kill the tree tiles if there are no tiles below it or if a Sapling is below it + // The Sapling check exists for Axe of Regrowth sapling replanting + Tile belowTile = Framing.GetTileSafely(i, j + 1); + if (!belowTile.HasTile || belowTile.TileType == ModContent.TileType()) { - WorldGen.KillTile(i, j, false, false, false); + WorldGen.KillTile(i, j); if (Main.netMode == NetmodeID.MultiplayerClient) - { NetMessage.SendData(MessageID.TileManipulation, -1, -1, null, 0, i, j); - } } } From 4b99dcef6b03700034cbee1394c644ce58aed364 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 9 Mar 2026 21:28:18 -0400 Subject: [PATCH 070/346] Removed Demonshade armor's red devil --- Buffs/Summon/DemonshadeSetDevilBuff.cs | 12 - Buffs/Summon/DemonshadeSetDevilBuff.png | Bin 993 -> 0 bytes CalPlayer/CalamityPlayer.cs | 6 - Items/Armor/Demonshade/DemonshadeHelm.cs | 17 -- .../en-US/Mods.CalamityMod.Buffs.hjson | 5 - ...CalamityMod.Items.Armor.PostMoonLord.hjson | 1 - .../en-US/Mods.CalamityMod.Items.Pets.hjson | 1 - ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 - Projectiles/Typeless/DemonshadeRedDevil.cs | 224 ------------------ Projectiles/Typeless/DemonshadeRedDevil.png | Bin 7102 -> 0 bytes 10 files changed, 267 deletions(-) delete mode 100644 Buffs/Summon/DemonshadeSetDevilBuff.cs delete mode 100644 Buffs/Summon/DemonshadeSetDevilBuff.png delete mode 100644 Projectiles/Typeless/DemonshadeRedDevil.cs delete mode 100644 Projectiles/Typeless/DemonshadeRedDevil.png diff --git a/Buffs/Summon/DemonshadeSetDevilBuff.cs b/Buffs/Summon/DemonshadeSetDevilBuff.cs deleted file mode 100644 index b9c589fc3a..0000000000 --- a/Buffs/Summon/DemonshadeSetDevilBuff.cs +++ /dev/null @@ -1,12 +0,0 @@ -using CalamityMod.Projectiles.Typeless; -using Terraria.ModLoader; - -namespace CalamityMod.Buffs.Summon -{ - public class DemonshadeSetDevilBuff : BaseSummonBuff - { - protected override int MinionProjectileType => ModContent.ProjectileType(); - - protected override ref bool MinionBool => ref BuffModdedOwner.rDevil; - } -} diff --git a/Buffs/Summon/DemonshadeSetDevilBuff.png b/Buffs/Summon/DemonshadeSetDevilBuff.png deleted file mode 100644 index 2bf486ac3e6f533648e2f007598a357a03234141..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 993 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^T}FfdWk9dNvV1jxdlK~3=B3ERzPNMYDuC(MQ%=Bu~mhw5?F;5kPQ;nS5g2gDap1~ zitr6kaLzAERWQ{v(KAr8<5EyiuqjGOvkG!?gK7uzY?U%fN(!v>^~=l4^~#O)@{7{- z4J|D#^$m>ljf`}GDs+o0^GXscbn}XpA%?)raY-#sF3Kz@$;{7F0GXSZlwVq6tE2?7 z2o50bEXhnm*pycc^%l^B`XCv7Lp=k1xY9|b`J7k}*aE-|9lTJ5pZV2$2m6n`ns;a4}>9u)7;N-yISxPQh7k->wop{OR^WERP z-_4983s37jvwnW3_?_+Z-S6jC$Ituv_4f~9lYbX8J_I?_nGL=kdVjFW8 z=nI|~OpBbiC@A&M@_)I0>W^Oa_chd?b6`B3@bt?3C~Hk7_47(y=e#n$1Wd5FduLfx z%AS3FmOKUgcb_Kp&)9c=KTBaohQN-Z>Vt}`Cr>z(3csm}*>Hog`bDHoGLKn1W7?8r zlPZqMe?M@@?CgH2*Og~|YJstzZ=%{l$L&NszJ+|QA&2jzah9kzQe9Sfd zU;VC1SUaA4y?W87o6Eg9KGtrHKXb}B#VPEZ#p+dI3wvH)$lzl>qam$!j^E&kwl3qV zz4PZzshjrYw3+Rms*yJ2%7UMJ5D}o8=a*UppGkahzfQ7t|Bb)r*FW~( XopI)D%)dXvpv>s$>gTe~DWM4f&Gwg0 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index e155649c21..2a86309ad8 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1300,8 +1300,6 @@ namespace CalamityMod.CalPlayer public bool daedalusCrystal = false; /// Hydrothermic armor's summoner set bonus minion. public bool chaosSpirit = false; - /// Demonshade armor's set bonus minion. - public bool redDevil = false; public bool GemTechSet = false; /// Calamity's Cobalt armor set bonus; increases damage and crit chance based on how fast the player is moving. public bool CobaltSet = false; @@ -1557,8 +1555,6 @@ namespace CalamityMod.CalPlayer /// Pearl of Enthrallment. public bool waterEleBuff = false; public bool fClump = false; - /// Demonshade armor's Red Devil. - public bool rDevil = false; /// Aerospec armor's Valkyrie. public bool aValkyrie = false; public bool apexShark = false; @@ -2814,7 +2810,6 @@ namespace CalamityMod.CalPlayer brimEleBuff = false; waterEleBuff = false; fClump = false; - rDevil = false; aValkyrie = false; sCrystal = false; sGod = false; @@ -2841,7 +2836,6 @@ namespace CalamityMod.CalPlayer fungalClumpVanity = false; howlsHeart = false; howlsHeartVanity = false; - redDevil = false; valkyrie = false; slimeGod = false; chaosSpirit = false; diff --git a/Items/Armor/Demonshade/DemonshadeHelm.cs b/Items/Armor/Demonshade/DemonshadeHelm.cs index ed2f083749..997c216a6f 100644 --- a/Items/Armor/Demonshade/DemonshadeHelm.cs +++ b/Items/Armor/Demonshade/DemonshadeHelm.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Items.Armor.Demonshade // Set Bonus public static int SetBonusMinionSlotBoost = 8; public static float SetBonusSummonDamageBoost = 1f; - public static int DevilDamage = 1000; public static int BeamDamage => CalamityUtils.ScaleWithDifficulty(300); public static int ScytheDamage => CalamityUtils.ScaleWithDifficulty(500); public static int EnrageDuration = CalamityUtils.SecondsToFrames(10); @@ -59,22 +58,6 @@ namespace CalamityMod.Items.Armor.Demonshade modPlayer.dsSetBonus = true; modPlayer.wearingRogueArmor = true; modPlayer.WearingPostMLSummonerSet = true; - if (player.whoAmI == Main.myPlayer && !modPlayer.chibii) - { - modPlayer.redDevil = true; - var source = player.GetSource_ItemUse(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(DevilDamage); - - var devil = Projectile.NewProjectileDirect(source, player.Center, -Vector2.UnitY, ModContent.ProjectileType(), damage, 0f, Main.myPlayer, 2f, 0f); - devil.originalDamage = DevilDamage; - } - } player.maxMinions += SetBonusMinionSlotBoost; player.GetDamage() += SetBonusSummonDamageBoost; } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 52a94b32e7..7c6c20ee1b 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1358,11 +1358,6 @@ DazzlingStabberBuff: { Description: En garde! } -DemonshadeSetDevilBuff: { - DisplayName: Red Devil - Description: The red devil will protect you -} - EnchantedKnifeStaffBuff: { DisplayName: Enchanted Knife Description: Junk knives not included diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 5a9ad82524..af6b6d7cde 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -307,7 +307,6 @@ DemonshadeHelm: { {$CommonItemTooltip.IncreasesMaxMinionsBy} {$CommonItemTooltip.PercentIncreasedSummonDamage@1} Shadowbeams and demon scythes will fire down when you are hit - A friendly red devil follows you around {2} to enrage nearby enemies with a dark magic spell for {3} seconds This makes them take {4}x total damage, but they will deal {5}x damage to you ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson index d8d310e8b3..50f567d1bb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Pets.hjson @@ -54,7 +54,6 @@ CosmicPlushie: { Tooltip: ''' Summons the devourer of the cosmos...? - Suppresses friendly red devils 'Sharp objects possibly included' ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index fd7feb6519..cda4323410 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -42,7 +42,6 @@ CursorProjSplit.DisplayName: Aestheticus Crystal CyanLabSeeker.DisplayName: Seeking Mechanism DarkIce.DisplayName: Dark Ice DeepseaBlaze.DisplayName: Deepsea Blaze -DemonshadeRedDevil.DisplayName: Red Devil DevourerofCodsBobber.DisplayName: Devourer of Cods Bobber DiamondOfTheDeepProjectile.DisplayName: Abyss Spirit DirectStrike.DisplayName: Nondescript Damaging Entity diff --git a/Projectiles/Typeless/DemonshadeRedDevil.cs b/Projectiles/Typeless/DemonshadeRedDevil.cs deleted file mode 100644 index 28a575a76d..0000000000 --- a/Projectiles/Typeless/DemonshadeRedDevil.cs +++ /dev/null @@ -1,224 +0,0 @@ -using System; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class DemonshadeRedDevil : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public int dust = 3; - - public ref float State => ref Projectile.ai[0]; // 0 = attacking, 1 = returning, 2 = initial spawn - public ref float Timer => ref Projectile.ai[1]; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 5; - ProjectileID.Sets.MinionSacrificable[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 48; - Projectile.height = 48; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.timeLeft *= 5; - } - - public override void AI() - { - bool isMinion = Projectile.type == ModContent.ProjectileType(); - Player player = Main.player[Projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - if (!modPlayer.redDevil) - { - Projectile.active = false; - return; - } - if (isMinion) - { - if (player.dead) - { - modPlayer.rDevil = false; - } - if (modPlayer.rDevil) - { - Projectile.timeLeft = 2; - } - } - - dust--; - if (dust >= 0) - { - for (int i = 0; i < 50; i++) - { - int brimDust = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y + 16f), Projectile.width, Projectile.height - 16, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1f); - Main.dust[brimDust].velocity *= 2f; - Main.dust[brimDust].scale *= 1.15f; - } - } - - Projectile.frameCounter++; - if (Projectile.frameCounter > 8) - { - Projectile.frameCounter = 0; - Projectile.frame++; - if (Projectile.frame > 4) - Projectile.frame = 0; - } - - float lights = (float)Main.rand.Next(90, 111) * 0.01f; - lights *= Main.essScale; - Lighting.AddLight(Projectile.Center, 1f * lights, 0f * lights, 0.15f * lights); - - Projectile.rotation = Projectile.velocity.X * 0.04f; - if ((double)Math.Abs(Projectile.velocity.X) > 0.2) - { - Projectile.spriteDirection = -Projectile.direction; - } - - if (State == 2f) - { - Timer++; - if (Timer > 60f) - { - Timer = 1f; - State = 0f; - Projectile.netUpdate = true; - } - return; - } - - Vector2 attackPos = Projectile.position; - float attackRange = 2000f; - bool canAttack = false; - if (player.HasMinionAttackTargetNPC) - { - NPC npc = Main.npc[player.MinionAttackTargetNPC]; - if (npc.CanBeChasedBy(Projectile, false)) - { - float npcDist = Vector2.Distance(npc.Center, Projectile.Center); - if (!canAttack && npcDist < attackRange) - { - attackRange = npcDist; - attackPos = npc.Center; - canAttack = true; - } - } - } - else - { - foreach (NPC nPC2 in Main.ActiveNPCs) - { - if (nPC2.CanBeChasedBy(Projectile, false)) - { - float npcDist = Vector2.Distance(nPC2.Center, Projectile.Center); - if ((!canAttack && npcDist < attackRange) && Collision.CanHitLine(Projectile.position, Projectile.width, Projectile.height, nPC2.position, nPC2.width, nPC2.height)) - { - attackRange = npcDist; - attackPos = nPC2.Center; - canAttack = true; - } - } - } - } - - float separationAnxietyDist = canAttack ? 3000f: 2000f; - if (Vector2.Distance(player.Center, Projectile.Center) > separationAnxietyDist) - { - State = 1f; - Projectile.netUpdate = true; - } - if (canAttack && State == 0f) - { - Vector2 projDirection = attackPos - Projectile.Center; - float projDist = projDirection.Length(); - projDirection.Normalize(); - if (projDist > 200f) - { - projDirection *= 25f; - Projectile.velocity = (Projectile.velocity * 40f + projDirection) / 41f; - } - else - { - projDirection *= -9f; - Projectile.velocity = (Projectile.velocity * 40f + projDirection) / 41f; - } - } - else - { - bool isReturning = State == 1f; - float returnSpeed = isReturning ? 24f : 15f; - - Vector2 playerDirection = player.Center - Projectile.Center + new Vector2(0f, -30f); - float playerDist = playerDirection.Length(); - if (playerDist > 200f && returnSpeed < 10f) - { - returnSpeed = 18f; - } - if (playerDist < 150f && isReturning && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) - { - State = 0f; - Projectile.netUpdate = true; - } - if (playerDist > 2000f) - { - Projectile.Center = player.Center; - Projectile.netUpdate = true; - } - if (playerDist > 70f) - { - playerDirection.Normalize(); - playerDirection *= returnSpeed; - Projectile.velocity = (Projectile.velocity * 40f + playerDirection) / 41f; - } - else if (Projectile.velocity == Vector2.Zero) - { - Projectile.velocity = new Vector2(-0.2f, -0.1f); - } - } - if (Timer > 0f) - { - Timer += Main.rand.Next(1, 2 + 1); - } - if (Timer > 80f) - { - Timer = 0f; - Projectile.netUpdate = true; - } - if (State == 0f) - { - if (canAttack && Timer == 0f) - { - Timer += 1f; - if (Main.myPlayer == Projectile.owner && Collision.CanHitLine(Projectile.Center, Projectile.width, Projectile.height, attackPos, 0, 0)) - { - Vector2 velocity = Vector2.Normalize(attackPos - Projectile.Center) * 24f; - int trident = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ProjectileID.UnholyTridentFriendly, Projectile.damage, 0f, Main.myPlayer); - if (trident.WithinBounds(Main.maxProjectiles)) - { - Main.projectile[trident].timeLeft = 300; - Main.projectile[trident].usesLocalNPCImmunity = true; - Main.projectile[trident].localNPCHitCooldown = 10; - Main.projectile[trident].DamageType = DamageClass.Generic; //typeless - } - Projectile.netUpdate = true; - } - } - } - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/Typeless/DemonshadeRedDevil.png b/Projectiles/Typeless/DemonshadeRedDevil.png deleted file mode 100644 index ab63c1a2c003185a29b8073c382ac6fd9be92a49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7102 zcma)>c{r5o|HsvdB4n*IgN!jkk}QJ>Q)8bpT2u(hl5MQX$bK}HEsP~H)=E;x}i`V$N}JAWogq)6!C* z*s5`GfY;Fas4I7G%x8vqKkmKJb*DN!t#>gpIQE5d%*8tCu;x)~S8pCNhrj@*mgq%-FW4kUl!WkkyE zTI||PP;7@Ezgp|3v|v{I!kV-BCRjccWnlT$}q0(LuC`N7I$F=$VTuY1bxF3(N71;2k+h}>vL7-<0eG&xkzR&;!_K!NQhe^j zs>TgnrrTu)2kE2n%m#IT73%GYk_&{DUU@wyEPol7pTEEKp`GI&pDfX{Qko`S8CoW) zn{aWO(n_l-$z5GB38KQI#*~2^*U8Csq*}q9HIa#^o<)dj?+AUHe{f_d+TF{`h`(x0 z0IXk(K8!t#9y$dQ(Ht{ZB?aZ76%`LbmC{rs(!7os;ZLVh+7LZytBf1@54djC+rJ9l zxShfJ@dFaJq*?<-NxQ`9gzf5ST!7LW-t=??!)`s{<;k$XyR+JfE6dLd5>{7PkaXgL z(R1Tg2n|A14ejjh_p(c(Lb_y<>*F8l)E{iEJ4QWDU%mPg|$`1onlaPFIM{D2KNW z27L1~!6X-@6grR9++95La}PRYTi$nq`a4l~Mbj1|F`-6hL?7Yg*u)j&6xq2F>fkrY;o2ZEQ$e^{lwZz?)?HW5G}eXQ@CtX&{u1XsXi0`Bghvj?Zmh2j4W9 zc?UTwJjcUPU)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026 22:19:09 -0400 Subject: [PATCH 071/346] Urchin Stinger resprite --- Items/Weapons/Rogue/UrchinStinger.cs | 2 +- Items/Weapons/Rogue/UrchinStinger.png | Bin 253 -> 427 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/UrchinStinger.cs b/Items/Weapons/Rogue/UrchinStinger.cs index 606271f7d4..01fe4cb223 100644 --- a/Items/Weapons/Rogue/UrchinStinger.cs +++ b/Items/Weapons/Rogue/UrchinStinger.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SetDefaults() { Item.width = 10; - Item.height = 26; + Item.height = 32; Item.damage = 13; Item.DamageType = RogueDamageClass.Instance; Item.useAnimation = Item.useTime = 17; diff --git a/Items/Weapons/Rogue/UrchinStinger.png b/Items/Weapons/Rogue/UrchinStinger.png index a5c38c11b9b0cbcc485343ed26fc1fbadeffabc3..9b6087ce1923f4627ed0a79cfb24c6306a1fa069 100644 GIT binary patch delta 414 zcmV;P0b&0A0jmR$7k?lK1^@s6D+TH800001b5ch_0Itp)=>Px#1ZP1_K>z@;j|==^ z1poj532;bRa{vGi!vFvd!vV){sAK>D0YFJaK~y+Tos_*w13?r<&#tK=DPlkfA-WON z5mId|(us(qOtg%pg|$!O6Ih8pLLim+09r^0(IyE?3<$wu34bZaVwquoT(aX=&D=S2 z7%rEASh|gt>^535Ubo|gv{>;%+Z7UE)7k~#>9ucRV$7+9de`;c6#)0Qk0H#!m;h@| zotjgRmy=*x)`D$U$hIrwT2MuUMX{nNR{EgXacFiNz0YjSss3Hw1pQOl*xQNhGaD1& zcrsu-88Gbi8GrWrx}E^jVlU;CrJU-*$nzL^UIfC#XsP)-yEp;h;l&4F|7Q^a&5d7M zE&!EkFxe{k_ct&yilbu*Ae!fqgP9j}!k>M@zl%C@cjK@_80g30-N4eS)w-a?f?J)07*qo IM6N<$f}Ga4#{d8T delta 238 zcmVf35r-ngA$ek>V&djq@^13DTyo!2SY(r>l-iyOAm6P4 z=->$@N^z0^(A2fITv;Bb7)c>Y!)yk?A>XvThARq2)6^=q?`ORg|DiE@O5|;Wy!$J< zi3r?;!jq9iTrLUy{yk+;Q5Mzr#!q;ep3Am0h2z Date: Tue, 10 Mar 2026 21:28:17 -0400 Subject: [PATCH 072/346] Shimmer Shrine has some horizontal leniency in its generation --- World/ShimmerShrine.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/World/ShimmerShrine.cs b/World/ShimmerShrine.cs index 7beb14fd6c..67220466ef 100644 --- a/World/ShimmerShrine.cs +++ b/World/ShimmerShrine.cs @@ -20,6 +20,23 @@ namespace CalamityMod.World int placementPositionY = (int)Main.worldSurface - 300; int offset = 28; + int width = schematic.GetLength(0); + int height = schematic.GetLength(1); + // If the point directly above the shimmer is blocked by something, try to move to the side a bit + if (!structures.CanPlace(new Rectangle(placementPositionX - width, placementPositionY - height, width, height))) + { + int attempts = 0; + while (attempts < 1000) + { + attempts++; + placementPositionX = Main.rand.Next((int)GenVars.shimmerPosition.X - 100, (int)GenVars.shimmerPosition.X + 100); + if (structures.CanPlace(new Rectangle(placementPositionX - width, placementPositionY - height, width, height))) + break; + } + // If still not good, just give up and place it directly above the shimmer regardless + placementPositionX = (int)GenVars.shimmerPosition.X; + } + while (!Main.tile[placementPositionX, placementPositionY].HasTile) placementPositionY++; From 2b7d8525b17cba3fd64a9d6c3db366023734d7a9 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 11 Mar 2026 11:09:48 +0700 Subject: [PATCH 073/346] Better wing tooltips --- Items/Accessories/Wings/BaseWings.cs | 170 +++++++++++++++++- Items/Accessories/Wings/SoulofCryogen.cs | 2 +- Items/CalamityGlobalItem.cs | 6 +- Items/CalamityGlobalItemTooltip.cs | 24 ++- .../en-US/Mods.CalamityMod.Common.hjson | 27 ++- .../Mods.CalamityMod.Vanilla.Wings.hjson | 2 +- 6 files changed, 204 insertions(+), 27 deletions(-) diff --git a/Items/Accessories/Wings/BaseWings.cs b/Items/Accessories/Wings/BaseWings.cs index 780b9224f3..5ef269941e 100644 --- a/Items/Accessories/Wings/BaseWings.cs +++ b/Items/Accessories/Wings/BaseWings.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +using Microsoft.Xna.Framework; +using System.Collections.Generic; +using System.Drawing; using System.Linq; using System.Text; using CalamityMod.Balancing; @@ -6,6 +8,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; +using static CalamityMod.CalamityUtils; namespace CalamityMod.Items.Accessories.Wings { @@ -86,26 +89,181 @@ namespace CalamityMod.Items.Accessories.Wings float baseJumpSpeed = (CalamityServerConfig.Instance.FasterJumpSpeed ? BalancingConstants.ConfigBoostedBaseJumpSpeed : 5.01f) + 1f; StringBuilder sb = new StringBuilder(512); sb.Append('\n'); - sb.Append(CalamityUtils.GetText($"Common.WingStats").Format(time.FramesToSeconds(), run.ToMph(), (MaxAscentSpeed * baseJumpSpeed).ToMph())); - sb.Append('\n'); if (Main.keyState.PressingShift()) { - sb.Append(CalamityUtils.GetText($"Common.WingStatsAcceleration").Format(rAcc.ToMphps(), BaseAscent.ToMphps(), + sb.Append(GetText($"Common.WingStatsFull").Format(time.FramesToSeconds(), + HorizontalSpeedText(run), run.ToMph(), + VerticalSpeedText(MaxAscentSpeed), (MaxAscentSpeed * baseJumpSpeed).ToMph(), + HorizontalAccelerationText(stats.AccRunAccelerationMult), rAcc.ToMphps(), + VerticalAccelerationText(BaseAscent), BaseAscent.ToMphps(), (BaseAscent + BonusAscentWhileRising).ToMphps(), (RisingSpeedThreshold * baseJumpSpeed).ToMph(), (BaseAscent + BonusAscentWhileFalling).ToMphps())); if (hover) { sb.Append('\n'); - sb.Append(CalamityUtils.GetText($"Common.WingStatsHover").Format(hSpeed.ToMph(), hAcc.ToMphps())); + sb.Append(GetText($"Common.WingStatsHover").Format(hSpeed.ToMph(), hAcc.ToMphps())); } } else - sb.Append($"[c/B8B8B8:{CalamityUtils.GetTextValue("UI.HoldShiftTooltipExtensionIndicator")}]"); + { + sb.Append(GetText($"Common.WingStats").Format(time.FramesToSeconds(), HorizontalSpeedText(run), VerticalSpeedText(MaxAscentSpeed), + HorizontalAccelerationText(stats.AccRunAccelerationMult), VerticalAccelerationText(BaseAscent))); + sb.Append('\n'); + sb.Append($"[c/B8B8B8:{GetTextValue("UI.HoldShiftTooltipExtensionIndicator")}]"); + } // Add stats below the common "Allows flight" line var wingTooltip = list.FirstOrDefault(x => x.Name == "Tooltip0" && x.Mod == "Terraria"); if (wingTooltip != null) wingTooltip.Text += sb.ToString(); } + + public static string HorizontalSpeedText(float speed) + { + string key = "Average"; + Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + if (speed > 9f) + { + key = "Excellent"; + hsl.Y = 1f; + hsl.Z = 0.61f; + } + else if (speed >= 8f) + { + key = "Great"; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (speed >= 7f) + { + key = "Good"; + hsl.Z = 0.61f; + } + else if (speed <= 3f) + { + key = "Awful"; + hsl.X = 0f; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (speed <= 6f) + { + key = "Poor"; + hsl.X = 0f; + hsl.Z = 0.61f; + } + return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; + } + + public static string VerticalSpeedText(float speed) + { + string key = "Average"; + Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + if (speed > 2.5f) + { + key = "Excellent"; + hsl.Y = 1f; + hsl.Z = 0.61f; + } + else if (speed >= 2f) + { + key = "Great"; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (speed >= 1.65f) + { + key = "Good"; + hsl.Z = 0.61f; + } + else if (speed <= 1f) + { + key = "Awful"; + hsl.X = 0f; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (speed <= 1.35f) + { + key = "Poor"; + hsl.X = 0f; + hsl.Z = 0.61f; + } + return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; + } + + public static string HorizontalAccelerationText(float acc) + { + string key = "Average"; + Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + if (acc > 2.5f) + { + key = "Excellent"; + hsl.Y = 1f; + hsl.Z = 0.61f; + } + else if (acc >= 2f) + { + key = "Great"; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (acc >= 1.25f) + { + key = "Good"; + hsl.Z = 0.61f; + } + else if (acc <= 0.5f) + { + key = "Awful"; + hsl.X = 0f; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (acc <= 0.75f) + { + key = "Poor"; + hsl.X = 0f; + hsl.Z = 0.61f; + } + return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; + } + + public static string VerticalAccelerationText(float acc) + { + string key = "Average"; + Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + if (acc > 0.2f) + { + key = "Excellent"; + hsl.Y = 1f; + hsl.Z = 0.61f; + } + else if (acc >= 0.135f) + { + key = "Great"; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (acc >= 0.11f) + { + key = "Good"; + hsl.Z = 0.61f; + } + else if (acc <= 0.05f) + { + key = "Awful"; + hsl.X = 0f; + hsl.Y = 0.65f; + hsl.Z = 0.61f; + } + else if (acc <= 0.09f) + { + key = "Poor"; + hsl.X = 0f; + hsl.Z = 0.61f; + } + return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; + } } } diff --git a/Items/Accessories/Wings/SoulofCryogen.cs b/Items/Accessories/Wings/SoulofCryogen.cs index 310123dc78..1ee669e46a 100644 --- a/Items/Accessories/Wings/SoulofCryogen.cs +++ b/Items/Accessories/Wings/SoulofCryogen.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 3)); ItemID.Sets.AnimatesAsSoul[Type] = true; ItemID.Sets.ItemNoGravity[Type] = true; - ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(120, 6.25f, 1f); + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(160, 7.5f, 1f); } public override void SetDefaults() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index eab16f4ab7..868deb7031 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -200,10 +200,10 @@ namespace CalamityMod.Items // 170 -> 240 flight time stats[(int)VanillaWingID.BoneWings].FlyTime = 240; - // 160 -> 170 flight time, 7.5 -> 9 horizontal speed, 1 -> 1.5 acceleration multiplier + // 160 -> 170 flight time, 7.5 -> 9 horizontal speed, 1 -> 2 acceleration multiplier stats[(int)VanillaWingID.LeafWings].FlyTime = 170; stats[(int)VanillaWingID.LeafWings].AccRunSpeedOverride = 9f; - stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 1.5f; + stats[(int)VanillaWingID.LeafWings].AccRunAccelerationMult = 2f; // (Spectre Wings) 1 -> 1.5 acceleration multiplier stats[(int)VanillaWingID.GhostWings].AccRunAccelerationMult = 1.5f; @@ -1319,8 +1319,6 @@ namespace CalamityMod.Items break; case ItemID.DemonWings: ascentWhenFalling *= 2f; - ascentWhenRising *= 2f; - maxCanAscendMultiplier *= 2f; break; case ItemID.FlameWings: maxAscentMultiplier *= 1.1067f; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index d61e7dff7d..9aa881e70a 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -8,6 +8,7 @@ using CalamityMod.CustomRecipes; using CalamityMod.DataStructures; using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; +using CalamityMod.Items.Accessories.Wings; using CalamityMod.Items.Armor.Demonshade; using CalamityMod.Items.Tools; using CalamityMod.Items.VanillaArmorChanges; @@ -1093,24 +1094,33 @@ namespace CalamityMod.Items float baseJumpSpeed = (CalamityServerConfig.Instance.FasterJumpSpeed ? BalancingConstants.ConfigBoostedBaseJumpSpeed : 5.01f) + 1f; StringBuilder sb = new StringBuilder(512); sb.Append('\n'); - sb.Append(CalamityUtils.GetText($"Common.WingStats").Format(time.FramesToSeconds(), run.ToMph(), (tMax * baseJumpSpeed).ToMph())); - sb.Append('\n'); if (Main.keyState.PressingShift()) { - sb.Append(CalamityUtils.GetText($"Common.WingStatsAcceleration").Format(rAcc.ToMphps(), asc.ToMphps(), (asc + rise).ToMphps(), (rMax * baseJumpSpeed).ToMph(), (asc + fall).ToMphps())); + sb.Append(GetText($"Common.WingStatsFull").Format(time.FramesToSeconds(), + BaseWings.HorizontalSpeedText(run), run.ToMph(), + BaseWings.VerticalSpeedText(tMax), (tMax * baseJumpSpeed).ToMph(), + BaseWings.HorizontalAccelerationText(stats.AccRunAccelerationMult), rAcc.ToMphps(), + BaseWings.VerticalAccelerationText(asc), asc.ToMphps(), + (asc + rise).ToMphps(), (rMax * baseJumpSpeed).ToMph(), + (asc + fall).ToMphps())); if (hover) { sb.Append('\n'); - sb.Append(CalamityUtils.GetText($"Common.WingStatsHover").Format(hSpeed.ToMph(), hAcc.ToMphps())); + sb.Append(GetText($"Common.WingStatsHover").Format(hSpeed.ToMph(), hAcc.ToMphps())); } } else - sb.Append($"[c/B8B8B8:{CalamityUtils.GetTextValue("UI.HoldShiftTooltipExtensionIndicator")}]"); + { + sb.Append(GetText($"Common.WingStats").Format(time.FramesToSeconds(), BaseWings.HorizontalSpeedText(run), BaseWings.VerticalSpeedText(tMax), + BaseWings.HorizontalAccelerationText(stats.AccRunAccelerationMult), BaseWings.VerticalAccelerationText(asc))); + sb.Append('\n'); + sb.Append($"[c/B8B8B8:{GetTextValue("UI.HoldShiftTooltipExtensionIndicator")}]"); + } if (extraKey != null) { sb.Append('\n'); - sb.Append(CalamityUtils.GetTextValue($"Vanilla.Wings.{extraKey}")); + sb.Append(GetTextValue($"Vanilla.Wings.{extraKey}")); } return sb.ToString(); } @@ -1125,7 +1135,7 @@ namespace CalamityMod.Items AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.8f, 0.135f); if (item.type == ItemID.DemonWings) - AddWingStats(item.wingSlot, 1f, 0.2f, 1f, 1.5f, 0.1f, "DemonWings"); + AddWingStats(item.wingSlot, 1f, 0.1f, 0.5f, 1.5f, 0.1f, "DemonWings"); if (item.type == ItemID.Jetpack) AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); diff --git a/Localization/en-US/Mods.CalamityMod.Common.hjson b/Localization/en-US/Mods.CalamityMod.Common.hjson index 186125b51b..26731d0356 100644 --- a/Localization/en-US/Mods.CalamityMod.Common.hjson +++ b/Localization/en-US/Mods.CalamityMod.Common.hjson @@ -47,19 +47,30 @@ GrappleStats: Reelback Velocity: {2} Pull Velocity: {3} ''' +StatsAwful: Awful +StatsPoor: Poor +StatsAverage: Average +StatsGood: Good +StatsGreat: Great +StatsExcellent: Excellent WingStats: ''' Flight time: {0} seconds - Max horizontal speed: {1} mph - Max vertical speed: {2} mph + Max horizontal speed: {1} + Max vertical speed: {2} + Horizontal acceleration: {3} + Vertical acceleration: {4} ''' -WingStatsAcceleration: +WingStatsFull: ''' - Horizontal acceleration: {0} mph/s - Vertical acceleration: - {1} mph/s - {2} mph/s if ascending slower than {3} mph - {4} mph/s if ascending while falling + Flight time: {0} seconds + Max horizontal speed: {1} ({2} mph) + Max vertical speed: {3} ({4} mph) + Horizontal acceleration: {5} ({6} mph/s) + Vertical acceleration: {7} + - {8} mph/s + - {9} mph/s if ascending slower than {10} mph + - {11} mph/s if ascending while falling ''' WingStatsHover: ''' diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Wings.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Wings.hjson index 2a9963a8f4..e88ac0d6e1 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Wings.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Wings.hjson @@ -1,6 +1,6 @@ BeeWings: Decreases fall speed while not pressing {$Key.DOWN} BoneWings: Halves flight time when taking a hit -DemonWings: Increases fall speed +DemonWings: Increases fall speed and accelerates up faster while falling FestiveWings: Spawns ornaments which restore flight time FinWings: Allows quick travel in water TatteredFairyWings: Leaves a trail of flight draining fairy dust From b4c61d00bf14050feaf885b0e959e21cd1c5fa2b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 11 Mar 2026 20:39:17 +0700 Subject: [PATCH 074/346] yellow like that coldplay song --- Items/Accessories/Wings/BaseWings.cs | 56 ++++++++++++---------------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/Items/Accessories/Wings/BaseWings.cs b/Items/Accessories/Wings/BaseWings.cs index 5ef269941e..b84e05bd20 100644 --- a/Items/Accessories/Wings/BaseWings.cs +++ b/Items/Accessories/Wings/BaseWings.cs @@ -121,36 +121,34 @@ namespace CalamityMod.Items.Accessories.Wings public static string HorizontalSpeedText(float speed) { string key = "Average"; - Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + Vector3 hsl = new Vector3(0.167f, 0.65f, 0.61f); if (speed > 9f) { key = "Excellent"; + hsl.X = 0.334f; hsl.Y = 1f; - hsl.Z = 0.61f; } else if (speed >= 8f) { key = "Great"; - hsl.Y = 0.65f; - hsl.Z = 0.61f; + hsl.X = 0.334f; } else if (speed >= 7f) { key = "Good"; - hsl.Z = 0.61f; + hsl.X = 0.334f; + hsl.Y = 0.35f; } else if (speed <= 3f) { key = "Awful"; hsl.X = 0f; - hsl.Y = 0.65f; - hsl.Z = 0.61f; } else if (speed <= 6f) { key = "Poor"; hsl.X = 0f; - hsl.Z = 0.61f; + hsl.Y = 0.35f; } return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; } @@ -158,36 +156,34 @@ namespace CalamityMod.Items.Accessories.Wings public static string VerticalSpeedText(float speed) { string key = "Average"; - Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + Vector3 hsl = new Vector3(0.167f, 0.65f, 0.61f); if (speed > 2.5f) { key = "Excellent"; + hsl.X = 0.334f; hsl.Y = 1f; - hsl.Z = 0.61f; } else if (speed >= 2f) { key = "Great"; - hsl.Y = 0.65f; - hsl.Z = 0.61f; + hsl.X = 0.334f; } else if (speed >= 1.65f) { key = "Good"; - hsl.Z = 0.61f; + hsl.X = 0.334f; + hsl.Y = 0.35f; } else if (speed <= 1f) { key = "Awful"; hsl.X = 0f; - hsl.Y = 0.65f; - hsl.Z = 0.61f; } else if (speed <= 1.35f) { key = "Poor"; hsl.X = 0f; - hsl.Z = 0.61f; + hsl.Y = 0.35f; } return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; } @@ -195,36 +191,34 @@ namespace CalamityMod.Items.Accessories.Wings public static string HorizontalAccelerationText(float acc) { string key = "Average"; - Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + Vector3 hsl = new Vector3(0.167f, 0.65f, 0.61f); if (acc > 2.5f) { key = "Excellent"; + hsl.X = 0.334f; hsl.Y = 1f; - hsl.Z = 0.61f; } else if (acc >= 2f) { key = "Great"; - hsl.Y = 0.65f; - hsl.Z = 0.61f; + hsl.X = 0.334f; } else if (acc >= 1.25f) { key = "Good"; - hsl.Z = 0.61f; + hsl.X = 0.334f; + hsl.Y = 0.35f; } else if (acc <= 0.5f) { key = "Awful"; hsl.X = 0f; - hsl.Y = 0.65f; - hsl.Z = 0.61f; } else if (acc <= 0.75f) { key = "Poor"; hsl.X = 0f; - hsl.Z = 0.61f; + hsl.Y = 0.35f; } return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; } @@ -232,36 +226,34 @@ namespace CalamityMod.Items.Accessories.Wings public static string VerticalAccelerationText(float acc) { string key = "Average"; - Vector3 hsl = new Vector3(0.334f, 0.35f, 1f); + Vector3 hsl = new Vector3(0.167f, 0.65f, 0.61f); if (acc > 0.2f) { key = "Excellent"; + hsl.X = 0.334f; hsl.Y = 1f; - hsl.Z = 0.61f; } else if (acc >= 0.135f) { key = "Great"; - hsl.Y = 0.65f; - hsl.Z = 0.61f; + hsl.X = 0.334f; } else if (acc >= 0.11f) { key = "Good"; - hsl.Z = 0.61f; + hsl.X = 0.334f; + hsl.Y = 0.35f; } else if (acc <= 0.05f) { key = "Awful"; hsl.X = 0f; - hsl.Y = 0.65f; - hsl.Z = 0.61f; } else if (acc <= 0.09f) { key = "Poor"; hsl.X = 0f; - hsl.Z = 0.61f; + hsl.Y = 0.35f; } return $"[c/{Main.hslToRgb(hsl).Hex3()}:{GetTextValue($"Common.Stats{key}")}]"; } From abdc9b451837cffcc5426205a6ce4da34b28074a Mon Sep 17 00:00:00 2001 From: Yum Date: Wed, 11 Mar 2026 21:19:35 +0200 Subject: [PATCH 075/346] Fix Angelic Alliance flight regen by moving logic to UpdateLifeRegen --- CalPlayer/CalamityPlayerLifeRegen.cs | 6 ++++++ Items/Accessories/AngelicAlliance.cs | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index b181b14c72..474f490c02 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -577,6 +577,12 @@ namespace CalamityMod.CalPlayer if (silvaSet) Player.lifeRegen += SilvaArmor.SetBonusRegenBoost; + if (angelicAlliance) + { + if (Player.wingTime < Player.wingTimeMax) + Player.lifeRegen += AngelicAlliance.RegenBoostDuringFlight; + } + if (phantomicHeartRegen > 0 && phantomicHeartRegen < 1000) { Player.lifeRegen += PhantomicArtifact.RegenBoost; diff --git a/Items/Accessories/AngelicAlliance.cs b/Items/Accessories/AngelicAlliance.cs index e0cc74a488..aca8d30b28 100644 --- a/Items/Accessories/AngelicAlliance.cs +++ b/Items/Accessories/AngelicAlliance.cs @@ -48,8 +48,6 @@ namespace CalamityMod.Items.Accessories player.GetDamage() += DamageBoost; player.GetDamage() += TotalSummonDamageBoost - DamageBoost; player.maxMinions += MinionSlotBoost; - if (player.wingTime < player.wingTimeMax) - player.lifeRegen += RegenBoostDuringFlight; } public override void AddRecipes() From 67563e6edb88f0b450030ae6d6956783cef6546c Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 12 Mar 2026 07:00:57 +0700 Subject: [PATCH 076/346] wing stats lines traces the tooltip with the common text --- Items/CalamityGlobalItemTooltip.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 9aa881e70a..dabf432fbb 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -1126,7 +1126,12 @@ namespace CalamityMod.Items } // This function is shorthand for appending a stat sheet to a pair of wings. - void AddWingStats(int slot, float fall, float rise, float rMax, float tMax, float asc, string extraKey = null) => EditTooltipByNum(0, (line) => line.Text += WingStatsTooltip(ArmorIDs.Wing.Sets.Stats[slot], fall, rise, rMax, tMax, asc, extraKey)); + void AddWingStats(int slot, float fall, float rise, float rMax, float tMax, float asc, string extraKey = null) + { + TooltipLine commonWingTooltipLine = tooltips.FirstOrDefault(x => x.Text == Language.GetTextValue("CommonItemTooltip.FlightAndSlowfall") && x.Mod == "Terraria"); + if (commonWingTooltipLine != null) + commonWingTooltipLine.Text += WingStatsTooltip(ArmorIDs.Wing.Sets.Stats[slot], fall, rise, rMax, tMax, asc, extraKey); + } if (item.type == ItemID.CreativeWings) AddWingStats(item.wingSlot, 0.5f, 0.1f, 0.5f, 1.5f, 0.1f); From 01d8339068611eef249fd71070256734b4016d02 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 11 Mar 2026 20:23:30 -0400 Subject: [PATCH 077/346] Added same logic for Calamity wings Even though it does nothing because every Calamity wing has "Allows flight and slow fall" as its first line --- Items/Accessories/Wings/BaseWings.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/Wings/BaseWings.cs b/Items/Accessories/Wings/BaseWings.cs index b84e05bd20..ee58c30df0 100644 --- a/Items/Accessories/Wings/BaseWings.cs +++ b/Items/Accessories/Wings/BaseWings.cs @@ -1,12 +1,12 @@ -using Microsoft.Xna.Framework; -using System.Collections.Generic; -using System.Drawing; +using System.Collections.Generic; using System.Linq; using System.Text; using CalamityMod.Balancing; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; using static CalamityMod.CalamityUtils; @@ -113,7 +113,7 @@ namespace CalamityMod.Items.Accessories.Wings } // Add stats below the common "Allows flight" line - var wingTooltip = list.FirstOrDefault(x => x.Name == "Tooltip0" && x.Mod == "Terraria"); + TooltipLine wingTooltip = list.FirstOrDefault(x => x.Text == Language.GetTextValue("CommonItemTooltip.FlightAndSlowfall") && x.Mod == "Terraria"); if (wingTooltip != null) wingTooltip.Text += sb.ToString(); } From 66bc0be1567a4165b371a08b92ac9042019f9739 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 12 Mar 2026 08:04:43 +0700 Subject: [PATCH 078/346] fewer stars faster stars --- Projectiles/Magic/AuroraAustralis.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Projectiles/Magic/AuroraAustralis.cs b/Projectiles/Magic/AuroraAustralis.cs index 9381f68bf7..de69370f2b 100644 --- a/Projectiles/Magic/AuroraAustralis.cs +++ b/Projectiles/Magic/AuroraAustralis.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.penetrate = 1; Projectile.tileCollide = false; Projectile.ignoreWater = true; - Projectile.timeLeft = 180; + Projectile.timeLeft = 144; Projectile.DamageType = DamageClass.Magic; Projectile.alpha = 255; @@ -77,8 +77,9 @@ namespace CalamityMod.Projectiles.Magic if (Main.player[Projectile.owner].ownedProjectileCounts[ModContent.ProjectileType()] < 30) { float dmgKBMult = Main.rand.NextFloat(0.25f, 0.75f); - Projectile star = CalamityUtils.ProjectileRain(source, Projectile.Center, Projectile.velocity.X, 100f, 500f, 800f, Main.rand.NextFloat(10f, 20f), ModContent.ProjectileType(), (int)(Projectile.damage * dmgKBMult), Projectile.knockBack * dmgKBMult, Projectile.owner); - star.timeLeft = 120; + Projectile star = CalamityUtils.ProjectileRain(source, Projectile.Center, Projectile.velocity.X, 100f, 500f, 640f, Main.rand.NextFloat(16f, 20f), ModContent.ProjectileType(), (int)(Projectile.damage * dmgKBMult), Projectile.knockBack * dmgKBMult, Projectile.owner); + star.extraUpdates += Main.rand.Next(1, 3); + star.timeLeft = 90; star.ai[0] = 1f; } } From 6d53e925dec9148986eb4e1cb7eb405db43091c8 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 12 Mar 2026 02:41:09 -0400 Subject: [PATCH 079/346] step stool interaction fx tweak --- Items/Accessories/SpringStool.cs | 2 +- Projectiles/Typeless/StepStoolBonusFX.cs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 5cbac7f78f..06a0ff9f5c 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Accessories if (IsVanillaStoolEquipped(Player)) { // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. - Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos + new Vector2(0f, -4f), new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); } } diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index 42f2c8a900..a1763cf6c5 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -30,10 +30,14 @@ namespace CalamityMod.Projectiles.Typeless // Gravity! Projectile.velocity.Y += 0.15f; - Projectile.rotation += 0.1f; - Projectile.scale -= 0.01f; - OpacityMultiplier -= 0.02f; + Projectile.rotation += 0.12f; + Projectile.scale -= 0.0125f; + OpacityMultiplier -= 0.025f; + if (Projectile.timeLeft > 99) + Projectile.alpha = 255; + else + Projectile.alpha = 0; } public override bool? CanDamage() => false; @@ -43,7 +47,7 @@ namespace CalamityMod.Projectiles.Typeless Texture2D texture = TextureAssets.Extra[102].Value; Vector2 origin = texture.Size() / 2f; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * ((1f - (Projectile.alpha / 255f)) * OpacityMultiplier), Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); return false; } From 0e8ff954b93ab33209e92670b0a7b6fb8063ba08 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 13 Mar 2026 12:07:33 -0500 Subject: [PATCH 080/346] 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 891c7d1f2795b6307da4be14d3d457b38d67a688 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 13 Mar 2026 20:11:27 -0500 Subject: [PATCH 081/346] Void Concentration Rework --- Buffs/Summon/VoidConcentrationBuff.cs | 28 +- CalPlayer/CalamityPlayer.cs | 11 +- .../DrawLayers/ConcentratedVoidAuraLayer.cs | 2 +- Items/CalamityGlobalItem.cs | 18 +- .../Weapons/Summon/VoidConcentrationStaff.cs | 602 +++++++++++++++++- .../en-US/Mods.CalamityMod.Buffs.hjson | 5 + .../Mods.CalamityMod.DamageClasses.hjson | 1 + ...ods.CalamityMod.Items.Weapons.Summon.hjson | 10 +- .../Mods.CalamityMod.Projectiles.Summon.hjson | 9 +- ModSupport/WeakReferenceSupport.cs | 2 +- Projectiles/Summon/VoidConcentrationAura.cs | 97 --- .../Summon/VoidConcentrationBlackhole.cs | 187 ------ .../Summon/VoidConcentrationBlackhole.png | Bin 1293 -> 0 bytes .../Summon/VoidConcentrationDarkEnergy.png | Bin 0 -> 801 bytes ...ationOrb.png => VoidConcentrationMark.png} | Bin Projectiles/Summon/VoidConcentrationOrb.cs | 115 ---- 16 files changed, 619 insertions(+), 468 deletions(-) delete mode 100644 Projectiles/Summon/VoidConcentrationAura.cs delete mode 100644 Projectiles/Summon/VoidConcentrationBlackhole.cs delete mode 100644 Projectiles/Summon/VoidConcentrationBlackhole.png create mode 100644 Projectiles/Summon/VoidConcentrationDarkEnergy.png rename Projectiles/Summon/{VoidConcentrationOrb.png => VoidConcentrationMark.png} (100%) delete mode 100644 Projectiles/Summon/VoidConcentrationOrb.cs diff --git a/Buffs/Summon/VoidConcentrationBuff.cs b/Buffs/Summon/VoidConcentrationBuff.cs index 21e2ca5ce2..4e1c27ecbf 100644 --- a/Buffs/Summon/VoidConcentrationBuff.cs +++ b/Buffs/Summon/VoidConcentrationBuff.cs @@ -1,34 +1,14 @@ using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Summon; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Buffs.Summon { - public class VoidConcentrationBuff : ModBuff + public class VoidConcentrationBuff : BaseSummonBuff { - public override void SetStaticDefaults() - { - Main.buffNoTimeDisplay[Type] = true; - Main.buffNoSave[Type] = true; - //Main.persistentBuff[Type] = true; - } - - public override void Update(Player player, ref int buffIndex) - { - CalamityPlayer mp = player.Calamity(); - int count = player.ownedProjectileCounts[ModContent.ProjectileType()]; - player.GetDamage() += 0.05f; //5% - mp.voidConcentrationAura = true; - if (!mp.voidAuraDamage && count == 0) - { - player.DelBuff(buffIndex); - buffIndex--; - } - else - { - player.buffTime[buffIndex] = 18000; - } - } + protected override ref bool MinionBool => ref BuffModdedOwner.VoidConcentrationStaff; + protected override int MinionProjectileType => ModContent.ProjectileType(); } } diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2a86309ad8..345171f28f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1581,9 +1581,7 @@ namespace CalamityMod.CalPlayer public bool plaguebringerMK2 = false; public bool igneousExaltation = false; public bool GlacialEmbrace = false; - public bool voidAura = false; - public bool voidAuraDamage = false; - public bool voidConcentrationAura = false; + public bool VoidConcentrationStaff = false; public bool MutatedTruffleBool = false; public bool virili = false; public bool frostBlossom = false; @@ -2850,9 +2848,7 @@ namespace CalamityMod.CalPlayer plaguebringerMK2 = false; igneousExaltation = false; GlacialEmbrace = false; - voidAura = false; - voidAuraDamage = false; - voidConcentrationAura = false; + VoidConcentrationStaff = false; saros = false; if (sarosEclipseBeamUsage > 300) sarosEclipseBeamUsage = 300; @@ -5039,7 +5035,8 @@ namespace CalamityMod.CalPlayer //Flashlight //Due to being in postUpdate we need to adjust the mousepos for the player's movement that will have happened - var mouseworld = Main.MouseWorld + Player.position - Player.oldPosition; + mouseWorldListener = true; + var mouseworld = mouseWorld + Player.position - Player.oldPosition; EnhancedDarknessSystem.lights.Add(new(center: Player.Center + Player.DirectionTo(mouseworld) * 750f, rotation: Player.DirectionTo(mouseworld).ToRotation() - MathHelper.PiOver2, vectorScale: new Vector2(0.85f * abyssFlashlightWidthMultiplier, 0.75f), texture: Request("CalamityMod/Particles/BloomLineFade").Value)); } diff --git a/CalPlayer/DrawLayers/ConcentratedVoidAuraLayer.cs b/CalPlayer/DrawLayers/ConcentratedVoidAuraLayer.cs index 74ea062c1e..6907aada5b 100644 --- a/CalPlayer/DrawLayers/ConcentratedVoidAuraLayer.cs +++ b/CalPlayer/DrawLayers/ConcentratedVoidAuraLayer.cs @@ -14,7 +14,7 @@ namespace CalamityMod.CalPlayer.DrawLayers { Player drawPlayer = drawInfo.drawPlayer; CalamityPlayer modPlayer = drawPlayer.Calamity(); - return drawInfo.shadow == 0f && !drawPlayer.dead && (modPlayer.voidAura || modPlayer.voidAuraDamage); + return drawInfo.shadow == 0f && !drawPlayer.dead && modPlayer.VoidConcentrationStaff; } protected override void Draw(ref PlayerDrawSet drawInfo) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 13bcb810cb..3b3e4f79d0 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -21,7 +21,6 @@ using CalamityMod.Items.Potions.Alcohol; using CalamityMod.Items.Tools; using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.Other; using CalamityMod.NPCs.TownNPCs; @@ -637,7 +636,7 @@ namespace CalamityMod.Items return true; } } - + return base.UseItem(item, player); } @@ -647,21 +646,6 @@ namespace CalamityMod.Items { return false; } - if (player.HeldItem.type == ItemType() && player.ownedProjectileCounts[ProjectileType()] == 0) - { - foreach (Projectile p in Main.ActiveProjectiles) - { - if (p.ModProjectile is VoidConcentrationAura) - { - if (p.owner == player.whoAmI) - { - p.ModProjectile().HandleRightClick(); - break; - } - } - } - return false; - } if (player.HeldItem.type == ItemType()) { bool canContinue = true; diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 5fa54ffc7a..4a7ca5206a 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -1,22 +1,50 @@ -using CalamityMod.Buffs.Summon; -using CalamityMod.Items.Weapons.Melee; +using System; +using System.Linq; +using CalamityMod.Buffs.Summon; +using CalamityMod.CalPlayer; +using CalamityMod.DataStructures; +using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Magic; using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; +using CalamityMod.Systems.Collections; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { + #region Item public class VoidConcentrationStaff : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Summon"; + public static SummonTag summonTag = new SummonTag() + { + MultiplicativeTagDamage = 0.05f, //Percentage of damage dealt added by the void. This is doubled by summons. + FlatTagDamage = 5, //Minimum damage of each void ball. + AllowsWhipStacking = true, + TagOnHit = tagOnHit, + TagModifyHitEffects = SummonTag.BlankTagModifyHit, + AutoDrawTooltip = false + }; + public static void tagOnHit(NPC npc, Projectile projectile, NPC.HitInfo hit, int damageDone) => npc.GetGlobalNPC().StoredDamage += damageDone; public override void SetStaticDefaults() { ItemID.Sets.StaffMinionSlotsRequired[Type] = 3f; + summonTag.TagItem = Type; + CalamityBuffSets.SummonTagDebuff.Add(ModContent.BuffType(), summonTag); } public override void SetDefaults() @@ -28,19 +56,17 @@ namespace CalamityMod.Items.Weapons.Summon Item.UseSound = SoundID.DD2_EtherianPortalOpen; Item.DamageType = DamageClass.Summon; Item.mana = 10; - Item.damage = 105; + Item.damage = 200; Item.knockBack = 4f; Item.useAnimation = Item.useTime = 24; - Item.buffType = ModContent.BuffType(); - Item.shoot = ModContent.ProjectileType(); + //Item.buffType = ModContent.BuffType(); + Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); } public override bool CanUseItem(Player player) { - if (player.altFunctionUse != 2) - return player.ownedProjectileCounts[ModContent.ProjectileType()] == 0; return base.CanUseItem(player); } @@ -48,14 +74,568 @@ namespace CalamityMod.Items.Weapons.Summon { if (player.altFunctionUse != 2) { - player.AddBuff(Item.buffType, 2); - var minion = Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI); - minion.originalDamage = Item.damage; + foreach (var item in Main.ActiveProjectiles) + { + if (item.type == ModContent.ProjectileType()) + item.Kill(); + } + if (player.ownedProjectileCounts[ModContent.ProjectileType()] == 0) + Projectile.NewProjectileDirect(source, player.Center, Vector2.Zero, type, damage, knockback, player.whoAmI); + } + else + { + player.MinionNPCTargetAim(true); + if (player.MinionAttackTargetNPC >= 0) + { + var target = Main.npc[player.MinionAttackTargetNPC]; + foreach (var item in Main.ActiveProjectiles) + { + if (item.type == ModContent.ProjectileType()) + item.Kill(); + } + Projectile.NewProjectileDirect(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI, target.whoAmI); + } } return false; } // TODO -- should be strictly unnecessary as per API design - public override bool AltFunctionUse(Player player) => base.AltFunctionUse(player); + public override bool AltFunctionUse(Player player) => true; } + + #endregion +} + +namespace CalamityMod.Projectiles.Summon +{ + + #region Left Click + public class VoidConcentrationMinion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void SetDefaults() + { + Projectile.width = 46; + Projectile.height = 80; + Projectile.netImportant = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.minionSlots = 3f; + Projectile.timeLeft = 18000; + Projectile.penetrate = -1; + + Projectile.tileCollide = false; + Projectile.timeLeft *= 5; + Projectile.minion = true; + Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + VoidConcentrationStaff.summonTag.MultiplicativeTagDamage = 0.15f; + } + public override bool? CanHitNPC(NPC target) => false; + public override void AI() + { + Main.projPet[Type] = false; + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + player.AddBuff(ModContent.BuffType(), 3600); + + if (player.dead) + { + modPlayer.VoidConcentrationStaff = false; + } + if (modPlayer.VoidConcentrationStaff) + { + Projectile.timeLeft = 2; + } + + Projectile.Center = player.Center; + + //Spawn proj code taken from Ceaseless Void + int numPerRing = 7; + int numRings = 3; + int spacing = 360 / numPerRing; + int distance2 = 10; + if (player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) + { + for (int i = 0; i < numPerRing; i++) + { + for (int j = 0; j < numRings; j++) + Projectile.NewProjectile(Projectile.GetSource_FromAI(), new Vector2((Projectile.Center.X + (MathF.Sin(i * spacing) * distance2)), (int)(Projectile.Center.Y + (MathF.Cos(i * spacing) * distance2))), Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, i * spacing, j); + } + } + + } + } + public class VoidConcentrationDarkEnergy : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + private double minDistance => 10; + private double distance { get; set; } = 10; + private double maxDistance => 400; + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 32; + Projectile.height = 32; + Projectile.netImportant = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.timeLeft = 10; + Projectile.penetrate = -1; + Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; + Projectile.scale = 1f; + Projectile.DamageType = DamageClass.Summon; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + texture = TextureAssets.Npc[ModContent.NPCType()].Value; + var gt = DarkEnergy.GlowTexture.Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + var frame = texture.Frame(1, 8, 0, Projectile.frame); + Main.EntitySpriteDraw(texture, drawPos, frame, lightColor, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale * 0.5f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(gt, drawPos, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale * 0.5f, SpriteEffects.None, 0); + return false; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + CalamityPlayer modPlayer = player.Calamity(); + if (player.ownedProjectileCounts[ModContent.ProjectileType()] - player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) + { + for (int k = 0; k < 20; k++) + { + int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.PurpleCosmilite, 0, -1f, 0, default, 1f); + Main.dust[dust].noGravity = true; + } + Projectile.Kill(); + return; + } + else + { + Projectile.timeLeft++; + } + + + if (Projectile.FinalExtraUpdate()) + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.frame = 0; + Projectile.frameCounter = 0; + } + if (Projectile.frame == 1) + Projectile.frame++; + + #region Movement Code (Taken from Ceaseless Void) + + Projectile.velocity = Vector2.Zero; + double rateOfChangeIncrease = (maxDistance / 80) - 1D; + double rateOfChange = ((Projectile.ai[1] * 0.5f) + 3.2D) * (maxDistance / 960); + if (Projectile.ai[2] == 0f) + { + distance += rateOfChange; + if (distance >= maxDistance) + { + distance = maxDistance; + Projectile.ai[2] = 1f; + } + } + else + { + distance -= rateOfChange; + if (distance <= minDistance) + { + distance = minDistance; + Projectile.ai[2] = 0f; + } + } + + // Rotation velocity + float minRotationVelocity = 0.5f; + float rotationVelocityIncrease = 0.15f; + rotationVelocityIncrease += rotationVelocityIncrease * (Projectile.ai[1] * 0.5f); + + // Rotate around Ceaseless Void + double degrees = Projectile.ai[0]; + double radians = degrees * (Math.PI / 180); + Projectile.position.X = player.Center.X - (int)(Math.Cos(radians) * distance) - Projectile.width / 2; + Projectile.position.Y = player.Center.Y - (int)(Math.Sin(radians) * distance) - Projectile.height / 2; + Projectile.ai[0] += minRotationVelocity + rotationVelocityIncrease; + #endregion + } + } + + #endregion + + #region Right Click + public class VoidConcentrationMark : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 4; + ProjectileID.Sets.MinionShot[Type] = true; + } + public override void SetDefaults() + { + Projectile.width = 54; + Projectile.height = 50; + Projectile.netImportant = true; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.timeLeft = 600; + Projectile.penetrate = 1; + Projectile.tileCollide = false; + Projectile.scale = 1f; + Projectile.DamageType = DamageClass.Summon; + } + public override bool? CanHitNPC(NPC target) => false; + public override void AI() + { + if (!Main.npc[(int)Projectile.ai[0]].active) + { + Projectile.Kill(); + return; + } + Player owner = Main.player[Projectile.owner]; + + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center; + Main.npc[(int)Projectile.ai[0]].AddBuff(ModContent.BuffType(), 5); + if (Projectile.timeLeft % 60 == 0) + { + var w = Main.npc[(int)Projectile.ai[0]].width + 200; + var v1 = Main.rand.NextVector2CircularEdge(1, 1); + for (var i = 0; i < 3; i++) + { + var v = v1.RotatedBy(MathHelper.TwoPi * (i / 3f)); + GeneralParticleHandler.SpawnParticle(new CustomSprite(Projectile.Center + 200 * v, Vector2.Zero, 30, TextureAssets.Projectile[ModContent.ProjectileType()].Value, 1, Color.White, AddativeBlend: false, frameCount: 5)); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); + p.penetrate = 1; + p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); + p.penetrate = 1; + + } + } + + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Type] - 1) + { + Projectile.frame = 0; + } + Projectile.frameCounter++; + + if (Projectile.timeLeft <= 60) + { + Projectile.alpha += 4; + } + } + } + public class VoidConcentrationBeam : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Summon"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 14; + ProjectileID.Sets.TrailingMode[Type] = 2; + ProjectileID.Sets.MinionShot[Type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 24; + Projectile.height = 24; + Projectile.friendly = true; + Projectile.timeLeft = 600; + Projectile.DamageType = DamageClass.Summon; + Projectile.MaxUpdates = 3; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.tileCollide = false; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; + Projectile.penetrate = 2; + } + + public override void OnSpawn(IEntitySource source) + { + ProjectileID.Sets.TrailCacheLength[Type] = 8; + } + + public override void AI() + { + NPC target = Projectile.Center.MinionHoming(5000f, Main.player[Projectile.owner]); + // Move towards the target. + if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0) + { + Projectile.velocity = Vector2.Lerp(Projectile.velocity, (target.Center - Projectile.Center).SafeNormalize(Vector2.Zero) * (Projectile.timeLeft < 300 ? 24f : 10f), 0.05f); + Projectile.netUpdate = true; + Projectile.Calamity().HomingTarget = target.whoAmI; + } + Projectile.rotation = Projectile.velocity.ToRotation(); + + if (Projectile.damage <= 0) + { + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero) * 4; + Projectile.timeLeft = (int)MathHelper.Min(8, Projectile.timeLeft); + } + + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + for (int i = 0; i < 12; i++) + { + Vector2 dustVelocity = Main.rand.NextVector2Circular(1f, 1f) * 6f; + float dustScale = Main.rand.NextFloat(3f, 5f); + Color dustColor = Color.Lerp(Color.Yellow, Color.Gold, Main.rand.NextFloat(0.5f, 1f)); + + Dust dust = Dust.NewDustDirect(Projectile.Center, 1, 1, DustID.TintableDustLighted, dustVelocity.X, dustVelocity.Y, 0, dustColor, dustScale); + dust.noGravity = true; + dust.noLight = false; + dust.noLightEmittence = false; + } + } + + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.End(out var ss); + + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + + using (lease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + + Vector2[] fireCoreLength = Projectile.oldPos.Take(8).ToArray(); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + + return false; + } + + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 38f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = Color.DarkSlateBlue * 1.3f; + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } + + public float FireCoreWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 pos) + { + Color mainColor = Color.SkyBlue; + Color tipColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + Color fullBodyColor = Color.Lerp(mainColor, tipColor, completion); + return Color.Lerp(fullBodyColor, Color.White, 0.175f) * Projectile.Opacity; + } + } + + #endregion + + #region Summon Tag + public class VoidTagDmgType : DamageClass //Custom damage class used to prevent the voids from activating themselves + { + public static VoidTagDmgType getInstance => ModContent.GetInstance(); + public override bool UseStandardCritCalcs => false; + } + public class VoidTagNPC : GlobalNPC + { + public override bool InstancePerEntity => true; + + public int StoredDamage = 0; + int voidTimer = 0; + float rot = 0; + + public override void PostAI(NPC npc) + { + voidTimer++; + if (StoredDamage > 0) + { + if (voidTimer > 10) + { + voidTimer = 0; + var dmg = (int)Math.Max(1, (StoredDamage)); + StoredDamage -= dmg; + rot += 0.15f; + Projectile.NewProjectile(npc.GetSource_OnHurt(null), npc.Center, Vector2.UnitX.RotatedBy(rot), ModContent.ProjectileType(), (int)Math.Max((dmg * VoidConcentrationStaff.summonTag.MultiplicativeTagDamage), 1), 0, -1, npc.whoAmI); + } + } + base.PostAI(npc); + } + } + public class VoidTagPlayer : ModPlayer + { + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (hit.DamageType != VoidTagDmgType.getInstance && target.HasBuff()) + target.GetGlobalNPC().StoredDamage += damageDone; + } + + public override void ModifyHurt(ref Player.HurtModifiers modifiers) + { + if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) + modifiers.FinalDamage *= 0.85f; //15% less dmg taken, mult + } + } + public class VoidConcentrationSummonTagProj : ModProjectile, ILocalizedModType + { + public override string Texture => "CalamityMod/Projectiles/Summon/VoidConcentrationDarkEnergy"; + public new string LocalizationCategory => "Projectiles.Summon"; + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 8; + ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.MinionTargettingFeature[Type] = true; + } + + public override void SetDefaults() + { + Projectile.width = 32; + Projectile.height = 32; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.timeLeft = 60; + Projectile.penetrate = 1; + Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; + Projectile.scale = 1f; + Projectile.DamageType = ModContent.GetInstance(); + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.ArmorPenetration = 1000; + } + + NPC target => Main.npc[(int)Projectile.ai[0]]; + + public override bool? CanHitNPC(NPC target) + { + if (Projectile.timeLeft < 5) + return null; + return false; + } + public override bool PreDraw(ref Color lightColor) + { + for (float i = 0; i < MathHelper.TwoPi; i += MathHelper.TwoPi / 3f) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + texture = TextureAssets.Npc[ModContent.NPCType()].Value; + var gt = DarkEnergy.GlowTexture.Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + Projectile.velocity.RotatedBy(i); + var frame = texture.Frame(1, 8, 0, Projectile.frame); + Main.EntitySpriteDraw(texture, drawPos, frame, lightColor, 0, frame.Size() * 0.5f, Projectile.scale * 0.5f, SpriteEffects.None, 0); + Main.EntitySpriteDraw(gt, drawPos, frame, Color.White, 0, frame.Size() * 0.5f, Projectile.scale * 0.5f, SpriteEffects.None, 0); + } + return false; + } + public override void AI() + { + ProjectileID.Sets.MinionShot[Type] = false; + if (target == null || !target.active) + { + Projectile.Kill(); + return; + } + var w = target.width + 200; + Projectile.Center = target.Center; + Projectile.rotation = Projectile.velocity.ToRotation(); + Projectile.velocity = Projectile.rotation.ToRotationVector2() * w * Projectile.timeLeft / 60f; + + if (Projectile.FinalExtraUpdate()) + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.frame = 0; + Projectile.frameCounter = 0; + } + if (Projectile.frame == 1) + Projectile.frame++; + } + + public override bool ShouldUpdatePosition() => false; + } + + public class VoidConcentrationSummonTagBuff : ModBuff + { + public override string Texture => "CalamityMod/Buffs/Summon/Whips/SentinalLash"; + + public override void SetStaticDefaults() + { + BuffID.Sets.IsATagBuff[Type] = true; + Main.debuff[Type] = true; + Main.buffNoSave[Type] = true; + } + } + + #endregion } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 7c6c20ee1b..4e146c0844 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -1783,3 +1783,8 @@ SmashedEvil: { 20% increased movement speed ''' } + +VoidConcentrationSummonTagBuff: { + DisplayName: Void Concentration Summon Tag Buff + Description: You should never see this. +} diff --git a/Localization/en-US/Mods.CalamityMod.DamageClasses.hjson b/Localization/en-US/Mods.CalamityMod.DamageClasses.hjson index b261db6100..4b00ee161b 100644 --- a/Localization/en-US/Mods.CalamityMod.DamageClasses.hjson +++ b/Localization/en-US/Mods.CalamityMod.DamageClasses.hjson @@ -4,3 +4,4 @@ RogueDamageClass.DisplayName: rogue damage StealthDamageClass.DisplayName: stealth damage TrueMeleeDamageClass.DisplayName: true melee damage TrueMeleeNoSpeedDamageClass.DisplayName: true melee damage +VoidTagDmgType.DisplayName: void tag damage diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 2216c079c2..2ea9bed867 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -887,11 +887,11 @@ VoidConcentrationStaff: { DisplayName: Void Concentration Staff Tooltip: ''' - Summons a foreboding aura that attacks by firing void orbs - Minion damage is increased by 5% while the aura is active - Requires three minion slots to use - There can only be one aura at a time - to launch a black hole that grows in size + Surrounds you with dark energy, which causes all attacks deal 15% less damage + to condense the energy onto a target, calling lasers and focusing your minions on them + When the focused enemy takes damage from any source, they will be struck by extra dark energies + This is extra effective if struck by a minion or sentry + After 10 seconds, the dark energy will return to orbiting you ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 6877f85cf9..651c9eb743 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -315,9 +315,11 @@ VengefulSunSpiritMinion.DisplayName: Vengeful Sun Spirit VileFeederProjectile.DisplayName: Eater of Souls Mini VileFeederSummon.DisplayName: Baby Eater ViridVanguardBlade.DisplayName: Vanguard Blade -VoidConcentrationAura.DisplayName: Concentrated Void Aura -VoidConcentrationBlackhole.DisplayName: Black Hole -VoidConcentrationOrb.DisplayName: Void Orb +VoidConcentrationSummonTagProj.DisplayName: Dark Energy Vortex +VoidConcentrationBeam.DisplayName: Concentrated Beam +VoidConcentrationDarkEnergy.DisplayName: Orbiting Dark Energy +VoidConcentrationMinion.DisplayName: Void Concentration Minion +VoidConcentrationMark.DisplayName: Void Concentration Mark VoidEaterMarionetteProjectile.DisplayName: Void Eater Marionette VolcanicFireballSummon.DisplayName: Volcanic Fireball WaterElementalMinion.DisplayName: Anahita @@ -334,3 +336,4 @@ WulfrumDroid.DisplayName: Wulfrum Droid WulfrumEnergyBurst.DisplayName: Wulfrum Bolt WulfrumFusionBolt.DisplayName: Fusion Bolt YharonMinionFireball.DisplayName: Dragon Fireball + diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 0fcbeb04a1..8a5b7692f8 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -1203,7 +1203,7 @@ namespace CalamityMod RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); - RegisterSummon(ItemType(), BuffType(), ProjectileType()); + RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); RegisterSummon(ItemType(), BuffType(), ProjectileType()); diff --git a/Projectiles/Summon/VoidConcentrationAura.cs b/Projectiles/Summon/VoidConcentrationAura.cs deleted file mode 100644 index 1d9f07ff49..0000000000 --- a/Projectiles/Summon/VoidConcentrationAura.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.IO; -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Summon -{ - public class VoidConcentrationAura : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public int timer = 0; - - public override void SetStaticDefaults() => Main.projPet[Type] = true; - - public override void SetDefaults() - { - Projectile.width = 46; - Projectile.height = 80; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.minionSlots = 3f; - Projectile.timeLeft = 18000; - Projectile.penetrate = -1; - - Projectile.tileCollide = false; - Projectile.timeLeft *= 5; - Projectile.minion = true; - Projectile.DamageType = DamageClass.Summon; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(timer); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - timer = reader.ReadInt32(); - } - - public override bool? CanCutTiles() - { - return true; - } - - public void HandleRightClick() - { - // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - Vector2 velocity = Main.MouseWorld - Main.player[Projectile.owner].Center; - velocity.Normalize(); - velocity *= 2f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Main.player[Projectile.owner].Center, velocity, ModContent.ProjectileType(), (int)(Projectile.damage * 5f), 0f, Projectile.owner); - - Projectile.Kill(); - } - - public override void AI() - { - Player owner = Main.player[Projectile.owner]; - CalamityPlayer mp = owner.Calamity(); - Projectile.Center = owner.Center; - mp.voidAuraDamage = true; - if (owner.dead) - mp.voidAuraDamage = false; - if (!mp.voidAuraDamage || !mp.voidConcentrationAura && Projectile.ai[0] == 1f) - { - mp.voidAura = false; - Projectile.Kill(); - } - if (owner.whoAmI == Main.myPlayer && owner.ownedProjectileCounts[Type] <= 25 && timer > 0 && timer % 4 == 0) - { - NPC target = CalamityUtils.MinionHoming(Projectile.Center, 1800f, owner); - if (target != null) - { - Vector2 correctedVelocity = target.Center - owner.Center; - correctedVelocity.Normalize(); - correctedVelocity *= 3f; - int perturbificator9000 = Main.rand.Next(-1, 2); - Vector2 perturbedspeed = new Vector2(correctedVelocity.X + perturbificator9000, correctedVelocity.Y + perturbificator9000).RotatedBy(MathHelper.ToRadians(Main.rand.Next(1, 3))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedspeed, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), 0f, owner.whoAmI); - } - timer = -1; - } - Projectile.ai[0] = 1f; - if (timer > 50 && timer % 4 == 0) - return; - timer++; - } - - public override bool MinionContactDamage() => true; - } -} diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.cs b/Projectiles/Summon/VoidConcentrationBlackhole.cs deleted file mode 100644 index efed72d73c..0000000000 --- a/Projectiles/Summon/VoidConcentrationBlackhole.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using System.IO; -using CalamityMod.NPCs; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Summon -{ - public class VoidConcentrationBlackhole : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - private int damage = 0; - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(damage); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - damage = reader.ReadInt32(); - } - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - ProjectileID.Sets.MinionShot[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 80; //32 base, 2.5x the normal (for hitbox purposes) - Projectile.height = 85; //34 base, 2.5x the normal (for hitbox purposes) - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.timeLeft = 1800; - Projectile.penetrate = -1; - - Projectile.tileCollide = false; - Projectile.scale = 0.01f; - Projectile.DamageType = DamageClass.Summon; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - } - - private void ApplySucc(NPC npc) - { - float succStrength = 4f / Projectile.scale; - succStrength *= Projectile.scale; - Vector2 velocity = Projectile.Center - npc.Center; - velocity *= 2f; - velocity.SafeNormalize(Vector2.Zero); - float projSpeed = 5f * Projectile.scale; - Vector2 fireDirection = npc.Center; - float fireXVel = Projectile.Center.X - fireDirection.X; - float fireYVel = Projectile.Center.Y - fireDirection.Y; - float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); - if (fireVelocity < 100f) - { - projSpeed = 28f; //14 - } - fireVelocity = projSpeed / fireVelocity; - fireXVel *= fireVelocity; - fireYVel *= fireVelocity; - npc.velocity.X = (velocity.X * 15f + fireXVel) / 16f; - npc.velocity.Y = (velocity.Y * 15f + fireYVel) / 16f; - npc.velocity = (velocity / succStrength); - } - - private void Death() - { - if (Projectile.scale >= 2.5f) //it's boom o' clock - { - Projectile.height *= 2; - Projectile.width *= 2; - Projectile.maxPenetrate = -1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.damage = damage; - Projectile.Damage(); - Projectile.friendly = false; - Projectile.Damage(); - SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - Projectile.Kill(); - } - } - - public override void OnKill(int timeLeft) - { - for (int d = 0; d < 6; d++) - { - int shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 4f); - Main.dust[shadow].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[shadow].scale = 0.5f; - Main.dust[shadow].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int d = 0; d < 18; d++) - { - int shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 4f); - Main.dust[shadow].noGravity = true; - Main.dust[shadow].velocity *= 5f; - shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 3f); - Main.dust[shadow].velocity *= 2f; - } - } - - public override bool PreAI() - { - if (damage == 0) - { - damage = Projectile.damage; - Projectile.damage = 0; - Projectile.position = Main.player[Projectile.owner].position; - } - return true; - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - int height = texture.Height / Main.projFrames[Type]; - int frameHeight = height * Projectile.frame; - Rectangle rectangle = new Rectangle(0, frameHeight, texture.Width, height); - Vector2 origin = new Vector2(texture.Width / 2f, height / 2f); - Main.EntitySpriteDraw(texture, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), lightColor, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None, 0); - return false; - } - - public override void AI() - { - - Projectile.scale += 0.01f; - if (Projectile.scale % 0.02f == 0) - { - Projectile.scale += 0.01f; //speeds up the projectile's growth to prevent it being too long - } - int radius = (int)(Projectile.scale * 100f); //0.01f; to a max of 2.5f; so radius of 1 to 250 by default - if (Projectile.scale >= 2f) - radius *= 2; - - int baseWidth = 32; - int baseHeight = 34; - int newWidth = (int)(baseWidth * Projectile.scale); - int newHeight = (int)(baseHeight * Projectile.scale); - Projectile.ExpandHitboxBy(newWidth, newHeight); - - - - if (Projectile.frameCounter > 6) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame >= Main.projFrames[Type] - 1) - { - Projectile.frame = 0; - } - Projectile.frameCounter++; - - foreach (NPC n in Main.ActiveNPCs) - { - if (!n.friendly && CalamityGlobalNPC.ShouldAffectNPC(n)) - { - if (Vector2.Distance(Projectile.Center, n.Center) <= radius) - ApplySucc(n); - } - } - - - if (Projectile.scale >= 2.5f) //it's boom o' clock - { - Death(); - } - } - } -} diff --git a/Projectiles/Summon/VoidConcentrationBlackhole.png b/Projectiles/Summon/VoidConcentrationBlackhole.png deleted file mode 100644 index ab6fe627707f4953b868f6ed58dbe897918da4d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1293 zcmV+o1@iidP)Px#AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^00dh}L_t(|+U=XqYZE~f$G?+o8nq#` zDRr&nPzWAG=*7Rlg9ttO2l(gt2Y3?1gU8+rq96ee#Ttrf2#L+_^|1Szo!8x+ne5t` zkbEy`w#m-C&&<4e@9jh&MXe{V004veAL)9nd=LOYXYxb3?(aOK&kOc>06_cqm&A5T zuq?qZynFrz0C3*F1^^7_yNMR7L_~VCO924m#ULcqy>OHOSsqgW03SME3vVk1fNqs-a`T~t@+MMv~C(`>)|D65|0H9i`2>|e;cI^{buJeOjW6mv4)1G$}084*i zoq+HU!=4Z4-N59Fd_A|0Po?*#iM8I1U!n{DSCxsE^tdsiBUUy-VvN2a2u&6`0iY>VOCp!OHncJ5s{$im0~!u zlq^?i{W2pio*nOqhv94Kku*0rnf1?((?lMVGz%uu`$aI12!*6NS9*Jcy96>~I+dqP zyk}ZW=^g=7k7(M4yMBNye_E{r0Dg`8c`er>VV^+Sn7{R3NEiQCt;jk7FZOrlm=lo# zNKiX&#DwuVkVt^fg|q8$58%6-X=daUfo*+Y+ktHdHoF5#PspY62fFJYu6RPv^b5Du zvK8wCTuu=%s*vQ6TM^O96_UJ`yAu`j3!9r6X^_w*vgX+_7uAY-vr7QLJeUFiX2Dqc zoF}RPfU>9nSXM&QYD4Z4;A3Bjs$-2xQ>&Uzdqj77Apl?++(`d-cNJ`|C%gyCGf7w{ zpj{s*P;S)+JX+^`y{g35vq3ZrVCi4%6VUZ=R4F;TDJK#zB|`1mC!ibGzyJ0L!1Byl zJ7>exu5|*+8j)#jh)XpWtP|LFK$#uW7_M3;8O#sUioYn~xmKkvZ2_ziNjQEA3 zvg60qahM%1!f5;Z@Jh0rO0W8mwc%`cJTB{ra0NNLy zGw<&n0eS*D7J9<2d^GI=03KBK!dcIr z1*;+)uGsGmBqBt@J^@|JIROL9C5@&%5w+t60gq-o&2rQ8!Mc{yef|1L_#2aGl~^Yr z{G*oufZ@1PXhftsiM?C(-5}u6*bkZKOOx)CQ`KCecC8cGo*`Me1FhrJJHM{F*A5gV z-aQ#|7W|KYV5V^1kru16YyfutK<>Wem$FJq3MZBXX1g| zRiKJwbfqE@%NyVZ0m@jAvqGX8d$OFOVrthqfjgN|Ooc|tJRfi;GvXIi*|Cbq+GWRE z{R64p`j?U&Xj%XO01|XXSad~LNk%$Pa%p95bYXO9Z*BlFgjnqF00000NkvXXu0mjf D()mp% diff --git a/Projectiles/Summon/VoidConcentrationDarkEnergy.png b/Projectiles/Summon/VoidConcentrationDarkEnergy.png new file mode 100644 index 0000000000000000000000000000000000000000..26c523f83c529afb08fee2d1edcd7bf6fc9d6f64 GIT binary patch literal 801 zcmeAS@N?(olHy`uVBq!ia0vp^3P9Yz!3-p0cg)rRQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`g#vs+T$Lppd4yzQG~JaIyntdraAE%WS|G(%666>B9|RaS?_aVXD8gCb z5n0T@z;_sg8IR|$NC65;l(KW=;=H%V71FG4U z8sVAd>8ZuQ0pzeUNHMZ9FalX1`=p_4kn1%VnZe>rK(-+x6N3PdjsoJ$b{4RB7LW}B z2|x_e52Mj6WdQnr0y_f>P=$e!u>s=(h^ZhQtP3C}O#!k&fC*?06If-Cr3H`$)n#a4 z0Fw1Nf51bv|M~);Z3{eI977`9pI$#*bXb9hHNfHB|Nlkqp?O~p%<#6J?7MZ-Mb9Me z#5vzY7j3;)ov+)wbh3JaXN$5}kKko7^#mT~ACiKC0&G8?-ki9M_r+2phRojAyY!Zr zN(gW-$>f#Kl#(`B&i#|2BV2Kj=l+u~_3|3Uy@Y?h_Ew#)U>@C*X_mdmVa~dq`?6bE z{ggO-y%~0g=-=K_z>#nwLdsj+dV>D>CU%doBTcieSupN>%xECY_F`dE^&uwZwO6;L zH_X?WcF&%%aMkmY6)LQ+9;G^}bU)qCdV87b0Uv{N%^iAFq%c9!+P!n(f_qEn`R<(RPQ$>ark^&$!UdxU0faMwJbZT28@ zlbC*W{{l94t&eL{FJ3iQ5YF*Wd?@hX`G?GpK@Kdf;+E_c7r)JCe8jNr(u`{fjrm6z zD*lEaVpx*=z?r8*pZVSwj)}H2F3+69WYbc|FHp~J_p!Rc>E#!NxAI(5W0+>I`SD$M z-xL^2FXt)i5s$QFT12e?%G-Z=SAxF6*2U FngFIW0Y?A; literal 0 HcmV?d00001 diff --git a/Projectiles/Summon/VoidConcentrationOrb.png b/Projectiles/Summon/VoidConcentrationMark.png similarity index 100% rename from Projectiles/Summon/VoidConcentrationOrb.png rename to Projectiles/Summon/VoidConcentrationMark.png diff --git a/Projectiles/Summon/VoidConcentrationOrb.cs b/Projectiles/Summon/VoidConcentrationOrb.cs deleted file mode 100644 index 7de9d93ea7..0000000000 --- a/Projectiles/Summon/VoidConcentrationOrb.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Summon -{ - public class VoidConcentrationOrb : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Summon"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - ProjectileID.Sets.MinionShot[Type] = true; - ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; - } - - public override void SetDefaults() - { - Projectile.width = 54; - Projectile.height = 50; - Projectile.netImportant = true; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.timeLeft = 300; - Projectile.penetrate = 1; - - Projectile.tileCollide = false; - Projectile.scale = 0.01f; - Projectile.DamageType = DamageClass.Summon; - } - - public override bool? CanHitNPC(NPC target) - { - if (Projectile.scale < 1f) - return false; - return null; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - for (int d = 0; d < 6; d++) - { - int shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 2f); - Main.dust[shadow].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[shadow].scale = 0.5f; - Main.dust[shadow].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int d = 0; d < 10; d++) - { - int shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 3f); - Main.dust[shadow].noGravity = true; - Main.dust[shadow].velocity *= 5f; - shadow = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Shadowflame, 0f, 0f, 100, new Color(0, 0, 0), 2f); - Main.dust[shadow].velocity *= 2f; - } - } - - public override void AI() - { - Player owner = Main.player[Projectile.owner]; - NPC target = CalamityUtils.MinionHoming(Projectile.Center, 1800f, owner); - - if (Projectile.scale >= 1f) - { - if (target != null) - { - float projSpeed = 40f; - Vector2 fireDirection = Projectile.Center; - float fireXVel = target.Center.X - fireDirection.X; - float fireYVel = target.Center.Y - fireDirection.Y; - float fireVelocity = (float)Math.Sqrt((double)(fireXVel * fireXVel + fireYVel * fireYVel)); - if (fireVelocity < 100f) - { - projSpeed = 28f; //14 - } - fireVelocity = projSpeed / fireVelocity; - fireXVel *= fireVelocity; - fireYVel *= fireVelocity; - Projectile.velocity.X = (Projectile.velocity.X * 25f + fireXVel) / 26f; - Projectile.velocity.Y = (Projectile.velocity.Y * 25f + fireYVel) / 26f; - if (Main.rand.NextBool(5)) - Projectile.velocity *= 1.1f; - } - - } - else - { - Projectile.scale += 0.025f; - Projectile.velocity *= 1.03f; - } - - if (Projectile.frameCounter > 6) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame >= Main.projFrames[Type] - 1) - { - Projectile.frame = 0; - } - Projectile.frameCounter++; - - if (Projectile.timeLeft <= 60) - { - Projectile.alpha += 4; - } - } - } -} From ed5263531a23e61a1abcd6ffc2bc2074b14ffe58 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 13 Mar 2026 23:03:47 -0500 Subject: [PATCH 082/346] cleanup --- .../Weapons/Summon/VoidConcentrationStaff.cs | 69 +++++++++---------- .../en-US/Mods.CalamityMod.Common.hjson | 1 + .../Mods.CalamityMod.Projectiles.Summon.hjson | 1 - 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 4a7ca5206a..a6ed6eef47 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using CalamityMod.Buffs.Summon; using CalamityMod.CalPlayer; @@ -22,6 +23,7 @@ using Terraria.GameContent; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.NPC.NPCNameFakeLanguageCategoryPassthrough; namespace CalamityMod.Items.Weapons.Summon { @@ -31,18 +33,17 @@ namespace CalamityMod.Items.Weapons.Summon public new string LocalizationCategory => "Items.Weapons.Summon"; public static SummonTag summonTag = new SummonTag() { - MultiplicativeTagDamage = 0.05f, //Percentage of damage dealt added by the void. This is doubled by summons. - FlatTagDamage = 5, //Minimum damage of each void ball. + MultiplicativeTagDamage = 0.3f, //Percentage of damage dealt added by the void. This is doubled by summons. This was tested - 1.5x was too weak to be worth 4 slots. AllowsWhipStacking = true, TagOnHit = tagOnHit, TagModifyHitEffects = SummonTag.BlankTagModifyHit, AutoDrawTooltip = false }; - public static void tagOnHit(NPC npc, Projectile projectile, NPC.HitInfo hit, int damageDone) => npc.GetGlobalNPC().StoredDamage += damageDone; + public static void tagOnHit(NPC npc, Projectile projectile, NPC.HitInfo hit, int damageDone) => npc.GetGlobalNPC().StoredDamage += (int)(damageDone); public override void SetStaticDefaults() { - ItemID.Sets.StaffMinionSlotsRequired[Type] = 3f; + ItemID.Sets.StaffMinionSlotsRequired[Type] = 4f; summonTag.TagItem = Type; CalamityBuffSets.SummonTagDebuff.Add(ModContent.BuffType(), summonTag); } @@ -59,17 +60,11 @@ namespace CalamityMod.Items.Weapons.Summon Item.damage = 200; Item.knockBack = 4f; Item.useAnimation = Item.useTime = 24; - //Item.buffType = ModContent.BuffType(); Item.shoot = ModContent.ProjectileType(); Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); } - public override bool CanUseItem(Player player) - { - return base.CanUseItem(player); - } - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { if (player.altFunctionUse != 2) @@ -98,9 +93,12 @@ namespace CalamityMod.Items.Weapons.Summon } return false; } - - // TODO -- should be strictly unnecessary as per API design 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 @@ -121,22 +119,18 @@ namespace CalamityMod.Projectiles.Summon Projectile.netImportant = true; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.minionSlots = 3f; + Projectile.minionSlots = 4f; Projectile.timeLeft = 18000; Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.timeLeft *= 5; Projectile.minion = true; Projectile.DamageType = DamageClass.Summon; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; - VoidConcentrationStaff.summonTag.MultiplicativeTagDamage = 0.15f; } public override bool? CanHitNPC(NPC target) => false; public override void AI() { - Main.projPet[Type] = false; Player player = Main.player[Projectile.owner]; CalamityPlayer modPlayer = player.Calamity(); player.AddBuff(ModContent.BuffType(), 3600); @@ -157,7 +151,7 @@ namespace CalamityMod.Projectiles.Summon int numRings = 3; int spacing = 360 / numPerRing; int distance2 = 10; - if (player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) + if (Main.netMode != NetmodeID.MultiplayerClient && player.ownedProjectileCounts[ModContent.ProjectileType()] + player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) { for (int i = 0; i < numPerRing; i++) { @@ -179,7 +173,6 @@ namespace CalamityMod.Projectiles.Summon { Main.projFrames[Type] = 8; ProjectileID.Sets.MinionShot[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -324,12 +317,13 @@ namespace CalamityMod.Projectiles.Summon for (var i = 0; i < 3; i++) { var v = v1.RotatedBy(MathHelper.TwoPi * (i / 3f)); - GeneralParticleHandler.SpawnParticle(new CustomSprite(Projectile.Center + 200 * v, Vector2.Zero, 30, TextureAssets.Projectile[ModContent.ProjectileType()].Value, 1, Color.White, AddativeBlend: false, frameCount: 5)); - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); - p.penetrate = 1; - p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); - p.penetrate = 1; - + if (Main.netMode != NetmodeID.MultiplayerClient) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); + p.penetrate = 1; + p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner,1); + p.penetrate = 1; + } } } @@ -357,7 +351,7 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 14; + ProjectileID.Sets.TrailCacheLength[Type] = 8; ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.MinionShot[Type] = true; } @@ -376,14 +370,13 @@ namespace CalamityMod.Projectiles.Summon Projectile.localNPCHitCooldown = 30; Projectile.penetrate = 2; } - - public override void OnSpawn(IEntitySource source) - { - ProjectileID.Sets.TrailCacheLength[Type] = 8; - } - public override void AI() { + if (Projectile.timeLeft == 600 && Projectile.ai[0] == 0) + { + GeneralParticleHandler.SpawnParticle(new CustomSprite(Projectile.Center, Vector2.Zero, 30, TextureAssets.Projectile[ModContent.ProjectileType()].Value, 1, Color.White, AddativeBlend: false, frameCount: 5)); + + } NPC target = Projectile.Center.MinionHoming(5000f, Main.player[Projectile.owner]); // Move towards the target. if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0) @@ -525,8 +518,11 @@ namespace CalamityMod.Projectiles.Summon var dmg = (int)Math.Max(1, (StoredDamage)); StoredDamage -= dmg; rot += 0.15f; - Projectile.NewProjectile(npc.GetSource_OnHurt(null), npc.Center, Vector2.UnitX.RotatedBy(rot), ModContent.ProjectileType(), (int)Math.Max((dmg * VoidConcentrationStaff.summonTag.MultiplicativeTagDamage), 1), 0, -1, npc.whoAmI); - } + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Projectile.NewProjectile(npc.GetSource_OnHurt(null), npc.Center, Vector2.UnitX.RotatedBy(rot), ModContent.ProjectileType(), (int)Math.Max((dmg * VoidConcentrationStaff.summonTag.MultiplicativeTagDamage), 1), 0, -1, npc.whoAmI); + } + } } base.PostAI(npc); } @@ -542,7 +538,7 @@ namespace CalamityMod.Projectiles.Summon public override void ModifyHurt(ref Player.HurtModifiers modifiers) { if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0) - modifiers.FinalDamage *= 0.85f; //15% less dmg taken, mult + modifiers.FinalDamage *= 0.85f; //15% less dmg taken, multipicative. This is not meant to be additive to avoid needing DR scaling. } } public class VoidConcentrationSummonTagProj : ModProjectile, ILocalizedModType @@ -553,8 +549,6 @@ namespace CalamityMod.Projectiles.Summon public override void SetStaticDefaults() { Main.projFrames[Type] = 8; - ProjectileID.Sets.MinionShot[Type] = true; - ProjectileID.Sets.MinionTargettingFeature[Type] = true; } public override void SetDefaults() @@ -598,7 +592,6 @@ namespace CalamityMod.Projectiles.Summon } public override void AI() { - ProjectileID.Sets.MinionShot[Type] = false; if (target == null || !target.active) { Projectile.Kill(); diff --git a/Localization/en-US/Mods.CalamityMod.Common.hjson b/Localization/en-US/Mods.CalamityMod.Common.hjson index 26731d0356..8b0a31d46e 100644 --- a/Localization/en-US/Mods.CalamityMod.Common.hjson +++ b/Localization/en-US/Mods.CalamityMod.Common.hjson @@ -11,6 +11,7 @@ NoArmorSetBonusKey: Press the Armor Set Bonus key ArmorSetBonusKey: Press {0} DoubleTapDown: Double tap {0} // Miscellaneous stats/info +MinionSlotCost: Uses {0} minion slots AggroBoost: Enemies are more likely to target you AggroReduction: Enemies are less likely to target you KnockbackImmunity: Grants immunity to knockback diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 651c9eb743..1d481724b0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -336,4 +336,3 @@ WulfrumDroid.DisplayName: Wulfrum Droid WulfrumEnergyBurst.DisplayName: Wulfrum Bolt WulfrumFusionBolt.DisplayName: Fusion Bolt YharonMinionFireball.DisplayName: Dragon Fireball - From cf681279bc2fdeb8c775a60f466850cff76a604e Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 13 Mar 2026 23:11:54 -0500 Subject: [PATCH 083/346] deleted unused texture --- Items/Weapons/Summon/VoidConcentrationStaff.cs | 5 +++-- .../Summon/VoidConcentrationDarkEnergy.png | Bin 801 -> 0 bytes 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 Projectiles/Summon/VoidConcentrationDarkEnergy.png diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index a6ed6eef47..74b057efc3 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -164,6 +164,7 @@ namespace CalamityMod.Projectiles.Summon } public class VoidConcentrationDarkEnergy : ModProjectile, ILocalizedModType { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public new string LocalizationCategory => "Projectiles.Summon"; private double minDistance => 10; private double distance { get; set; } = 10; @@ -543,7 +544,7 @@ namespace CalamityMod.Projectiles.Summon } public class VoidConcentrationSummonTagProj : ModProjectile, ILocalizedModType { - public override string Texture => "CalamityMod/Projectiles/Summon/VoidConcentrationDarkEnergy"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() @@ -620,7 +621,7 @@ namespace CalamityMod.Projectiles.Summon public class VoidConcentrationSummonTagBuff : ModBuff { - public override string Texture => "CalamityMod/Buffs/Summon/Whips/SentinalLash"; + public override string Texture => "CalamityMod/Buffs/Summon/Whips/SentinalLash"; //Shared placeholder by all summon tag buffs. This is never seen in game. public override void SetStaticDefaults() { diff --git a/Projectiles/Summon/VoidConcentrationDarkEnergy.png b/Projectiles/Summon/VoidConcentrationDarkEnergy.png deleted file mode 100644 index 26c523f83c529afb08fee2d1edcd7bf6fc9d6f64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmeAS@N?(olHy`uVBq!ia0vp^3P9Yz!3-p0cg)rRQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`g#vs+T$Lppd4yzQG~JaIyntdraAE%WS|G(%666>B9|RaS?_aVXD8gCb z5n0T@z;_sg8IR|$NC65;l(KW=;=H%V71FG4U z8sVAd>8ZuQ0pzeUNHMZ9FalX1`=p_4kn1%VnZe>rK(-+x6N3PdjsoJ$b{4RB7LW}B z2|x_e52Mj6WdQnr0y_f>P=$e!u>s=(h^ZhQtP3C}O#!k&fC*?06If-Cr3H`$)n#a4 z0Fw1Nf51bv|M~);Z3{eI977`9pI$#*bXb9hHNfHB|Nlkqp?O~p%<#6J?7MZ-Mb9Me z#5vzY7j3;)ov+)wbh3JaXN$5}kKko7^#mT~ACiKC0&G8?-ki9M_r+2phRojAyY!Zr zN(gW-$>f#Kl#(`B&i#|2BV2Kj=l+u~_3|3Uy@Y?h_Ew#)U>@C*X_mdmVa~dq`?6bE z{ggO-y%~0g=-=K_z>#nwLdsj+dV>D>CU%doBTcieSupN>%xECY_F`dE^&uwZwO6;L zH_X?WcF&%%aMkmY6)LQ+9;G^}bU)qCdV87b0Uv{N%^iAFq%c9!+P!n(f_qEn`R<(RPQ$>ark^&$!UdxU0faMwJbZT28@ zlbC*W{{l94t&eL{FJ3iQ5YF*Wd?@hX`G?GpK@Kdf;+E_c7r)JCe8jNr(u`{fjrm6z zD*lEaVpx*=z?r8*pZVSwj)}H2F3+69WYbc|FHp~J_p!Rc>E#!NxAI(5W0+>I`SD$M z-xL^2FXt)i5s$QFT12e?%G-Z=SAxF6*2U FngFIW0Y?A; From 1d93720448e2c46bcd66a3c357d4c05766ba3f32 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:57:26 +0700 Subject: [PATCH 084/346] Primordial Wyrm spawning text --- Localization/en-US/Mods.CalamityMod.Status.Boss.hjson | 2 ++ Systems/World/WorldMiscUpdateSystem.cs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson index 3b293f65f6..e9a1183133 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Boss.hjson @@ -130,6 +130,8 @@ PermafrostSecondBirbSwarmText: I must say, those birds earlier were rather cute! PermafrostNonchalantText: I must say, I am not the mage I used to be. This is starting to tire my old body... PermafrostBruhText: Ha! Just kidding! Watch what happens when I cast a spell I know! PermafrostGiveUpText: Gah, I think I pulled a muscle! Ah, well. I seems that I must concede. Well fought! +// Primordial Wyrm +PrimordialWyrmSpawn: The chaotic teleportation energy enrages an abyssal behemoth... // April Fools AprilFools: The LORDE is approaching... AprilFoolsGFB: La Ruga is approaching... diff --git a/Systems/World/WorldMiscUpdateSystem.cs b/Systems/World/WorldMiscUpdateSystem.cs index 8568bd4e69..81feca5779 100644 --- a/Systems/World/WorldMiscUpdateSystem.cs +++ b/Systems/World/WorldMiscUpdateSystem.cs @@ -619,7 +619,10 @@ namespace CalamityMod.Systems bool adultWyrmAlive = CalamityGlobalNPC.adultEidolonWyrmHead != -1 && Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active; if (!adultWyrmAlive) + { + CalamityUtils.BroadcastLocalizedText("Mods.CalamityMod.Status.Boss.PrimordialWyrmSpawn", Color.Cyan); NPC.SpawnOnPlayer(player.whoAmI, NPCType()); + } } #endregion } From 6781466d75b35ee42d3cd01fbd792550b96485e5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Mar 2026 16:50:32 -0700 Subject: [PATCH 085/346] Fixed Negative Speed Bug --- Projectiles/Magic/ValkyrieRayStaff.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Magic/ValkyrieRayStaff.cs b/Projectiles/Magic/ValkyrieRayStaff.cs index 05285981d6..dfc485f8d0 100644 --- a/Projectiles/Magic/ValkyrieRayStaff.cs +++ b/Projectiles/Magic/ValkyrieRayStaff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Magic; +using System; +using CalamityMod.Items.Weapons.Magic; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -36,7 +37,7 @@ namespace CalamityMod.Projectiles.Magic // Calculate how quickly the staff should charge. Charge increases by some number close to 1 every frame. // Speed increasing reforges make this number greater than 1. Slowing reforges make it smaller than 1. if (TimeRate == 0f) - TimeRate = (ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime; + TimeRate = MathF.Round((float)(ValkyrieRay.ChargeFrames + ValkyrieRay.CooldownFrames) / player.HeldItem.useTime, 3); // Increment the timer for the staff. If the timer has passed the total time, destroy it. Timer += TimeRate; @@ -46,7 +47,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.Kill(); return; } - // Compute the weapon's charge. float chargeLevel = MathHelper.Clamp(Timer / ValkyrieRay.ChargeFrames, 0f, 1f); From 396ff751b8d8fd26a1ac6302f4aa0480c3d7b65b Mon Sep 17 00:00:00 2001 From: FluffyMode <151322140+FluffyMode@users.noreply.github.com> Date: Sun, 15 Mar 2026 13:01:36 +1300 Subject: [PATCH 086/346] Update EnchantedStarfish.cs --- Items/Fishing/EnchantedStarfish.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/Fishing/EnchantedStarfish.cs b/Items/Fishing/EnchantedStarfish.cs index f34ae22667..24a8edd2b5 100644 --- a/Items/Fishing/EnchantedStarfish.cs +++ b/Items/Fishing/EnchantedStarfish.cs @@ -48,5 +48,7 @@ namespace CalamityMod.Items.Fishing } return true; } + + public override bool ConsumeItem(Player player) => player.ConsumedManaCrystals < Player.ManaCrystalMax; } } From e552c4eea562129428d9b969f63a2d8ad6384a13 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Mar 2026 17:03:05 -0700 Subject: [PATCH 087/346] Re-implements Grand Dad Makes many adjustments to retier it and disconnect it from the Grand Guardian line and remove gfb gameplay changes --- CalPlayer/CalamityPlayer.cs | 3 + CalPlayer/CalamityPlayerLifeRegen.cs | 9 + CalPlayer/CalamityPlayerMiscEffects.cs | 5 + Dusts/SquashDust.cs | 4 +- Dusts/VoidDust.cs | 55 +- Items/Weapons/Melee/GrandDad.cs | 29 +- Items/Weapons/Melee/VoidEdge.cs | 12 +- ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 + NPCs/Abyss/EidolonWyrmHead.cs | 2 +- NPCs/CalamityTileCollisionHarmNPC.cs | 73 ++- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 2 +- Particles/CircularSmearLarge.png | Bin 0 -> 70439 bytes Particles/CustomSpark.cs | 25 +- Projectiles/Melee/BasherHoldout.cs | 5 +- Projectiles/Melee/GrandDadHoldout.cs | 545 +++++++++++------- Projectiles/Typeless/TileSlamDamage.cs | 17 + 16 files changed, 517 insertions(+), 270 deletions(-) create mode 100644 Particles/CircularSmearLarge.png create mode 100644 Projectiles/Typeless/TileSlamDamage.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2a86309ad8..11fa4bf835 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -361,6 +361,9 @@ namespace CalamityMod.CalPlayer public int amputatorBuff = 0; /// Variable used to track the current fuel amount for Pristine Fury's right-click. public int furyFuel = 1800; + /// Variable to track the healing over time gained from Grand Dad. + public int grandDadHealPool = 0; + public int grandDadHealTimer = 0; public const int FuryFuelMax = 1800; public float furyRefuelTimer = 0; /// Variable used to track if Auger can do its big slash attack. diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 474f490c02..6ea725299d 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -342,6 +342,15 @@ namespace CalamityMod.CalPlayer Player.lifeRegen += 6; } + if (grandDadHealTimer == 0 && grandDadHealPool >= 7) + { + Player.HealPlayer(7, HealTextType.Broadcast); + grandDadHealPool -= 7; + grandDadHealTimer = (int)(30 * Utils.GetLerpValue(260, 60, grandDadHealPool, true)); + } + else if (grandDadHealTimer > 0) + grandDadHealTimer--; + // Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity if (rOoze || aAmpoule || purity) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 085ae24558..9bf6d8f9f3 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -222,6 +222,11 @@ namespace CalamityMod.CalPlayer 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); } + 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); + } } // De-equipping Gael's Greatsword deletes all rage. diff --git a/Dusts/SquashDust.cs b/Dusts/SquashDust.cs index a0d5160f88..425763512a 100644 --- a/Dusts/SquashDust.cs +++ b/Dusts/SquashDust.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Dusts public override bool PreDraw(Dust dust) { Vector2 baseSize = Vector2.One; - if (dust.customData != null) + if (dust.customData != null && dust.customData is Vector2) baseSize = (Vector2)dust.customData; Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y)); @@ -87,7 +87,7 @@ namespace CalamityMod.Dusts private static void DrawPixelated(Dust dust) { Vector2 baseSize = Vector2.One; - if (dust.customData != null) + if (dust.customData != null && dust.customData is Vector2) baseSize = (Vector2)dust.customData; Vector2 squash = new Vector2(Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), 2, 7, 1 * baseSize.Y, 2.5f * baseSize.Y)); diff --git a/Dusts/VoidDust.cs b/Dusts/VoidDust.cs index e66a8f3bf4..22eeafbd4c 100644 --- a/Dusts/VoidDust.cs +++ b/Dusts/VoidDust.cs @@ -31,30 +31,51 @@ namespace CalamityMod.Dusts public override bool Update(Dust dust) { - dust.rotation += MathF.Sign(dust.velocity.X); - dust.velocity *= 0.98f; + float fade = (1 + dust.fadeIn); + dust.velocity *= 0.96f; if (dust.noGravity) - dust.scale += 0.02f; + dust.scale -= 0.05f * fade; else - dust.scale -= 0.01f; + dust.scale -= 0.065f * fade; float light = MathHelper.Clamp(dust.scale * 0.8f, 0f, 1f); if (!dust.noLightEmittence) Lighting.AddLight(dust.position, dust.color.ToVector3() * light); + + if (dust.scale <= 0) + dust.active = false; - return true; + dust.position += dust.velocity; + return false; + } + public override bool MidUpdate(Dust dust) + { + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; + return false; } public override bool PreDraw(Dust dust) { + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; + Vector2 baseSize = Vector2.One; + bool useSquash = false; + float squashMaxSpeed = 0; + if (dust.customData != null && dust.customData is int) + { + useSquash = true; + squashMaxSpeed = (float)dust.customData; + } + + Vector2 squash = useSquash ? new Vector2(Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.Y, 2.5f * baseSize.Y)) : baseSize; + if (!dust.noLight) { // Glow Orb - Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); if (dust.alpha < 1) - Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0); } - Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0); return false; } } @@ -65,20 +86,32 @@ namespace CalamityMod.Dusts public override bool PreDraw(Dust dust) { + dust.rotation = dust.velocity.ToRotation() + MathHelper.PiOver2; PixelationManager.AddPixelatedDrawer((_) => DrawPixelated(dust), GeneralDrawLayer.AfterDusts); return false; } private static void DrawPixelated(Dust dust) { + Vector2 baseSize = Vector2.One; + bool useSquash = false; + float squashMaxSpeed = 0; + if (dust.customData != null && dust.customData is int) + { + useSquash = true; + squashMaxSpeed = (int)dust.customData; + } + + Vector2 squash = useSquash ? new Vector2(Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.X, 0.5f * baseSize.X), Utils.Remap(dust.velocity.Length(), squashMaxSpeed / 4, squashMaxSpeed, 1 * baseSize.Y, 2.5f * baseSize.Y)) : baseSize; + if (!dust.noLight) { // Glow Orb - Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.1f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.1f, SpriteEffects.None, 0); if (dust.alpha < 1) - Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, dust.scale * 0.04f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(BloomCircle.Value, dust.position - Main.screenPosition, null, dust.color with { A = 0 } * 0.85f * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, BloomCircle.Size() * 0.5f, squash * dust.scale * 0.04f, SpriteEffects.None, 0); } - Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, dust.scale * 0.075f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(SolidCircle.Value, dust.position - Main.screenPosition, null, Color.Black * Utils.GetLerpValue(255, 0, dust.alpha), dust.rotation, SolidCircle.Size() * 0.5f, squash * dust.scale * 0.075f, SpriteEffects.None, 0); } } } diff --git a/Items/Weapons/Melee/GrandDad.cs b/Items/Weapons/Melee/GrandDad.cs index fab3876b27..c22652b727 100644 --- a/Items/Weapons/Melee/GrandDad.cs +++ b/Items/Weapons/Melee/GrandDad.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 124; Item.height = 124; - Item.damage = 2407; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( + Item.damage = 3777; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 77; Item.useTime = 77; @@ -56,14 +56,6 @@ namespace CalamityMod.Items.Weapons.Melee { list.FindAndReplace("[GFB]", Lang.SupportGlyphs(this.GetLocalizedValue(Main.zenithWorld ? "TooltipGFB" : "TooltipNormal"))); } - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(). - AddIngredient(3). - AddTile(TileID.MythrilAnvil). - Register(); - } public override void OnSpawn(IEntitySource source) { time = 0; @@ -95,11 +87,21 @@ namespace CalamityMod.Items.Weapons.Melee int particleNumber = (int)Math.Max(15 * power, 2); for (int i = -particleNumber; i <= particleNumber; i++) { - Particle sparks = new AltSparkParticle(place, (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power, false, Main.rand.Next(17, 30 + 1), Main.rand.NextFloat(0.2f, 0.8f), Main.rand.NextBool() ? Color.Lerp(Color.Blue, Color.DodgerBlue, 0.3f) : Color.Gold); - GeneralParticleHandler.SpawnParticle(sparks); - Dust dust = Dust.NewDustPerfect(place, ModContent.DustType(), (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power, 0, default, Main.rand.NextFloat(0.85f, 1.2f) * power); + if (i % 2 == 0) + { + Vector2 vel = (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power; + Dust dust2 = Dust.NewDustPerfect(place + vel * 13, ModContent.DustType(), + vel, 0, default, Main.rand.NextFloat(1.3f, 1.2f)); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; + dust2.customData = new Vector2(0.2f, 1.6f); + dust2.fadeIn = 2.5f; + } + + Dust dust = Dust.NewDustPerfect(place, ModContent.DustType(), (Vector2.UnitX * (5 + Math.Abs(i)) * Math.Sign(i)).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.5f, 1) * power, 0, default, Main.rand.NextFloat(0.85f, 1.2f) * power); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Blue : Color.DodgerBlue; + dust.customData = 7; } SoundStyle sound = new("CalamityMod/Sounds/NPCHit/ExoHit3"); @@ -130,10 +132,11 @@ namespace CalamityMod.Items.Weapons.Melee maxFallSpeed = 75; oldVel = Item.velocity; } - public override void OnCreated(ItemCreationContext context) + public override bool OnPickup(Player player) { if (Main.zenithWorld) SoundEngine.PlaySound(GrandDadEasterEggSound, Main.LocalPlayer.MountedCenter); + return true; } } } diff --git a/Items/Weapons/Melee/VoidEdge.cs b/Items/Weapons/Melee/VoidEdge.cs index 7ac33fbcb3..f7134929dd 100644 --- a/Items/Weapons/Melee/VoidEdge.cs +++ b/Items/Weapons/Melee/VoidEdge.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Melee; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; @@ -104,5 +105,14 @@ namespace CalamityMod.Items.Weapons.Melee Projectile.NewProjectile(player.GetSource_ItemUse(Item), target.Center + new Vector2(0, 1300f), velocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.9f, 1.1f), ModContent.ProjectileType(), soulDamage, 0f, player.whoAmI, 0f, ai1); Projectile.NewProjectile(player.GetSource_ItemUse(Item), target.Center + new Vector2(0, 1300f), velocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.9f, 1.1f), ModContent.ProjectileType(), soulDamage, 0f, player.whoAmI, 0f, ai1); } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddIngredient(15). + AddIngredient(3). + AddTile(TileID.MythrilAnvil). + Register(); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index cda4323410..77d8aa7a5e 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -146,6 +146,7 @@ TarraEnergy.DisplayName: Tarra Energy TarragonAura.DisplayName: Tarragon Aura TatteredFairyDust.DisplayName: Tattered Fairy Dust TeslaAura.DisplayName: Tesla's Electricity +TileSlamDamage.DisplayName: Grand Damage TitanHeartBoom.DisplayName: Titan Heart Boom TransformerAura.DisplayName: Transformer Aura TransformerBlob.DisplayName: Transformer Shard diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 52c405524e..06341b7b05 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -462,9 +462,9 @@ namespace CalamityMod.NPCs.Abyss // Post-Polterghast: Soul Edge, Eidolic Wail, Stardust Staff LeadingConditionRule postPolter = new LeadingConditionRule(DropHelper.If(() => DownedBossSystem.downedPolterghast)); aewMinionCondition.Add(postPolter); - postPolter.Add(ModContent.ItemType(), 3); postPolter.Add(ModContent.ItemType(), 3); postPolter.Add(ModContent.ItemType(), 3); + postPolter.Add(ModContent.ItemType(), 3); // Post-Leviathan: 6-8 Lumenyl (8-11 on Expert) LeadingConditionRule postLevi = new LeadingConditionRule(DropHelper.If(() => DownedBossSystem.downedLeviathan)); diff --git a/NPCs/CalamityTileCollisionHarmNPC.cs b/NPCs/CalamityTileCollisionHarmNPC.cs index e8c8ce2d34..4a7ed2fecc 100644 --- a/NPCs/CalamityTileCollisionHarmNPC.cs +++ b/NPCs/CalamityTileCollisionHarmNPC.cs @@ -1,7 +1,12 @@ using System; +using System.Collections.Generic; +using CalamityMod.Dusts; +using CalamityMod.Enums; +using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ModLoader; namespace CalamityMod.NPCs @@ -78,10 +83,6 @@ namespace CalamityMod.NPCs /// Will check for tiles in the collision instead of velocity public void ApplyCollisionDamage(NPC npc, Player player, int potentialDamage, Vector2 forcedVel, float terminalVelocityForFullDamage = 10f, bool checkTiles = false) { - //NPCs that don't collide with tiles simply don't get fall damage, lol. - if (npc.noTileCollide) - return; - PotentialEnergyDamage = potentialDamage; OldVelocity = npc.velocity; OlderVelocity = npc.velocity; @@ -100,10 +101,6 @@ namespace CalamityMod.NPCs /// Will check for tiles in the collision instead of velocity public void ApplyForcedVelocity(NPC npc, Player player, Vector2 forcedVel, bool checkTiles = false) { - // NPCs that don't collide with tiles simply don't get velocity, lol. - if (npc.noTileCollide) - return; - OldVelocity = npc.velocity; OlderVelocity = npc.velocity; CheckTiles = checkTiles; @@ -116,21 +113,71 @@ namespace CalamityMod.NPCs { if (FallDamageSusceptible) { - if (CheckTiles) + if (CheckTiles) // Grand Dad { + float scale = (npc.boss ? 1.35f : 1) + Utils.GetLerpValue(20, 800, Math.Max(npc.width, npc.height)); float oldVelocity = OldVelocity.Length(); npc.Center += ForcedVel; ForcedVel *= 0.995f; - if (Collision.SolidCollision(npc.Center, (int)(npc.width * 0.5f), (int)(npc.height * 0.5f)) || !WorldGen.InWorld(npc.Center.ToTileCoordinates().X, npc.Center.ToTileCoordinates().Y, 40)) + Vector2 safeVel = ForcedVel.SafeNormalize(Vector2.UnitX); + + if (npc.velocity == Vector2.Zero || ForcedVel.Length() < 2 || Collision.SolidCollision(npc.Center, (int)(npc.width * 0.5f), (int)(npc.height * 0.5f)) || !WorldGen.InWorld(npc.Center.ToTileCoordinates().X, npc.Center.ToTileCoordinates().Y, 40)) { - if (!ForceVelocityOnly) + if (!ForceVelocityOnly && potentialEnergyDamage > 0) { + attacker.SetScreenshake(7f * scale); + if (!CalamityClientConfig.Instance.Photosensitivity) + { + Vector2 pulseVel = -safeVel; + Particle pulse1 = new CustomSpark(npc.Center, pulseVel * 2, "CalamityMod/Particles/BloomCircle", false, (int)(23 * MathF.Pow(scale, 2)), 0.6f * MathF.Pow(scale, 2), Color.DodgerBlue, new Vector2(2f, 1f), shrinkSpeed: -0.1f / scale, noShrink: true, glowCenter: true, glowOpacity: 0.8f); + GeneralParticleHandler.SpawnParticle(pulse1); + pulse1.Pixelate = true; + Particle pulse2 = new CustomSpark(npc.Center, pulseVel, "CalamityMod/Particles/BloomRing", false, (int)(18 * MathF.Pow(scale, 2)), 0.5f * MathF.Pow(scale, 2), Color.Blue, new Vector2(4f, 0.7f), shrinkSpeed: -0.3f / scale, noShrink: true); + GeneralParticleHandler.SpawnParticle(pulse2); + pulse2.Pixelate = true; + } + + + for (int i = 0; i < 2; i++) + { + SoundStyle die = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); + SoundEngine.PlaySound(die with { Pitch = 0.5f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); + if (npc.boss) + { + SoundStyle dieHard = new("CalamityMod/Sounds/Item/HellkiteSmallHit3"); + SoundEngine.PlaySound(dieHard with { Pitch = -1f, Volume = Math.Min(0.5f * scale, 1f), MaxInstances = 2 }, npc.Center); + } + SoundStyle dieHarder = new("CalamityMod/Sounds/Item/HeliumFlashCoreImpact"); + SoundEngine.PlaySound(dieHarder with { Pitch = -1.8f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); + } + for (int i = 0; i < 30; i++) + { + float variance = Main.rand.NextFloat(-0.8f, 0.8f); + Dust dust = Dust.NewDustPerfect(npc.Center, ModContent.DustType(), + -safeVel.RotatedBy(variance * 2).RotatedByRandom(MathF.Abs(variance) / 3) * scale * Main.rand.NextFloat(30.0f, 33.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2), 0, default, scale * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust.noGravity = true; + dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; + dust.customData = 2; + dust.fadeIn = 0.5f * scale; + } + for (int i = 0; i < 15; i++) + { + float variance = Main.rand.NextFloat(-0.8f, 0.8f); + Vector2 vel = -safeVel.RotatedBy(variance / 2).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(20.0f, 23.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2); + Dust dust2 = Dust.NewDustPerfect(npc.Center + vel * 13, ModContent.DustType(), + vel, 0, default, 2 * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; + dust2.customData = new Vector2(0.2f, 1.6f); + dust2.fadeIn = 2.5f; + + } + int wallImpactDamage = (int)(PotentialEnergyDamage * Math.Clamp(oldVelocity / terminalVelocityForFullFallDamage, (ForcedVel.Length() > 0 ? 1f : 0f), 1f)); - Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI); + Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI); wallImpact.DamageType = DamageClass.Melee; - wallImpact.CritChance = (int)attacker.GetCritChance(DamageClass.Melee) + attacker.HeldItem.crit; } PotentialEnergyDamage = 0; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 2bc598ef88..32adbb354a 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -1492,7 +1492,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm public override void ModifyNPCLoot(NPCLoot npcLoot) { npcLoot.Add(ModContent.ItemType()); - npcLoot.Add(ModContent.ItemType()); + npcLoot.Add(ModContent.ItemType()); npcLoot.Add(ModContent.ItemType()); npcLoot.Add(ModContent.ItemType()); npcLoot.Add(ModContent.ItemType(), 1, 80, 100); diff --git a/Particles/CircularSmearLarge.png b/Particles/CircularSmearLarge.png new file mode 100644 index 0000000000000000000000000000000000000000..d9d51baaefd658aa337a2037e6e434f8860d0496 GIT binary patch literal 70439 zcmXt9cQ~7G)JBLPh?+5j8m$%7-kTPstvzEGCH5X6R;xybQEF6ws`jc`BcZ6R2x^pS zQJdQHd;5LY_eU<*mBjO$ai4SUbIzM2BSRf(N>)lDA|h%%UCjqXL?qaMF9;ZTC$CZH zKJbUsRn0(+h^Qu&>H1{^PqlYt0 z2_tPXZALF(PhX9CxIG}zrEb$r7riY`0lV9oM#Lkn`3S9PoL&r(5L}Ed(nzo2c^XG- zT(dz6*PQS{Gq7doIaR=ad=A+e%K5={9O;qYHZt$J6G3PpO1p?9!|R(eQJ|v`Ml_!l#oxv*}Nm+gfN4r{}lFRg!T;*ZHrSEqKI< zjIxqf_fKZ5;mluUmCSPa8t;G2YPe%CjJ!L{V-X`^`qFP-*ed)e+nHAGuLM>RKHxX} z(|PyToWSyPxf|`t>Gp8uRme%RL_5D@tiN8oYLEA?8hE&&G?CzoInforhfba%jxPiy zVnmihh!%Cf+UxS>Geh_qZjt zwsV$G6QyAnKJuV_e&;tT`0q>E7yjZJwlZEWp~afreZxP|r_h!BgcC0Es{l?Wx{I6b ziDIv`GzW_H5&9XQtorB^$+FesRZsHYoX~b%y`O2$Ncw(4H=1Ei@*g*=Y9uF-;B7ht zMVOP&=uQMxj}GW`=-F6y*4y)un5zi0CjF~ErkhbIjyjqWO*f2(H{V=XlH5TMX{mzN zRoT`+^qr&)open^w2L4THNi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LL?D#gCmr>)52q`C2q|OxH?)#J&0ru`6SjeJ>eT(sI-;J2U8nWbrdK1*FPE~)pA!Jev#v6)(HZY~q~M=;L-z?3>cmSc#DY|%(++@)m8 z_sw>T2eju+}m7Z9))ixtF80CcbSTFC} z{>$M(w^cvCxeE9XD4ZX7<2-nH8|fxzB42n#(lha5e?{5pn{6gBT&qJeTc#BHewjAUl0x-`P6{5=%`5v0TbZo)rE<59 z4DQHmQ`NP0Nx&B0FM|usn{0~iN1zL)I0C29^0($9UpJsH^5`Qwanhh0^ zLy*aZx)1g%nXQ)(uE}7C_iU$Mv}+E&a|Aqut?*6NAko=GS*>!E;of|m;B}V(I{$vN zD2#|MVdKjRJ%~srMCO<958c{=HQI)@txC;m6ux86Pgq~8~= zDtyTHgsbpV@bW&SZ%`mRsts$fF=OXaW_OHYH3W**u{~z@r)ye<> literal 0 HcmV?d00001 diff --git a/Particles/CustomSpark.cs b/Particles/CustomSpark.cs index 72087bb46b..295709d63d 100644 --- a/Particles/CustomSpark.cs +++ b/Particles/CustomSpark.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Systems.Graphic.PixelationSystem; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -22,13 +23,14 @@ namespace CalamityMod.Particles 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 CustomSpark(Vector2 relativePosition, Vector2 velocity, string texture, bool affectedByGravity, int lifetime, float scale, Color color, 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) + public CustomSpark(Vector2 relativePosition, Vector2 velocity, string texture, bool affectedByGravity, int lifetime, float scale, Color color, 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; @@ -55,6 +57,7 @@ namespace CalamityMod.Particles if (FadeIn) Scale = 0f; Spin = spin; + ColorFadeSpeed = colorFadeSpeed; } public override void Update() @@ -63,7 +66,7 @@ namespace CalamityMod.Particles { if (!NoShrink) Scale *= 0.95f; - Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)); + Color = Color.Lerp(InitialColor, Color.Transparent, (float)Math.Pow(LifetimeCompletion, ColorFadeSpeed)); } else { @@ -114,9 +117,21 @@ namespace CalamityMod.Particles col = Lighting.GetColor((Position / 16).ToPoint()).MultiplyRGB(Color); } - spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)), Rotation, texture.Size() * 0.5f, scale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f); - if (GlowCenter) - spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(Color.Lerp(col, Color.White, 0.8f), Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)) * GlowOpacity, Rotation, texture.Size() * 0.5f, scale * 0.8f * GlowCenterScale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + if (Pixelate) + { + PixelationManager.AddPixelatedDrawer((_) => + { + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)), Rotation, texture.Size() * 0.5f, scale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f); + if (GlowCenter) + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(Color.Lerp(col, Color.White, 0.8f), Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)) * 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 + { + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(col, Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)), Rotation, texture.Size() * 0.5f, scale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0f); + if (GlowCenter) + spriteBatch.Draw(texture, Position - Main.screenPosition, null, Color.Lerp(Color.Lerp(col, Color.White, 0.8f), Color.Transparent, (float)Math.Pow(LifetimeCompletion, 3D)) * GlowOpacity, Rotation, texture.Size() * 0.5f, scale * 0.8f * GlowCenterScale * scaleMult, FlipHorizontal ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + } } } } diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 0050590376..7f8ad74901 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -56,6 +56,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; + Projectile.noEnchantmentVisuals = true; + Projectile.scale = 0; } public void OnSpawn() { @@ -99,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee if (!Owner.CantUseHoldout(false)) Projectile.timeLeft = 5; - Projectile.scale = Owner.GetMeleeScale() + 0.1f; + Projectile.scale = MathHelper.Lerp(Projectile.scale, Owner.GetMeleeScale() + 0.1f, 0.3f / Projectile.MaxUpdates); toMouse = Utils.DirectionTo(Owner.Center, Owner.ClampedMouseWorld()); Positioning(toMouse); @@ -125,6 +127,7 @@ namespace CalamityMod.Projectiles.Melee } else Owner.itemTime = Owner.itemAnimation = 5; + #region Not Swinging if (attackTimer < 0) // When the sword isn't swinging { diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index cd7d39d564..0ded93f6cd 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -1,9 +1,16 @@ -using CalamityMod.Dusts; +using System; +using System.Collections.Generic; +using System.Runtime.ConstrainedExecution; +using CalamityMod.Dusts; +using CalamityMod.Enums; +using CalamityMod.Items.Tools; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; using CalamityMod.NPCs.PrimordialWyrm; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Systems.Graphic.PixelationSystem; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -12,212 +19,257 @@ using Terraria.Audio; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; +using static Terraria.Player; namespace CalamityMod.Projectiles.Melee { [PierceResistException] - public class GrandDadHoldout : BaseCustomUseStyleProjectile, ILocalizedModType + public class GrandDadHoldout : ModProjectile, ILocalizedModType { - public override int AssignedItemID => ModContent.ItemType(); - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/GrandDad"; - public override float HitboxOutset => 125; - public override Vector2 HitboxSize => new Vector2(190, 190); - public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(0, 124); - public Vector2 mousePos; - public Vector2 aimVel; - public bool doSwing = true; - public bool postSwing = false; - public float fadeIn = 0; - public int useAnim; - public int swingCount; - public bool finalFlip = false; - public bool swingSound = true; + public ref float attackTimer => ref Projectile.ai[0]; + public Player Owner => Main.player[Projectile.owner]; + public int fireRate => (int)((Owner.HeldItem.useAnimation * Owner.inverseMeleeSpeed * Projectile.MaxUpdates) / 2.75f); + public int time = 0; + public Vector2 toMouse = Vector2.Zero; + public int cooldown => (int)(-Owner.HeldItem.useAnimation * Owner.inverseMeleeSpeed * Projectile.MaxUpdates); + public float bladeRot = 0; // Rotation of the blade + public int swingCount = 0; // Increases at the start of a swing + public float bladefx = 0; // Visual effects of the blade + // Checks to make sure sounds only happen once per swing + public bool makeSound = true; + public bool performSwing = false; + public float enabledHitbox = 0; // Deals damage when above 0, ticks down quickly + public float angledHold = 0; // Adds some angle based on swing direction + public float angleArmHold = 0; + public static int hitboxFramesMax = 11; + public bool canReleaseHoldout = false; public int armoredHits = 0; - private NPC target => Main.npc[(int)Projectile.ai[0]]; - + public float startAngle = MathHelper.Pi * 0.9f; + public float endAngle = -MathHelper.PiOver4 * 3 * 0.9f; + public override bool? CanDamage() => enabledHitbox > 0 ? null : false; + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float outset = 40 * Projectile.scale; + Vector2 hitboxPosition = Owner.Center + toMouse * outset; + float hitboxSize = 155 * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(hitboxPosition, hitboxSize, targetHitbox); + } public override void SetDefaults() { - base.SetDefaults(); + Projectile.width = Projectile.height = 124; + Projectile.friendly = true; + Projectile.DamageType = TrueMeleeDamageClass.Instance; + Projectile.timeLeft = 5; + Projectile.penetrate = -1; + Projectile.extraUpdates = 8; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; - Projectile.DamageType = TrueMeleeDamageClass.Instance; + Projectile.noEnchantmentVisuals = true; + Projectile.scale = 0; } - - public override void WhenSpawned() + public void OnSpawn() { - Projectile.timeLeft = Owner.HeldItem.useAnimation + 1; - Projectile.knockBack = 0; - Projectile.scale = 1; - Projectile.ai[1] = -1; - - // 14NOV2024: Ozzatron: clamped mouse position unnecessary, as Grand Dad has no projectiles - mousePos = Owner.Calamity().mouseWorld; - aimVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; - useAnim = Owner.itemAnimationMax; - - if (mousePos.X < Owner.Center.X) Owner.direction = -1; - else Owner.direction = 1; - - FlipAsSword = Owner.direction == -1; - } - - public override void UseStyle() - { - AnimationProgress = Animation % useAnim; - DrawUnconditionally = false; - - if (CanHit || postSwing) - mousePos = Owner.Center - aimVel; - else + if (time == 0) { - mousePos = Owner.Calamity().mouseWorld; + Projectile.knockBack = 0; + attackTimer = cooldown; + swingCount = 1; } + } + public void ResetVariables() // After a swing, reset/adjust many stats + { + for (int i = 0; i < Main.maxNPCs; i++) + Projectile.localNPCImmunity[i] = 0; + Projectile.numHits = 0; + swingCount++; + makeSound = true; + enabledHitbox = 0; + canReleaseHoldout = false; + armoredHits = 0; + Projectile.ForceNetUpdate(); + } + public void Positioning(Vector2 toMouse) // Hand and holdout positioning + { + Owner.heldProj = Projectile.whoAmI; + Owner.itemRotation = (Projectile.velocity * Owner.direction).ToRotation(); - if (CanHit) - fadeIn = MathHelper.Lerp(fadeIn, 1, 0.3f); - else - fadeIn = MathHelper.Lerp(fadeIn, 0, 0.35f); + angleArmHold = MathHelper.Lerp(angleArmHold, angledHold * MathF.Pow(Utils.GetLerpValue(cooldown, cooldown * 0.35f, attackTimer, true), 5), 0.12f / Projectile.MaxUpdates * Owner.meleeSpeed); + float angleVariation = (float)Math.Sin(time * 0.04f / Projectile.MaxUpdates) * 0.05f; + float outwardDistance = 5; + Owner.ChangeDir(Math.Sign(toMouse.X)); + Owner.SetCompositeArmFront(true, CompositeArmStretchAmount.Full, (toMouse.ToRotation() + (bladeRot + angleArmHold + angleVariation) * Owner.direction + MathHelper.PiOver2 * -Owner.direction) + (Owner.direction == -1 ? MathHelper.Pi : 0)); + Vector2 handPos = Owner.GetFrontHandPosition(CompositeArmStretchAmount.None, Owner.compositeFrontArm.rotation) + (Owner.compositeFrontArm.rotation + MathHelper.PiOver2).ToRotationVector2() * outwardDistance; + float armRotation = (Utils.DirectionTo(Owner.Center, handPos).ToRotation() - MathHelper.PiOver2) * Owner.gravDir + (Owner.gravDir == -1 ? MathHelper.Pi : 0f); + Owner.SetCompositeArmBack(true, CompositeArmStretchAmount.Full, armRotation); - if (!doSwing) + Projectile.velocity = toMouse.RotatedBy((bladeRot + angledHold + angleVariation) * Owner.direction); + Projectile.rotation = Projectile.velocity.ToRotation(); + Projectile.Center = handPos; + } + public override void AI() + { + if (!Owner.CantUseHoldout(false)) + Projectile.timeLeft = 5; + + Projectile.scale = MathHelper.Lerp(Projectile.scale, Owner.GetMeleeScale(), 0.3f / Projectile.MaxUpdates); + toMouse = Utils.DirectionTo(Owner.Center, Owner.ClampedMouseWorld()); + + Positioning(toMouse); + + OnSpawn(); + + bool fadeInFX = enabledHitbox > (int)(hitboxFramesMax / 3f); + if (enabledHitbox > 0) { - for (int i = 0; i < Main.maxNPCs; i++) - Projectile.localNPCImmunity[i] = 0; + if (Projectile.FinalExtraUpdate()) + enabledHitbox--; + } + if (fadeInFX) + bladefx = MathHelper.Lerp(bladefx, 1, 0.25f / Projectile.MaxUpdates * Owner.meleeSpeed); + else + bladefx = MathHelper.Lerp(bladefx, 0, 0.15f / Projectile.MaxUpdates * Owner.meleeSpeed); - Projectile.numHits = 0; - mousePos = Owner.Calamity().mouseWorld; - aimVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; - CanHit = false; - if (mousePos.X < Owner.Center.X) Owner.direction = -1; - else Owner.direction = 1; - FlipAsSword = Owner.direction == -1; - - doSwing = true; - swingCount++; - finalFlip = false; - swingSound = true; - armoredHits = 0; + if (canReleaseHoldout || time < 25) + { + if (Owner.HeldItem.type != ItemType() || Main.mapFullscreen || Owner.mouseInterface || Owner.dead) + { + Projectile.Kill(); + return; + } } else + Owner.itemTime = Owner.itemAnimation = 5; + + + float lerpSpeed = 0.1f / Projectile.MaxUpdates * Owner.meleeSpeed; + float maxAngle = MathHelper.PiOver4 * 0.8f; + if (swingCount % 2 == 0) + angledHold = MathHelper.Lerp(angledHold, maxAngle, lerpSpeed); + else + angledHold = MathHelper.Lerp(angledHold, -maxAngle, lerpSpeed); + + + #region Not Swinging + if (attackTimer < 0) // When the sword isn't swinging { - if (!CanHit && !postSwing) + Timers(); + + float lerp = Utils.GetLerpValue(cooldown, -1, attackTimer, true); + + if (attackTimer == 0) // Reset a few things in prep for the next swing + ResetVariables(); + else // Wind up animation in prep for the next swing { - if (mousePos.X < Owner.Center.X) Owner.direction = -1; - else Owner.direction = 1; - } - else - { - if ((Owner.Center - aimVel).X < Owner.Center.X) Owner.direction = -1; - else Owner.direction = 1; - } + int swingDir = (swingCount % 2 != 0 ? 1 : -1); + float lerp2 = Utils.GetLerpValue(cooldown, -1, attackTimer, true); + float start = -startAngle * swingDir; + float end = endAngle * swingDir; + bladeRot = MathHelper.Lerp(start, end, CalamityUtils.EaseInOutExp(lerp2, 2f, 2f)); - - Projectile.rotation = Projectile.rotation.AngleLerp(Owner.AngleTo(mousePos) + MathHelper.ToRadians(45f), 0.1f); - - if (AnimationProgress < (useAnim / 1.5f)) - { - aimVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; - CanHit = false; - postSwing = false; - if (AnimationProgress == 0) + if (lerp >= 0.85f) { - doSwing = false; - Projectile.ai[1] = -Projectile.ai[1]; - } - RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(120f * Projectile.ai[1] * Owner.direction * (1 + (Utils.GetLerpValue(useAnim * 0.8f, useAnim, Animation, true)) * 0.35f)), 0.2f); - } - else - { - if (!finalFlip) - { - FlipAsSword = Owner.direction < 0; - } - - float time = (AnimationProgress) - (useAnim / 3); - float timeMax = useAnim - (useAnim / 3); - - if (time >= (int)(timeMax * 0.4f) && swingSound) - { - SoundStyle fire = new("CalamityMod/Sounds/Item/HeavySwing"); - SoundEngine.PlaySound(fire with { Volume = 0.8f, Pitch = Main.rand.NextFloat(0.2f, 0.32f) }, Projectile.Center); - swingSound = false; - } - if (time > (int)(timeMax * 0.4f) && time < (int)(timeMax * 0.7f)) - { - CanHit = true; - - for (int i = 0; i < 3; i++) + if (Owner.controlUseItem || performSwing) + performSwing = true; + else { - Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 165), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - GeneralParticleHandler.SpawnParticle(new LineParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, false, 19, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue)); - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, Main.rand.NextBool(4) ? Color.Black : Color.DarkBlue, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f)); - } - } - else - CanHit = false; - - RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(MathHelper.Lerp(150f * Projectile.ai[1] * Owner.direction, 120f * -Projectile.ai[1] * Owner.direction, CalamityUtils.ExpInOutEasing(time / timeMax, 1))), - 0.2f); - - if (time >= timeMax) - doSwing = false; - if (time < (int)(timeMax * 0.7f)) - postSwing = true; - - if (CanHit) - { - for (int i = 0; i < 6; i++) - { - if (Main.rand.NextBool(3)) - { - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.Zero, 0, default, Main.rand.NextFloat(1.15f, 1.5f)); - dust.noGravity = true; - dust.color = Color.DodgerBlue; - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, false, 23, Main.rand.NextFloat(0.5f, 1f), Color.Black, false, false, false)); - } - else - { - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.Zero, 0, default, Main.rand.NextFloat(1.15f, 1.5f)); - dust.noGravity = true; - dust.color = Color.Blue; - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, false, 23, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue)); - } - } - for (int i = 0; i < 3; i++) - { - float randRot = Main.rand.NextFloat(-30, -60); - Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(185, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel * Main.rand.NextFloat(0.1f, 0.5f)); - dust2.scale = Main.rand.NextFloat(0.55f, 1.05f); - dust2.noGravity = true; - dust2.color = Main.rand.NextBool(3) ? Color.Goldenrod : Color.Gold; + canReleaseHoldout = true; + attackTimer--; + lerp = 0.85f; } } } + if (lerp > 0.85f) + { + angledHold = MathHelper.Lerp(angledHold, maxAngle * 3.5f * (swingCount % 2 == 0 ? 1 : -1), lerpSpeed * 1.5f); + } + + return; } + #endregion - ArmRotationOffset = MathHelper.ToRadians(-140f); - ArmRotationOffsetBack = MathHelper.ToRadians(-140f); + if (attackTimer >= fireRate) // Once the swing is done, put it on cooldown + { + attackTimer = cooldown; + performSwing = false; + } + else // Do the swing + { + #region Swinging + int swingDir = (swingCount % 2 != 0 ? -1 : 1); + float lerp = Utils.GetLerpValue(0, fireRate - 1, attackTimer, true); + float start = endAngle * swingDir; + float end = startAngle * swingDir; + bladeRot = MathHelper.Lerp(start, end, CalamityUtils.EaseInOutExp(lerp, 11f, 11f)); + + if (lerp > 0.3f && lerp < 0.8f && Main.rand.NextBool((int)(1 + 4 * Projectile.MaxUpdates * Math.Abs(Utils.GetLerpValue(0.5f, 1.2f, lerp))))) + { + Vector2 dustPosition = Projectile.Center + Projectile.velocity * 170 * Projectile.scale; + Vector2 dustPosition2 = Projectile.Center + Projectile.velocity.RotatedByRandom(0.3f) * 170 * Projectile.scale; + Vector2 swingVel = Projectile.velocity.RotatedBy(MathHelper.PiOver2 * (swingCount % 2 == 0 ? 1 : -1) * Owner.direction); + + Dust dust = Dust.NewDustPerfect(dustPosition, ModContent.DustType(), + swingVel.RotatedByRandom(0.1f) * Main.rand.NextFloat(9.5f, 15.5f), 0, default, Main.rand.NextFloat(1.55f, 2.2f)); + dust.noGravity = true; + dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; + dust.customData = 7; + + if (Main.rand.NextBool(3, 4)) + { + Vector2 vel = swingVel.RotatedByRandom(0.1f) * Main.rand.NextFloat(9.5f, 15.5f); + Dust dust2 = Dust.NewDustPerfect(dustPosition2, ModContent.DustType(), + vel, 0, default, 2 * Main.rand.NextFloat(1.0f, 1.3f)); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; + dust2.customData = new Vector2(0.2f, 1.0f); + dust2.fadeIn = 0.2f; + } + + } + if (lerp > 0.4f) // Partway through make the hitbox and sound + { + if (makeSound) + { + enabledHitbox = hitboxFramesMax; + SoundStyle swing1 = new("CalamityMod/Sounds/Item/HeavySwing"); + SoundEngine.PlaySound(swing1 with { Volume = 0.8f, Pitch = Main.rand.NextFloat(0.2f, 0.32f) }, Projectile.Center); + makeSound = false; + } + } + #endregion + } + Timers(); } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + public void Timers() { - if ((target.life <= 0 && target.realLife == -1) && Projectile.numHits > 0) - Projectile.numHits -= 1; - if (damageDone <= 2) + time++; + // Only increment the attack animation when on cooldown or when allowed to swing + if ((attackTimer < fireRate && performSwing) || attackTimer < -1) + attackTimer++; + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + // Dont increment numHits on armored targets or kills + if (((target.life <= 0 && target.realLife == -1) || target.Calamity().IsArmored())) armoredHits++; - if (Main.zenithWorld && Projectile.numHits == 0 && target.type != ModContent.NPCType() && Main.rand.NextBool(5)) + float distanceToTiles = -100; + bool canBeLaunched = false; + bool lowEnoughToExecute = target.life <= Projectile.damage * 15; + bool jared = target.type == ModContent.NPCType(); + Vector2 launchVel = Utils.DirectionTo(Owner.Center, (lowEnoughToExecute ? Owner.Calamity().mouseWorld : target.Center)); + + if (lowEnoughToExecute) { - SoundStyle fire3 = new("CalamityMod/Sounds/Item/GFBScreams/Scream", 8); - SoundEngine.PlaySound(fire3 with { Volume = 0.8f }, Projectile.Center); + distanceToTiles = CalamityUtils.DistanceToTileCollisionHit(target.Center, launchVel, 200) ?? -100; + canBeLaunched = jared || ((distanceToTiles == -100 ? false : distanceToTiles < 200 ? true : false) && target.realLife == -1); } if (Projectile.numHits == 0) { @@ -227,60 +279,82 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fire2 = new("CalamityMod/Sounds/Item/FinalDawnSlash"); SoundEngine.PlaySound(fire2 with { Volume = 0.65f, Pitch = Main.rand.NextFloat(-0.2f, -0.3f) }, Projectile.Center); } - - int heal = (int)(MathHelper.Clamp(20 - Projectile.numHits * 12, 1, 20)); + int heal = (int)(MathHelper.Clamp(18 - Projectile.numHits * 13, 1, 20)); if (Projectile.numHits < 10) { - Owner.DoLifestealDirect(target, heal, 0.5f); + Owner.Calamity().grandDadHealPool += heal; + // Give partial Grand Dad healing to all nearby players + for (int playerIndex = 0; playerIndex < Main.maxPlayers; playerIndex++) + { + Player player = Main.player[playerIndex]; + float targetDist = player.Center.DistanceSQ(Owner.Center); + + if (targetDist < 500f && player.team == Owner.team && player != Owner) + { + player.Calamity().grandDadHealPool += (int)(heal / 2); + } + } } - if (target.CanBeMoved(true) || Main.zenithWorld || target.type == ModContent.NPCType() || (DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs)) + if (canBeLaunched) // launches/executes enemies { - if (target.type == ModContent.NPCType()) + if (jared) { CombatText.NewText(target.Hitbox, Color.Aqua, CalamityUtils.GetTextValue("Misc.HecBoop")); SoundStyle boop = new("CalamityMod/Sounds/Item/SnootBooped"); SoundEngine.PlaySound(boop with { Pitch = Main.rand.NextFloat(-0.15f, 0.15f) }, Projectile.Center); } - bool rightClicked = Owner.Calamity().mouseRight; - - // Make all hit enemies able to hit tiles, so you can dunk them - target.noTileCollide = false; + target.Calamity().pacified = true; // Launch the suckers - Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - float launchPower = 30 * (rightClicked ? 2 : 1); + float launchPower = 60; target.MoveNPC(launchVel, launchPower * 0.5f, true); - - // Remove knockback resist, just like it used to - target.knockBackResist = 1; - - // Apply tile collison damage (is boosted even further if both final bosses are gone) - float damageMults = ((DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs) ? 5 : 1) * (rightClicked ? 3 : 1); - int damage = (int)(Projectile.damage * damageMults); - target.GetGlobalNPC().ApplyCollisionDamage(target, Owner, damage, launchVel * launchPower, 5f, true); + + // Apply tile collison damage + // This always kills (unless it's Jared) + int damage = (int)(Projectile.damage); + target.GetGlobalNPC().ApplyCollisionDamage(target, Owner, (jared && !lowEnoughToExecute) ? 0 : damage, launchVel * launchPower, 5f, true); } if (Projectile.numHits < 3) { - Particle spark = new VoidSparkParticle(target.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * (-45 + Projectile.numHits * 5), false, (int)(16 - Projectile.numHits * 3), 0.6f - Projectile.numHits * 0.15f, Color.DodgerBlue, 0.45f); - GeneralParticleHandler.SpawnParticle(spark); + for (int i = 0; i < 2; i++) + { + Particle spark = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark2", false, (int)(16 - Projectile.numHits * 3), 0.145f - Projectile.numHits * 0.015f, Color.Black, new Vector2(2f, 1f), false, shrinkSpeed: 1f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(spark); + spark.Pixelate = true; + Particle spark2 = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark", false, (int)(16 - Projectile.numHits * 3), 0.105f - Projectile.numHits * 0.015f, Color.Lerp(Color.Blue, Color.DodgerBlue, 0.65f), new Vector2(2f, 1f), true, false, shrinkSpeed: 1f, colorFadeSpeed: 10); + GeneralParticleHandler.SpawnParticle(spark2); + spark2.Pixelate = true; + spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + } + + for (int i = 0; i < 25 - Projectile.numHits * 3; i++) + { + float hitMult = 1 - 0.15f * Projectile.numHits; + float variance = Main.rand.NextFloat(-0.6f, 0.6f); + Dust dust = Dust.NewDustPerfect(target.Center, ModContent.DustType(), + launchVel.RotatedBy(variance / 2).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(30.0f, 33.0f) * hitMult * MathF.Pow((1 - MathF.Abs(variance)), 2), 0, default, 3 * hitMult * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust.noGravity = true; + dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; + dust.customData = 3; + dust.fadeIn = 2.1f; + + if (i % 2 == 0) + { + Vector2 vel = launchVel.RotatedBy(variance / 2).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(20.0f, 23.0f) * hitMult * MathF.Pow((1 - MathF.Abs(variance)), 2); + Dust dust2 = Dust.NewDustPerfect(target.Center + vel * 13, ModContent.DustType(), + vel, 0, default, 2 * hitMult * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; + dust2.customData = new Vector2(0.2f, 1.6f); + dust2.fadeIn = 2.5f; + } + } } - for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++) - { - Particle spark2 = new SparkParticle(target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), false, 55, Main.rand.NextFloat(0.4f, 1.5f), Main.rand.NextBool(4) ? Color.DodgerBlue : Color.Blue); - GeneralParticleHandler.SpawnParticle(spark2); - Dust dust = Dust.NewDustPerfect(target.Center, ModContent.DustType(), ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -35).RotatedByRandom(0.7) * Main.rand.NextFloat(0.2f, 1f), 0, default, Main.rand.NextFloat(1.55f, 2.2f)); - dust.noGravity = true; - dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; - } - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (Owner.Calamity().mouseRight) + if (canBeLaunched) { modifiers.SourceDamage *= 0; modifiers.FinalDamage.Flat = 0.1f; @@ -293,34 +367,61 @@ namespace CalamityMod.Projectiles.Melee modifiers.SourceDamage *= damageMult; } } - public override bool PreDraw(ref Color lightColor) { - // Only draw the projectile if the projectile's owner is currently using the item this projectile is attached to. - if ((useAnim > 0 || DrawUnconditionally) && Owner.ItemAnimationActive) + if (time < 3) + return false; + + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Texture2D swoosh = ModContent.Request("CalamityMod/Particles/CircularSmearLarge").Value; + + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.rotation.ToRotationVector2(); + Color drawColor = Projectile.GetAlpha(lightColor); + float drawRotation = Projectile.rotation + ((Owner.direction == -1) ? MathHelper.Pi - MathHelper.PiOver4 : MathHelper.PiOver4); + Vector2 rotationPoint = (Owner.direction == -1) ? new Vector2(texture.Width, texture.Height) : new Vector2(0, texture.Height); + SpriteEffects flipSprite = (Owner.direction == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Vector2 handLatchingAdjustments = (swingCount % 2 == 0 ? new Vector2(-6, 0) : new Vector2(-2, 0)); + Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f + (handLatchingAdjustments.RotatedBy(drawRotation) * Owner.direction); + + float lerp = 1 - bladefx; + int swingCountFlip = (swingCount % 2 == 0 ? 1 : 3) + Owner.direction == 0 ? 2 : 0; + Vector2 vel2 = Vector2.Lerp(Projectile.velocity.RotatedBy(MathHelper.PiOver2), Owner.Center.DirectionTo(Owner.ClampedMouseWorld()).RotatedBy(-MathHelper.PiOver2), 0f); + float extraRot = MathHelper.PiOver4 * MathHelper.Lerp(3, 1.9f, lerp) * (swingCount % 2 == 0 ? (Owner.direction == -1 ? 1 : -1) : (Owner.direction == -1 ? -1 : 1)); + float swooshDrawRotation = vel2.ToRotation() + extraRot; + SpriteEffects swooshFlipSprite = (swingCount % 2 == 0 ? (Owner.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None) : (Owner.direction == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally)); + if (bladefx > 0.02f) { - Asset tex = ModContent.Request(Texture); - Asset glowTex = ModContent.Request("CalamityMod/Items/Weapons/Melee/GrandDadGlow"); - - float r = FlipAsSword ? MathHelper.ToRadians(90) : 0f; - - Asset swoosh = ModContent.Request("CalamityMod/Particles/VerticalSmearLarge"); - if (Animation > useAnim * 0.2f) - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.DodgerBlue with { A = 0 } * fadeIn * 0.65f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(Projectile.ai[1] == 1 ? -90 : 90) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.6f, SpriteEffects.None); - - for (int i = 0; i < 25; i++) + PixelationManager.AddPixelatedDrawer((_) => { - Texture2D centerTexture = ModContent.Request("CalamityMod/Projectiles/Melee/GrandDadGhost").Value; - Color auraColor = Color.Gold with { A = 0 } * 0.15f * fadeIn; - Vector2 drawOffset = (MathHelper.TwoPi * i / 25f).ToRotationVector2() * 6 * fadeIn; - Main.EntitySpriteDraw(centerTexture, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), centerTexture.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); + int draws = 15; + for (int i = 0; i < draws; i++) + { + Color clr = Color.Black; + Vector2 outlineOffset = (MathHelper.TwoPi / draws * i).ToRotationVector2() * 3.5f; + Main.EntitySpriteDraw(swoosh, drawPosition + Projectile.velocity.RotatedBy(extraRot) * 12.5f + outlineOffset, null, clr * MathF.Pow(bladefx, 3) * 0.4f, swooshDrawRotation, swoosh.Size() * 0.5f, Projectile.scale * 0.6f, swooshFlipSprite); + Main.EntitySpriteDraw(texture, drawPosition + placeAdjust + outlineOffset * 2 * bladefx, null, clr * 0.2f * bladefx, drawRotation, rotationPoint, Projectile.scale, flipSprite); + } + }, Enums.GeneralDrawLayer.AfterProjectiles, BlendState.AlphaBlend); + if (!CalamityClientConfig.Instance.Photosensitivity) + { + PixelationManager.AddPixelatedDrawer((_) => + { + Color clrCenter = Color.DodgerBlue; + Main.EntitySpriteDraw(swoosh, drawPosition + Projectile.velocity.RotatedBy(extraRot) * 12.5f, null, clrCenter * MathF.Pow(bladefx, 0.6f), swooshDrawRotation, swoosh.Size() * 0.5f, Projectile.scale * 0.6f, swooshFlipSprite); + Main.EntitySpriteDraw(texture, drawPosition + placeAdjust, null, clrCenter * bladefx, drawRotation, rotationPoint, Projectile.scale, flipSprite); + }, Enums.GeneralDrawLayer.AfterEverything, BlendState.Additive); + } - - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), lightColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); - Main.EntitySpriteDraw(glowTex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), glowTex.Frame(1, FrameCount, 0, Frame), Color.White, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(glowTex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); - } + + Main.EntitySpriteDraw(texture, drawPosition + placeAdjust, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); // The holdout + return false; } + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + overPlayers.Add(index); + } } } diff --git a/Projectiles/Typeless/TileSlamDamage.cs b/Projectiles/Typeless/TileSlamDamage.cs new file mode 100644 index 0000000000..45184ff8ed --- /dev/null +++ b/Projectiles/Typeless/TileSlamDamage.cs @@ -0,0 +1,17 @@ +using CalamityMod.Buffs.DamageOverTime; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class TileSlamDamage : DirectStrike, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Typeless"; + public Player Owner => Main.player[Projectile.owner]; + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SetInstantKill(); + } + + } +} From d31c98f7d4aaa7ea9eb4a489f2800121e2f2c4d6 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Mar 2026 18:02:03 -0700 Subject: [PATCH 088/346] Tooltip --- .../en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index c5383d7d53..662837279f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -669,18 +669,16 @@ GrandDad: { TooltipNormal: ''' An unfathomably heavy blade that rips through enemies using its sheer mass - Heals you on hit - Striking weaker enemies will launch them with incredible force - Launched enemies take immense damage when colliding with walls and floors - Holding while swinging will heavily reduce the damage of the blade and increase its launch damage and velocity + Provides healing over time to you and all nearby allies on hit + Striking low health enemies will launch them with incredible force + Launched enemies are killed instantly on impact with walls and floors [c/00B8DF:'How are you swinging something that has half the mass of a star?'] ''' TooltipGFB: ''' A high quality blade that rips through enemies - Striking weaker enemies will yeet them with incredible force, often leaving them Stuck Inside tiles + Striking low health enemies will yeet them with incredible force, nice >:] Yeeted enemies will turn to JAM when SLAMMED into walls and floors - Holding while swinging will heavily reduce the damage of the blade and increase its yeet damage and velocity, nice >:] [c/00B8DF:'Please read the weapon description.'] ''' } From e024ed2daddbd6a10405465a478a659b2205d39a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 14 Mar 2026 22:17:24 -0400 Subject: [PATCH 089/346] tooltip clarification --- 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 92a010c0c2..6938d91cb5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1673,7 +1673,7 @@ SpringStool: { ''' Hold Up to reach higher Press [KEY] to jump super high - Super jumps can only be performed once every {0} seconds and after touching the ground + Super jumps can only be performed once every {0} seconds and after landing +{1}% critical strike chance when striking enemies below you ''' } From ce788480a92c5ed93f5a0dbac442fc697703cf0b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 15 Mar 2026 19:33:53 -0700 Subject: [PATCH 090/346] Removed Shredder line right click --- Items/Weapons/Ranged/Infinity.cs | 21 +++---------------- Items/Weapons/Ranged/Shredder.cs | 15 +------------ Items/Weapons/Ranged/Svantechnical.cs | 19 +++++------------ ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 3 --- 4 files changed, 9 insertions(+), 49 deletions(-) diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 4eb04468eb..4c6c6151ff 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -21,11 +21,6 @@ namespace CalamityMod.Items.Weapons.Ranged public static int AmmoSavedPercent = 80; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } - public override void SetDefaults() { Item.width = 56; @@ -49,11 +44,9 @@ namespace CalamityMod.Items.Weapons.Ranged } public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool AltFunctionUse(Player player) => true; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int shotType = player.altFunctionUse == 2 ? type : ModContent.ProjectileType(); // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction position = position + (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.UnitX) * 65; @@ -64,19 +57,11 @@ 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, shotType, damage, knockback, player.whoAmI, 0, 0, player.altFunctionUse != 2 ? 1 : 0); + Projectile.NewProjectile(source, position, helixVel, ModContent.ProjectileType(), damage, knockback, player.whoAmI, 0, 0, player.altFunctionUse != 2 ? 1 : 0); } } - else if (player.altFunctionUse != 2) - { - 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)); - GeneralParticleHandler.SpawnParticle(spark2); - } - - // Reset altFunctionUse to zero to prevent blank frame appear between shots on Alt-fire - if (player.itemAnimation <= 1) - player.altFunctionUse = 0; - + 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)); + GeneralParticleHandler.SpawnParticle(spark2); return false; } diff --git a/Items/Weapons/Ranged/Shredder.cs b/Items/Weapons/Ranged/Shredder.cs index 7657926ed4..d9768ef6a9 100644 --- a/Items/Weapons/Ranged/Shredder.cs +++ b/Items/Weapons/Ranged/Shredder.cs @@ -11,11 +11,6 @@ namespace CalamityMod.Items.Weapons.Ranged { public new string LocalizationCategory => "Items.Weapons.Ranged"; - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } - public override void SetDefaults() { Item.width = 56; @@ -41,22 +36,14 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool AltFunctionUse(Player player) => true; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int shotType = (player.altFunctionUse == 2 ? type : ModContent.ProjectileType()); int bulletAmt = 3; Vector2 newPosition = position + velocity.SafeNormalize(Vector2.UnitY) * 50f; for (int index = 0; index < bulletAmt; index++) { - Projectile.NewProjectile(source, newPosition, (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedByRandom(0.2f), shotType, damage, knockback, player.whoAmI); + Projectile.NewProjectile(source, newPosition, (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedByRandom(0.2f), ModContent.ProjectileType(), damage, knockback, player.whoAmI); } - - // Reset altFunctionUse to zero to prevent blank frame appear between shots on Alt-fire - if (player.itemAnimation <= 1) - player.altFunctionUse = 0; - return false; } diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index d10a646a8a..ae859ea8b6 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -21,10 +21,6 @@ namespace CalamityMod.Items.Weapons.Ranged public static int AmmoSavedPercent = 80; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } public override void SetDefaults() { Item.width = 60; @@ -51,11 +47,9 @@ namespace CalamityMod.Items.Weapons.Ranged } public override Vector2? HoldoutOffset() => new Vector2(-5, 0); - public override bool AltFunctionUse(Player player) => true; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int shotType = (player.altFunctionUse == 2 ? type : ModContent.ProjectileType()); // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction position = position + (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.UnitX) * 65; @@ -67,15 +61,12 @@ 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, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 2f : 0); - Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 4f : 0); - Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 3f : 0); - } - else if (player.altFunctionUse != 2) - { - 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); + 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); } + 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); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index f272922918..84d6108562 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -616,7 +616,6 @@ Infinity: { Tooltip: ''' Fires a twin stream of energy bolts that split - Press to fire a barrage of normal bullets {$CommonItemTooltip.PercentChanceToSaveAmmo} 'They say infinity is neverending, yet you hold it in your hands' ''' @@ -1121,7 +1120,6 @@ Shredder: { Tooltip: ''' Fires a barrage of energy bolts that split and bounce - Press to fire a barrage of normal bullets instead 'The myth, the legend, the weapon that drops more frames than any other' ''' } @@ -1305,7 +1303,6 @@ Svantechnical: { Tooltip: ''' Fires a trinity of energy bolts that split into beams that track your cursor - Press to fire a barrage of normal bullets {$CommonItemTooltip.PercentChanceToSaveAmmo} 'The age old balance of trading damage for frames' ''' From 2f877b6675fc61d76ee758afd1c1f15b047bf7ad Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:07:50 +0700 Subject: [PATCH 091/346] Fixed Mark of Providence being referred to as its old name in dialogue --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 12a58c2e4b..da3390cf62 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -514,7 +514,7 @@ SeaKing: { DoGDefeated3: The Devourer of Gods is truly an enigma. Some say it's not even from this world at all. What is known is that he is a being that can devour the essence of gods entirely, leaving absolutely nothing left. It's no wonder Yharim recruited that monster. PolterghastDefeated1: The Abyss holds many secrets revealed with time. Checking it out again may not be a bad idea. PolterghastDefeated2: Ah... I can sense a powerful change in the weather. You may want to venture to the Sulphurous Seas once more during the rain to experience it. - ProvidenceDefeated1: The Rune of Kos holds a significant portion of Providence's brand of magic, easily distinguishable from all others. Activating it in certain places would have some... risky consequences. + ProvidenceDefeated1: The Mark of Providence holds a significant portion of her brand of magic, easily distinguishable from all others. Activating it in certain places would have some... risky consequences. ProvidenceDefeated2: I do wonder what has happened to Braelor and Statis. I have heard or seen very little of either. In my days, both were great heroes to those who worshiped the gods. Have they been killed, captured, or are they simply in hiding? MoonLordDefeated1: Your adventure focuses to the jungle it seems. The Dragonfolly and its swarming offspring should be eliminated before their numbers spiral out of control. MoonLordDefeated2: Profaned creatures now lurk in the Hallow and in Hell. If you destroy enough and gather their essence together you shall be able to capture the attention of the Profaned Guardians. From 22b12cb0e3037123fc5a1d3fd4154beb5fa0d1e6 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Mar 2026 12:23:25 -0700 Subject: [PATCH 092/346] Grand Dad LaunchVisual Separation Also now displays a damage number on tile collision --- NPCs/CalamityTileCollisionHarmNPC.cs | 105 +++++++++++++------------ Projectiles/Melee/GrandDadHoldout.cs | 22 ++---- Projectiles/Typeless/TileSlamDamage.cs | 13 ++- 3 files changed, 76 insertions(+), 64 deletions(-) diff --git a/NPCs/CalamityTileCollisionHarmNPC.cs b/NPCs/CalamityTileCollisionHarmNPC.cs index 4a7ed2fecc..65507bd0af 100644 --- a/NPCs/CalamityTileCollisionHarmNPC.cs +++ b/NPCs/CalamityTileCollisionHarmNPC.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using CalamityMod.Dusts; using CalamityMod.Enums; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; @@ -35,6 +36,7 @@ namespace CalamityMod.NPCs private bool hitVoid = false; private Player attacker; private int packetTimer = 0; + private bool GrandDad = false; public int PotentialEnergyDamage { @@ -81,7 +83,7 @@ namespace CalamityMod.NPCs /// The maximum fall damage taken by the npc once they hit the ground /// The downwards velocity necessary to recieve the full fall damage. By default 10, the npc max fall speed /// Will check for tiles in the collision instead of velocity - public void ApplyCollisionDamage(NPC npc, Player player, int potentialDamage, Vector2 forcedVel, float terminalVelocityForFullDamage = 10f, bool checkTiles = false) + public void ApplyCollisionDamage(NPC npc, Player player, int potentialDamage, Vector2 forcedVel, float terminalVelocityForFullDamage = 10f, bool checkTiles = false, bool grandDad = false) { PotentialEnergyDamage = potentialDamage; OldVelocity = npc.velocity; @@ -90,6 +92,7 @@ namespace CalamityMod.NPCs CheckTiles = checkTiles; ForcedVel = forcedVel; attacker = player; + GrandDad = grandDad; } /// @@ -113,71 +116,75 @@ namespace CalamityMod.NPCs { if (FallDamageSusceptible) { - if (CheckTiles) // Grand Dad + if (CheckTiles) { - float scale = (npc.boss ? 1.35f : 1) + Utils.GetLerpValue(20, 800, Math.Max(npc.width, npc.height)); - float oldVelocity = OldVelocity.Length(); - npc.Center += ForcedVel; ForcedVel *= 0.995f; - Vector2 safeVel = ForcedVel.SafeNormalize(Vector2.UnitX); if (npc.velocity == Vector2.Zero || ForcedVel.Length() < 2 || Collision.SolidCollision(npc.Center, (int)(npc.width * 0.5f), (int)(npc.height * 0.5f)) || !WorldGen.InWorld(npc.Center.ToTileCoordinates().X, npc.Center.ToTileCoordinates().Y, 40)) { if (!ForceVelocityOnly && potentialEnergyDamage > 0) { - attacker.SetScreenshake(7f * scale); - if (!CalamityClientConfig.Instance.Photosensitivity) + float oldVelocity = OldVelocity.Length(); + if (GrandDad) { - Vector2 pulseVel = -safeVel; - Particle pulse1 = new CustomSpark(npc.Center, pulseVel * 2, "CalamityMod/Particles/BloomCircle", false, (int)(23 * MathF.Pow(scale, 2)), 0.6f * MathF.Pow(scale, 2), Color.DodgerBlue, new Vector2(2f, 1f), shrinkSpeed: -0.1f / scale, noShrink: true, glowCenter: true, glowOpacity: 0.8f); - GeneralParticleHandler.SpawnParticle(pulse1); - pulse1.Pixelate = true; - Particle pulse2 = new CustomSpark(npc.Center, pulseVel, "CalamityMod/Particles/BloomRing", false, (int)(18 * MathF.Pow(scale, 2)), 0.5f * MathF.Pow(scale, 2), Color.Blue, new Vector2(4f, 0.7f), shrinkSpeed: -0.3f / scale, noShrink: true); - GeneralParticleHandler.SpawnParticle(pulse2); - pulse2.Pixelate = true; - } - + float scale = (npc.boss ? 1.35f : 1) + Utils.GetLerpValue(20, 800, Math.Max(npc.width, npc.height)); - for (int i = 0; i < 2; i++) - { - SoundStyle die = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); - SoundEngine.PlaySound(die with { Pitch = 0.5f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); - if (npc.boss) + attacker.SetScreenshake(7f * scale); + if (!CalamityClientConfig.Instance.Photosensitivity) { - SoundStyle dieHard = new("CalamityMod/Sounds/Item/HellkiteSmallHit3"); - SoundEngine.PlaySound(dieHard with { Pitch = -1f, Volume = Math.Min(0.5f * scale, 1f), MaxInstances = 2 }, npc.Center); + Vector2 pulseVel = -safeVel; + Particle pulse1 = new CustomSpark(npc.Center, pulseVel * 2, "CalamityMod/Particles/BloomCircle", false, (int)(23 * MathF.Pow(scale, 2)), 0.6f * MathF.Pow(scale, 2), Color.DodgerBlue, new Vector2(2f, 1f), shrinkSpeed: -0.1f / scale, noShrink: true, glowCenter: true, glowOpacity: 0.8f); + GeneralParticleHandler.SpawnParticle(pulse1); + pulse1.Pixelate = true; + Particle pulse2 = new CustomSpark(npc.Center, pulseVel, "CalamityMod/Particles/BloomRing", false, (int)(18 * MathF.Pow(scale, 2)), 0.5f * MathF.Pow(scale, 2), Color.Blue, new Vector2(4f, 0.7f), shrinkSpeed: -0.3f / scale, noShrink: true); + GeneralParticleHandler.SpawnParticle(pulse2); + pulse2.Pixelate = true; + } + + + for (int i = 0; i < 2; i++) + { + SoundStyle die = new("CalamityMod/Sounds/Item/HolyFireBulletExplosion"); + SoundEngine.PlaySound(die with { Pitch = 0.5f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); + if (npc.boss) + { + SoundStyle dieHard = new("CalamityMod/Sounds/Item/HellkiteSmallHit3"); + SoundEngine.PlaySound(dieHard with { Pitch = -1f, Volume = Math.Min(0.5f * scale, 1f), MaxInstances = 2 }, npc.Center); + } + SoundStyle dieHarder = new("CalamityMod/Sounds/Item/HeliumFlashCoreImpact"); + SoundEngine.PlaySound(dieHarder with { Pitch = -1.8f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); + } + for (int i = 0; i < 30; i++) + { + float variance = Main.rand.NextFloat(-0.8f, 0.8f); + Dust dust = Dust.NewDustPerfect(npc.Center, ModContent.DustType(), + -safeVel.RotatedBy(variance * 2).RotatedByRandom(MathF.Abs(variance) / 3) * scale * Main.rand.NextFloat(30.0f, 33.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2), 0, default, scale * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust.noGravity = true; + dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; + dust.customData = 2; + dust.fadeIn = 0.5f * scale; + } + for (int i = 0; i < 15; i++) + { + float variance = Main.rand.NextFloat(-0.8f, 0.8f); + Vector2 vel = -safeVel.RotatedBy(variance / 2).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(20.0f, 23.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2); + Dust dust2 = Dust.NewDustPerfect(npc.Center + vel * 13, ModContent.DustType(), + vel, 0, default, 2 * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust2.noGravity = true; + dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; + dust2.customData = new Vector2(0.2f, 1.6f); + dust2.fadeIn = 2.5f; + } - SoundStyle dieHarder = new("CalamityMod/Sounds/Item/HeliumFlashCoreImpact"); - SoundEngine.PlaySound(dieHarder with { Pitch = -1.8f, Volume = Math.Min(0.6f * scale, 1f), MaxInstances = 2 }, npc.Center); - } - for (int i = 0; i < 30; i++) - { - float variance = Main.rand.NextFloat(-0.8f, 0.8f); - Dust dust = Dust.NewDustPerfect(npc.Center, ModContent.DustType(), - -safeVel.RotatedBy(variance * 2).RotatedByRandom(MathF.Abs(variance) / 3) * scale * Main.rand.NextFloat(30.0f, 33.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2), 0, default, scale * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); - dust.noGravity = true; - dust.color = Main.rand.NextBool() ? Color.DodgerBlue : Color.Blue; - dust.customData = 2; - dust.fadeIn = 0.5f * scale; - } - for (int i = 0; i < 15; i++) - { - float variance = Main.rand.NextFloat(-0.8f, 0.8f); - Vector2 vel = -safeVel.RotatedBy(variance / 2).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(20.0f, 23.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2); - Dust dust2 = Dust.NewDustPerfect(npc.Center + vel * 13, ModContent.DustType(), - vel, 0, default, 2 * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); - dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Gold : Color.Goldenrod; - dust2.customData = new Vector2(0.2f, 1.6f); - dust2.fadeIn = 2.5f; - } + bool instakill = (GrandDad && potentialEnergyDamage != 1); int wallImpactDamage = (int)(PotentialEnergyDamage * Math.Clamp(oldVelocity / terminalVelocityForFullFallDamage, (ForcedVel.Length() > 0 ? 1f : 0f), 1f)); - Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, ModContent.ProjectileType(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI); + Projectile wallImpact = Projectile.NewProjectileDirect(attacker.GetSource_FromThis(), npc.Center, Vector2.Zero, instakill ? ModContent.ProjectileType() : ModContent.ProjectileType(), wallImpactDamage, 0f, attacker.whoAmI, npc.whoAmI); wallImpact.DamageType = DamageClass.Melee; + wallImpact.CritChance = (int)attacker.GetCritChance(DamageClass.Melee) + attacker.HeldItem.crit; } PotentialEnergyDamage = 0; diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index 0ded93f6cd..ea8acf382e 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -1,22 +1,16 @@ using System; using System.Collections.Generic; -using System.Runtime.ConstrainedExecution; using CalamityMod.Dusts; using CalamityMod.Enums; -using CalamityMod.Items.Tools; -using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; using CalamityMod.NPCs.PrimordialWyrm; using CalamityMod.Particles; -using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Systems.Graphic.PixelationSystem; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; using Terraria.Audio; -using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; @@ -264,9 +258,10 @@ namespace CalamityMod.Projectiles.Melee bool canBeLaunched = false; bool lowEnoughToExecute = target.life <= Projectile.damage * 15; bool jared = target.type == ModContent.NPCType(); - Vector2 launchVel = Utils.DirectionTo(Owner.Center, (lowEnoughToExecute ? Owner.Calamity().mouseWorld : target.Center)); + Vector2 toMouse = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); + Vector2 launchVel = lowEnoughToExecute ? toMouse : Utils.DirectionTo(Owner.Center, target.Center); - if (lowEnoughToExecute) + if (lowEnoughToExecute || jared) { distanceToTiles = CalamityUtils.DistanceToTileCollisionHit(target.Center, launchVel, 200) ?? -100; canBeLaunched = jared || ((distanceToTiles == -100 ? false : distanceToTiles < 200 ? true : false) && target.realLife == -1); @@ -296,6 +291,9 @@ namespace CalamityMod.Projectiles.Melee } } + // Regular knockback + float launchPower = 60; + target.MoveNPC(toMouse, launchPower * (canBeLaunched ? 0.5f : 0.25f), true); if (canBeLaunched) // launches/executes enemies { if (jared) @@ -307,14 +305,10 @@ namespace CalamityMod.Projectiles.Melee target.Calamity().pacified = true; - // Launch the suckers - float launchPower = 60; - target.MoveNPC(launchVel, launchPower * 0.5f, true); - - // Apply tile collison damage + // Apply tile collison damage and forced velocity to launch the suckers // This always kills (unless it's Jared) int damage = (int)(Projectile.damage); - target.GetGlobalNPC().ApplyCollisionDamage(target, Owner, (jared && !lowEnoughToExecute) ? 0 : damage, launchVel * launchPower, 5f, true); + target.GetGlobalNPC().ApplyCollisionDamage(target, Owner, (jared && !lowEnoughToExecute) ? 1 : damage, launchVel * launchPower, 5f, true, true); } if (Projectile.numHits < 3) diff --git a/Projectiles/Typeless/TileSlamDamage.cs b/Projectiles/Typeless/TileSlamDamage.cs index 45184ff8ed..b359b1b9ab 100644 --- a/Projectiles/Typeless/TileSlamDamage.cs +++ b/Projectiles/Typeless/TileSlamDamage.cs @@ -1,5 +1,7 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless @@ -11,6 +13,15 @@ namespace CalamityMod.Projectiles.Typeless public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { modifiers.SetInstantKill(); + int damageLength = (int)Math.Pow(target.life.ToString().Length, target.boss ? 2.8f : 1); + string sevens = "7"; + for (int i = 0; i < damageLength; i++) + { + sevens = sevens + "7"; + } + + Rectangle location = new Rectangle((int)target.position.X, (int)target.position.Y - 16, target.width, target.height); + int text = CombatText.NewText(location, Color.DodgerBlue, Language.GetTextValue(sevens), true); } } From 6e2cbfbde7ba27b10b2dbaf3c7bcd9944784880e Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 16 Mar 2026 14:51:14 -0700 Subject: [PATCH 093/346] fix canvas borders not merging --- Tiles/Furniture/Paintings/BaseCanvasPainting.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tiles/Furniture/Paintings/BaseCanvasPainting.cs b/Tiles/Furniture/Paintings/BaseCanvasPainting.cs index 49fcd0d128..6c036b064e 100644 --- a/Tiles/Furniture/Paintings/BaseCanvasPainting.cs +++ b/Tiles/Furniture/Paintings/BaseCanvasPainting.cs @@ -111,11 +111,11 @@ namespace CalamityMod.Tiles.Furniture.Paintings DrawBorders(spriteBatch, pos - Main.screenPosition, new Point(i, j)); return false; } - public static void DrawBorders(SpriteBatch spriteBatch, Vector2 pos, Point cords) + public void DrawBorders(SpriteBatch spriteBatch, Vector2 pos, Point cords) { var texture = border.Value; var cornerTex = corner.Value; - var canvasID = (ushort)Main.LocalPlayer.Calamity().CurrentlyViewedCanvasType; + var canvasID = Type; var commonDim = 8; var finalCord = 72; var size = 80; From 81e924876171241e5432a4e9a1d690d8b7964e0b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 16 Mar 2026 18:42:23 -0700 Subject: [PATCH 094/346] 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 095/346] 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 cef0c4fcba51be237630bb1515c87dd30595f4b5 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 16 Mar 2026 23:49:21 -0400 Subject: [PATCH 096/346] vhex error fix --- CalPlayer/CalamityPlayerMiscEffects.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 9bf6d8f9f3..e300e7b368 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1009,12 +1009,17 @@ namespace CalamityMod.CalPlayer // Incinerate the target with either Vulnerability Hex or True Vulnerability Hex, depending on current cursor focus. // This adds 8 to the buff duration, which results in a net increase of 3 frames every time damage is dealt, due to damage occurring every 5 frames. - int buffToInflict = target.Calamity().trueVulnerabilityHex ? ModContent.BuffType() : ModContent.BuffType(); - if (!target.HasBuff(buffToInflict)) - target.AddBuff(buffToInflict, 52); - target.buffTime[target.FindBuffIndex(buffToInflict)] += 8; - if (target.buffTime[target.FindBuffIndex(buffToInflict)] < VulnerabilityHex.CalamityDuration) - target.buffTime[target.FindBuffIndex(buffToInflict)] = VulnerabilityHex.CalamityDuration; + int buffToInflict = target.Calamity().trueVulnerabilityHex ? ModContent.BuffType() : ModContent.BuffType(); + if (!target.buffImmune[buffToInflict]) + { + if (!target.HasBuff(buffToInflict)) + target.AddBuff(buffToInflict, 52); + + int index = target.FindBuffIndex(buffToInflict); + + if (index != -1) + target.buffTime[index] = Math.Max(target.buffTime[index] + 8, VulnerabilityHex.CalamityDuration); + } // Make some fancy dust to indicate damage is being done. for (int j = 0; j < 12; j++) 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 097/346] 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 098/346] 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 099/346] 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 100/346] 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 90ffc1f9373fdf9a7f85a18f071fdcb3a81cb37e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 12 Mar 2026 19:39:13 -0400 Subject: [PATCH 101/346] Nerfed True VHex to same DoT as VHex --- Buffs/DamageOverTime/TrueVulnerabilityHex.cs | 2 +- Localization/en-US/Mods.CalamityMod.Buffs.hjson | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs index cfeafcdb55..beead70032 100644 --- a/Buffs/DamageOverTime/TrueVulnerabilityHex.cs +++ b/Buffs/DamageOverTime/TrueVulnerabilityHex.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 3996, //6x the tick size + EnemyLostRegen = 2664, //4x the tick size HeatDebuffScaling = 1, MinimumDamageTickSize = 666, //Vhex should always have ticks of 666 MultiplierDamageTickSize = 0 diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 7c6c20ee1b..6a972e6928 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -347,7 +347,7 @@ TrueVulnerabilityHex: { ''' ItemTooltipEnemy: ''' - Heat - 1998 DPS + Heat - 1332 DPS Increases damage taken from all sources Slows enemies ''' From a4eaf573adbace4ed8ae6cd5293a73f6b60486b9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:58:21 -0400 Subject: [PATCH 102/346] Fixed Lightspeed and Lucrecia tooltips still stating outdated charge dissipation logic --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 662837279f..cd1e467989 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -796,7 +796,7 @@ Lightspeed: { Tooltip: ''' [c/c7f5ff:Unleash a flurry of stabs which build Elemental Mastery on hit] - [c/c2fff2:Elemental Mastery is lost over time but briefly stops depleting after reaching its maximum] + [c/c2fff2:Elemental Mastery is lost over time if it has not being gained for a few seconds] [c/ffdfba:Press with maximum Elemental Mastery to dash toward your cursor] [c/ffc7c7:Hitting an enemy during the dash refunds some Elemental Mastery] ''' @@ -818,7 +818,7 @@ Lucrecia: { ''' [c/9370db:Fires a spiraling darklight shard when swung] [c/837ce4:Hits with the blade itself build Darklight Energy] - [c/7489ee:Darklight Energy is lost over time but briefly stops depleting after reaching its maximum] + [c/7489ee:Darklight Energy is lost over time if it has not being gained for a few seconds] [c/6495f7:Press with maximum energy to fire a double helix comet] ''' } From 07dea8af9ff826467abf6a2cac37fc880cce0dd3 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 13 Mar 2026 11:01:42 -0400 Subject: [PATCH 103/346] The typoer --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index cd1e467989..a461ca580e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -796,7 +796,7 @@ Lightspeed: { Tooltip: ''' [c/c7f5ff:Unleash a flurry of stabs which build Elemental Mastery on hit] - [c/c2fff2:Elemental Mastery is lost over time if it has not being gained for a few seconds] + [c/c2fff2:Elemental Mastery is lost over time if it has not been gained for a few seconds] [c/ffdfba:Press with maximum Elemental Mastery to dash toward your cursor] [c/ffc7c7:Hitting an enemy during the dash refunds some Elemental Mastery] ''' @@ -818,7 +818,7 @@ Lucrecia: { ''' [c/9370db:Fires a spiraling darklight shard when swung] [c/837ce4:Hits with the blade itself build Darklight Energy] - [c/7489ee:Darklight Energy is lost over time if it has not being gained for a few seconds] + [c/7489ee:Darklight Energy is lost over time if it has not been gained for a few seconds] [c/6495f7:Press with maximum energy to fire a double helix comet] ''' } From 41ce7a688a81dfc9eda6ad908fdc8dbd6f511a04 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Mar 2026 14:40:38 -0400 Subject: [PATCH 104/346] Bloodflare armor set bonus tooltip now copies our rewritten Crimson armor set bonus tooltip instead of saying it's "equivalent to Crimson armor" --- .../en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index af6b6d7cde..071dab3909 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -168,7 +168,7 @@ BloodflareBodyArmor: { Tooltip: "{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}" CommonSetBonus: ''' - Greatly increased life regen, equivalent to Crimson armor + {$Mods.CalamityMod.Vanilla.Armor.SetBonus.Crimson} Enemies below 50% life drop a heart when struck This effect has a 5 second cooldown ''' From 7d2ad4ec9ee397b31a4591d67022fa47e6ac72bb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Mar 2026 21:40:53 -0400 Subject: [PATCH 105/346] Primordial Ancient nerf --- Items/Weapons/Magic/PrimordialAncient.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/PrimordialAncient.cs b/Items/Weapons/Magic/PrimordialAncient.cs index 016e0e5e2a..7f76b27f3f 100644 --- a/Items/Weapons/Magic/PrimordialAncient.cs +++ b/Items/Weapons/Magic/PrimordialAncient.cs @@ -17,18 +17,17 @@ namespace CalamityMod.Items.Weapons.Magic public new string LocalizationCategory => "Items.Weapons.Magic"; public static float BuffDamageReductionBoost = 0.08f; - public static float BuffDamageBoost = 0.18f; + public static float BuffDamageBoost = 0.15f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(BuffDamageReductionBoost.ToPercent(), BuffDamageBoost.ToPercent()); public override void SetDefaults() { Item.width = 40; Item.height = 56; - Item.damage = 4350; + Item.damage = 3825; Item.DamageType = DamageClass.Magic; Item.mana = 95; - Item.useTime = 78; - Item.useAnimation = 78; + Item.useTime = Item.useAnimation = 72; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 14; From b56211f08a845a261b3fdbbd1ff8db282c684066 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Mar 2026 22:18:29 -0400 Subject: [PATCH 106/346] Aetherflux Cannon nerf --- Items/Weapons/Magic/AetherfluxCannon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/AetherfluxCannon.cs b/Items/Weapons/Magic/AetherfluxCannon.cs index 7223d35dbe..5bd42780b5 100644 --- a/Items/Weapons/Magic/AetherfluxCannon.cs +++ b/Items/Weapons/Magic/AetherfluxCannon.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 94; Item.height = 54; - Item.damage = 355; + Item.damage = 315; Item.DamageType = DamageClass.Magic; Item.mana = 7; Item.useAnimation = Item.useTime = UseTime; From 494e921659e690530a27979f764f1c1e2f4a4ef9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 16 Mar 2026 20:36:02 -0400 Subject: [PATCH 107/346] 1 - Made double-jump Bottle recipes more expensive 2 - Sandstorm Bottle no longer uses Pearl Shards, Bundle of Balloons no longer uses Aerialite Bars --- Systems/Mechanic/RecipeSystem.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Systems/Mechanic/RecipeSystem.cs b/Systems/Mechanic/RecipeSystem.cs index 9d8535f641..741a5fe91b 100644 --- a/Systems/Mechanic/RecipeSystem.cs +++ b/Systems/Mechanic/RecipeSystem.cs @@ -756,8 +756,6 @@ namespace CalamityMod.Systems // Tier lock various items to a higher tier (sorted by progression) { Vanilla(ItemID.Trimarang), AddIngredient(ItemType(), 5) }, - { Vanilla(ItemID.BundleofBalloons), AddIngredient(ItemType(), 3) }, - { r => r.HasResult(ItemID.HorseshoeBundle) && !r.HasIngredient(ItemID.BundleofBalloons), AddIngredient(ItemType(), 3) }, { Vanilla(ItemID.NightsEdge), AddIngredient(ItemType(), 5) }, { Vanilla(ItemID.FairyBoots), AddIngredient(ItemID.SoulofLight, 5) }, { Vanilla(ItemID.FairyBell), RemoveIngredient(ItemID.SoulofSight) }, @@ -1581,8 +1579,8 @@ namespace CalamityMod.Systems // Blizzard in a Bottle r = Recipe.Create(ItemID.BlizzardinaBottle); r.AddIngredient(ItemID.Bottle); - r.AddIngredient(ItemID.Cloud, 5); - r.AddRecipeGroup(AnySnowBlock, 5); + r.AddIngredient(ItemID.Cloud, 15); + r.AddRecipeGroup(AnySnowBlock, 30); r.AddIngredient(ItemID.Feather, 3); r.AddTile(TileID.Anvils); r.Register(); @@ -1590,7 +1588,7 @@ namespace CalamityMod.Systems // Cloud in a Bottle r = Recipe.Create(ItemID.CloudinaBottle); r.AddIngredient(ItemID.Bottle); - r.AddIngredient(ItemID.Cloud, 5); + r.AddIngredient(ItemID.Cloud, 30); r.AddIngredient(ItemID.Feather, 2); r.AddTile(TileID.Anvils); r.Register(); @@ -1598,9 +1596,8 @@ namespace CalamityMod.Systems // Sandstorm in a Bottle r = Recipe.Create(ItemID.SandstorminaBottle); r.AddIngredient(ItemID.Bottle); - r.AddIngredient(ItemID.Cloud, 5); - r.AddRecipeGroup("Sand", 5); - r.AddIngredient(3); + r.AddIngredient(ItemID.Cloud, 15); + r.AddRecipeGroup("Sand", 40); r.AddIngredient(ItemID.Feather, 3); r.AddTile(TileID.Anvils); r.Register(); @@ -1608,7 +1605,7 @@ namespace CalamityMod.Systems // Fledgling Wings r = Recipe.Create(ItemID.CreativeWings); - r.AddIngredient(ModContent.ItemType(), 2); + r.AddIngredient(2); r.AddIngredient(ItemID.Cloud, 5); r.AddIngredient(ItemID.Feather, 10); r.AddTile(TileID.Anvils); From 27827725224efdd008137c819a547a694eaef531 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 16 Mar 2026 22:24:13 -0400 Subject: [PATCH 108/346] Fixed possible EoL lance wall desync --- NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index b553015d05..e7c56ef885 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -848,10 +848,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Chance to stop using the lance walls and switch to a different attack after 3 lance walls are used. - if (Main.rand.NextBool(5 - ((int)calamityGlobalNPC.newAI[1] - 2)) && calamityGlobalNPC.newAI[1] >= 2f) + if (Main.netMode != NetmodeID.MultiplayerClient) { - NPC.ai[1] = lanceWallPhaseTime; - NPC.netUpdate = true; + if (Main.rand.NextBool(5 - ((int)calamityGlobalNPC.newAI[1] - 2)) && calamityGlobalNPC.newAI[1] >= 2f) + { + NPC.ai[1] = lanceWallPhaseTime; + NPC.netUpdate = true; + } } } From 16b0f48d67b79c4fb7b0c0989051c60eb0c8b48f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 17 Mar 2026 13:35:40 -0400 Subject: [PATCH 109/346] Fixed Thread of Eradication not dealing ranged damage Compensatory nerf --- Items/Weapons/Ranged/ThreadOfEradication.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Ranged/ThreadOfEradication.cs b/Items/Weapons/Ranged/ThreadOfEradication.cs index 2e959a2428..e7b0499bac 100644 --- a/Items/Weapons/Ranged/ThreadOfEradication.cs +++ b/Items/Weapons/Ranged/ThreadOfEradication.cs @@ -24,10 +24,9 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 40; Item.height = 82; - Item.damage = 4375; + Item.damage = 2570; Item.DamageType = DamageClass.Ranged; - Item.useTime = 45; - Item.useAnimation = 45; + Item.useTime = Item.useAnimation = 45; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; @@ -74,7 +73,9 @@ namespace CalamityMod.Items.Weapons.Ranged Main.LocalPlayer.SetScreenshake(2f); if (Main.myPlayer == player.whoAmI) { - Projectile.NewProjectile(Item.GetSource_FromThis(), player.Center + Vector2.UnitX.RotatedBy(player.itemRotation) * 2016, Vector2.UnitX.RotatedBy(player.itemRotation), ModContent.ProjectileType(), storedDMG, storedKB, player.whoAmI, -1, 1); + int p = Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center + Vector2.UnitX.RotatedBy(player.itemRotation) * 2016, Vector2.UnitX.RotatedBy(player.itemRotation), ModContent.ProjectileType(), storedDMG, storedKB, player.whoAmI, -1, 1); + if (Main.projectile.IndexInRange(p)) + Main.projectile[p].DamageType = DamageClass.Ranged; } } } @@ -89,9 +90,10 @@ namespace CalamityMod.Items.Weapons.Ranged Main.LocalPlayer.SetScreenshake(5f); if (Main.myPlayer == player.whoAmI) { - int p = Projectile.NewProjectile(Item.GetSource_FromThis(), player.Center + Vector2.UnitX.RotatedBy(player.itemRotation) * 2016, Vector2.UnitX.RotatedBy(player.itemRotation), ModContent.ProjectileType(), storedDMG*4, storedKB, player.whoAmI,-0.25f,1); + int p = Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center + Vector2.UnitX.RotatedBy(player.itemRotation) * 2016, Vector2.UnitX.RotatedBy(player.itemRotation), ModContent.ProjectileType(), storedDMG*4, storedKB, player.whoAmI,-0.25f,1); if (Main.projectile.IndexInRange(p)) { + Main.projectile[p].DamageType = DamageClass.Ranged; Main.projectile[p].scale = 4; } } From ae6b46c02ce484c6eea236f2733980c9600acb1b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 18 Mar 2026 01:50:03 -0400 Subject: [PATCH 110/346] Update WulfrumKnifeProj.cs Added squash and stretch when a knife sticks to an enemy, Removed the fade-in triggering when a knife sticks to an enemy, Knifes now fade out before disappearing, Re-aligned the trail on the stealth strike to line up properly with the knife, Slightly reduced dust spawn rate for non-stealth strikes, Made knives fade in faster upon spawning, Made the stealth strike trail properly fade in based on the main projectile's opacity --- Projectiles/Rogue/WulfrumKnifeProj.cs | 92 +++++++++++++++++++++------ 1 file changed, 72 insertions(+), 20 deletions(-) diff --git a/Projectiles/Rogue/WulfrumKnifeProj.cs b/Projectiles/Rogue/WulfrumKnifeProj.cs index 1e27343593..a84d65e9a8 100644 --- a/Projectiles/Rogue/WulfrumKnifeProj.cs +++ b/Projectiles/Rogue/WulfrumKnifeProj.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; @@ -6,6 +7,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -19,6 +21,9 @@ namespace CalamityMod.Projectiles.Rogue internal Color PrimColorMult = Color.White; public override string Texture => "CalamityMod/Items/Weapons/Rogue/WulfrumKnife"; + private bool beginStretchAnim = false; + private float progress = -1f; + public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 20; @@ -27,7 +32,6 @@ namespace CalamityMod.Projectiles.Rogue public static int Lifetime = 1440; public float LifetimeCompletion => MathHelper.Clamp((Lifetime - Projectile.timeLeft) / (float)Lifetime, 0f, 1f); - public float StealthEffectOpacity => MathHelper.Clamp(1 - LifetimeCompletion, 0f, 1f); public float StuckEnemyID { @@ -59,10 +63,23 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 1; Projectile.stopsDealingDamageAfterPenetrateHits = true; } - + public override void OnSpawn(IEntitySource source) + { + for (int i = 0; i < Projectile.oldPos.Length; i++) + Projectile.oldPos[i] = Projectile.Center; + } public override void AI() { + if (Projectile.timeLeft >= 50) + Projectile.Opacity = MathHelper.Clamp(LifetimeCompletion * 90f, 0f, 1f); + else + Projectile.Opacity = Projectile.timeLeft / 50f; // Fade out over last 50 frames + + // Update squash and stretch animation + if (progress >= 0f && progress < 1f) + progress += 0.06f; + if (StuckEnemyID > 0) { Projectile.tileCollide = false; @@ -108,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue if (!Projectile.Calamity().stealthStrike) { - if (Main.rand.NextBool(10)) + if (Main.rand.NextBool(12)) { Vector2 dustCenter = Projectile.Center + Projectile.velocity.RotatedBy(MathHelper.PiOver2).SafeNormalize(Vector2.Zero) * Main.rand.NextFloat(-3f, 3f); @@ -122,13 +139,13 @@ namespace CalamityMod.Projectiles.Rogue else { - Lighting.AddLight(Projectile.Center, (Main.rand.NextBool() ? Color.GreenYellow : Color.DeepSkyBlue).ToVector3() * StealthEffectOpacity); + Lighting.AddLight(Projectile.Center, (Main.rand.NextBool() ? Color.GreenYellow : Color.DeepSkyBlue).ToVector3()); if (Main.rand.NextBool(7)) { Vector2 center = Projectile.Center + Projectile.velocity.RotatedBy(MathHelper.PiOver2).SafeNormalize(Vector2.Zero) * Main.rand.NextFloat(-3f, 3f); Vector2 velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedByRandom(MathHelper.Pi / 6f) * Main.rand.NextFloat(4, 10); - GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(center, velocity, Main.rand.NextFloat(1f, 2f), Main.rand.NextBool() ? new Color(99, 255, 229) : new Color(25, 132, 247), 25, StealthEffectOpacity)); + GeneralParticleHandler.SpawnParticle(new TechyHoloysquareParticle(center, velocity, Main.rand.NextFloat(1f, 2f), Main.rand.NextBool() ? new Color(99, 255, 229) : new Color(25, 132, 247), 25, Projectile.Opacity)); } @@ -141,16 +158,24 @@ namespace CalamityMod.Projectiles.Rogue chust.noLightEmittence = true; } } + + if (Projectile.timeLeft < 120) + Projectile.Opacity -= 0.03f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { SoundEngine.PlaySound(WulfrumKnife.TileHitSound, Projectile.Center); - Projectile.timeLeft = Lifetime; + Projectile.timeLeft = Math.Max(Projectile.timeLeft, 300); StuckEnemyID = target.whoAmI+1; StuckEnemyDistance = Projectile.Distance(target.Center); StuckEnemyRotation = Projectile.DirectionFrom(target.Center).ToRotation(); } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + beginStretchAnim = true; + } + public override bool OnTileCollide(Vector2 oldVelocity) { Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height); @@ -161,7 +186,7 @@ namespace CalamityMod.Projectiles.Rogue internal Color ColorFunction(float completionRatio, Vector2 vertexPos) { - float fadeOpacity = (float)Math.Pow(1 - completionRatio, 2) * StealthEffectOpacity; + float fadeOpacity = (float)MathHelper.Clamp(LifetimeCompletion * 30f, 0f, 1f); return Color.GreenYellow.MultiplyRGB(PrimColorMult) * fadeOpacity; } @@ -173,7 +198,41 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - float opacitey = StealthEffectOpacity; + + // Squash and Stretch Scale Logic + if (beginStretchAnim) + { + progress = 0f; + beginStretchAnim = false; + } + + float stretchFactorX = 1f; + float stretchFactorY = 1f; + + if (progress >= 0f) + { + if (progress < 0.5f) // Stretch phase + { + float completion = progress / 0.5f; + stretchFactorX = MathHelper.Lerp(1.8f, 0.7f, completion); + stretchFactorY = MathHelper.Lerp(0.7f, 1.8f, completion); + } + else // Squash phase + { + float completion = (progress - 0.5f) / 0.5f; + stretchFactorX = MathHelper.Lerp(0.7f, 1f, completion); + stretchFactorY = MathHelper.Lerp(1.8f, 1f, completion); + } + + if (progress >= 1f) + { + progress = -1f; + } + } + + Vector2 drawScale = new Vector2(stretchFactorX, stretchFactorY) * Projectile.scale; + Vector2 offset = Projectile.Size * 0.5f; + Vector2[] oldPosWithOffset = Projectile.oldPos.Select(p => p - offset).ToArray(); if (Projectile.Calamity().stealthStrike && StuckEnemyID == 0) { @@ -181,33 +240,26 @@ namespace CalamityMod.Projectiles.Rogue Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); GameShaders.Misc["CalamityMod:TrailStreak"].SetShaderTexture(Request("CalamityMod/ExtraTextures/Trails/BasicTrail")); - + CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 1f, delegate (Vector2 offset, Color colorMod) { PrimColorMult = colorMod; - PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(WidthFunction, ColorFunction, (_,_) => Projectile.Size + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); + PrimitiveRenderer.RenderTrail(oldPosWithOffset, new(WidthFunction, ColorFunction, (_,_) => Projectile.Size + offset, shader: GameShaders.Misc["CalamityMod:TrailStreak"]), 30); }); - - CalamityUtils.DrawChromaticAberration(Vector2.UnitX, 3f, delegate (Vector2 offset, Color colorMod) { - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + offset, null, Color.GreenYellow.MultiplyRGB(colorMod) * opacitey, Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition + offset, null, Color.GreenYellow.MultiplyRGB(colorMod) * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, drawScale, SpriteEffects.None, 0); }); Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - opacitey = MathHelper.Clamp(LifetimeCompletion * 8f, 0f, 1f); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * opacitey, Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, drawScale, SpriteEffects.None, 0); } - else { - opacitey = MathHelper.Clamp(LifetimeCompletion * 15f, 0f, 1f); - - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * opacitey, Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor) * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, drawScale, SpriteEffects.None, 0); } return false; } From dd180412f7eb6b51f0dcff48e7cae82e144c158b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 18 Mar 2026 01:53:31 -0400 Subject: [PATCH 111/346] Reduced squash n stretch intensity --- Projectiles/Rogue/WulfrumKnifeProj.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Rogue/WulfrumKnifeProj.cs b/Projectiles/Rogue/WulfrumKnifeProj.cs index a84d65e9a8..8301c8146d 100644 --- a/Projectiles/Rogue/WulfrumKnifeProj.cs +++ b/Projectiles/Rogue/WulfrumKnifeProj.cs @@ -214,14 +214,14 @@ namespace CalamityMod.Projectiles.Rogue if (progress < 0.5f) // Stretch phase { float completion = progress / 0.5f; - stretchFactorX = MathHelper.Lerp(1.8f, 0.7f, completion); - stretchFactorY = MathHelper.Lerp(0.7f, 1.8f, completion); + stretchFactorX = MathHelper.Lerp(1.6f, 0.7f, completion); + stretchFactorY = MathHelper.Lerp(0.7f, 1.6f, completion); } else // Squash phase { float completion = (progress - 0.5f) / 0.5f; stretchFactorX = MathHelper.Lerp(0.7f, 1f, completion); - stretchFactorY = MathHelper.Lerp(1.8f, 1f, completion); + stretchFactorY = MathHelper.Lerp(1.6f, 1f, completion); } if (progress >= 1f) From a8e7ea8d58d59b5e4663b0a51c943b10e5faa4ff Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 19 Mar 2026 23:22:58 +0700 Subject: [PATCH 112/346] various set changes --- CalPlayer/CalamityPlayerMiscEffects.cs | 11 --------- CalPlayer/CalamityPlayerOnHit.cs | 2 +- Items/Armor/Daedalus/DaedalusHeadMagic.cs | 2 +- Items/Armor/Daedalus/DaedalusHeadMelee.cs | 2 +- Items/Armor/Daedalus/DaedalusHeadRanged.cs | 2 +- Items/Armor/Daedalus/DaedalusHeadRogue.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 13 ----------- .../AdamantiteArmorSetChange.cs | 7 +++--- .../CrimsonArmorSetChange.cs | 4 ---- .../FrostArmorSetChange.cs | 6 ++--- .../OrichalcumArmorSetChange.cs | 23 ------------------- .../PalladiumArmorSetChange.cs | 13 ----------- .../VanillaArmorChanges/RainArmorSetChange.cs | 2 +- .../Mods.CalamityMod.Vanilla.Armor.hjson | 6 ++--- 14 files changed, 16 insertions(+), 79 deletions(-) delete mode 100644 Items/VanillaArmorChanges/OrichalcumArmorSetChange.cs diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e300e7b368..3dcbe21eab 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -571,17 +571,6 @@ namespace CalamityMod.CalPlayer { if (Player.whoAmI == Main.myPlayer) { - // Hallowed Armor nerf - if (Player.onHitDodge) - { - for (int l = 0; l < Player.MaxBuffs; l++) - { - int hasBuff = Player.buffType[l]; - if (Player.buffTime[l] > 600 && hasBuff == BuffID.ShadowDodge) - Player.buffTime[l] = 600; - } - } - // Immunity Frames nerf int immuneTimeLimit = 150; if (Player.immuneTime > immuneTimeLimit) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 478ec02a8b..2276e7f805 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -54,7 +54,7 @@ namespace CalamityMod.CalPlayer if (AdamantiteSet) { - adamantiteSetDefenseBoostInterpolant += 1.75f / AdamantiteArmorSetChange.TimeUntilBoostCompletelyDecays; + adamantiteSetDefenseBoostInterpolant += 1f / AdamantiteArmorSetChange.TimeUntilBoostCompletelyDecays; adamantiteSetDefenseBoostInterpolant = MathHelper.Clamp(adamantiteSetDefenseBoostInterpolant, 0f, 1f); AdamantiteSetDecayDelay = AdamantiteArmorSetChange.TimeUntilDecayBeginsAfterAttacking; } diff --git a/Items/Armor/Daedalus/DaedalusHeadMagic.cs b/Items/Armor/Daedalus/DaedalusHeadMagic.cs index d169b687ba..b93e9b2d92 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMagic.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMagic.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Daedalus Item.height = 18; Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; - Item.defense = 5; // 39 + Item.defense = 8; // 42 } public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); diff --git a/Items/Armor/Daedalus/DaedalusHeadMelee.cs b/Items/Armor/Daedalus/DaedalusHeadMelee.cs index db0b4c87ef..09107dbbf4 100644 --- a/Items/Armor/Daedalus/DaedalusHeadMelee.cs +++ b/Items/Armor/Daedalus/DaedalusHeadMelee.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Armor.Daedalus Item.height = 18; Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; - Item.defense = 21; // 55 + Item.defense = 22; // 56 } public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); diff --git a/Items/Armor/Daedalus/DaedalusHeadRanged.cs b/Items/Armor/Daedalus/DaedalusHeadRanged.cs index 5a62695eb4..b52bf0a10a 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRanged.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRanged.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Armor.Daedalus Item.height = 18; Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; - Item.defense = 9; // 43 + Item.defense = 14; // 48 } public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); diff --git a/Items/Armor/Daedalus/DaedalusHeadRogue.cs b/Items/Armor/Daedalus/DaedalusHeadRogue.cs index 5b4c79a506..495458d722 100644 --- a/Items/Armor/Daedalus/DaedalusHeadRogue.cs +++ b/Items/Armor/Daedalus/DaedalusHeadRogue.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Armor.Daedalus Item.height = 18; Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; - Item.defense = 7; // 41 + Item.defense = 10; // 44 } public override bool IsArmorSet(Item head, Item body, Item legs) => body.type == ModContent.ItemType() && legs.type == ModContent.ItemType(); diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index dd375e4e0c..ff3204552b 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -884,10 +884,7 @@ namespace CalamityMod.Items // Crimson if (item.type == ItemID.CrimsonHelmet || item.type == ItemID.CrimsonScalemail || item.type == ItemID.CrimsonGreaves) - { - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("3%", "6%")); EditTooltipByNum(0, (line) => line.Text += AddedTooltip("CrimsonArmorPieces")); - } // Magic Hat nerf if (item.type == ItemID.MagicHat) @@ -926,20 +923,10 @@ namespace CalamityMod.Items if (item.type == ItemID.CobaltHat) EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40", $"{CobaltArmorSetChange.MaxManaBoost + 40}")); - // Palladium - if (item.type == ItemID.PalladiumBreastplate) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("3%", $"{PalladiumArmorSetChange.ChestplateDamagePercentageBoost + 3}%")); - if (item.type == ItemID.PalladiumLeggings) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("2%", $"{PalladiumArmorSetChange.LeggingsDamagePercentageBoost + 2}%")); - // Mythril if (item.type == ItemID.MythrilHood) EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("60", $"{MythrilArmorSetChange.MaxManaBoost + 60}")); - // Orichalcum - if (item.type == ItemID.OrichalcumBreastplate) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("6%", $"{OrichalcumArmorSetChange.ChestplateCritChanceBoost + 6}%")); - // Adamantite if (item.type == ItemID.AdamantiteHeadgear) EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("80", $"{AdamantiteArmorSetChange.MaxManaBoost + 80}")); diff --git a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs index 43c6867f92..8ae7e117cf 100644 --- a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs +++ b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs @@ -20,7 +20,8 @@ namespace CalamityMod.Items.VanillaArmorChanges public const int MaxManaBoost = 20; public const int DefenseBoostMax = 10; public const int TimeUntilDecayBeginsAfterAttacking = 60; - public const int TimeUntilBoostCompletelyDecays = 210; + public const int TimeUntilBoostCompletelyDecays = 210; // Unlisted use: this is also the amount of hits to max out defense. + public const int CritToDRConversionPercent = 25; public override void ApplyHeadPieceEffect(Player player) { @@ -36,12 +37,12 @@ namespace CalamityMod.Items.VanillaArmorChanges setBonusText = CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}.Melee"); } - setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(DefenseBoostMax)}"; + setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(CritToDRConversionPercent, DefenseBoostMax, TimeUntilBoostCompletelyDecays.FramesToSeconds())}"; } public override void ApplyArmorSetBonus(Player player) { - int critBoost = (int)(MathHelper.Clamp(player.endurance, 0f, 1f) * 50f); + int critBoost = (int)(MathHelper.Clamp(player.endurance, 0f, 1f) * CritToDRConversionPercent); switch (player.armor[0].type) { case ItemID.AdamantiteHeadgear: diff --git a/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs b/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs index 3ba4856861..233e6dcee9 100644 --- a/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CrimsonArmorSetChange.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Crimson"; - public const float ArmorPieceDamage = 0.06f; public const int ArmorPieceLifeRegen = 1; // Set bonus clarification @@ -25,9 +24,6 @@ namespace CalamityMod.Items.VanillaArmorChanges private static void ApplyAnyPieceEffect(Player player) { - // Remove the vanilla +3% damage and add the new damage value at the same time - player.GetDamage() += ArmorPieceDamage - 0.03f; - // Give life regen player.lifeRegen += ArmorPieceLifeRegen; } diff --git a/Items/VanillaArmorChanges/FrostArmorSetChange.cs b/Items/VanillaArmorChanges/FrostArmorSetChange.cs index f84f8b0fa0..f98bfee7ba 100644 --- a/Items/VanillaArmorChanges/FrostArmorSetChange.cs +++ b/Items/VanillaArmorChanges/FrostArmorSetChange.cs @@ -15,9 +15,9 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Frost"; - public const float ProximityBoost = 0.2f; - public const float MinDistance = 160f; - public const float MaxDistance = 800f; + public const float ProximityBoost = 0.25f; + public const float MinDistance = 80f; + public const float MaxDistance = 720f; public override void UpdateSetBonusText(ref string setBonusText) { diff --git a/Items/VanillaArmorChanges/OrichalcumArmorSetChange.cs b/Items/VanillaArmorChanges/OrichalcumArmorSetChange.cs deleted file mode 100644 index ec3cb749c2..0000000000 --- a/Items/VanillaArmorChanges/OrichalcumArmorSetChange.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.VanillaArmorChanges -{ - public class OrichalcumArmorSetChange : VanillaArmorChange - { - public override int? HeadPieceID => ItemID.OrichalcumHelmet; - - public override int? BodyPieceID => ItemID.OrichalcumBreastplate; - - public override int? LegPieceID => ItemID.OrichalcumLeggings; - - public override int[] AlternativeHeadPieceIDs => new int[] { ItemID.OrichalcumHeadgear, ItemID.OrichalcumMask }; - - public override string ArmorSetName => "Orichalcum"; - - public const int ChestplateCritChanceBoost = 4; - - public override void ApplyBodyPieceEffect(Player player) => player.GetCritChance() += ChestplateCritChanceBoost; - } -} diff --git a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs index 064aa47036..53913379ff 100644 --- a/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs +++ b/Items/VanillaArmorChanges/PalladiumArmorSetChange.cs @@ -16,19 +16,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Palladium"; - public const int ChestplateDamagePercentageBoost = 2; - public const int LeggingsDamagePercentageBoost = 3; - - public override void ApplyBodyPieceEffect(Player player) - { - player.GetDamage() += ChestplateDamagePercentageBoost * 0.01f; - } - - public override void ApplyLegPieceEffect(Player player) - { - player.GetDamage() += LeggingsDamagePercentageBoost * 0.01f; - } - public override void UpdateSetBonusText(ref string setBonusText) { setBonusText = $"{CalamityUtils.GetTextValue($"Vanilla.Armor.SetBonus.{ArmorSetName}")}"; diff --git a/Items/VanillaArmorChanges/RainArmorSetChange.cs b/Items/VanillaArmorChanges/RainArmorSetChange.cs index d777dc2c4a..cd67076673 100644 --- a/Items/VanillaArmorChanges/RainArmorSetChange.cs +++ b/Items/VanillaArmorChanges/RainArmorSetChange.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.VanillaArmorChanges public static void SpawnRainArmorJump(Player Player) { bool rainBoost = Player.Center.Y < Main.worldSurface * 16.0 && Main.raining; - int damage = (int)Player.GetBestClassDamage().ApplyTo(30 * (rainBoost ? 2f : 1)); + int damage = (int)Player.GetBestClassDamage().ApplyTo(30 * (rainBoost ? 1.5f : 1)); Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center + Vector2.UnitY * 26, Vector2.Zero, ModContent.ProjectileType(), damage, 0, Main.myPlayer); } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 4fe4d6f239..037e38f91c 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -2,9 +2,9 @@ SetBonus: { Adamantite: { $parentVal: ''' - Half of your current DR is added to your critical strike chance - Continuously doing damage makes you gradually gain more and more defense, up to a maximum of {0} - When not doing damage, this bonus gradually decays + {0}% of your current damage reduction is added to your critical strike chance + Continuously doing damage makes you gradually gain more and more defense, up to a maximum of {1} + When not doing damage, this bonus gradually decays over {2} seconds This added defense can be broken by defense damage ''' Melee: 15% increased melee speed and 20% increased movement speed From 4dc3afd2f4820ec539afd6a77f7194ebf2727628 Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 19 Mar 2026 11:20:00 -0700 Subject: [PATCH 113/346] Hyperius Bugfix and Balance --- Items/Ammo/HyperiusBullet.cs | 3 ++- Items/CalamityGlobalItem.cs | 12 +++++------- Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson | 2 +- NPCs/CalamityGlobalNPC.cs | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 11 ++++------- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Items/Ammo/HyperiusBullet.cs b/Items/Ammo/HyperiusBullet.cs index 7d7083766f..850195e567 100644 --- a/Items/Ammo/HyperiusBullet.cs +++ b/Items/Ammo/HyperiusBullet.cs @@ -9,7 +9,8 @@ namespace CalamityMod.Items.Ammo { public class HyperiusBullet : ModItem, ILocalizedModType { - public static float overflowEfficency = 1.2f; // Multiplier applied to overflow damage done by other damage sources + public static float overflowEfficency = 0.8f; // Multiplier applied to hyperius stacks taken when enemies are damaged by other sources + public static float overflowAppliedMult = 0.9f; // The amount of damage from a hit taken into account when dealing overflow damage public static readonly SoundStyle hit = new("CalamityMod/Sounds/Item/HyperiusOverflow"); public new string LocalizationCategory => "Items.Ammo"; public override void SetStaticDefaults() diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 13bcb810cb..534e02d860 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -900,15 +900,13 @@ namespace CalamityMod.Items // Hyperius Overflow if (target.Calamity().hyperiusMarked) { - int damage = 0; - if (target.Calamity().hyperiusDamage < damageDone) - damage = damageDone - target.Calamity().hyperiusDamage; - else - damage = damageDone; - target.Calamity().hyperiusDamage -= damage; + int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult); + int damage = (int)Math.Min(target.Calamity().hyperiusDamage, damageDealt); + + target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency); // Spawn overflow hit - Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), (int)(damage * HyperiusBullet.overflowEfficency), 0, player.whoAmI, target.whoAmI); + Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), damage, 0, player.whoAmI, target.whoAmI); overflow.DamageType = item.DamageType; overflow.ArmorPenetration = item.ArmorPenetration; // Takes the armor pen from what did the hit diff --git a/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson b/Localization/en-US/Mods.CalamityMod.Items.Ammo.hjson index 8046622dfb..0c6da2395a 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 deals 20% more damage + Releasing charge in this way is 20% more efficent ''' } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 163b7a2a5b..b90aa3dae4 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -334,8 +334,8 @@ namespace CalamityMod.NPCs public int hyperiusDamage = 0; public static int hyperiusOverflowTime = 100; public int hyperiusOverflowTimer = hyperiusOverflowTime; - /// Constant variable representing the % of max health Hyperius Bullet's damage stacks must reach before they start to overflow. - public const float HyperiusLifePercentThreshold = 0.07f; + /// Constant variable representing the % of max health Hyperius Bullet's damage stacks must reach before they start to bleed. + public const float HyperiusLifePercentThreshold = 0.10f; public int hyperiusFxTimer = 0; public int glaiveShredTimer = 0; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 30b2834719..fd3a9a4f78 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4763,16 +4763,13 @@ namespace CalamityMod.Projectiles // Hyperius Overflow if (projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType() && target.Calamity().hyperiusMarked) { - int damage = 0; - if (target.Calamity().hyperiusDamage < damageDone) - damage = damageDone - target.Calamity().hyperiusDamage; - else - damage = damageDone; + int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult); + int damage = (int)Math.Min(target.Calamity().hyperiusDamage, damageDealt); - target.Calamity().hyperiusDamage -= damage; + target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency); // Spawn overflow hit - Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), (int)(damage * HyperiusBullet.overflowEfficency), 0, projectile.owner, target.whoAmI); + Projectile overflow = Projectile.NewProjectileDirect(target.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), damage, 0, projectile.owner, target.whoAmI); overflow.DamageType = projectile.DamageType; overflow.ArmorPenetration = projectile.ArmorPenetration; // Takes the armor pen from what did the hit From 8de95215d41140a9dc0f7987cd42d20eefc2b7c2 Mon Sep 17 00:00:00 2001 From: Doze-Zoze <43045606+Doze-Zoze@users.noreply.github.com> Date: Thu, 19 Mar 2026 13:26:03 -0500 Subject: [PATCH 114/346] Hyperius Bullet can drain all of Overflow Compensates for the extra efficiency when capping Hyperius overflow, allowing one hit to still drain all Overflow --- Projectiles/CalamityGlobalProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index fd3a9a4f78..3784e20d35 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4764,7 +4764,7 @@ namespace CalamityMod.Projectiles if (projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType() && projectile.type != ProjectileType() && target.Calamity().hyperiusMarked) { int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult); - int damage = (int)Math.Min(target.Calamity().hyperiusDamage, damageDealt); + int damage = (int)MathF.Min(target.Calamity().hyperiusDamage / HyperiusBullet.overflowEfficency, damageDealt); target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency); From 896d5ea62d3164a2f7ec1cefb39195790be0ecfb Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 19 Mar 2026 13:11:48 -0700 Subject: [PATCH 115/346] Applied Doze fix to item hits --- Items/CalamityGlobalItem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 534e02d860..27877401d2 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -901,7 +901,7 @@ namespace CalamityMod.Items if (target.Calamity().hyperiusMarked) { int damageDealt = (int)(damageDone * HyperiusBullet.overflowAppliedMult); - int damage = (int)Math.Min(target.Calamity().hyperiusDamage, damageDealt); + int damage = (int)Math.Min(target.Calamity().hyperiusDamage / HyperiusBullet.overflowEfficency, damageDealt); target.Calamity().hyperiusDamage -= (int)(damage * HyperiusBullet.overflowEfficency); 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 116/346] 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 117/346] 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 118/346] 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 a47390a7788ab492d5c28f7d15cec94264372964 Mon Sep 17 00:00:00 2001 From: Xyk Date: Thu, 19 Mar 2026 23:16:19 -0700 Subject: [PATCH 119/346] Adjusted Heavy Knockback and added a whitelist --- CalPlayer/CalamityPlayer.cs | 3 + CalPlayer/CalamityPlayerOnHit.cs | 2 +- Items/Accessories/ShieldoftheOcean.cs | 4 +- NPCs/Abyss/CannonballJellyfish.cs | 1 + NPCs/Abyss/ChaoticPuffer.cs | 1 + NPCs/Abyss/ColossalSquid.cs | 1 + NPCs/Abyss/EidolonWyrmHead.cs | 1 + NPCs/Abyss/GulperEelHead.cs | 1 + NPCs/Abyss/MirageJelly.cs | 1 + NPCs/Abyss/OarfishHead.cs | 1 + NPCs/Abyss/ReaperShark.cs | 1 + NPCs/Abyss/SlabCrab.cs | 1 + NPCs/AcidRain/BloodwormFleeing.cs | 1 + NPCs/AcidRain/BloodwormNormal.cs | 1 + NPCs/AcidRain/CragmawMire.cs | 1 + NPCs/AcidRain/FlakCrab.cs | 1 + NPCs/AcidRain/GammaSlime.cs | 1 + NPCs/AcidRain/Mauler.cs | 1 + NPCs/AcidRain/NuclearTerror.cs | 1 + NPCs/AcidRain/SulphurousSkater.cs | 1 + NPCs/Astral/AstralachneaWall.cs | 1 + NPCs/Astral/SightseerSpitter.cs | 1 + NPCs/AstrumAureus/AureusSpawn.cs | 1 + NPCs/CalamityGlobalNPC.cs | 4 +- NPCs/CalamityHeavyKnockbackWhitelist.cs | 116 ++++++++++++++++++ NPCs/Crags/HeatSpirit.cs | 1 + NPCs/DraedonLabThings/Androomba.cs | 1 + NPCs/DraedonLabThings/RepairUnitCritter.cs | 1 + NPCs/GreatSandShark/GreatSandShark.cs | 1 + NPCs/HeavyKnockbackWhitelistedAttribute.cs | 13 ++ NPCs/NormalNPCs/AuroraSpirit.cs | 1 + NPCs/NormalNPCs/PlanterasFreeTentacle.cs | 1 + NPCs/NormalNPCs/ScornEater.cs | 1 + NPCs/OldDuke/SulphurousSharkron.cs | 1 + .../PlagueHomingMissile.cs | 1 + NPCs/Signus/CosmicLantern.cs | 1 + Projectiles/DraedonsArsenal/AugerPull.cs | 4 +- Projectiles/DraedonsArsenal/AugerSlash.cs | 2 +- .../CountermeasurePalmBlast.cs | 4 +- .../DraedonsArsenal/NidhoggExplosion.cs | 2 +- .../DraedonsArsenal/NidhoggRailgunBigShot.cs | 2 +- .../DraedonsArsenal/NidhoggRailgunBlast.cs | 3 +- .../DraedonsArsenal/PhalanxSurgeLance.cs | 2 +- .../DraedonsArsenal/ShortCircuitExplosion.cs | 2 +- .../DraedonsArsenal/ShortCircuitShot.cs | 2 +- .../DraedonsArsenal/VulcanProjectile.cs | 3 +- Projectiles/DraedonsArsenal/VulcanSpear.cs | 3 +- Projectiles/Magic/FireImplosion.cs | 3 +- Projectiles/Magic/PhantasmalFuryProj.cs | 2 +- Projectiles/Magic/Phantom.cs | 2 +- .../Magic/PrimordialAncientExplosion.cs | 2 +- Projectiles/Magic/PrimordialEarthExplosion.cs | 2 +- Projectiles/Magic/SHPB.cs | 4 +- Projectiles/Magic/SHPExplosion.cs | 4 +- Projectiles/Melee/BasherHoldout.cs | 2 +- Projectiles/Melee/CometQuasherHoldout.cs | 2 +- Projectiles/Melee/DevilsDevastationHoldout.cs | 2 +- Projectiles/Melee/DragoonBigBolt.cs | 2 +- Projectiles/Melee/EarthHoldout.cs | 2 +- Projectiles/Melee/ExaltedOathbladeHoldout.cs | 2 +- .../Melee/ForbiddenOathbladeHoldout.cs | 4 +- Projectiles/Melee/GrandDadHoldout.cs | 2 +- Projectiles/Melee/GrandGuardianHoldout.cs | 2 +- Projectiles/Melee/HellkiteHoldout.cs | 2 +- Projectiles/Melee/HolyColliderHoldout.cs | 2 +- Projectiles/Melee/MajesticGuardHoldout.cs | 2 +- Projectiles/Melee/OldLordClaymoreHoldout.cs | 2 +- .../Melee/Shortswords/GalileoGladiusThrown.cs | 2 +- Projectiles/Melee/SkytideDragoonHoldout.cs | 2 +- Projectiles/Melee/StellarStrikerHoldout.cs | 2 +- Projectiles/Ranged/FlashRoundFlash.cs | 2 +- Projectiles/Ranged/HellbornProj.cs | 2 +- Projectiles/Ranged/NullFlash.cs | 2 +- .../Ranged/OntoligicalDespoilerBurst.cs | 2 +- .../Ranged/OntologicalDespoilerBeam.cs | 2 +- Projectiles/Rogue/DoomsdayDeviceProjectile.cs | 2 +- Projectiles/Rogue/ExorcismShockwave.cs | 3 +- Projectiles/Rogue/LeviathanToothStealth.cs | 2 +- Projectiles/Rogue/PumpkaboomBig.cs | 2 +- Projectiles/Rogue/SupernovaBoom.cs | 4 +- Projectiles/Rogue/SupernovaStealthBoom.cs | 4 +- Projectiles/Rogue/WhitewaterAura.cs | 3 +- Projectiles/Summon/BrittleStarMinion.cs | 2 +- Projectiles/Typeless/BasicBurst.cs | 8 +- Projectiles/Typeless/BasicBurstExclusive.cs | 8 +- .../Typeless/BatholithBangleProjectile.cs | 2 +- .../Typeless/DiamondOfTheDeepProjectile.cs | 2 +- Projectiles/Typeless/DirectStrike.cs | 4 +- Projectiles/Typeless/LeviAmberDash.cs | 2 +- Projectiles/Typeless/PauldronExplosion.cs | 2 +- .../Typeless/ProtolithBangleProjectile.cs | 2 +- Projectiles/Typeless/PuddleSplash.cs | 2 +- Projectiles/Typeless/TransformerBlob.cs | 2 +- Utilities/NPCUtils.cs | 32 +++-- 94 files changed, 263 insertions(+), 89 deletions(-) create mode 100644 NPCs/CalamityHeavyKnockbackWhitelist.cs create mode 100644 NPCs/HeavyKnockbackWhitelistedAttribute.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 11fa4bf835..dab836227a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5267,6 +5267,9 @@ namespace CalamityMod.CalPlayer if (titanHeartSet && StealthStrikeAvailable() && rogue) knockback *= TitanHeartMask.StealthStrikeKnockbackMult; + + Player.GetKnockback() += 0.2f; + //Player.GetKnockback().ApplyTo(1); } #endregion diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 2276e7f805..ae18de7e06 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -249,7 +249,7 @@ namespace CalamityMod.CalPlayer if (proj.IsMinionOrSentryRelated) center = proj.Center; Vector2 launchVel = Utils.DirectionTo(center, target.Center); - target.MoveNPC(launchVel, proj.knockBack, true); + target.MoveNPC(launchVel, proj.knockBack, true, Player); } if (moscowMule || bloodyMary) diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs index 02daf35a01..00ef2c412f 100644 --- a/Items/Accessories/ShieldoftheOcean.cs +++ b/Items/Accessories/ShieldoftheOcean.cs @@ -78,11 +78,11 @@ namespace CalamityMod.Items.Accessories // If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries. // Otherwise, simply deal a large amount of damage to them if empowered. - if (npc.CanBeMoved(true)) + if (npc.CanBeMoved()) { // The NPC has to actually have its velocity changed, because TileCollisionHarmNPC only changes its position. Not confusing at all! Vector2 shoveVelocity = Utils.DirectionTo(player.Center, npc.Center) * (Main.zenithWorld ? 35f : 12.5f) - Vector2.UnitY * 6f; - npc.MoveNPC(Vector2.Normalize(shoveVelocity), shoveVelocity.Length(), true); + npc.MoveNPC(Vector2.Normalize(shoveVelocity), shoveVelocity.Length(), true, player); int scaledFallDamage = CalamityUtils.ScaleWithDifficulty(ShoveFallBaseDamage); var flungNPC = npc.GetGlobalNPC(); diff --git a/NPCs/Abyss/CannonballJellyfish.cs b/NPCs/Abyss/CannonballJellyfish.cs index 4ac27bd126..f24782ec3c 100644 --- a/NPCs/Abyss/CannonballJellyfish.cs +++ b/NPCs/Abyss/CannonballJellyfish.cs @@ -17,6 +17,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class CannonballJellyfish : ModNPC { public bool hasBeenHit = false; diff --git a/NPCs/Abyss/ChaoticPuffer.cs b/NPCs/Abyss/ChaoticPuffer.cs index 2ef44a8f59..407135ec7b 100644 --- a/NPCs/Abyss/ChaoticPuffer.cs +++ b/NPCs/Abyss/ChaoticPuffer.cs @@ -15,6 +15,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class ChaoticPuffer : ModNPC { public bool puffedUp = false; diff --git a/NPCs/Abyss/ColossalSquid.cs b/NPCs/Abyss/ColossalSquid.cs index 951075b079..dfe2e0cab1 100644 --- a/NPCs/Abyss/ColossalSquid.cs +++ b/NPCs/Abyss/ColossalSquid.cs @@ -19,6 +19,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class ColossalSquid : ModNPC { public bool hasBeenHit = false; diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 06341b7b05..dae263984c 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -26,6 +26,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { [LongDistanceNetSync] + [HeavyKnockbackWhitelisted] public class EidolonWyrmHead : ModNPC { private Vector2 patrolSpot = Vector2.Zero; diff --git a/NPCs/Abyss/GulperEelHead.cs b/NPCs/Abyss/GulperEelHead.cs index b3db09830a..24d56ebdb6 100644 --- a/NPCs/Abyss/GulperEelHead.cs +++ b/NPCs/Abyss/GulperEelHead.cs @@ -17,6 +17,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { [LongDistanceNetSync] + [HeavyKnockbackWhitelisted] public class GulperEelHead : ModNPC { private Vector2 patrolSpot = Vector2.Zero; diff --git a/NPCs/Abyss/MirageJelly.cs b/NPCs/Abyss/MirageJelly.cs index 13dcc29c85..963c4580e0 100644 --- a/NPCs/Abyss/MirageJelly.cs +++ b/NPCs/Abyss/MirageJelly.cs @@ -16,6 +16,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class MirageJelly : ModNPC { private bool teleporting = false; diff --git a/NPCs/Abyss/OarfishHead.cs b/NPCs/Abyss/OarfishHead.cs index fec514fc15..3a49ef77ef 100644 --- a/NPCs/Abyss/OarfishHead.cs +++ b/NPCs/Abyss/OarfishHead.cs @@ -16,6 +16,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { [LongDistanceNetSync] + [HeavyKnockbackWhitelisted] public class OarfishHead : ModNPC { private Vector2 patrolSpot = Vector2.Zero; diff --git a/NPCs/Abyss/ReaperShark.cs b/NPCs/Abyss/ReaperShark.cs index cce3312e48..ceee4b8ef8 100644 --- a/NPCs/Abyss/ReaperShark.cs +++ b/NPCs/Abyss/ReaperShark.cs @@ -20,6 +20,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class ReaperShark : ModNPC { public static Asset ManTexture; diff --git a/NPCs/Abyss/SlabCrab.cs b/NPCs/Abyss/SlabCrab.cs index 99d5a112fe..55b402b4df 100644 --- a/NPCs/Abyss/SlabCrab.cs +++ b/NPCs/Abyss/SlabCrab.cs @@ -18,6 +18,7 @@ using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.Abyss { + [HeavyKnockbackWhitelisted] public class SlabCrab : ModNPC { enum AIState diff --git a/NPCs/AcidRain/BloodwormFleeing.cs b/NPCs/AcidRain/BloodwormFleeing.cs index 8670ed3870..9da8ac1562 100644 --- a/NPCs/AcidRain/BloodwormFleeing.cs +++ b/NPCs/AcidRain/BloodwormFleeing.cs @@ -6,6 +6,7 @@ using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { + [HeavyKnockbackWhitelisted] public class BloodwormFleeing : ModNPC { public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.BloodwormNormal.DisplayName"); diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index ad723affaa..718537c5ee 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -10,6 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { + [HeavyKnockbackWhitelisted] public class BloodwormNormal : ModNPC { public override void SetStaticDefaults() diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index a91b3a9793..92368654ad 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -23,6 +23,7 @@ using Terraria.WorldBuilding; namespace CalamityMod.NPCs.AcidRain { [AutoloadBossHead] + [HeavyKnockbackWhitelisted] public class CragmawMire : ModNPC { public enum CragmawAttackState diff --git a/NPCs/AcidRain/FlakCrab.cs b/NPCs/AcidRain/FlakCrab.cs index a2f6a64262..cf6b88cc32 100644 --- a/NPCs/AcidRain/FlakCrab.cs +++ b/NPCs/AcidRain/FlakCrab.cs @@ -15,6 +15,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { + [HeavyKnockbackWhitelisted] public class FlakCrab : ModNPC { public Player Target => Main.player[NPC.target]; diff --git a/NPCs/AcidRain/GammaSlime.cs b/NPCs/AcidRain/GammaSlime.cs index c3bae2cc77..55f41a9b93 100644 --- a/NPCs/AcidRain/GammaSlime.cs +++ b/NPCs/AcidRain/GammaSlime.cs @@ -15,6 +15,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { + [HeavyKnockbackWhitelisted] public class GammaSlime : ModNPC { public float DustAngleMultiplier1; diff --git a/NPCs/AcidRain/Mauler.cs b/NPCs/AcidRain/Mauler.cs index 51ed39b3da..fb3fe345bf 100644 --- a/NPCs/AcidRain/Mauler.cs +++ b/NPCs/AcidRain/Mauler.cs @@ -21,6 +21,7 @@ using Terraria.WorldBuilding; namespace CalamityMod.NPCs.AcidRain { [AutoloadBossHead] + [HeavyKnockbackWhitelisted] public class Mauler : ModNPC { // TODO -- Potentially add another attack in higher difficulty modes at some point? diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index 7d6d04049f..a5bf709271 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -19,6 +19,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { [AutoloadBossHead] + [HeavyKnockbackWhitelisted] public class NuclearTerror : ModNPC { public enum SpecialAttackState diff --git a/NPCs/AcidRain/SulphurousSkater.cs b/NPCs/AcidRain/SulphurousSkater.cs index 51a9914263..e34dfe714d 100644 --- a/NPCs/AcidRain/SulphurousSkater.cs +++ b/NPCs/AcidRain/SulphurousSkater.cs @@ -18,6 +18,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { + [HeavyKnockbackWhitelisted] public class SulphurousSkater : ModNPC { public bool Flying = false; diff --git a/NPCs/Astral/AstralachneaWall.cs b/NPCs/Astral/AstralachneaWall.cs index 9f9a0c9703..60823673ec 100644 --- a/NPCs/Astral/AstralachneaWall.cs +++ b/NPCs/Astral/AstralachneaWall.cs @@ -19,6 +19,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.Astral { + [HeavyKnockbackWhitelisted] public class AstralachneaWall : ModNPC { public static Asset glowmask; diff --git a/NPCs/Astral/SightseerSpitter.cs b/NPCs/Astral/SightseerSpitter.cs index d3c9e0f44a..acb2a97565 100644 --- a/NPCs/Astral/SightseerSpitter.cs +++ b/NPCs/Astral/SightseerSpitter.cs @@ -16,6 +16,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.Astral { + [HeavyKnockbackWhitelisted] public class SightseerSpitter : ModNPC { public static Asset glowmask; diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 9d20520ac4..5b3052c3ce 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -18,6 +18,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AstrumAureus { + [HeavyKnockbackWhitelisted] public class AureusSpawn : ModNPC { public static Asset GlowTexture; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 163b7a2a5b..c5c3f455b8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3182,7 +3182,7 @@ namespace CalamityMod.NPCs SoundEngine.PlaySound(fullPower with { Volume = 0.7f, Pitch = 0.7f }, npc.Center); warbannerBurnStacks++; } - if (warbannerBurnIntensity > 2.5f && npc.CanBeMoved(true)) + if (warbannerBurnIntensity > 2.5f && npc.CanBeMoved()) { npc.velocity *= 1f - 0.25f * Utils.GetLerpValue(2.5f, 3, warbannerBurnIntensity); if (npc.velocity.Length() > 5 && warbannerBurnIntensity > 2.85f) // Repel leaping enemies @@ -3358,7 +3358,7 @@ namespace CalamityMod.NPCs pearlAuraOwner = -1; } - if (demonSwordImpales > 0 && npc.CanBeMoved(true)) + if (demonSwordImpales > 0 && npc.CanBeMoved()) { npc.velocity *= Utils.Remap(demonSwordImpales, 1, 5, 0.95f, 0.3f, true); if (impalePacketTimer > 30) // There's probably a better solution, but this is the best for now diff --git a/NPCs/CalamityHeavyKnockbackWhitelist.cs b/NPCs/CalamityHeavyKnockbackWhitelist.cs new file mode 100644 index 0000000000..00140543d2 --- /dev/null +++ b/NPCs/CalamityHeavyKnockbackWhitelist.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using CalamityMod.Balancing; +using CalamityMod.Items.Accessories; +using CalamityMod.Systems.Collections; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.NPCs +{ + public sealed class CalamityHeavyKnockbackWhitelist : GlobalNPC + { + // General rule of thumb I used for this is to not put it on anything that is a stationary entity (EX: Tesla Turrets, Antlions, Hive Cysts) + // No putting it on any bosses, though boss minions are fair game when applicable (no stuff like Scal hearts obviously, sending them into the void would be bad) + internal static HashSet whitelistNPC; + public override void Load() + { + whitelistNPC = new(); + } + public override void Unload() + { + whitelistNPC?.Clear(); + whitelistNPC = null; + } + public override void SetStaticDefaults() + { + // Add vanilla enemies to the whitelist + whitelistNPC.Add(NPCID.AncientCultistSquidhead); + whitelistNPC.Add(NPCID.DesertDjinn); + whitelistNPC.Add(NPCID.DD2DrakinT2); + whitelistNPC.Add(NPCID.DD2DrakinT3); + whitelistNPC.Add(NPCID.DungeonGuardian); + whitelistNPC.Add(NPCID.GrayGrunt); + whitelistNPC.Add(NPCID.HeadlessHorseman); + whitelistNPC.Add(NPCID.LihzahrdCrawler); + whitelistNPC.Add(NPCID.MartianProbe); + whitelistNPC.Add(NPCID.MartianWalker); + whitelistNPC.Add(NPCID.Paladin); + whitelistNPC.Add(NPCID.PirateCaptain); + whitelistNPC.Add(NPCID.ShadowFlameApparition); + whitelistNPC.Add(NPCID.ThePossessed); + whitelistNPC.Add(NPCID.EyeballFlyingFish); + whitelistNPC.Add(NPCID.Yeti); + whitelistNPC.Add(NPCID.ZombieMerman); + whitelistNPC.Add(NPCID.FungiBulb); + whitelistNPC.Add(NPCID.GiantFungiBulb); + whitelistNPC.Add(NPCID.ManEater); + whitelistNPC.Add(NPCID.Snatcher); + whitelistNPC.Add(NPCID.BloodEelHead); + whitelistNPC.Add(NPCID.BoneSerpentHead); + whitelistNPC.Add(NPCID.DevourerHead); + whitelistNPC.Add(NPCID.DiggerHead); + whitelistNPC.Add(NPCID.DuneSplicerHead); + whitelistNPC.Add(NPCID.GiantWormHead); + whitelistNPC.Add(NPCID.LeechHead); + whitelistNPC.Add(NPCID.StardustWormHead); + whitelistNPC.Add(NPCID.CultistDragonHead); + whitelistNPC.Add(NPCID.AncientCultistSquidhead); + whitelistNPC.Add(NPCID.TombCrawlerHead); + whitelistNPC.Add(NPCID.TruffleWormDigger); + whitelistNPC.Add(NPCID.SeekerHead); + whitelistNPC.Add(NPCID.WyvernHead); + whitelistNPC.Add(NPCID.Creeper); // Here because they gain KB immunity in multiplayer + whitelistNPC.Add(NPCID.TheHungry); // Here because they gain KB immunity in multiplayer + whitelistNPC.Add(NPCID.TheHungryII); // Here because they gain KB immunity in multiplayer + whitelistNPC.Add(NPCID.DD2DarkMageT1); + whitelistNPC.Add(NPCID.DD2DarkMageT3); + whitelistNPC.Add(NPCID.DD2OgreT2); + whitelistNPC.Add(NPCID.DD2OgreT3); + whitelistNPC.Add(NPCID.MourningWood); + whitelistNPC.Add(NPCID.Pumpking); + whitelistNPC.Add(NPCID.Everscream); + whitelistNPC.Add(NPCID.SantaNK1); + whitelistNPC.Add(NPCID.IceQueen); + whitelistNPC.Add(NPCID.MartianSaucerCore); + whitelistNPC.Add(NPCID.Sharkron); + whitelistNPC.Add(NPCID.Sharkron2); + // Below are enemies Calamity gives KB immunity, but that aren't KB immune in vanilla + whitelistNPC.Add(NPCID.Mothron); + whitelistNPC.Add(NPCID.BigMimicCorruption); + whitelistNPC.Add(NPCID.BigMimicCrimson); + whitelistNPC.Add(NPCID.BigMimicHallow); + whitelistNPC.Add(NPCID.BigMimicJungle); + whitelistNPC.Add(NPCID.SolarCorite); + whitelistNPC.Add(NPCID.CrimsonAxe); + whitelistNPC.Add(NPCID.CursedHammer); + whitelistNPC.Add(NPCID.EnchantedSword); + whitelistNPC.Add(NPCID.GiantTortoise); + whitelistNPC.Add(NPCID.IceTortoise); + whitelistNPC.Add(NPCID.GoblinSummoner); + whitelistNPC.Add(NPCID.Butcher); + + var npcs = GetContent(); + foreach (var npc in npcs) + { + try + { + var type = npc.GetType(); + var whitelisted = type.GetCustomAttribute(); + if (whitelisted != null) + { + int npcType = npc.Type; + whitelistNPC.Add(npcType); + } + } + catch (Exception e) + { + CalamityMod.Log.Error($"Exception thrown while evaluating type \"{npc.FullName}\": {e}"); + } + } + } + } +} diff --git a/NPCs/Crags/HeatSpirit.cs b/NPCs/Crags/HeatSpirit.cs index cfc7c0469f..6b1b8c374d 100644 --- a/NPCs/Crags/HeatSpirit.cs +++ b/NPCs/Crags/HeatSpirit.cs @@ -12,6 +12,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.Crags { + [HeavyKnockbackWhitelisted] public class HeatSpirit : ModNPC { public override void SetStaticDefaults() diff --git a/NPCs/DraedonLabThings/Androomba.cs b/NPCs/DraedonLabThings/Androomba.cs index fc60264b5f..09230077a7 100644 --- a/NPCs/DraedonLabThings/Androomba.cs +++ b/NPCs/DraedonLabThings/Androomba.cs @@ -13,6 +13,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.DraedonLabThings { + [HeavyKnockbackWhitelisted] public class Androomba : ModNPC { diff --git a/NPCs/DraedonLabThings/RepairUnitCritter.cs b/NPCs/DraedonLabThings/RepairUnitCritter.cs index 4aebb02ae2..a3c7bcb9c1 100644 --- a/NPCs/DraedonLabThings/RepairUnitCritter.cs +++ b/NPCs/DraedonLabThings/RepairUnitCritter.cs @@ -15,6 +15,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.DraedonLabThings { + [HeavyKnockbackWhitelisted] public class RepairUnitCritter : ModNPC { public enum BehaviorState diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index 42af41cb27..42d7441b6c 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -20,6 +20,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.GreatSandShark { [AutoloadBossHead] + [HeavyKnockbackWhitelisted] public class GreatSandShark : ModNPC { private bool resetAI = false; diff --git a/NPCs/HeavyKnockbackWhitelistedAttribute.cs b/NPCs/HeavyKnockbackWhitelistedAttribute.cs new file mode 100644 index 0000000000..0bc40aa705 --- /dev/null +++ b/NPCs/HeavyKnockbackWhitelistedAttribute.cs @@ -0,0 +1,13 @@ +using System; + +namespace CalamityMod.NPCs +{ + /// + /// This attribute puts an NPC into the heavy knockback whitelist + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public sealed class HeavyKnockbackWhitelistedAttribute : Attribute + { + + } +} diff --git a/NPCs/NormalNPCs/AuroraSpirit.cs b/NPCs/NormalNPCs/AuroraSpirit.cs index 95e4beec0b..d013f9f032 100644 --- a/NPCs/NormalNPCs/AuroraSpirit.cs +++ b/NPCs/NormalNPCs/AuroraSpirit.cs @@ -9,6 +9,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { + [HeavyKnockbackWhitelisted] public class AuroraSpirit : ModNPC { public override void SetStaticDefaults() diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index c4fa0d8395..07040968de 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -8,6 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.NormalNPCs { + [HeavyKnockbackWhitelisted] public class PlanterasFreeTentacle : ModNPC { public override string Texture => $"Terraria/Images/NPC_{NPCID.PlanterasTentacle}"; diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 2891aa5e74..dffd4e8a18 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -12,6 +12,7 @@ using Terraria.ModLoader; using Terraria.ModLoader.Utilities; namespace CalamityMod.NPCs.NormalNPCs { + [HeavyKnockbackWhitelisted] public class ScornEater : ModNPC { diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index dc51b1a0f1..4592d3b4b4 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -15,6 +15,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.OldDuke { + [HeavyKnockbackWhitelisted] public class SulphurousSharkron : ModNPC { public override void SetStaticDefaults() diff --git a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs index 8cd56e8f01..e9c9606af2 100644 --- a/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs +++ b/NPCs/PlaguebringerGoliath/PlagueHomingMissile.cs @@ -14,6 +14,7 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.PlaguebringerGoliath { + [HeavyKnockbackWhitelisted] public class PlagueHomingMissile : ModNPC { public static Asset GlowTexture; diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index 33d6c79feb..4bcda5bc2f 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -12,6 +12,7 @@ using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.NPCs.Signus { + [HeavyKnockbackWhitelisted] public class CosmicLantern : ModNPC { public static Asset GlowTexture; diff --git a/Projectiles/DraedonsArsenal/AugerPull.cs b/Projectiles/DraedonsArsenal/AugerPull.cs index ce365ce951..4abb72e134 100644 --- a/Projectiles/DraedonsArsenal/AugerPull.cs +++ b/Projectiles/DraedonsArsenal/AugerPull.cs @@ -47,7 +47,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target != null && target.CanBeMoved(true) && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < 650) + if (target != null && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < 650) { Vector2 moveDir = target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX); target.velocity = moveDir; @@ -67,7 +67,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target != null && target.CanBeMoved(true) && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1)) + if (target != null && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1)) { if (Vector2.Distance(target.Center, Projectile.Center) > 15 && Vector2.Distance(target.Center, Projectile.Center) < 300) { diff --git a/Projectiles/DraedonsArsenal/AugerSlash.cs b/Projectiles/DraedonsArsenal/AugerSlash.cs index ac72757579..dfe7bc00b1 100644 --- a/Projectiles/DraedonsArsenal/AugerSlash.cs +++ b/Projectiles/DraedonsArsenal/AugerSlash.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = (Projectile.ai[2] == 5 ? 35 : 14); - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); if (Projectile.ai[2] == 5) modifiers.SetCrit(); diff --git a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs index 295d12422c..07263d5cca 100644 --- a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs +++ b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal { Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 25; - targeted.MoveNPC(launchVel, launchPower, true); + targeted.MoveNPC(launchVel, launchPower, true, Owner); } time++; } @@ -64,7 +64,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 40; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/DraedonsArsenal/NidhoggExplosion.cs b/Projectiles/DraedonsArsenal/NidhoggExplosion.cs index 428ab220d0..dcbec391c1 100644 --- a/Projectiles/DraedonsArsenal/NidhoggExplosion.cs +++ b/Projectiles/DraedonsArsenal/NidhoggExplosion.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target != null && target.CanBeMoved(true)) + if (target != null && target.CanBeMoved()) { if (Vector2.Distance(target.Center, Projectile.Center) > 15 && Vector2.Distance(target.Center, Projectile.Center) < 500) { diff --git a/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs b/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs index a05b781b79..7d14fdce6e 100644 --- a/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs +++ b/Projectiles/DraedonsArsenal/NidhoggRailgunBigShot.cs @@ -88,7 +88,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 20; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override void OnKill(int timeLeft) diff --git a/Projectiles/DraedonsArsenal/NidhoggRailgunBlast.cs b/Projectiles/DraedonsArsenal/NidhoggRailgunBlast.cs index ba71ef2c53..bcb44deb3c 100644 --- a/Projectiles/DraedonsArsenal/NidhoggRailgunBlast.cs +++ b/Projectiles/DraedonsArsenal/NidhoggRailgunBlast.cs @@ -52,6 +52,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Player Owner = Main.player[Projectile.owner]; Particle spark = new GlowSparkParticle(Projectile.Center, Projectile.velocity, false, 8, MathHelper.Clamp(0.06f - Projectile.numHits * 0.01f, 0f, 0.06f), Effects.ArsenalEffects.ArsenalGaussColor * 0.9f, new Vector2(1f, 0.5f), true, true, 0.9f); GeneralParticleHandler.SpawnParticle(spark); @@ -74,7 +75,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 6; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override void OnKill(int timeLeft) diff --git a/Projectiles/DraedonsArsenal/PhalanxSurgeLance.cs b/Projectiles/DraedonsArsenal/PhalanxSurgeLance.cs index 8fcacbe4d0..6e597a6e2b 100644 --- a/Projectiles/DraedonsArsenal/PhalanxSurgeLance.cs +++ b/Projectiles/DraedonsArsenal/PhalanxSurgeLance.cs @@ -73,7 +73,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Player Owner = Main.player[Projectile.owner]; float distMult = Utils.GetLerpValue(400, 10, Utils.Distance(target.Center, Projectile.Center), true); Vector2 launchVel = startVel; - target.MoveNPC(launchVel, 10 + 35 * distMult, true); + target.MoveNPC(launchVel, 10 + 35 * distMult, true, Owner); if (Projectile.numHits == 0) { diff --git a/Projectiles/DraedonsArsenal/ShortCircuitExplosion.cs b/Projectiles/DraedonsArsenal/ShortCircuitExplosion.cs index e931f7966f..f9740376b1 100644 --- a/Projectiles/DraedonsArsenal/ShortCircuitExplosion.cs +++ b/Projectiles/DraedonsArsenal/ShortCircuitExplosion.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Projectiles.Ranged Player Owner = Main.player[Projectile.owner]; Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); - target.MoveNPC(launchVel, 12, true); + target.MoveNPC(launchVel, 12, true, Owner); } public override void AI() diff --git a/Projectiles/DraedonsArsenal/ShortCircuitShot.cs b/Projectiles/DraedonsArsenal/ShortCircuitShot.cs index 95c1b5dc0d..ac88bcf212 100644 --- a/Projectiles/DraedonsArsenal/ShortCircuitShot.cs +++ b/Projectiles/DraedonsArsenal/ShortCircuitShot.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal target.AddBuff(ModContent.BuffType(), 40); Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); - target.MoveNPC(launchVel, 8, false); + target.MoveNPC(launchVel, 8, false, Owner); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/DraedonsArsenal/VulcanProjectile.cs b/Projectiles/DraedonsArsenal/VulcanProjectile.cs index 8f805e1a94..915998cce8 100644 --- a/Projectiles/DraedonsArsenal/VulcanProjectile.cs +++ b/Projectiles/DraedonsArsenal/VulcanProjectile.cs @@ -60,11 +60,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Player Owner = Main.player[Projectile.owner]; impactDust(); Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 4; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override void OnKill(int timeLeft) diff --git a/Projectiles/DraedonsArsenal/VulcanSpear.cs b/Projectiles/DraedonsArsenal/VulcanSpear.cs index 55707121f9..c921a059c7 100644 --- a/Projectiles/DraedonsArsenal/VulcanSpear.cs +++ b/Projectiles/DraedonsArsenal/VulcanSpear.cs @@ -128,11 +128,12 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Player Owner = Main.player[Projectile.owner]; impactDust(); Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); float launchPower = 12; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Magic/FireImplosion.cs b/Projectiles/Magic/FireImplosion.cs index b053d51ba6..aedb225937 100644 --- a/Projectiles/Magic/FireImplosion.cs +++ b/Projectiles/Magic/FireImplosion.cs @@ -98,6 +98,7 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Player Owner = Main.player[Projectile.owner]; if (frigidFlash) { target.AddBuff(BuffID.OnFire3, 30); @@ -112,7 +113,7 @@ namespace CalamityMod.Projectiles.Magic modifiers.SourceDamage *= damageMult * (frigidFlash ? 0.5f : 1); // Frigidflash explosion are spawned at full power, so their damage is reduced here // The vortex sucks in enemies - target.MoveNPC(-pushVelocity, customKnockback, frigidFlash); + target.MoveNPC(-pushVelocity, customKnockback, frigidFlash, Owner); } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Magic/PhantasmalFuryProj.cs b/Projectiles/Magic/PhantasmalFuryProj.cs index ac35739eca..9c79b761b0 100644 --- a/Projectiles/Magic/PhantasmalFuryProj.cs +++ b/Projectiles/Magic/PhantasmalFuryProj.cs @@ -105,7 +105,7 @@ namespace CalamityMod.Projectiles.Magic Player Owner = Main.player[Projectile.owner]; Vector2 launchVel = (Owner.Center - target.Center).SafeNormalize(Vector2.UnitY) * -10 * (launched ? 0.5f : 1); - target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true); + target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true, Owner); } public override bool? CanHitNPC(NPC target) { diff --git a/Projectiles/Magic/Phantom.cs b/Projectiles/Magic/Phantom.cs index eb3af39916..1b12a7f910 100644 --- a/Projectiles/Magic/Phantom.cs +++ b/Projectiles/Magic/Phantom.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Magic Player Owner = Main.player[Projectile.owner]; Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); - target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true); + target.MoveNPC(launchVel, 10 * (launched ? 0.5f : 1), true, Owner); } public override bool? CanHitNPC(NPC target) diff --git a/Projectiles/Magic/PrimordialAncientExplosion.cs b/Projectiles/Magic/PrimordialAncientExplosion.cs index f5783774a8..371b6cb0a1 100644 --- a/Projectiles/Magic/PrimordialAncientExplosion.cs +++ b/Projectiles/Magic/PrimordialAncientExplosion.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 40, true); + target.MoveNPC(launchVel, 40, true, Owner); if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.95f); diff --git a/Projectiles/Magic/PrimordialEarthExplosion.cs b/Projectiles/Magic/PrimordialEarthExplosion.cs index d35a7323a5..95ffc29e30 100644 --- a/Projectiles/Magic/PrimordialEarthExplosion.cs +++ b/Projectiles/Magic/PrimordialEarthExplosion.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Magic public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 20, true); + target.MoveNPC(launchVel, 20, true, Owner); if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.9f); diff --git a/Projectiles/Magic/SHPB.cs b/Projectiles/Magic/SHPB.cs index 0183bcdc66..9f2231225d 100644 --- a/Projectiles/Magic/SHPB.cs +++ b/Projectiles/Magic/SHPB.cs @@ -266,11 +266,11 @@ namespace CalamityMod.Projectiles.Magic } // Might launches enemies - if (GetSoulEffects((int)Projectile.ai[0]) == SoulType.Might && target.CanBeMoved(false)) + if (GetSoulEffects((int)Projectile.ai[0]) == SoulType.Might && target.CanBeMoved()) { // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 launchVel = Utils.DirectionTo(owner.Center, owner.Calamity().mouseWorld) - Vector2.UnitY * 5f; - target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false); + target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false, owner); } } diff --git a/Projectiles/Magic/SHPExplosion.cs b/Projectiles/Magic/SHPExplosion.cs index 4b0bda748a..04fec18c74 100644 --- a/Projectiles/Magic/SHPExplosion.cs +++ b/Projectiles/Magic/SHPExplosion.cs @@ -75,13 +75,13 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { // Might launches enemies - if (SHPB.GetSoulEffects((int)Projectile.ai[0]) == SHPB.SoulType.Might && target.CanBeMoved(false)) + if (SHPB.GetSoulEffects((int)Projectile.ai[0]) == SHPB.SoulType.Might && target.CanBeMoved()) { // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Player owner = Main.player[Projectile.owner]; Vector2 launchVel = Utils.DirectionTo(owner.Center, owner.Calamity().mouseWorld) - Vector2.UnitY * 5f; - target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false); + target.MoveNPC(launchVel, SHPC.MightKnockbackStrength, false, owner); } } diff --git a/Projectiles/Melee/BasherHoldout.cs b/Projectiles/Melee/BasherHoldout.cs index 7f8ad74901..3428fbe1dc 100644 --- a/Projectiles/Melee/BasherHoldout.cs +++ b/Projectiles/Melee/BasherHoldout.cs @@ -239,7 +239,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(ModContent.BuffType(), 300); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 14f, true); + target.MoveNPC(launchVel, 14f, true, Owner); for (int i = 0; i < MathHelper.Clamp(15 - Projectile.numHits * 3, 2, 15); i++) { diff --git a/Projectiles/Melee/CometQuasherHoldout.cs b/Projectiles/Melee/CometQuasherHoldout.cs index fb612dd221..08ff873084 100644 --- a/Projectiles/Melee/CometQuasherHoldout.cs +++ b/Projectiles/Melee/CometQuasherHoldout.cs @@ -205,7 +205,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.7f }, Projectile.Center); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 7, true); + target.MoveNPC(launchVel, 7, true, Owner); for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++) { diff --git a/Projectiles/Melee/DevilsDevastationHoldout.cs b/Projectiles/Melee/DevilsDevastationHoldout.cs index 501bccd737..093afc45b2 100644 --- a/Projectiles/Melee/DevilsDevastationHoldout.cs +++ b/Projectiles/Melee/DevilsDevastationHoldout.cs @@ -392,7 +392,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - CalamityUtils.MoveNPC(target, launchVel, 40, true); + CalamityUtils.MoveNPC(target, launchVel, 40, true, Owner); if (target.Calamity().demonSwordImpales != 0 || Projectile.numHits == 0) { diff --git a/Projectiles/Melee/DragoonBigBolt.cs b/Projectiles/Melee/DragoonBigBolt.cs index 828cbe7972..baf5c2aef5 100644 --- a/Projectiles/Melee/DragoonBigBolt.cs +++ b/Projectiles/Melee/DragoonBigBolt.cs @@ -127,7 +127,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 20, true); + target.MoveNPC(launchVel, 20, true, Owner); } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/EarthHoldout.cs b/Projectiles/Melee/EarthHoldout.cs index 2a230edb90..c51b91ec44 100644 --- a/Projectiles/Melee/EarthHoldout.cs +++ b/Projectiles/Melee/EarthHoldout.cs @@ -261,7 +261,7 @@ namespace CalamityMod.Projectiles.Melee armoredHits++; Vector2 launchVel = (Projectile.ai[1] != 1 ? Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) : Utils.DirectionTo(Owner.Center, target.Center)); - target.MoveNPC(launchVel, 37, true); + target.MoveNPC(launchVel, 37, true, Owner); if (spawnBoom) { diff --git a/Projectiles/Melee/ExaltedOathbladeHoldout.cs b/Projectiles/Melee/ExaltedOathbladeHoldout.cs index c4db13d8e4..279b825edd 100644 --- a/Projectiles/Melee/ExaltedOathbladeHoldout.cs +++ b/Projectiles/Melee/ExaltedOathbladeHoldout.cs @@ -251,7 +251,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - CalamityUtils.MoveNPC(target, launchVel, 23, true); + CalamityUtils.MoveNPC(target, launchVel, 23, true, Owner); int dustNum = (int)MathHelper.Clamp(12 - Projectile.numHits * 3, 3, 12); for (int i = 0; i < dustNum; i++) diff --git a/Projectiles/Melee/ForbiddenOathbladeHoldout.cs b/Projectiles/Melee/ForbiddenOathbladeHoldout.cs index b4088066bc..ba2800c800 100644 --- a/Projectiles/Melee/ForbiddenOathbladeHoldout.cs +++ b/Projectiles/Melee/ForbiddenOathbladeHoldout.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Cooldowns; @@ -307,7 +307,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - CalamityUtils.MoveNPC(target, launchVel, 17, true); + CalamityUtils.MoveNPC(target, launchVel, 17, true, Owner); int dustNum = (int)MathHelper.Clamp(12 - Projectile.numHits * 3, 3, 12); for (int i = 0; i < dustNum; i++) diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index ea8acf382e..630fa6b82b 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.Melee // Regular knockback float launchPower = 60; - target.MoveNPC(toMouse, launchPower * (canBeLaunched ? 0.5f : 0.25f), true); + target.MoveNPC(toMouse, launchPower * (canBeLaunched ? 0.5f : 0.25f), true, Owner); if (canBeLaunched) // launches/executes enemies { if (jared) diff --git a/Projectiles/Melee/GrandGuardianHoldout.cs b/Projectiles/Melee/GrandGuardianHoldout.cs index 51978ae71d..6ab245f9cd 100644 --- a/Projectiles/Melee/GrandGuardianHoldout.cs +++ b/Projectiles/Melee/GrandGuardianHoldout.cs @@ -194,7 +194,7 @@ namespace CalamityMod.Projectiles.Melee armoredHits++; Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 8, true); + target.MoveNPC(launchVel, 8, true, Owner); if (spawnBoom) { diff --git a/Projectiles/Melee/HellkiteHoldout.cs b/Projectiles/Melee/HellkiteHoldout.cs index 07c121065c..f2595cf48f 100644 --- a/Projectiles/Melee/HellkiteHoldout.cs +++ b/Projectiles/Melee/HellkiteHoldout.cs @@ -390,7 +390,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, (chargedSwing ? 24 : 19), true); + target.MoveNPC(launchVel, (chargedSwing ? 24 : 19), true, Owner); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 923f3e19c5..959a2e1553 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -438,7 +438,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, (chargedSwing ? 35 : 23), true); + target.MoveNPC(launchVel, (chargedSwing ? 35 : 23), true, Owner); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { diff --git a/Projectiles/Melee/MajesticGuardHoldout.cs b/Projectiles/Melee/MajesticGuardHoldout.cs index ddb54e5253..b10a3a2a49 100644 --- a/Projectiles/Melee/MajesticGuardHoldout.cs +++ b/Projectiles/Melee/MajesticGuardHoldout.cs @@ -197,7 +197,7 @@ namespace CalamityMod.Projectiles.Melee } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 15, true); + target.MoveNPC(launchVel, 15, true, Owner); for (int i = 0; i < MathHelper.Clamp(6 - Projectile.numHits * 2, 2, 6); i++) { diff --git a/Projectiles/Melee/OldLordClaymoreHoldout.cs b/Projectiles/Melee/OldLordClaymoreHoldout.cs index 66ed0e1215..cf3264b909 100644 --- a/Projectiles/Melee/OldLordClaymoreHoldout.cs +++ b/Projectiles/Melee/OldLordClaymoreHoldout.cs @@ -190,7 +190,7 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(BuffID.OnFire3, 180); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - CalamityUtils.MoveNPC(target, launchVel, 12, true); + CalamityUtils.MoveNPC(target, launchVel, 12, true, Owner); int dustNum = (int)MathHelper.Clamp(12 - Projectile.numHits * 3, 3, 12); for (int i = 0; i < dustNum; i++) diff --git a/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs b/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs index ae618ec5b3..0c3d240adb 100644 --- a/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs +++ b/Projectiles/Melee/Shortswords/GalileoGladiusThrown.cs @@ -219,7 +219,7 @@ namespace CalamityMod.Projectiles.Melee.Shortswords Particle boostRing = new CustomSpark(position, velocity, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, lifetime, scale, color, stretch, shrinkSpeed: shrink); GeneralParticleHandler.SpawnParticle(boostRing); - if (stabbedNPC.CanBeMoved(true)) + if (stabbedNPC.CanBeMoved()) { stabbedNPC.velocity = -Owner.velocity; } diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index 946245b17b..686133e319 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -298,7 +298,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(fire2 with { Volume = 0.65f, Pitch = 0.4f }, Projectile.Center); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 23, true); + target.MoveNPC(launchVel, 23, true, Owner); target.AddBuff(BuffID.Electrified, 230); } diff --git a/Projectiles/Melee/StellarStrikerHoldout.cs b/Projectiles/Melee/StellarStrikerHoldout.cs index 5dfff076cc..d06ba14221 100644 --- a/Projectiles/Melee/StellarStrikerHoldout.cs +++ b/Projectiles/Melee/StellarStrikerHoldout.cs @@ -202,7 +202,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(fire2 with { Volume = 0.55f, Pitch = 0.6f }, Projectile.Center); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 17, true); + target.MoveNPC(launchVel, 17, true, Owner); for (int i = 0; i < MathHelper.Clamp(10 - Projectile.numHits * 2, 2, 10); i++) { diff --git a/Projectiles/Ranged/FlashRoundFlash.cs b/Projectiles/Ranged/FlashRoundFlash.cs index 292698a737..6fb1571f0f 100644 --- a/Projectiles/Ranged/FlashRoundFlash.cs +++ b/Projectiles/Ranged/FlashRoundFlash.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Ranged { Player Owner = Main.player[Projectile.owner]; Vector2 launchVel = Utils.DirectionTo(Owner.Center, Projectile.Center); - target.MoveNPC(launchVel, 5, false); + target.MoveNPC(launchVel, 5, false, Owner); Vector2 dustVel = Utils.DirectionTo(Projectile.Center, target.Center); for (int i = 0; i < 3; i++) diff --git a/Projectiles/Ranged/HellbornProj.cs b/Projectiles/Ranged/HellbornProj.cs index 90705bfdf2..e53c485122 100644 --- a/Projectiles/Ranged/HellbornProj.cs +++ b/Projectiles/Ranged/HellbornProj.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Ranged // Launch Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 6, true); + target.MoveNPC(launchVel, 6, true, Owner); MakeBlast(target.whoAmI, true); } diff --git a/Projectiles/Ranged/NullFlash.cs b/Projectiles/Ranged/NullFlash.cs index 3654040cf2..3f728b5c57 100644 --- a/Projectiles/Ranged/NullFlash.cs +++ b/Projectiles/Ranged/NullFlash.cs @@ -66,7 +66,7 @@ namespace CalamityMod.Projectiles.Ranged } Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 20, true); + target.MoveNPC(launchVel, 20, true, Owner); } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs index 8877b11310..58d4c289ed 100644 --- a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs +++ b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 launchVel = Projectile.Center.DirectionTo(target.Center); float launchPower = 20; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 450, targetHitbox); } diff --git a/Projectiles/Ranged/OntologicalDespoilerBeam.cs b/Projectiles/Ranged/OntologicalDespoilerBeam.cs index 7281333710..9e8d5a9584 100644 --- a/Projectiles/Ranged/OntologicalDespoilerBeam.cs +++ b/Projectiles/Ranged/OntologicalDespoilerBeam.cs @@ -134,7 +134,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 launchVel = Projectile.velocity; float launchPower = 60; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool? CanDamage() => Projectile.numHits < 1 ? null : false; public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs index ebdf68342e..7f049480b7 100644 --- a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs +++ b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs @@ -343,7 +343,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 launchDir = Utils.DirectionTo(Projectile.Center, target.Center); float launchPower = ((hasReachedFullCharge ? 9 : 0) + charge * 1.5f) * finalHitMult; - target.MoveNPC(launchDir, launchPower, true); + target.MoveNPC(launchDir, launchPower, true, Owner); float extraPitch = (Owner.Calamity().rogueStealthMax > 0 ? (0.25f * (Owner.Calamity().rogueStealth / Owner.Calamity().rogueStealthMax)) : 0); diff --git a/Projectiles/Rogue/ExorcismShockwave.cs b/Projectiles/Rogue/ExorcismShockwave.cs index 25e1abd09a..6257692b1c 100644 --- a/Projectiles/Rogue/ExorcismShockwave.cs +++ b/Projectiles/Rogue/ExorcismShockwave.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Rogue } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Player Owner = Main.player[Projectile.owner]; float minMult = 0.35f; int hitsToMinMult = 15; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); @@ -32,7 +33,7 @@ namespace CalamityMod.Projectiles.Rogue Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center) - Vector2.UnitY; float launchPower = (Projectile.Calamity().stealthStrike ? 4f : 1) * 10; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { diff --git a/Projectiles/Rogue/LeviathanToothStealth.cs b/Projectiles/Rogue/LeviathanToothStealth.cs index 24fdafda21..90da6945bf 100644 --- a/Projectiles/Rogue/LeviathanToothStealth.cs +++ b/Projectiles/Rogue/LeviathanToothStealth.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Rogue if (hitTimer == 0) hitTimer = Projectile.localNPCHitCooldown; - if (target.CanBeMoved(true)) + if (target.CanBeMoved()) target.velocity *= 0.05f; } public override bool? CanDamage() => canDamage ? null : false; diff --git a/Projectiles/Rogue/PumpkaboomBig.cs b/Projectiles/Rogue/PumpkaboomBig.cs index 7439fa10fd..310ecffa27 100644 --- a/Projectiles/Rogue/PumpkaboomBig.cs +++ b/Projectiles/Rogue/PumpkaboomBig.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target != null && target.active && target.CanBeMoved(true) && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < maxPullDistance) + if (target != null && target.active && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < maxPullDistance) { if (target.whoAmI == stuckNPC) continue; diff --git a/Projectiles/Rogue/SupernovaBoom.cs b/Projectiles/Rogue/SupernovaBoom.cs index 9d920c69f4..72676d8d23 100644 --- a/Projectiles/Rogue/SupernovaBoom.cs +++ b/Projectiles/Rogue/SupernovaBoom.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target.CanBeMoved(true) && target.CanBeChasedBy(Projectile, false)) + if (target.CanBeMoved() && target.CanBeChasedBy(Projectile, false)) { if (Vector2.Distance(target.Center, Projectile.Center) > 40 && Vector2.Distance(target.Center, Projectile.Center) < 600) { @@ -212,7 +212,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 30, true); + target.MoveNPC(launchVel, 30, true, Owner); target.AddBuff(ModContent.BuffType(), 90); } diff --git a/Projectiles/Rogue/SupernovaStealthBoom.cs b/Projectiles/Rogue/SupernovaStealthBoom.cs index 21f394d99a..291086f2d7 100644 --- a/Projectiles/Rogue/SupernovaStealthBoom.cs +++ b/Projectiles/Rogue/SupernovaStealthBoom.cs @@ -221,7 +221,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target.CanBeMoved(true) && target.CanBeChasedBy(Projectile, false)) + if (target.CanBeMoved() && target.CanBeChasedBy(Projectile, false)) { if (target != null && !CalamityPlayer.areThereAnyDamnBosses) { @@ -284,7 +284,7 @@ namespace CalamityMod.Projectiles.Rogue } Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 60, true); + target.MoveNPC(launchVel, 60, true, Owner); } } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) // Add to regular plz diff --git a/Projectiles/Rogue/WhitewaterAura.cs b/Projectiles/Rogue/WhitewaterAura.cs index 466840dfc2..a1a3c6b70c 100644 --- a/Projectiles/Rogue/WhitewaterAura.cs +++ b/Projectiles/Rogue/WhitewaterAura.cs @@ -65,11 +65,12 @@ namespace CalamityMod.Projectiles.Rogue } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + Player Owner = Main.player[Projectile.owner]; target.AddBuff(BuffID.Wet, 300); target.AddBuff(ModContent.BuffType(), 300); Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); - target.MoveNPC(launchVel, 9, true); + target.MoveNPC(launchVel, 9, true, Owner); } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Summon/BrittleStarMinion.cs b/Projectiles/Summon/BrittleStarMinion.cs index 59a7afc0be..5344a200dc 100644 --- a/Projectiles/Summon/BrittleStarMinion.cs +++ b/Projectiles/Summon/BrittleStarMinion.cs @@ -215,7 +215,7 @@ namespace CalamityMod.Projectiles.Summon modifiers.SourceDamage *= damageMult; Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center); - target.MoveNPC(launchVel, (MinionBuffMode ? 5f : 0.5f), false); + target.MoveNPC(launchVel, (MinionBuffMode ? 5f : 0.5f), false, Owner); } public override bool MinionContactDamage() => !Reforming; } diff --git a/Projectiles/Typeless/BasicBurst.cs b/Projectiles/Typeless/BasicBurst.cs index df59243a41..10feff399b 100644 --- a/Projectiles/Typeless/BasicBurst.cs +++ b/Projectiles/Typeless/BasicBurst.cs @@ -64,16 +64,14 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff((int)(Projectile.localAI[2]), (int)(Projectile.localAI[1])); } - pushVelocity = Utils.DirectionTo(Projectile.Center, target.Center) * customKnockback; + pushVelocity = Utils.DirectionTo(Projectile.Center, target.Center); float minMult = Projectile.ai[1]; int hitsToMinMult = (int)Projectile.ai[2]; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); modifiers.SourceDamage *= damageMult; - if (customKnockback != 0 && target.CanBeMoved(hasStongDisplacement)) - { - target.velocity = (pushVelocity * (target.knockBackResist == 0 ? 0.5f : 1)); - } + if (customKnockback != 0) + target.MoveNPC(pushVelocity, customKnockback, hasStongDisplacement, Main.player[Projectile.owner]); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { diff --git a/Projectiles/Typeless/BasicBurstExclusive.cs b/Projectiles/Typeless/BasicBurstExclusive.cs index b5297f95f8..3a75ed111f 100644 --- a/Projectiles/Typeless/BasicBurstExclusive.cs +++ b/Projectiles/Typeless/BasicBurstExclusive.cs @@ -62,16 +62,14 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff((int)(Projectile.localAI[1]), (int)(Projectile.localAI[2])); } - pushVelocity = Utils.DirectionTo(Projectile.Center, target.Center) * customKnockback; + pushVelocity = Utils.DirectionTo(Projectile.Center, target.Center); float minMult = Projectile.ai[1]; int hitsToMinMult = (int)Projectile.ai[2]; float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); modifiers.SourceDamage *= damageMult; - if (customKnockback != 0 && target.CanBeMoved(hasStongDisplacement)) - { - target.velocity = (pushVelocity * (target.knockBackResist == 0 ? 0.5f : 1)); - } + if (customKnockback != 0) + target.MoveNPC(pushVelocity, customKnockback, hasStongDisplacement, Main.player[Projectile.owner]); } public override bool? CanHitNPC(NPC target) { diff --git a/Projectiles/Typeless/BatholithBangleProjectile.cs b/Projectiles/Typeless/BatholithBangleProjectile.cs index efd000c2c1..85919f69ec 100644 --- a/Projectiles/Typeless/BatholithBangleProjectile.cs +++ b/Projectiles/Typeless/BatholithBangleProjectile.cs @@ -123,7 +123,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center) - Vector2.UnitY; float launchPower = 9; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f, targetHitbox); public override bool? CanDamage() diff --git a/Projectiles/Typeless/DiamondOfTheDeepProjectile.cs b/Projectiles/Typeless/DiamondOfTheDeepProjectile.cs index c8339673f9..8fa99e61c3 100644 --- a/Projectiles/Typeless/DiamondOfTheDeepProjectile.cs +++ b/Projectiles/Typeless/DiamondOfTheDeepProjectile.cs @@ -446,7 +446,7 @@ namespace CalamityMod.Projectiles.Typeless // HADAL and VOID have knockback, GRAVEL has it's knockback on the explosion Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center) - Vector2.UnitY; float launchPower = 7f; - target.MoveNPC(launchVel, launchPower, false); + target.MoveNPC(launchVel, launchPower, false, Owner); if (visuals) { diff --git a/Projectiles/Typeless/DirectStrike.cs b/Projectiles/Typeless/DirectStrike.cs index b29d83d206..9436c4835d 100644 --- a/Projectiles/Typeless/DirectStrike.cs +++ b/Projectiles/Typeless/DirectStrike.cs @@ -57,9 +57,9 @@ namespace CalamityMod.Projectiles.Typeless if (projHitbox.Intersects(targetHitbox)) { NPC target = Main.npc[(int)Projectile.ai[0]]; - if (pushVelocity != Vector2.Zero && pushVelocity.X < 255f && !invalidTarget && target.CanBeMoved(hasStongDisplacement)) + if (pushVelocity != Vector2.Zero && pushVelocity.X < 255f && !invalidTarget) { - target.velocity = (pushVelocity * (target.knockBackResist == 0 ? 0.5f : 1)); + target.MoveNPC(pushVelocity, pushVelocity.Length(), hasStongDisplacement, Main.player[Projectile.owner]); } return true; } diff --git a/Projectiles/Typeless/LeviAmberDash.cs b/Projectiles/Typeless/LeviAmberDash.cs index a77ac9724f..40337949c0 100644 --- a/Projectiles/Typeless/LeviAmberDash.cs +++ b/Projectiles/Typeless/LeviAmberDash.cs @@ -126,7 +126,7 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 180); Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 20, true); + target.MoveNPC(launchVel, 20, true, Owner); for (int i = 0; i <= 17; i++) { diff --git a/Projectiles/Typeless/PauldronExplosion.cs b/Projectiles/Typeless/PauldronExplosion.cs index eddb8cb142..0dd79cde37 100644 --- a/Projectiles/Typeless/PauldronExplosion.cs +++ b/Projectiles/Typeless/PauldronExplosion.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Projectiles.Typeless modifiers.SourceDamage *= damageMult; Vector2 launchVel = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); - target.MoveNPC(launchVel, 15, true); + target.MoveNPC(launchVel, 15, true, Owner); } public override bool? CanCutTiles() => false; diff --git a/Projectiles/Typeless/ProtolithBangleProjectile.cs b/Projectiles/Typeless/ProtolithBangleProjectile.cs index f50a544547..fae2961e9b 100644 --- a/Projectiles/Typeless/ProtolithBangleProjectile.cs +++ b/Projectiles/Typeless/ProtolithBangleProjectile.cs @@ -111,7 +111,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center) - Vector2.UnitY; float launchPower = 6; - target.MoveNPC(launchVel, launchPower, true); + target.MoveNPC(launchVel, launchPower, true, Owner); } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); public override bool? CanDamage() diff --git a/Projectiles/Typeless/PuddleSplash.cs b/Projectiles/Typeless/PuddleSplash.cs index 0d8dff4a2c..56e251accc 100644 --- a/Projectiles/Typeless/PuddleSplash.cs +++ b/Projectiles/Typeless/PuddleSplash.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Typeless { target.AddBuff(BuffID.Wet, 180); Vector2 launchVel = Utils.DirectionTo(Owner.Center, target.Center) + Vector2.UnitY * -0.75f; - target.MoveNPC(launchVel, 12, false); + target.MoveNPC(launchVel, 12, false, Owner); } public override bool? CanCutTiles() => false; } diff --git a/Projectiles/Typeless/TransformerBlob.cs b/Projectiles/Typeless/TransformerBlob.cs index a3fc1c1c55..c9fa8c8bdc 100644 --- a/Projectiles/Typeless/TransformerBlob.cs +++ b/Projectiles/Typeless/TransformerBlob.cs @@ -237,7 +237,7 @@ namespace CalamityMod.Projectiles.Typeless else modifiers.SourceDamage *= 0.2f; - target.MoveNPC(Utils.DirectionTo(Owner.Center, target.Center), (poweredTimer == 0 ? 7 : 3)); + target.MoveNPC(Utils.DirectionTo(Owner.Center, target.Center), (poweredTimer == 0 ? 7 : 3), false, Owner); if (Projectile.numHits == 0 && poweredTimer == 0) { diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index c360a2d7ea..0141f7a60f 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -1,12 +1,18 @@ using System; +using System; +using System.Collections.Generic; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Reflection; +using CalamityMod.Balancing; using CalamityMod.Balancing; using CalamityMod.CalPlayer; using CalamityMod.DataStructures; using CalamityMod.Enums; using CalamityMod.Events; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Armor; using CalamityMod.NPCs; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; @@ -16,17 +22,22 @@ using CalamityMod.NPCs.SunkenSea; using CalamityMod.NPCs.Yharon; using CalamityMod.Packets; using CalamityMod.Systems.Collections; +using CalamityMod.Systems.Collections; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria; using Terraria.Audio; using Terraria.Chat; using Terraria.DataStructures; using Terraria.GameContent; using Terraria.ID; +using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; using static Terraria.ModLoader.ModContent; namespace CalamityMod @@ -732,14 +743,11 @@ namespace CalamityMod ///
/// The NPC attacked. /// Whether or not the NPC can be moved around. - public static bool CanBeMoved(this NPC target, bool ignoreKBImmune = false) + public static bool CanBeMoved(this NPC target) { - // Ideally we can replace [!CalamityPlayer.areThereAnyDamnBosses] with a check for problematic boss minions so that you can knock back regular ones in bossfights. - // For now at least, when a boss is alive it will always fail to knockback enemies with 100% kb resist. - if (CalamityPlayer.areThereAnyDamnBosses) - ignoreKBImmune = false; - bool isAPillar = target.type == NPCID.LunarTowerSolar || target.type == NPCID.LunarTowerVortex || target.type == NPCID.LunarTowerNebula || target.type == NPCID.LunarTowerStardust; - if (!isAPillar && !target.boss && target.IsAnEnemy(true, true, false) && (ignoreKBImmune || target.knockBackResist > 0)) + bool whitelisted = CalamityHeavyKnockbackWhitelist.whitelistNPC.Contains(target.type); + + if ((target.knockBackResist != 0 || whitelisted) && target.IsAnEnemy(true, true, false)) return true; return false; } @@ -748,13 +756,15 @@ namespace CalamityMod /// /// The NPC being moved. /// Whether or not NPC's that normally have knockback immunity can be moved around. - public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool ignoreKBImmune = false) + public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool heavyKnockback = false, Player attacker = null) { - if (target.CanBeMoved(ignoreKBImmune)) + if (target.CanBeMoved()) { Vector2 launchVel = direction.SafeNormalize(Vector2.UnitX) * strength; - float knockbackMult = Utils.Remap(target.knockBackResist, 0, 1, 0.5f, 1f, false); - target.velocity = launchVel * (knockbackMult > 1 ? (float)Math.Pow(knockbackMult, 10) : knockbackMult); + float playerKnockbackMult = attacker != null ? (attacker.GetTotalKnockback().ApplyTo(1)) : 1; + Main.NewText(attacker.GetKnockback().ApplyTo(1)); + float knockbackMult = playerKnockbackMult * (heavyKnockback ? Math.Max(target.knockBackResist, 1) : target.knockBackResist); // Heavy knockback ignores knockback resist (but not knockback weakness) + target.velocity = launchVel * knockbackMult; target.SyncMotionToServer(); } } From 5212905e6b8037db8ce0e5cd399a706877c1cf9b Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 20 Mar 2026 00:03:50 -0700 Subject: [PATCH 120/346] Standardizing a knockback stat was a bad idea I can't make something like that right now, maybe one day --- CalPlayer/CalamityPlayer.cs | 3 --- Utilities/NPCUtils.cs | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index dab836227a..11fa4bf835 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5267,9 +5267,6 @@ namespace CalamityMod.CalPlayer if (titanHeartSet && StealthStrikeAvailable() && rogue) knockback *= TitanHeartMask.StealthStrikeKnockbackMult; - - Player.GetKnockback() += 0.2f; - //Player.GetKnockback().ApplyTo(1); } #endregion diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index 0141f7a60f..14007babda 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -756,13 +756,12 @@ namespace CalamityMod /// /// The NPC being moved. /// Whether or not NPC's that normally have knockback immunity can be moved around. - public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool heavyKnockback = false, Player attacker = null) + public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool heavyKnockback = false, Player attacker = null, DamageClass damageClass = null) { if (target.CanBeMoved()) { Vector2 launchVel = direction.SafeNormalize(Vector2.UnitX) * strength; - float playerKnockbackMult = attacker != null ? (attacker.GetTotalKnockback().ApplyTo(1)) : 1; - Main.NewText(attacker.GetKnockback().ApplyTo(1)); + float playerKnockbackMult = 1; // Xyk 19MARCH2026: If we ever make knockback a real stat, it can go here. It's much too messy right now to work with, but at least the player is already supported. float knockbackMult = playerKnockbackMult * (heavyKnockback ? Math.Max(target.knockBackResist, 1) : target.knockBackResist); // Heavy knockback ignores knockback resist (but not knockback weakness) target.velocity = launchVel * knockbackMult; target.SyncMotionToServer(); From 608439ff7827ded0ac66a5ad8e8544748d7a86e6 Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 20 Mar 2026 00:28:58 -0700 Subject: [PATCH 121/346] removeDamageClass --- Utilities/NPCUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/NPCUtils.cs b/Utilities/NPCUtils.cs index 14007babda..9b41cd6be3 100644 --- a/Utilities/NPCUtils.cs +++ b/Utilities/NPCUtils.cs @@ -756,7 +756,7 @@ namespace CalamityMod /// /// The NPC being moved. /// Whether or not NPC's that normally have knockback immunity can be moved around. - public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool heavyKnockback = false, Player attacker = null, DamageClass damageClass = null) + public static void MoveNPC(this NPC target, Vector2 direction, float strength, bool heavyKnockback = false, Player attacker = null) { if (target.CanBeMoved()) { From 66c181c199ea67783087c85f31a0db29df15f56e Mon Sep 17 00:00:00 2001 From: Done_22 Date: Fri, 20 Mar 2026 15:51:23 +0200 Subject: [PATCH 122/346] void concentration staff tooltip --- .../en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 2ea9bed867..d79a170ee1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -887,11 +887,11 @@ VoidConcentrationStaff: { DisplayName: Void Concentration Staff Tooltip: ''' - Surrounds you with dark energy, which causes all attacks deal 15% less damage - to condense the energy onto a target, calling lasers and focusing your minions on them - When the focused enemy takes damage from any source, they will be struck by extra dark energies - This is extra effective if struck by a minion or sentry - After 10 seconds, the dark energy will return to orbiting you + Surrounds you with dark energy, which makes all attacks deal 15% less damage + to condense the energy onto a target, chanelling lasers and focusing your minions on them + When the focused enemy takes damage from any source, they will be struck by additional dark energies + This is extremely effective if struck by a minion or sentry + After 10 seconds, the dark energy will resume orbiting you ''' } 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 123/346] 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 bd864112f5088ef74814cf9a2fef0b0cb832d749 Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 20 Mar 2026 10:18:54 -0700 Subject: [PATCH 124/346] Comments accepted removes the bloodworm, truffle worm, extra ancient vision, and dungeon guardian from the whitelist --- NPCs/AcidRain/BloodwormFleeing.cs | 1 - NPCs/AcidRain/BloodwormNormal.cs | 1 - NPCs/CalamityHeavyKnockbackWhitelist.cs | 3 --- 3 files changed, 5 deletions(-) diff --git a/NPCs/AcidRain/BloodwormFleeing.cs b/NPCs/AcidRain/BloodwormFleeing.cs index 9da8ac1562..8670ed3870 100644 --- a/NPCs/AcidRain/BloodwormFleeing.cs +++ b/NPCs/AcidRain/BloodwormFleeing.cs @@ -6,7 +6,6 @@ using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { - [HeavyKnockbackWhitelisted] public class BloodwormFleeing : ModNPC { public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.BloodwormNormal.DisplayName"); diff --git a/NPCs/AcidRain/BloodwormNormal.cs b/NPCs/AcidRain/BloodwormNormal.cs index 718537c5ee..ad723affaa 100644 --- a/NPCs/AcidRain/BloodwormNormal.cs +++ b/NPCs/AcidRain/BloodwormNormal.cs @@ -10,7 +10,6 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.AcidRain { - [HeavyKnockbackWhitelisted] public class BloodwormNormal : ModNPC { public override void SetStaticDefaults() diff --git a/NPCs/CalamityHeavyKnockbackWhitelist.cs b/NPCs/CalamityHeavyKnockbackWhitelist.cs index 00140543d2..3a579641bf 100644 --- a/NPCs/CalamityHeavyKnockbackWhitelist.cs +++ b/NPCs/CalamityHeavyKnockbackWhitelist.cs @@ -32,7 +32,6 @@ namespace CalamityMod.NPCs whitelistNPC.Add(NPCID.DesertDjinn); whitelistNPC.Add(NPCID.DD2DrakinT2); whitelistNPC.Add(NPCID.DD2DrakinT3); - whitelistNPC.Add(NPCID.DungeonGuardian); whitelistNPC.Add(NPCID.GrayGrunt); whitelistNPC.Add(NPCID.HeadlessHorseman); whitelistNPC.Add(NPCID.LihzahrdCrawler); @@ -58,9 +57,7 @@ namespace CalamityMod.NPCs whitelistNPC.Add(NPCID.LeechHead); whitelistNPC.Add(NPCID.StardustWormHead); whitelistNPC.Add(NPCID.CultistDragonHead); - whitelistNPC.Add(NPCID.AncientCultistSquidhead); whitelistNPC.Add(NPCID.TombCrawlerHead); - whitelistNPC.Add(NPCID.TruffleWormDigger); whitelistNPC.Add(NPCID.SeekerHead); whitelistNPC.Add(NPCID.WyvernHead); whitelistNPC.Add(NPCID.Creeper); // Here because they gain KB immunity in multiplayer 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 125/346] 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 1a66c78423012870fd67d40ff91f5597a636f50b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Fri, 20 Mar 2026 14:32:15 -0700 Subject: [PATCH 126/346] Several recipe changes --- Items/Ammo/HailstormBullet.cs | 14 ++++++++++++-- Items/Ammo/IcicleArrow.cs | 14 ++++++++++++-- Items/TreasureBags/PlaguebringerGoliathBag.cs | 1 - Items/Weapons/Ranged/TheHive.cs | 12 +++++++++++- NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs | 1 - NPCs/TownNPCs/Archmage.cs | 2 -- 6 files changed, 35 insertions(+), 9 deletions(-) diff --git a/Items/Ammo/HailstormBullet.cs b/Items/Ammo/HailstormBullet.cs index 8571c98ecf..664f50c928 100644 --- a/Items/Ammo/HailstormBullet.cs +++ b/Items/Ammo/HailstormBullet.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Ranged; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,12 +22,21 @@ namespace CalamityMod.Items.Ammo Item.DamageType = DamageClass.Ranged; Item.consumable = true; Item.knockBack = 2f; - Item.value = Item.buyPrice(copper: 80); // Sold by Archmage + Item.value = Item.sellPrice(copper: 16); Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 0.3f; Item.ammo = AmmoID.Bullet; Item.maxStack = Item.CommonMaxStack; } + public override void AddRecipes() + { + CreateRecipe(333). + AddIngredient(ItemID.MusketBall, 333). + AddIngredient(). + AddIngredient(ItemID.Ectoplasm). + AddTile(TileID.MythrilAnvil). + Register(); + } } } diff --git a/Items/Ammo/IcicleArrow.cs b/Items/Ammo/IcicleArrow.cs index 4efafcd10a..9625571c1c 100644 --- a/Items/Ammo/IcicleArrow.cs +++ b/Items/Ammo/IcicleArrow.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Ranged; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -21,12 +22,21 @@ namespace CalamityMod.Items.Ammo Item.DamageType = DamageClass.Ranged; Item.consumable = true; Item.knockBack = 2.5f; - Item.value = Item.buyPrice(copper: 80); // Sold by Archmage + Item.value = Item.sellPrice(copper: 20); Item.rare = ItemRarityID.Yellow; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 0.2f; Item.ammo = AmmoID.Arrow; Item.maxStack = Item.CommonMaxStack; } + public override void AddRecipes() + { + CreateRecipe(250). + AddIngredient(ItemID.WoodenArrow, 250). + AddIngredient(). + AddIngredient(ItemID.Ectoplasm). + AddTile(TileID.MythrilAnvil). + Register(); + } } } diff --git a/Items/TreasureBags/PlaguebringerGoliathBag.cs b/Items/TreasureBags/PlaguebringerGoliathBag.cs index c0f2e9952f..690d11d151 100644 --- a/Items/TreasureBags/PlaguebringerGoliathBag.cs +++ b/Items/TreasureBags/PlaguebringerGoliathBag.cs @@ -67,7 +67,6 @@ namespace CalamityMod.Items.TreasureBags itemLoot.Add(DropHelper.CalamityStyle(DropHelper.BagWeaponDropRateFraction, new int[] { ModContent.ItemType(), - ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/Items/Weapons/Ranged/TheHive.cs b/Items/Weapons/Ranged/TheHive.cs index e6f4359eeb..11f3c56554 100644 --- a/Items/Weapons/Ranged/TheHive.cs +++ b/Items/Weapons/Ranged/TheHive.cs @@ -1,4 +1,5 @@ -using CalamityMod.Projectiles.Ranged; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -59,6 +60,15 @@ namespace CalamityMod.Items.Weapons.Ranged return false; } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddIngredient(7). + AddIngredient(12). + AddTile(TileID.MythrilAnvil). + Register(); + } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, Request(Texture + "_Glow").Value); } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 47724c6a71..5a988a1156 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -1337,7 +1337,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath int[] weapons = new int[] { ModContent.ItemType(), - ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), diff --git a/NPCs/TownNPCs/Archmage.cs b/NPCs/TownNPCs/Archmage.cs index d9f67f8926..e5f9ec3ef8 100644 --- a/NPCs/TownNPCs/Archmage.cs +++ b/NPCs/TownNPCs/Archmage.cs @@ -165,8 +165,6 @@ namespace CalamityMod.NPCs.TownNPCs .Add(Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) .Add(Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) .Add(Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) - .Add(Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) - .Add(Condition.DownedEverscream, Condition.DownedSantaNK1, Condition.DownedIceQueen) .Add() .Add(ItemID.SuperManaPotion) .Add() 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 127/346] 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 afd58196b11151970852889baca959b0f1d0486d Mon Sep 17 00:00:00 2001 From: Doze-Zoze <43045606+Doze-Zoze@users.noreply.github.com> Date: Sat, 21 Mar 2026 12:12:02 -0500 Subject: [PATCH 128/346] tooltip revision --- .../en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index d79a170ee1..46493b2f39 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -888,9 +888,9 @@ VoidConcentrationStaff: { Tooltip: ''' Surrounds you with dark energy, which makes all attacks deal 15% less damage - to condense the energy onto a target, chanelling lasers and focusing your minions on them + to condense the energy onto a target, focusing your minions on them and creating homing beams When the focused enemy takes damage from any source, they will be struck by additional dark energies - This is extremely effective if struck by a minion or sentry + These dark energy are twice as strong when the strike was from a minion or sentry After 10 seconds, the dark energy will resume orbiting you ''' } From aeea851e5ce5ac5ada41096c1528a59473ec831d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 21 Mar 2026 13:38:22 -0500 Subject: [PATCH 129/346] Requested fixes --- Items/Weapons/Summon/VoidConcentrationStaff.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/Summon/VoidConcentrationStaff.cs b/Items/Weapons/Summon/VoidConcentrationStaff.cs index 74b057efc3..5ad1a5cec5 100644 --- a/Items/Weapons/Summon/VoidConcentrationStaff.cs +++ b/Items/Weapons/Summon/VoidConcentrationStaff.cs @@ -23,7 +23,6 @@ using Terraria.GameContent; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; -using static Terraria.NPC.NPCNameFakeLanguageCategoryPassthrough; namespace CalamityMod.Items.Weapons.Summon { @@ -320,10 +319,8 @@ namespace CalamityMod.Projectiles.Summon var v = v1.RotatedBy(MathHelper.TwoPi * (i / 3f)); if (Main.netMode != NetmodeID.MultiplayerClient) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); - p.penetrate = 1; - p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner,1); - p.penetrate = 1; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + 200 * v, v.RotatedBy(-MathHelper.PiOver2) * 10, ModContent.ProjectileType(), (int)(Projectile.damage * 0.4f), Projectile.knockBack, Projectile.owner,1); } } } @@ -355,6 +352,7 @@ namespace CalamityMod.Projectiles.Summon ProjectileID.Sets.TrailCacheLength[Type] = 8; ProjectileID.Sets.TrailingMode[Type] = 2; ProjectileID.Sets.MinionShot[Type] = true; + ProjectileID.Sets.CultistIsResistantTo[Type] = true; } public override void SetDefaults() @@ -369,7 +367,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30; - Projectile.penetrate = 2; + Projectile.penetrate = 1; } public override void AI() { From 309a85d9732f02ddbf76b116b9ded3b0c0a5e20f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 21 Mar 2026 16:17:54 -0500 Subject: [PATCH 130/346] 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 131/346] 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 132/346] 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 133/346] 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 b9284c2003d481374513863b5e5ac75b02dfaffe Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 22:28:51 -0400 Subject: [PATCH 134/346] hydrothermic set bonus fx refactor --- CalPlayer/CalamityPlayerMiscEffects.cs | 24 +++++++--- Projectiles/Typeless/HydrothermalSmoke.cs | 54 ----------------------- 2 files changed, 18 insertions(+), 60 deletions(-) delete mode 100644 Projectiles/Typeless/HydrothermalSmoke.cs diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3dcbe21eab..bfad7730dd 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1345,19 +1345,31 @@ namespace CalamityMod.CalPlayer } } - // Hydrothermal blue smoke effects but it doesn't work epicccccc if (Player.whoAmI == Main.myPlayer) { - if (hydrothermalSmoke) + if (hydrothermalSmoke && !Main.dedServ) { + // Release effects when the player moves. if (Math.Abs(Player.velocity.X) > 0.1f || Math.Abs(Player.velocity.Y) > 0.1f) { - // https://github.com/tModLoader/tModLoader/wiki/IEntitySource#detailed-list - var source = Player.GetSource_FromThis(HydrothermicArmor.VanitySmokeEntitySourceContext); - Projectile.NewProjectile(source, Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + if (Main.rand.NextBool(6)) + { + int fieryDust = Dust.NewDust(Player.Top + Vector2.UnitY, 20, 42, DustID.Flare, 0f, 0f, 100, default, 0.7f); + if (Main.rand.NextBool(4)) + { + Main.dust[fieryDust].scale *= 0.35f; + } + Main.dust[fieryDust].velocity *= 0f; + } + + if (Main.rand.NextBool(2)) + { + float upwardVariation = Main.rand.NextFloat(-4.5f, -8f); + MediumMistParticle mist = new MediumMistParticle(Player.Top + Vector2.UnitY, -Player.velocity + new Vector2(0.5f, upwardVariation), Main.rand.NextBool(3) ? Color.LightSteelBlue : Color.Black, Color.Black, Main.rand.NextFloat(0.4f, 0.65f), 130); + GeneralParticleHandler.SpawnParticle(mist); + } } } - // Trying to find a workaround because apparently putting the bool in ResetEffects prevents it from working if (!Player.armorEffectDrawOutlines) { hydrothermalSmoke = false; diff --git a/Projectiles/Typeless/HydrothermalSmoke.cs b/Projectiles/Typeless/HydrothermalSmoke.cs deleted file mode 100644 index 1fda4b4a77..0000000000 --- a/Projectiles/Typeless/HydrothermalSmoke.cs +++ /dev/null @@ -1,54 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class HydrothermalSmoke : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - - public override void SetDefaults() - { - Projectile.width = 20; - Projectile.height = 42; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = 6; - } - - public override void AI() - { - - if (Projectile.timeLeft == 6) - Projectile.Center = Main.player[Projectile.owner].Center; - - if (Main.rand.NextBool(6)) - { - int fieryDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Flare, 0f, 0f, 100, default, 0.7f); - if (Main.rand.NextBool(4)) - { - Main.dust[fieryDust].scale *= 0.35f; - } - Main.dust[fieryDust].velocity *= 0f; - } - - - if (Main.rand.NextBool(9) && !Main.dedServ) - { - float upwardVariation = Main.rand.NextFloat(-4.5f, -8f); - MediumMistParticle mist = new MediumMistParticle(Projectile.position, -Projectile.velocity + new Vector2(0.5f, upwardVariation), // This velocity makes it slowly float upward - Main.rand.NextBool(3) ? Color.LightSteelBlue : Color.SteelBlue, Color.LightSlateGray, Main.rand.NextFloat(0.4f, 0.65f), 130); - GeneralParticleHandler.SpawnParticle(mist); - } - } - - public override bool? CanDamage() => false; - } -} From 938794fd1b19dafafb8776f8b5757d17e130871b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 23:13:55 -0400 Subject: [PATCH 135/346] U --- CalamityKeybinds.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalamityKeybinds.cs b/CalamityKeybinds.cs index 99b1ba8dd1..62b5f44039 100644 --- a/CalamityKeybinds.cs +++ b/CalamityKeybinds.cs @@ -41,7 +41,7 @@ namespace CalamityMod NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z"); RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V"); SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z"); - SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "Q"); + SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "U"); TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K"); SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T"); ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl"); From a0494b1f5ae23c489e03639426ccdca8922f1e4f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 21 Mar 2026 23:36:02 -0400 Subject: [PATCH 136/346] Fixed en-US localization on FX projectiles --- Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson | 2 ++ Projectiles/Typeless/SpringStoolFX.cs | 2 ++ Projectiles/Typeless/StepStoolBonusFX.cs | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 4521bdd13e..21069bc0a9 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -137,8 +137,10 @@ SkyFlareFriendly.DisplayName: Flare 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 StomperSlam.DisplayName: Stomper Slam SuicideBomberDemon.DisplayName: Demon diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs index 40d3451bcf..43b814b8a1 100644 --- a/Projectiles/Typeless/SpringStoolFX.cs +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -11,6 +11,8 @@ namespace CalamityMod.Projectiles.Typeless { public class SpringStoolFX : ModProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Typeless"; + float rotationFactor = 0.015f; public static float EaseOutElastic(float x, float amplitude = 1f, float period = 0.3f) { diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index a1763cf6c5..6cd1a56d57 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -7,8 +7,9 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class StepStoolBonusFX : ModProjectile + public class StepStoolBonusFX : ModProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "Calamitymod/Projectiles/InvisibleProj"; public float OpacityMultiplier = 1f; public override void SetDefaults() From 9f796441f003e5615d576c45eba174c729a0630b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 22 Mar 2026 11:24:01 -0400 Subject: [PATCH 137/346] A scuffed but more accurate implementation of Spring Stool's crit boost --- Items/Accessories/SpringStool.cs | 48 ++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 06a0ff9f5c..e68a6b1687 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((JumpCooldown).FramesToSeconds(), (CritRateBoostAboveTargets)); public static int JumpCooldown = CalamityUtils.SecondsToFrames(20); - public static float CritRateBoostAboveTargets = 5f; + public static int CritRateBoostAboveTargets = 5; public override void SetDefaults() { @@ -56,6 +56,10 @@ namespace CalamityMod.Items.Accessories { // Hook directly into vanilla's stool drawing On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; + + // Used to apply the conditional crit chance boost + // Projectiles uses standard tML hooks + On_Player.ProcessHitAgainstNPC += HandleExtraMeleeHitboxCrit; } public override void PostUpdate() @@ -173,22 +177,36 @@ namespace CalamityMod.Items.Accessories } } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + // Adds crit to melee hitboxes + private static void HandleExtraMeleeHitboxCrit(On_Player.orig_ProcessHitAgainstNPC orig, Player self, Item sItem, Rectangle itemRectangle, int originalDamage, float knockback, int npcIndex) { - if (springStool) + bool getBoost = self.GetModPlayer().springStool && self.Top.Y < Main.npc[npcIndex].Top.Y; + if (getBoost) + sItem.crit += SpringStool.CritRateBoostAboveTargets; + + orig(self, sItem, itemRectangle, originalDamage, knockback, npcIndex); + + if (getBoost) + sItem.crit -= SpringStool.CritRateBoostAboveTargets; + } + // Scuffed implementation to add crit to projectiles, using one hook to add it and then a later hook to remove it + // There are two return statements in between these hooks that I would normally be nervous of, however neither actually affect this at all: + // * The first is Electrosphere Launcher's rockets dying on hit, which kills the projectile anyways and can just have a manual check against + // * The second is Abigail's Flower hit cooldown logic, which does nothing since it's a minion that doesn't crit + public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool && proj.type != ProjectileID.ElectrosphereMissile) { - // When hitting a target below you - if (Main.LocalPlayer.Top.Y < target.Top.Y) - { - // Effective +5% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; - - if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) - modifiers.SetCrit(); - - else - modifiers.DisableCrit(); - } + if (Player.Top.Y < target.Top.Y) + proj.CritChance += SpringStool.CritRateBoostAboveTargets; + } + } + public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone) + { + if (springStool && proj.type != ProjectileID.ElectrosphereMissile) + { + if (Player.Top.Y < target.Top.Y) + proj.CritChance -= SpringStool.CritRateBoostAboveTargets; } } From 2ce9ca1594f72b3de78f9cc7ca03400abefa651d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 22 Mar 2026 17:36:57 -0500 Subject: [PATCH 138/346] 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 5814cd09dbdcc7c469ebca3a87df45facc40b12b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 22 Mar 2026 16:16:21 -0700 Subject: [PATCH 139/346] wrathwing fireballs no longer have afterimages --- Projectiles/Rogue/WrathwingFireball.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Projectiles/Rogue/WrathwingFireball.cs b/Projectiles/Rogue/WrathwingFireball.cs index b5996c3d83..b6b9471db2 100644 --- a/Projectiles/Rogue/WrathwingFireball.cs +++ b/Projectiles/Rogue/WrathwingFireball.cs @@ -12,8 +12,6 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { Main.projFrames[Type] = 5; - ProjectileID.Sets.TrailCacheLength[Type] = 20; - ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -57,15 +55,6 @@ namespace CalamityMod.Projectiles.Rogue int frameHeight = texture.Height / Main.projFrames[Type]; int frameY = frameHeight * Projectile.frame; Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); - if (CalamityClientConfig.Instance.Afterimages) - { - for (int i = 0; i < Projectile.oldPos.Length; i++) - { - Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size / 2f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Color color2 = Projectile.GetAlpha(lightColor) * ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(texture, drawPos, new Microsoft.Xna.Framework.Rectangle?(rectangle), color2, Projectile.rotation, rectangle.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); - } - } Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameY, texture.Width, frameHeight)), From 714317d992144da65af723f6923c7a406a37c5e3 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 22 Mar 2026 16:18:27 -0700 Subject: [PATCH 140/346] titanium railgun no longer fires a luxor's projectile --- Projectiles/Ranged/TitaniumRailgunScope.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Projectiles/Ranged/TitaniumRailgunScope.cs b/Projectiles/Ranged/TitaniumRailgunScope.cs index 60c5ea557c..49746ec717 100644 --- a/Projectiles/Ranged/TitaniumRailgunScope.cs +++ b/Projectiles/Ranged/TitaniumRailgunScope.cs @@ -127,19 +127,6 @@ namespace CalamityMod.Projectiles.Ranged // Play a sound with volume scaling with charge percent SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * ChargePercent }, Owner.MountedCenter); - // Summon Luxor's gift manually, as channeling tends to be.... unbalanced, to say the least, if you don't - if (Owner.Calamity().luxorsGift) - { - double rangedDamage = shotDamage * 0.15; - if (rangedDamage >= 1D) - { - float speed = 24f * ChargePercent; - int projectile = Projectile.NewProjectile(new EntitySource_ItemUse_WithAmmo(Owner, Owner.HeldItem, -1), Projectile.Center, direction * speed, ModContent.ProjectileType(), (int)rangedDamage, 0f, Projectile.owner); - if (projectile.WithinBounds(Main.maxProjectiles)) - Main.projectile[projectile].DamageType = DamageClass.Generic; - } - } - // Set the initial recoil, mark the projectile as fired, and set the target recoil Owner.itemRotation = initialRecoil; Charge = -1; From 8a7d5166ef9cc0d9f68c6c91731a9847da40cf6b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 22 Mar 2026 16:31:20 -0700 Subject: [PATCH 141/346] changed amalgam's recipe to better fit inflictions --- Items/Accessories/TheAmalgam.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Accessories/TheAmalgam.cs b/Items/Accessories/TheAmalgam.cs index fdea11a01a..4d4836af00 100644 --- a/Items/Accessories/TheAmalgam.cs +++ b/Items/Accessories/TheAmalgam.cs @@ -51,11 +51,11 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(4). - AddIngredient(ItemID.LunarBar, 10). - AddIngredient(ItemID.FragmentSolar, 10). + AddIngredient(12). + AddIngredient(15). AddIngredient(15). AddIngredient(15). - AddIngredient(8). + AddIngredient(4). AddTile(). Register(); } From 2798a6679c75116b3cdf9a95b588428dce529ac3 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 22 Mar 2026 17:05:59 -0700 Subject: [PATCH 142/346] gave astral helm an Omniscience toggle --- Items/Armor/Astral/AstralHelm.cs | 52 ++++++++++++++++++- ...ods.CalamityMod.Items.Armor.Hardmode.hjson | 8 ++- 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/Items/Armor/Astral/AstralHelm.cs b/Items/Armor/Astral/AstralHelm.cs index 39e9bb66d6..6458df3a5a 100644 --- a/Items/Armor/Astral/AstralHelm.cs +++ b/Items/Armor/Astral/AstralHelm.cs @@ -1,8 +1,13 @@ -using CalamityMod.Items.Materials; +using System.Collections.Generic; +using System.IO; +using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.ModLoader.IO; namespace CalamityMod.Items.Armor.Astral { @@ -30,6 +35,42 @@ namespace CalamityMod.Items.Armor.Astral Item.rare = ItemRarityID.Cyan; Item.defense = 17; //63 } + #region Toggleable Omniscience effect + + bool toggleEnabled = true; + + public override bool CanRightClick() => Main.keyState.PressingShift(); + public override void RightClick(Player player) + { + toggleEnabled = !toggleEnabled; + Item.NetStateChanged(); + } + public override bool ConsumeItem(Player player) => false; + public override void SaveData(TagCompound tag) + { + tag.Add("toggleEffect", toggleEnabled); + } + + public override void LoadData(TagCompound tag) + { + toggleEnabled = tag.GetBool("toggleEffect"); + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(toggleEnabled); + } + + public override void NetReceive(BinaryReader reader) + { + toggleEnabled = reader.ReadBoolean(); + } + + public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + CalamityUtils.DrawInventoryDot(spriteBatch, position, new Vector2(16, 16) * Main.inventoryScale, toggleEnabled); + } + #endregion public override bool IsArmorSet(Item head, Item body, Item legs) { @@ -46,7 +87,6 @@ namespace CalamityMod.Items.Armor.Astral player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusDamageBoost.ToPercent(), StarRainCooldown.FramesToSeconds()); var modPlayer = player.Calamity(); modPlayer.astralStarRain = true; - modPlayer.omniscience = true; player.maxMinions += SetBonusMinionSlotBoost; player.GetDamage() += SetBonusDamageBoost; player.GetCritChance() += SetBonusCritBoost; @@ -57,6 +97,14 @@ namespace CalamityMod.Items.Armor.Astral { player.GetDamage() += DamageBoost; player.GetCritChance() += CritBoost; + var modPlayer = player.Calamity(); + modPlayer.omniscience = toggleEnabled; + } + + public override void ModifyTooltips(List tooltips) + { + if (!toggleEnabled) + tooltips.RemoveAll(x => x.Name == "Tooltip1"); } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson index 53dfc279cd..7cd148e6f7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Hardmode.hjson @@ -10,12 +10,16 @@ AstralBreastplate: { AstralHelm: { DisplayName: Astral Helm - Tooltip: "{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}" + Tooltip: + ''' + {$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1} + Detects nearby creatures, enemy projectiles, danger sources, and treasure + [c/aaaaaa:Shift- in your inventory to toggle the] [cbuffplr:CalamityMod/Omniscience] [c/aaaaaa:effect] + ''' SetBonus: ''' {$CommonItemTooltip.IncreasesMaxMinionsBy} {$CommonItemTooltip.PercentIncreasedDamageCritChance@1} - Detects nearby creatures, enemy projectiles, danger sources, and treasure Whenever you crit an enemy, a barrage of stars will rain down This effect has a {2} {^2:second;seconds} cooldown before it can trigger again ''' From 9910c29e3cc4fcd0dd99ca15a893640aa6d3dba1 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 23 Mar 2026 07:50:00 +0700 Subject: [PATCH 143/346] Low-tier Jewels, Bloodfin, Ooze effect --- CalPlayer/CalamityPlayerLifeRegen.cs | 25 +++++-------------- Items/Accessories/CrownJewel.cs | 5 ++++ Items/Accessories/InfectedJewel.cs | 9 ++++++- Items/Accessories/RadiantOoze.cs | 4 +-- .../Fishing/BrimstoneCragCatches/Bloodfin.cs | 11 ++------ .../Mods.CalamityMod.Items.Accessories.hjson | 12 ++++----- .../Mods.CalamityMod.Items.Fishing.hjson | 6 ++--- 7 files changed, 31 insertions(+), 41 deletions(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 6ea725299d..5e61894fbe 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -308,19 +308,6 @@ namespace CalamityMod.CalPlayer if (bloodfinBoost) { - if (Player.lifeRegen < 0) - { - if (Player.lifeRegenTime < Bloodfin.DebuffedRegenTimeFloor) - Player.lifeRegenTime = Bloodfin.DebuffedRegenTimeFloor; - - Player.lifeRegen += Bloodfin.DebuffedRegenBoost; - } - else - { - Player.lifeRegen += Bloodfin.RegenBoost; - Player.lifeRegenTime += Bloodfin.RegenTimeBoost; - } - if (bloodfinTimer > 0) bloodfinTimer--; @@ -328,7 +315,7 @@ namespace CalamityMod.CalPlayer { bloodfinTimer = Bloodfin.FramesForExtraRegen; - if (Player.statLife < (int)(Player.statLifeMax2 * Bloodfin.ExtraRegenHealthThreshold) && !noLifeRegen) + if (!noLifeRegen) Player.HealPlayer(1, HealTextType.None); } } @@ -412,7 +399,7 @@ namespace CalamityMod.CalPlayer // Infected Jewel does not stack with Purity else if (infectedJewel) { - Player.lifeRegen += 2; + Player.lifeRegen += InfectedJewel.RegenBoost; // If the player has any debuffs, give the extra life regen and defense // More defense is given for each additional debuff @@ -420,9 +407,9 @@ namespace CalamityMod.CalPlayer int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]); if (currentDebuffs > 0) { - Player.lifeRegen += 4; + Player.lifeRegen += InfectedJewel.DebuffedRegenBoost; - intendedJewelDefense = 12 + (currentDebuffs - 1) * 4; + intendedJewelDefense = InfectedJewel.DebuffedDefenseBoost + (currentDebuffs - 1) * InfectedJewel.ExtraDebuffDefenseBoost; if (jewelBonusDefense < intendedJewelDefense) jewelBonusDefense = intendedJewelDefense; } @@ -439,11 +426,11 @@ namespace CalamityMod.CalPlayer // Crown Jewel does not stack with Purity or Infected Jewel else if (crownJewel) { - Player.lifeRegen += 2; + Player.lifeRegen += CrownJewel.RegenBoost; // If any debuff is detected, provide even more life regen if (Player.buffType.Any(i => CalamityBuffSets.IsDebuff[i])) - Player.lifeRegen += 3; + Player.lifeRegen += CrownJewel.DebuffedRegenBoost; } //If a player had a life regen hindering debuff, add 30 seconds to their regen time when under Tequila Sunrise diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index 9c4b4cfca5..26871c87ef 100644 --- a/Items/Accessories/CrownJewel.cs +++ b/Items/Accessories/CrownJewel.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -8,6 +9,10 @@ namespace CalamityMod.Items.Accessories public class CrownJewel : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int RegenBoost = 1; + public static int DebuffedRegenBoost = 3; // Added on top of the baseline regen boost + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedRegenBoost.ToRegenPerSecond()); public override void SetDefaults() { Item.width = 26; diff --git a/Items/Accessories/InfectedJewel.cs b/Items/Accessories/InfectedJewel.cs index 7746446c7f..83a178f4cf 100644 --- a/Items/Accessories/InfectedJewel.cs +++ b/Items/Accessories/InfectedJewel.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Potions; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -11,11 +12,17 @@ namespace CalamityMod.Items.Accessories public class InfectedJewel : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int RegenBoost = 2; + public static int DebuffedRegenBoost = 3; // Added on top of the baseline regen boost + public static int DebuffedDefenseBoost = 8; + public static int ExtraDebuffDefenseBoost = 4; // Per additional debuff + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedDefenseBoost, DebuffedRegenBoost.ToRegenPerSecond(), ExtraDebuffDefenseBoost); public override void SetDefaults() { Item.width = 26; Item.height = 26; - Item.defense = 4; + Item.defense = 2; Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.accessory = true; diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs index 6c5173059b..51470995e7 100644 --- a/Items/Accessories/RadiantOoze.cs +++ b/Items/Accessories/RadiantOoze.cs @@ -13,8 +13,8 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MinRegenBoost = 4; - public static int MaxRegenBoost = 10; + public static int MinRegenBoost = 1; + public static int MaxRegenBoost = 4; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond()); public override void SetDefaults() diff --git a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs index 07e7f4cb50..384384a467 100644 --- a/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs +++ b/Items/Fishing/BrimstoneCragCatches/Bloodfin.cs @@ -11,18 +11,11 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches { public new string LocalizationCategory => "Items.Fishing"; - public static int RegenBoost = 4; - public static int RegenTimeBoost = 4; - - public static int DebuffedRegenBoost = 10; // Does not stack with above - public static int DebuffedRegenTimeFloor = 900; - - public static double ExtraRegenHealthThreshold = 0.75D; - public static int FramesForExtraRegen = 30; + public static int FramesForExtraRegen = 15; public static int BuffType = ModContent.BuffType(); public static int BuffDuration = 10; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedRegenBoost.ToRegenPerSecond(), FramesForExtraRegen.FramesToSeconds(), ExtraRegenHealthThreshold.ToPercent(), BuffDuration); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FramesForExtraRegen.FramesToSeconds(), BuffDuration); public override void SetStaticDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 52d2f71605..f3db981e57 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -467,8 +467,8 @@ CrownJewel: { DisplayName: Crown Jewel Tooltip: ''' - +1 HP/s life regen - You gain an additional +1.5 HP/s life regen while afflicted with any debuff + +{0} HP/s life regen + You gain an additional +{1} HP/s life regen while afflicted with any debuff ''' } @@ -977,10 +977,10 @@ InfectedJewel: { DisplayName: Infected Jewel Tooltip: ''' - Passively grants +1 HP/s life regen - Grants 12 defense and +2 HP/s life regen while afflicted with any debuff + Passively grants +{0} HP/s life regen + Grants {1} defense and +{2} HP/s life regen while afflicted with any debuff Granted defense fades away quickly when not afflicted with any debuffs - Each debuff beyond the first grants 4 additional defense + Each debuff beyond the first grants {3} additional defense Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] 'A beautiful gemstone tarnished by spaceborne rot' ''' @@ -1401,7 +1401,7 @@ Radiance: { ''' HoldShiftTooltip: ''' - [c/CDF69C:Grants +2 to +5 HP/s life regen based on missing health] + [c/CDF69C:Grants +0.5 to +2 HP/s life regen based on missing health] [c/CDF69C:Recover an additional 6 HP/s while inflicted with a debuff] [c/CDF69C:This eventually slows to 1.33 HP/s when debuffed for an extended time period] [c/CDF69C:Grants the Honey buff] diff --git a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson index 9875d18c4d..ebc986797d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Fishing.hjson @@ -58,10 +58,8 @@ Bloodfin: { DisplayName: Bloodfin Tooltip: ''' - Grants a buff that massively boosts natural life regen and grants +{0} HP/s life regen - This increases to +{1} HP/s while suffering from damage over time debuffs - This buff also directly restores HP every {2} seconds if below {3}% health - {$CommonItemTooltip.SecondDuration@4} + Grants a buff that restores 1 HP every {0} seconds + {$CommonItemTooltip.SecondDuration@1} 'The wonders of angiogenesis' ''' } From 1ba0611f088cdf511cf1bfa37d2af289f1497730 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 23 Mar 2026 08:01:05 +0700 Subject: [PATCH 144/346] Fairy Boots --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index bfad7730dd..e8fe8fde5c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2660,7 +2660,7 @@ namespace CalamityMod.CalPlayer { if (Player.isNearFairy()) { - Player.lifeRegen += 4; + Player.lifeRegen += 2; Player.statDefense += 6; Player.moveSpeed += 0.1f; } From c8ce70b9dc8aba8de7b6f92ca7a98a453b5e9dc3 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 22 Mar 2026 20:13:28 -0700 Subject: [PATCH 145/346] cosmilite bar resprite --- Items/Materials/CosmiliteBar.cs | 2 +- Items/Materials/CosmiliteBar.png | Bin 1908 -> 1762 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Materials/CosmiliteBar.cs b/Items/Materials/CosmiliteBar.cs index 3bc6ddbe7c..80133e73e6 100644 --- a/Items/Materials/CosmiliteBar.cs +++ b/Items/Materials/CosmiliteBar.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Materials Item.ResearchUnlockCount = 25; ItemID.Sets.SortingPriorityMaterials[Type] = 114; ItemID.Sets.AnimatesAsSoul[Type] = true; - Main.RegisterItemAnimation(Type, new DrawAnimationVertical(6, 10)); + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(5, 13)); } public override void SetDefaults() diff --git a/Items/Materials/CosmiliteBar.png b/Items/Materials/CosmiliteBar.png index 7c8f6ed134a5118bd5bf802ab4d910b9d46c1427..2c84750b35d83f6c39bc9a026c7abdba28d7f279 100644 GIT binary patch literal 1762 zcmV<81|9i{P)Px#S5Qn;MF0Q*9up!hD@{*Db7X9snvB1=)87C8{{R30Mk#n1QKb)N*ODKo*)HEE zlII1)V0jy?ew;Y`3|p9L4;(jW!62v70)k=(a_yJ2$oiB)q@3ZJvvjAo%Jn#JwG486@L$YTF4rQ{&DZ z4rS?OnhAK_1F~eqVFz{Hw!d2fIveP&8Sgqt@OH4@S5;BO!OOB~nuZOc?8U?Dx-7e{ zX}S*05Ho<$9FL=kwg@lFy6(E+_7G+en8Ze05{Qc(oX-Jp5$+$A(hiI`5=?er#8bR} z^nKqOri2>jf~_bZ8j1up4%t2&Xa$ths+zDHHGa8VE_l6R02EbNP4$RCf(h^Y?q^7X zSWVCljJR`jLDX0P$;VE7}`d&HJj5th&c97?a1T_v2 zuQ}unaGp=vjT)yNP_iM~Fo6j>GvTlUyw)O0*r0H^99-6#ac)+mF?9_XoyCxj2GfXR z_?+{0fFv}84=e_b2GI^^2p%6T%*}XN;v<$^IGE@vrf^`CjrjQt$)g=01%eGM9)3R44z5==EglX4AJPseuFfGb zD1%0vlUDFaa1qY#!fKSVZN!s%q*xo6$cl3bGk&?i3|KBwB&czSHePEvV&HaVJuamv z7IR<+$0G|}la(tK-uGOF56e+vXF;xlTeekOeslMk6^j<3435)^f-m+a}ET8?pnFt(%n{mpiY$jxr@}&G~#ATyJTv0MI;!MB< zR_{Gbc-niUSR1myijC6_)Hik&IA0BJ`&o+ORh}o8@r}3~WSA;fN?Z;ywXs&X}h4@*(Jj-;+!sqj>} zO7XYHcb%F;US;F2NKoUH?XrYS^PqtgayJv7xQ7}a{`3eW^>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jx;S3+B_PUkMr~))AqLcs`Oun?xd12*U4a4nOHWjZT##J==LuT2Oa7RTv;sqN z0fmfw!J=*Z=wRY2D7pZ%MYB0e%>7p+UC-o^^wL7{1Uot9d({Wu^)}||DRLH2c z2Resl+R1Em)oysAtW77aOHkIP^R5{sUmUNHkuO-ZZ66&>d<8`pUg`eSu@pHX?AQRiMKM3;b|uaLqxlI(>_$zLZVz0oPT04WQm uZ+b27Gb-;hl4v(tT3((r@^xis`+opa9NDg-PY&k*0000 Date: Sun, 22 Mar 2026 22:37:34 -0700 Subject: [PATCH 146/346] removed several sources of whispering death --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 2 +- Projectiles/Magic/ApotheosisWorm.cs | 1 - Projectiles/Melee/MawOfInfinityHoldout.cs | 4 ---- Projectiles/Melee/OmnibladeSwing.cs | 10 ---------- Projectiles/Melee/Yoyos/ObliteratorYoyo.cs | 2 -- Projectiles/Ranged/AnimosityBullet.cs | 2 +- 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 84d6108562..3afeaa551b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -46,7 +46,7 @@ Animosity: { TooltipNormal: ''' Fires a shotgun blast with a tight spread which is imbued with [cbuff:CalamityMod/BrimstoneFlames] - Press to fire a powerful brimstone round that inflicts [cbuff:CalamityMod/WhisperingDeath] + Press to fire a powerful brimstone round that causes enemies to become [cbuff:CalamityMod/MarkedforDeath] ''' TooltipGFB: ''' diff --git a/Projectiles/Magic/ApotheosisWorm.cs b/Projectiles/Magic/ApotheosisWorm.cs index 2d2b200bac..3fd943a129 100644 --- a/Projectiles/Magic/ApotheosisWorm.cs +++ b/Projectiles/Magic/ApotheosisWorm.cs @@ -258,7 +258,6 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300, true); - target.AddBuff(ModContent.BuffType(), 300, true); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/MawOfInfinityHoldout.cs b/Projectiles/Melee/MawOfInfinityHoldout.cs index cb0d2546cb..cf7bf97d01 100644 --- a/Projectiles/Melee/MawOfInfinityHoldout.cs +++ b/Projectiles/Melee/MawOfInfinityHoldout.cs @@ -155,9 +155,5 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.Draw(tex, DrawPos - Main.screenPosition, tex.Frame(2,1,0,0), modplayer.swingNum == 1 ? Color.Fuchsia : Color.Cyan, rotation + MathHelper.PiOver4, new Vector2(tex.Width * 0.25f,tex.Height * 0.5f), Projectile.scale * jawScaleMult, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 240); - } } } diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index f40e864581..e884f6f0ba 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -85,16 +85,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.velocity = newVelocity; } - 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(), 300); - } - public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 170); // Don't suffer from the same issues Murasama did in the past; encouraging people to kill their wrists for some extra DPS is bad lmao diff --git a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs index 3f2b27e3c6..3c7a6de762 100644 --- a/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs +++ b/Projectiles/Melee/Yoyos/ObliteratorYoyo.cs @@ -200,8 +200,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/NPCHit/OtherworldlyHit") with { Pitch = -0.45f, Volume = 0.33f }, Projectile.Center); } - else - target.AddBuff(ModContent.BuffType(), 180); GFBCounter = 15; } } diff --git a/Projectiles/Ranged/AnimosityBullet.cs b/Projectiles/Ranged/AnimosityBullet.cs index a52e6c2f5e..a403ac043a 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(), 120); // Music easter egg in GFB, and more! if (Main.zenithWorld) 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 147/346] 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 786100acd3ba63a1867665711bae302b2d01bf19 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 24 Mar 2026 06:15:41 +0700 Subject: [PATCH 148/346] Honey Dew line also PSA and slightly re-buffed Ooze --- CalPlayer/CalamityPlayer.cs | 10 +-- CalPlayer/CalamityPlayerLifeRegen.cs | 86 ++++++------------- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Accessories/AmbrosialAmpoule.cs | 6 +- Items/Accessories/HoneyDew.cs | 11 ++- Items/Accessories/InfectedJewel.cs | 3 +- Items/Accessories/LivingDew.cs | 13 +-- Items/Accessories/Radiance.cs | 22 +++-- Items/Accessories/RadiantOoze.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 2 +- Items/IHoldShiftTooltipItem.cs | 6 ++ .../Mods.CalamityMod.Items.Accessories.hjson | 30 +++---- Utilities/LocalizationUtils.cs | 1 + 13 files changed, 87 insertions(+), 107 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 46ccedfca7..32c6f92045 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -907,8 +907,8 @@ namespace CalamityMod.CalPlayer public bool alwaysHoneyRegen = false; public float alwaysHoneyRegenAmount = 0; public bool honeyTurboRegen = false; - public bool honeyDewHalveDebuffs = false; - public bool livingDewHalveDebuffs = false; + public bool honeyDew = false; + public bool livingDew = false; public int jewelBonusDefense = 0; /// /// Counter variable for spawning Toxic Heart's pulses.
@@ -983,7 +983,6 @@ namespace CalamityMod.CalPlayer public bool purity = false; /// If true, reduces the damage of electricity debuffs by 50%. public bool eleResist = false; - public int PurityHealSlowdownFrames = 0; public bool harpyRing = false; public bool angelTreads = false; /// Makes Flesh Knuckles and its upgrades increase the player's max health. @@ -2387,8 +2386,8 @@ namespace CalamityMod.CalPlayer lAmbergris = false; tortShell = false; absorber = false; - honeyDewHalveDebuffs = false; - livingDewHalveDebuffs = false; + honeyDew = false; + livingDew = false; aAmpoule = false; rOoze = false; radiantOozeRegen = 0; @@ -3168,7 +3167,6 @@ namespace CalamityMod.CalPlayer vaporfied = false; banishingFire = false; wither = false; - PurityHealSlowdownFrames = 0; ImmobilityDebuffImmunityTimer = 0; TypelessDebuffMultiplier = new(); HeatDebuffMultiplier = new(); diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 5e61894fbe..f3ac99db4d 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -277,26 +277,6 @@ namespace CalamityMod.CalPlayer bool hasLifeRegenHinderingDebuff = Player.lifeRegenTime == 0; #region Life Regen That Works Even During DoT Debuffs - if (honeyDewHalveDebuffs) - { - // Tick down all sickness debuffs; this makes them expire 2x faster - // Upgrades increase the sets of debuffs which expire faster - for (int l = 0; l < Player.MaxBuffs; ++l) - { - int buffID = Player.buffType[l]; - if (Player.buffTime[l] <= 2 || BuffDatasets.DebuffDataset[buffID] is null) - continue; - bool shouldHalveDuration = BuffDatasets.DebuffDataset[buffID].SicknessDebuffScaling > 0; - if (livingDewHalveDebuffs) - shouldHalveDuration |= BuffDatasets.DebuffDataset[buffID].HeatDebuffScaling > 0; - if (purity) - shouldHalveDuration |= CalamityBuffSets.IsDebuff[buffID]; - - if (shouldHalveDuration) - --Player.buffTime[l]; - } - } - if (divineBless) { if (Player.whoAmI == Main.myPlayer && Player.miscCounter % AngelicAlliance.DivineBlessFramesPerHeal == 0) // Flat 4 health per second @@ -338,60 +318,26 @@ namespace CalamityMod.CalPlayer else if (grandDadHealTimer > 0) grandDadHealTimer--; - // Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and purity - if (rOoze || aAmpoule || purity) - { - float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2; - //Ambrosial Ampule and ooze give between 2 and 5 hp/s - int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(RadiantOoze.MinRegenBoost, RadiantOoze.MaxRegenBoost, missingLifeRatio));//Rounding is needed for it to ever actually give +5 hp/s, as the integer conversion would otherwise floor it. - Player.lifeRegen += lifeRegenToGive; - radiantOozeRegen += lifeRegenToGive / 2f; - purityRegen += lifeRegenToGive / 2f; - } - if (purity) { int intendedPurityDefense = 0; int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]); if (currentDebuffs > 0) { - // Healing rate is normally 5 HP/s (+1 every 12 frames) - // However, that 12 frames can and will slowly increase if you try to abuse this accessory - int healFrameCadence = 12; + Player.lifeRegen += Radiance.DebuffedRegenBoost; - // Healing slows down after 5 seconds (300 frames) debuffed. For every 15 frames thereafter the cadence slows - // The upper limit to how slow it can get is after 15 seconds (900 frames) - int punishmentFrames = PurityHealSlowdownFrames - 300; - //lowest punishment is a little under a second between the one health heal - if (healFrameCadence < 52) - healFrameCadence += (punishmentFrames < 0) ? 0 : punishmentFrames / 15; - - if (Player.miscCounter % healFrameCadence == healFrameCadence - 1) - Player.Heal(1); - - intendedPurityDefense = 15 + (currentDebuffs - 1) * 5; + intendedPurityDefense = Radiance.DebuffedDefenseBoost + (currentDebuffs - 1) * Radiance.ExtraDebuffDefenseBoost; if (jewelBonusDefense < intendedPurityDefense) jewelBonusDefense = intendedPurityDefense; - // Count up total frames spent healing for slowdown. - if (PurityHealSlowdownFrames < 900) - ++PurityHealSlowdownFrames; - purityRegen += (60 / (float)healFrameCadence); + // Update tooltip + purityRegen += Radiance.DebuffedRegenBoost / 2f; } // If the defense should be ticking down to some lower value, do that. - // Purity loses 1 point of defense every second. - if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedPurityDefense) + if (Player.miscCounter % Radiance.FramesToDecayDefense == 0 && jewelBonusDefense > intendedPurityDefense) --jewelBonusDefense; - // If the player is clear of all debuffs then gradually reduce the slowdown frames - if (currentDebuffs <= 0) - { - --PurityHealSlowdownFrames; - if (PurityHealSlowdownFrames < 0) - PurityHealSlowdownFrames = 0; - } - // Actually apply defense bonus Player.statDefense += jewelBonusDefense; } @@ -415,8 +361,7 @@ namespace CalamityMod.CalPlayer } // If the defense should be ticking down to some lower value, do that. - // Infected Jewel loses 1 point of defense every 20 frames. - if (Player.miscCounter % 60 == 0 && jewelBonusDefense > intendedJewelDefense) + if (Player.miscCounter % InfectedJewel.FramesToDecayDefense == 0 && jewelBonusDefense > intendedJewelDefense) --jewelBonusDefense; // Actually apply defense bonus @@ -549,6 +494,21 @@ namespace CalamityMod.CalPlayer if (PinkJellyRegen) Player.lifeRegen += LifeJelly.AuraRegenBoost; + // Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and Radiance + if (rOoze || aAmpoule || purity) + { + float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2; + // Rounding is needed to prevent flooring and making the max unreachable + int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(RadiantOoze.MinRegenBoost, RadiantOoze.MaxRegenBoost, missingLifeRatio)); + Player.lifeRegen += lifeRegenToGive; + // Update tooltips + radiantOozeRegen += lifeRegenToGive / 2f; + purityRegen += lifeRegenToGive / 2f; + } + + if (livingDew) + Player.lifeRegenTime += LivingDew.RegenTimeBoost; + if (GreenJellyRegen) Player.lifeRegen += Items.Accessories.GrandGelatin.AuraRegenBoost; @@ -731,6 +691,10 @@ namespace CalamityMod.CalPlayer public override void NaturalLifeRegen(ref float regen) { + // Honey Dew and its upgrades make natural regen more powerful + if (honeyDew) + regen *= HoneyDew.NaturalRegenPower; + // The Camper counteracts the regen loss while moving horizontally if (camper && (Player.velocity.X != 0 && Player.grappling[0] <= 0)) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index e8fe8fde5c..496bd372f8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1580,7 +1580,7 @@ namespace CalamityMod.CalPlayer if (Player.whoAmI == Main.myPlayer) { - Player.HealPlayer(15); + Player.HealPlayer(10); if (profanedCrystal) { diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 8cd7145e58..ee9f62221b 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int MaxLifeBoost = 50; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond()); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, LivingDew.RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent(), RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond()); public override void SetDefaults() { @@ -36,8 +36,8 @@ namespace CalamityMod.Items.Accessories modPlayer.aAmpoule = true; // Inherits all effects of Honey Dew and Living Dew - modPlayer.honeyDewHalveDebuffs = true; - modPlayer.livingDewHalveDebuffs = true; + modPlayer.honeyDew = true; + modPlayer.livingDew = true; // Add light if the other accessories aren't equipped and visibility is turned on if (!(modPlayer.rOoze || modPlayer.purity) && !hideVisual) diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index cedef67539..ee517c2349 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -8,6 +9,10 @@ namespace CalamityMod.Items.Accessories public class HoneyDew : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int MaxLifeBoost = 10; + public static float NaturalRegenPower = 1.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, (NaturalRegenPower - 1f).ToPercent()); public override void SetDefaults() { Item.width = 20; @@ -19,11 +24,9 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.statLifeMax2 += 10; - if (!player.HasBuff(BuffID.Honey)) - player.AddBuff(BuffID.Honey, 2); + player.statLifeMax2 += MaxLifeBoost; CalamityPlayer modPlayer = player.Calamity(); - modPlayer.honeyDewHalveDebuffs = true; + modPlayer.honeyDew = true; } public override void AddRecipes() diff --git a/Items/Accessories/InfectedJewel.cs b/Items/Accessories/InfectedJewel.cs index 83a178f4cf..fbd7f2306e 100644 --- a/Items/Accessories/InfectedJewel.cs +++ b/Items/Accessories/InfectedJewel.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Items.Accessories public static int RegenBoost = 2; public static int DebuffedRegenBoost = 3; // Added on top of the baseline regen boost public static int DebuffedDefenseBoost = 8; - public static int ExtraDebuffDefenseBoost = 4; // Per additional debuff + public static int ExtraDebuffDefenseBoost = 3; // Per additional debuff + public static int FramesToDecayDefense = 15; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedDefenseBoost, DebuffedRegenBoost.ToRegenPerSecond(), ExtraDebuffDefenseBoost); public override void SetDefaults() { diff --git a/Items/Accessories/LivingDew.cs b/Items/Accessories/LivingDew.cs index ca84090d44..938341e256 100644 --- a/Items/Accessories/LivingDew.cs +++ b/Items/Accessories/LivingDew.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,6 +10,10 @@ namespace CalamityMod.Items.Accessories public class LivingDew : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int MaxLifeBoost = 25; + public static int RegenTimeBoost = 1; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent()); public override void SetDefaults() { Item.width = 34; @@ -20,14 +25,12 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.statLifeMax2 += 25; - if (!player.HasBuff(BuffID.Honey)) - player.AddBuff(BuffID.Honey, 2); + player.statLifeMax2 += MaxLifeBoost; // Inherits all effects of Honey Dew CalamityPlayer modPlayer = player.Calamity(); - modPlayer.honeyDewHalveDebuffs = true; - modPlayer.livingDewHalveDebuffs = true; + modPlayer.honeyDew = true; + modPlayer.livingDew = true; } public override void AddRecipes() diff --git a/Items/Accessories/Radiance.cs b/Items/Accessories/Radiance.cs index 7fbffc9bb8..dcf0f695a2 100644 --- a/Items/Accessories/Radiance.cs +++ b/Items/Accessories/Radiance.cs @@ -7,6 +7,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -15,6 +16,15 @@ namespace CalamityMod.Items.Accessories public class Radiance : ModItem, ILocalizedModType, IHoldShiftTooltipItem { public new string LocalizationCategory => "Items.Accessories"; + + public static int MaxLifeBoost = 70; + public static int DebuffedRegenBoost = 4; // Added on top of the baseline regen boost + public static int DebuffedDefenseBoost = 9; + public static int ExtraDebuffDefenseBoost = 4; // Per additional debuff + public static int FramesToDecayDefense = 15; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost); + public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(LivingDew.RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent(), + RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond(), DebuffedDefenseBoost, DebuffedRegenBoost.ToRegenPerSecond(), ExtraDebuffDefenseBoost); public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7)); @@ -25,7 +35,7 @@ namespace CalamityMod.Items.Accessories { Item.width = 18; Item.height = 44; - Item.defense = 5; + Item.defense = 3; Item.accessory = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.rare = ModContent.RarityType(); @@ -34,16 +44,14 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - player.statLifeMax2 += 70; - if (!player.HasBuff(BuffID.Honey)) - player.AddBuff(BuffID.Honey, 2); + player.statLifeMax2 += MaxLifeBoost; - // Abyss light, debuff near-immunity, life regen effects, and massively enhances debuff halving + // Abyss light, debuff near-immunity, and life regen effects modPlayer.purity = true; // Inherits effects from Honey Dew and Living Dew - modPlayer.honeyDewHalveDebuffs = true; - modPlayer.livingDewHalveDebuffs = true; + modPlayer.honeyDew = true; + modPlayer.livingDew = true; // Add light if the other accessories aren't equipped and visibility is turned on if (!(modPlayer.rOoze || modPlayer.aAmpoule) && !hideVisual) diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs index 51470995e7..0164304a0d 100644 --- a/Items/Accessories/RadiantOoze.cs +++ b/Items/Accessories/RadiantOoze.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int MinRegenBoost = 1; - public static int MaxRegenBoost = 4; + public static int MaxRegenBoost = 5; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond()); public override void SetDefaults() diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index ff3204552b..9ab199e038 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -188,7 +188,7 @@ namespace CalamityMod.Items // If holding SHIFT, actually display the extended tooltip. if (holdingShift && firstTooltipIndex != -1) { - string holdShiftText = item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey); + string holdShiftText = (holdShiftItem.TooltipExtensionText == LocalizedText.Empty ? item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey) : holdShiftItem.TooltipExtensionText.ToString()); TooltipLine holdShiftLine = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionTooltipID, holdShiftText); if (holdShiftItem.TooltipExtensionColor is not null) holdShiftLine.OverrideColor = holdShiftItem.TooltipExtensionColor; diff --git a/Items/IHoldShiftTooltipItem.cs b/Items/IHoldShiftTooltipItem.cs index 28938b7a60..69df795e2a 100644 --- a/Items/IHoldShiftTooltipItem.cs +++ b/Items/IHoldShiftTooltipItem.cs @@ -1,4 +1,5 @@ using Microsoft.Xna.Framework; +using Terraria.Localization; namespace CalamityMod.Items { @@ -75,6 +76,11 @@ namespace CalamityMod.Items #endregion #region Tooltip Extension Properties + /// + /// The localization text object itself. Override to allow text to be formatted. + /// + public virtual LocalizedText TooltipExtensionText => LocalizedText.Empty; + /// /// The lang/localization key which this item uses for its tooltip extension. /// diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index f3db981e57..605100e9e8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -99,8 +99,8 @@ AmbrosialAmpoule: { Tooltip: ''' +{0} max life - Grants +{1} to +{2} HP/s life regen based on missing health - Grants the [cbuffplr:Honey] buff + Natural life regen is {1}% faster and {2}% more potent + Grants +{2} to +{3} HP/s life regen based on missing health Current boost: +[REGEN] HP/s Fire and sickness debuff durations are halved You emit yellow light if visibility is enabled @@ -948,9 +948,8 @@ HoneyDew: { DisplayName: Honey Dew Tooltip: ''' - +10 max life - Grants the [cbuffplr:Honey] buff - Sickness debuff durations are halved + +{0} max life + Natural life regen is {1}% more potent ''' } @@ -979,7 +978,7 @@ InfectedJewel: { ''' Passively grants +{0} HP/s life regen Grants {1} defense and +{2} HP/s life regen while afflicted with any debuff - Granted defense fades away quickly when not afflicted with any debuffs + Granted defense fades away when not afflicted with any debuffs Each debuff beyond the first grants {3} additional defense Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] 'A beautiful gemstone tarnished by spaceborne rot' @@ -1080,9 +1079,8 @@ LivingDew: { DisplayName: Living Dew Tooltip: ''' - +25 max life - Grants the [cbuffplr:Honey] buff - Fire and sickness debuff durations are halved + +{0} max life + Natural life regen is {1}% faster and {2}% more potent ''' } @@ -1392,7 +1390,7 @@ Radiance: { DisplayName: Radiance Tooltip: ''' - +70 max life + +{0} max life Provides greatly improved life regen, increasing with lost health Gain increased defense from debuffs inflicted on you, and greatly reduces their effectiveness Current boosts: +[REGEN] HP/s and [DEFENSE] defense. @@ -1401,13 +1399,11 @@ Radiance: { ''' HoldShiftTooltip: ''' - [c/CDF69C:Grants +0.5 to +2 HP/s life regen based on missing health] - [c/CDF69C:Recover an additional 6 HP/s while inflicted with a debuff] - [c/CDF69C:This eventually slows to 1.33 HP/s when debuffed for an extended time period] - [c/CDF69C:Grants the Honey buff] - [c/CDF69C:Grants 15 defense while afflicted with any debuff] - [c/CDF69C:Each additional debuff grants 5 defense, which slowly decays while not debuffed] - [c/CDF69C:Weak damaging debuffs are harmless and halves the duration of most other debuffs] + [c/CDF69C:Natural life regen is {0}% faster and {1}% more potent] + [c/CDF69C:Grants +{2} to +{3} HP/s life regen based on missing health] + [c/CDF69C:Grants {4} defense and +{5} HP/s life regen while afflicted with any debuff] + [c/CDF69C:Each additional debuff grants {6} defense, which decays while not debuffed] + [c/CDF69C:Causes weak damaging debuffs to be harmless] ''' } diff --git a/Utilities/LocalizationUtils.cs b/Utilities/LocalizationUtils.cs index 10132d352e..58729ababd 100644 --- a/Utilities/LocalizationUtils.cs +++ b/Utilities/LocalizationUtils.cs @@ -97,6 +97,7 @@ namespace CalamityMod public static string GetChanceFromDenominator(this int denominator) => ToPercent(1 / (float)denominator); + public static string ToPercent(this int percent) => (percent * 100).ToString(); public static string ToPercent(this float percent, string precision = "N1") => Round(percent * 100f, precision); public static string ToPercent(this double percent, string precision = "N1") => Round(percent * 100D, precision); // Double-rounded for proper digit cutoffs From 3e18bbeacda33d560b311f5afbb905c6a6e8a1bb Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 23 Mar 2026 20:30:01 -0500 Subject: [PATCH 149/346] Ooze line, correcting effect orders --- CalPlayer/CalamityPlayer.cs | 11 +- CalPlayer/CalamityPlayerLifeRegen.cs | 242 ++++++++---------- CalPlayer/CalamityPlayerMiscEffects.cs | 10 +- Items/Accessories/AmbrosialAmpoule.cs | 25 +- Items/Accessories/CrownJewel.cs | 6 +- Items/Accessories/HoneyDew.cs | 6 +- Items/Accessories/InfectedJewel.cs | 10 +- Items/Accessories/LivingDew.cs | 10 +- Items/Accessories/Radiance.cs | 35 +-- Items/Accessories/RadiantOoze.cs | 12 +- .../Mods.CalamityMod.Items.Accessories.hjson | 48 +--- 11 files changed, 174 insertions(+), 241 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 32c6f92045..f979990cc6 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -903,6 +903,10 @@ namespace CalamityMod.CalPlayer public bool lAmbergrisVisual = false; public bool tortShell = false; public bool absorber = false; + /// + /// Used for detetcing life regen hindering debuffs + /// + bool _hasNoNaturalRegen = false; public bool hadLifeRegenHinderingDebuff = false; public bool alwaysHoneyRegen = false; public float alwaysHoneyRegenAmount = 0; @@ -922,8 +926,6 @@ namespace CalamityMod.CalPlayer public float pulseRate = 1; public bool aAmpoule = false; public bool rOoze = false; - public float radiantOozeRegen = 0; - public float purityRegen = 0; public bool fBarrier = false; public bool aBrain = false; public bool amalgam = false; @@ -2390,8 +2392,6 @@ namespace CalamityMod.CalPlayer livingDew = false; aAmpoule = false; rOoze = false; - radiantOozeRegen = 0; - purityRegen = 0; fBarrier = false; aBrain = false; amalgam = false; @@ -5013,6 +5013,9 @@ namespace CalamityMod.CalPlayer if (gSabaton && Player.whoAmI == Main.myPlayer) Player.jumpSpeedBoost += 2f; } + + //Update life regen that needs to happen before calculating debuffs + GeneralLifeRegen(); } #endregion diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index f3ac99db4d..e6b70c8528 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -48,22 +48,22 @@ namespace CalamityMod.CalPlayer { int totalVanillaDoT = 0; - if (Player.poisoned && !purity) + if (Player.poisoned) totalVanillaDoT += 4; - if (Player.onFire && !purity) + if (Player.onFire) totalVanillaDoT += 8; if (Player.tongued) totalVanillaDoT += 100; - if (Player.venom && !purity) + if (Player.venom) totalVanillaDoT += 12; - if (Player.onFrostBurn && !purity) + if (Player.onFrostBurn) totalVanillaDoT += 12; - if (Player.onFire2 && !purity) + if (Player.onFire2) totalVanillaDoT += 12; if (Player.burned) @@ -72,7 +72,7 @@ namespace CalamityMod.CalPlayer if (Player.suffocating) totalVanillaDoT += 40; - if (Player.electrified && !purity) + if (Player.electrified) { totalVanillaDoT += eleResist ? 4 : 8; if (Player.controlLeft || Player.controlRight) @@ -101,38 +101,38 @@ namespace CalamityMod.CalPlayer // Whispering Death sets positive regen to zero but doesn't actually deal any damage ApplyDoTDebuff(whisperingDeath, 0, laudanum); - ApplyDoTDebuff(irradiated, 4, purity); + ApplyDoTDebuff(irradiated, 4); int sulphurDoT = 6 - (sulphurSet ? 2 : 0) - (sulphurskin ? 2 : 0) - (corrosiveSpine ? 2 : 0); - ApplyDoTDebuff(sulphurPoison, sulphurDoT, purity); - ApplyDoTDebuff(riptide, 6, purity); + ApplyDoTDebuff(sulphurPoison, sulphurDoT); + ApplyDoTDebuff(riptide, 6); ApplyDoTDebuff(weakBrimstoneFlames, 7); - ApplyDoTDebuff(burningBlood, 8, purity); - ApplyDoTDebuff(brainRot, 8, purity); - ApplyDoTDebuff(vaporfied, 8, purity); + ApplyDoTDebuff(burningBlood, 8); + ApplyDoTDebuff(brainRot, 8); + ApplyDoTDebuff(vaporfied, 8); int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1); - ApplyDoTDebuff(staticDischarge, staticDoT, purity); - ApplyDoTDebuff(heavybleeding, 16, purity); - ApplyDoTDebuff(crushDepth, 18, purity); - ApplyDoTDebuff(astralInfection, 24, infectedJewel || hideOfDeus || purity); - ApplyDoTDebuff(shadowflame, 30, purity); - ApplyDoTDebuff(brimstoneFlames, 30, purity); - ApplyDoTDebuff(plague, (int)MathF.Round(30 * (alchFlask ? (1f - AlchemicalDecanter.PlagueReduction) : 1f)), purity); + ApplyDoTDebuff(staticDischarge, staticDoT); + ApplyDoTDebuff(heavybleeding, 16); + ApplyDoTDebuff(crushDepth, 18); + ApplyDoTDebuff(astralInfection, 24, hideOfDeus); + ApplyDoTDebuff(shadowflame, 30); + ApplyDoTDebuff(brimstoneFlames, 30); + ApplyDoTDebuff(plague, (int)MathF.Round(30 * (alchFlask ? (1f - AlchemicalDecanter.PlagueReduction) : 1f))); ApplyDoTDebuff(vHex, 30); // Has other effects ApplyDoTDebuff(searingLava, 30); - ApplyDoTDebuff(demonicFlames, 33, purity); // Never inflicted on the player - ApplyDoTDebuff(laceration, 36, purity); - ApplyDoTDebuff(daybroken, 40, purity); - ApplyDoTDebuff(bane, 40, purity); - ApplyDoTDebuff(nightwither, 40, purity); - ApplyDoTDebuff(holyFlames, 40, purity); - ApplyDoTDebuff(voidfrost, 40, purity); - ApplyDoTDebuff(hadopelagicPressure, 40, purity); + ApplyDoTDebuff(demonicFlames, 33); // Never inflicted on the player + ApplyDoTDebuff(laceration, 36); + ApplyDoTDebuff(daybroken, 40); + ApplyDoTDebuff(bane, 40); + ApplyDoTDebuff(nightwither, 40); + ApplyDoTDebuff(holyFlames, 40); + ApplyDoTDebuff(voidfrost, 40); + ApplyDoTDebuff(hadopelagicPressure, 40); // Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40); int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1); ApplyDoTDebuff(vermillionFlux, fluxDoT); - ApplyDoTDebuff(elementalMix, 50, purity); // Never inflicted on the player + ApplyDoTDebuff(elementalMix, 50); // Never inflicted on the player ApplyDoTDebuff(trueVHex, 50); int dragonfireDoT = ((Player.name == "JFL" || Player.name == "MrJFL") ? 200 : 50) / (dynamoStemCells ? 2 : 1); ApplyDoTDebuff(dragonFire, dragonfireDoT); @@ -276,7 +276,25 @@ namespace CalamityMod.CalPlayer bool hasLifeRegenHinderingDebuff = Player.lifeRegenTime == 0; + #region Life Regen That Works Even During DoT Debuffs + + //Negation of debuffs. These all will not take life regen above 0 + if (Player.lifeRegen < 0) + { + if (crownJewel) + Player.lifeRegen += CrownJewel.ReducedDoTAmount; + + if (infectedJewel) + Player.lifeRegen += InfectedJewel.ReducedDoTAmount; + + if (purity) + Player.lifeRegen += Radiance.ReducedDoTAmount; + + if (Player.lifeRegen > 0) + Player.lifeRegen = 0; + } + if (divineBless) { if (Player.whoAmI == Main.myPlayer && Player.miscCounter % AngelicAlliance.DivineBlessFramesPerHeal == 0) // Flat 4 health per second @@ -318,75 +336,19 @@ namespace CalamityMod.CalPlayer else if (grandDadHealTimer > 0) grandDadHealTimer--; - if (purity) + //Raising natural regen post-damaging-debuff + if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff) { - int intendedPurityDefense = 0; - int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]); - if (currentDebuffs > 0) - { - Player.lifeRegen += Radiance.DebuffedRegenBoost; + if (infectedJewel) + Player.lifeRegenTime += InfectedJewel.PostDebuffRegenTimeBoost; - intendedPurityDefense = Radiance.DebuffedDefenseBoost + (currentDebuffs - 1) * Radiance.ExtraDebuffDefenseBoost; - if (jewelBonusDefense < intendedPurityDefense) - jewelBonusDefense = intendedPurityDefense; + if (purity) + Player.lifeRegenTime += Radiance.PostDebuffRegenTimeBoost; - // Update tooltip - purityRegen += Radiance.DebuffedRegenBoost / 2f; - } - - // If the defense should be ticking down to some lower value, do that. - if (Player.miscCounter % Radiance.FramesToDecayDefense == 0 && jewelBonusDefense > intendedPurityDefense) - --jewelBonusDefense; - - // Actually apply defense bonus - Player.statDefense += jewelBonusDefense; - } - - // Infected Jewel does not stack with Purity - else if (infectedJewel) - { - Player.lifeRegen += InfectedJewel.RegenBoost; - - // If the player has any debuffs, give the extra life regen and defense - // More defense is given for each additional debuff - int intendedJewelDefense = 0; - int currentDebuffs = Player.buffType.Count(i => CalamityBuffSets.IsDebuff[i]); - if (currentDebuffs > 0) - { - Player.lifeRegen += InfectedJewel.DebuffedRegenBoost; - - intendedJewelDefense = InfectedJewel.DebuffedDefenseBoost + (currentDebuffs - 1) * InfectedJewel.ExtraDebuffDefenseBoost; - if (jewelBonusDefense < intendedJewelDefense) - jewelBonusDefense = intendedJewelDefense; - } - - // If the defense should be ticking down to some lower value, do that. - if (Player.miscCounter % InfectedJewel.FramesToDecayDefense == 0 && jewelBonusDefense > intendedJewelDefense) - --jewelBonusDefense; - - // Actually apply defense bonus - Player.statDefense += jewelBonusDefense; - } - - // Crown Jewel does not stack with Purity or Infected Jewel - else if (crownJewel) - { - Player.lifeRegen += CrownJewel.RegenBoost; - - // If any debuff is detected, provide even more life regen - if (Player.buffType.Any(i => CalamityBuffSets.IsDebuff[i])) - Player.lifeRegen += CrownJewel.DebuffedRegenBoost; - } - - //If a player had a life regen hindering debuff, add 30 seconds to their regen time when under Tequila Sunrise - //This stacks with all other post-debuff boosts due to Tequila Sunrise increasing DoT damage taken - if (tequilaSunrise) - { - if (hadLifeRegenHinderingDebuff && !hasLifeRegenHinderingDebuff) - { + if (tequilaSunrise) Player.lifeRegenTime += 1800; - } } + #endregion // During Silva revive or God Slayer dash, all negative life regen is canceled @@ -461,24 +423,29 @@ namespace CalamityMod.CalPlayer // The bleedout is applied by directly reducing the player's health. It is not canceled by anything. ChaliceOfTheBloodGod.HandleBleedout(Player); - //Finally, update the state of hadLifeRegenHinderingDebuff for next frame. - hadLifeRegenHinderingDebuff = hasLifeRegenHinderingDebuff; + //Finally, update the state of hadLifeRegenHinderingDebuff for next frame. Needs to check for 2 frames of 0 regen time to be sure they had a debuff + hadLifeRegenHinderingDebuff = hasLifeRegenHinderingDebuff && _hasNoNaturalRegen; + _hasNoNaturalRegen = hasLifeRegenHinderingDebuff; } #endregion #region Update Life Regen - public override void UpdateLifeRegen() + //This method runs BEFORE UpdateBadLifeRegen. Put most effects here. Ran at the end of PostUpdateEquips + public void GeneralLifeRegen() { + + float lifeRatio = (Player.statLife) / (float)Player.statLifeMax2; + if (mushy) Player.lifeRegen += Mushy.RegenBoost; if (permafrostsConcoction) { - if (Player.statLife < actualMaxLife / 2) + if (lifeRatio <= 0.5f) Player.lifeRegen++; - if (Player.statLife < actualMaxLife / 4) + if (lifeRatio <= 0.25f) Player.lifeRegen++; - if (Player.statLife < actualMaxLife / 10) + if (lifeRatio <= 0.1f) Player.lifeRegen += 2; } @@ -494,21 +461,25 @@ namespace CalamityMod.CalPlayer if (PinkJellyRegen) Player.lifeRegen += LifeJelly.AuraRegenBoost; - // Grant life regen based on missing health for Radiant Ooze, Ambrosial Ampule, and Radiance - if (rOoze || aAmpoule || purity) - { - float missingLifeRatio = (Player.statLifeMax2 - Player.statLife) / (float)Player.statLifeMax2; - // Rounding is needed to prevent flooring and making the max unreachable - int lifeRegenToGive = (int)Math.Round(MathHelper.Lerp(RadiantOoze.MinRegenBoost, RadiantOoze.MaxRegenBoost, missingLifeRatio)); - Player.lifeRegen += lifeRegenToGive; - // Update tooltips - radiantOozeRegen += lifeRegenToGive / 2f; - purityRegen += lifeRegenToGive / 2f; - } + if (rOoze) + Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(RadiantOoze.MaxRegenBoost, RadiantOoze.MinRegenBoost, lifeRatio)); if (livingDew) Player.lifeRegenTime += LivingDew.RegenTimeBoost; + if (aAmpoule) + { + Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(AmbrosialAmpoule.MaxRegenBoost, AmbrosialAmpoule.MinRegenBoost, lifeRatio)); + Player.lifeRegenTime += AmbrosialAmpoule.RegenTimeBoost; + } + + if (purity) + { + Player.lifeRegen += (int)Math.Round(MathHelper.Lerp(Radiance.MaxRegenBoost, Radiance.MinRegenBoost, lifeRatio)); + Player.lifeRegenTime += Radiance.RegenTimeBoost; + } + + if (GreenJellyRegen) Player.lifeRegen += Items.Accessories.GrandGelatin.AuraRegenBoost; @@ -554,6 +525,27 @@ namespace CalamityMod.CalPlayer regen.position = Player.Center - velocity; } } + if (fearmongerSet && fearmongerRegenFrames > 0) + { + if (Player.lifeRegenTime < FearmongerGreathelm.MinionRegenTimeFloor) + Player.lifeRegenTime = FearmongerGreathelm.MinionRegenTimeFloor; + + Player.lifeRegen += FearmongerGreathelm.MinionRegenBoost; + Player.lifeRegenTime += FearmongerGreathelm.MinionRegenTimeBoost; + } + if (handWarmer && eskimoSet) + { + Player.lifeRegen += 2; + } + } + + //This method runs AFTER UpdateBadLifeRegen. Only put effects that should bypass debuff DoT canceling here. + public override void UpdateLifeRegen() + { + if (avertorBonus) + { + Player.lifeRegen += 4; + } if (community) { @@ -568,22 +560,10 @@ namespace CalamityMod.CalPlayer Player.lifeRegen += lesserEffect ? 1 : regenBoost; } - if (handWarmer && eskimoSet) + if (manaOverloader) { - Player.lifeRegen += 2; - } - if (avertorBonus) - { - Player.lifeRegen += 4; - } - - if (fearmongerSet && fearmongerRegenFrames > 0) - { - if (Player.lifeRegenTime < FearmongerGreathelm.MinionRegenTimeFloor) - Player.lifeRegenTime = FearmongerGreathelm.MinionRegenTimeFloor; - - Player.lifeRegen += FearmongerGreathelm.MinionRegenBoost; - Player.lifeRegenTime += FearmongerGreathelm.MinionRegenTimeBoost; + float manaRatio = Player.statMana / (float)Player.statManaMax2; + Player.lifeRegen += (int)(MathF.Round(MathHelper.Lerp(4f, -4f, manaRatio)) * (Player.HasBuff(BuffID.ManaSickness) ? 0.5f : 1f)); } if (pinkCandle && !noLifeRegen) @@ -600,12 +580,6 @@ namespace CalamityMod.CalPlayer else pinkCandleHealFraction = 0D; - if (manaOverloader) - { - float manaRatio = Player.statMana / (float)Player.statManaMax2; - Player.lifeRegen += (int)(MathF.Round(MathHelper.Lerp(4f, -4f, manaRatio)) * (Player.HasBuff(BuffID.ManaSickness) ? 0.5f : 1f)); - } - #region Standing Still Life Regen // Standing still healing bonuses (all are exclusive with vanilla Shiny Stone, but all function similarly) if (!Player.shinyStone && Player.StandingStill() && Player.velocity.Y == 0 && Player.itemAnimation == 0 && (shadeRegen || cFreeze)) @@ -692,7 +666,13 @@ namespace CalamityMod.CalPlayer public override void NaturalLifeRegen(ref float regen) { // Honey Dew and its upgrades make natural regen more powerful - if (honeyDew) + if (purity) + regen *= Radiance.NaturalRegenPower; + else if (aAmpoule) + regen *= AmbrosialAmpoule.NaturalRegenPower; + else if (livingDew) + regen *= LivingDew.NaturalRegenPower; + else if (honeyDew) regen *= HoneyDew.NaturalRegenPower; // The Camper counteracts the regen loss while moving horizontally diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 496bd372f8..0e2be84687 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3637,24 +3637,24 @@ namespace CalamityMod.CalPlayer if (tarraSet) Player.lifeMagnet = true; - if (whisperingDeath && !laudanum && !purity) + if (whisperingDeath && !laudanum) Player.GetDamage() -= 0.2f; - if (armorCrunch && !laudanum && !purity) + if (armorCrunch && !laudanum) { Player.statDefense -= ArmorCrunch.DefenseReduction; Player.endurance *= ArmorCrunch.MultiplicativeDamageReductionPlayer; } - if (wither && !purity) + if (wither) { Player.statDefense -= RemsRevenge.WitherDefenseReduction; } - if (eutrophication && !purity) + if (eutrophication) Player.velocity = Vector2.Zero; - if ((vaporfied && !purity) || galvanicCorrosion) + if ((vaporfied) || galvanicCorrosion) Player.velocity *= 0.98f; if (molluskHelmet) diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index ee9f62221b..0011d11d15 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; @@ -13,8 +14,11 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxLifeBoost = 50; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, LivingDew.RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent(), RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond()); + public static int MinRegenBoost => 2; + public static int MaxRegenBoost => 6; + public static float RegenTimeBoost => 1; + public static float NaturalRegenPower => 1.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent()); public override void SetDefaults() { @@ -28,19 +32,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - player.statLifeMax2 += MaxLifeBoost; - if (!player.HasBuff(BuffID.Honey)) - player.AddBuff(BuffID.Honey, 2); - - // bool left in for abyss light purposes and life regen effects modPlayer.aAmpoule = true; - - // Inherits all effects of Honey Dew and Living Dew - modPlayer.honeyDew = true; - modPlayer.livingDew = true; - - // Add light if the other accessories aren't equipped and visibility is turned on - if (!(modPlayer.rOoze || modPlayer.purity) && !hideVisual) + if (!(modPlayer.purity) && !hideVisual) Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f)); } @@ -49,7 +42,7 @@ namespace CalamityMod.Items.Accessories var player = Main.LocalPlayer; if (player != null) { - list.FindAndReplace("[REGEN]", player.Calamity().radiantOozeRegen.ToString("0.##")); + list.FindAndReplace("[REGEN]", ((int)MathF.Round(MathHelper.Lerp(MaxRegenBoost, MinRegenBoost, (player.statLife / (float)player.statLifeMax2)))).ToRegenPerSecond()); } } diff --git a/Items/Accessories/CrownJewel.cs b/Items/Accessories/CrownJewel.cs index 26871c87ef..6eebae181d 100644 --- a/Items/Accessories/CrownJewel.cs +++ b/Items/Accessories/CrownJewel.cs @@ -11,13 +11,12 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenBoost = 1; - public static int DebuffedRegenBoost = 3; // Added on top of the baseline regen boost - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedRegenBoost.ToRegenPerSecond()); + public static int ReducedDoTAmount = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), ReducedDoTAmount.ToRegenPerSecond()); public override void SetDefaults() { Item.width = 26; Item.height = 26; - Item.defense = 1; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.rare = ItemRarityID.Blue; Item.accessory = true; @@ -27,6 +26,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.crownJewel = true; + player.lifeRegen += RegenBoost; } } } diff --git a/Items/Accessories/HoneyDew.cs b/Items/Accessories/HoneyDew.cs index ee517c2349..854d5f27b0 100644 --- a/Items/Accessories/HoneyDew.cs +++ b/Items/Accessories/HoneyDew.cs @@ -10,9 +10,8 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxLifeBoost = 10; - public static float NaturalRegenPower = 1.5f; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, (NaturalRegenPower - 1f).ToPercent()); + public static float NaturalRegenPower => 1.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((NaturalRegenPower - 1f).ToPercent()); public override void SetDefaults() { Item.width = 20; @@ -24,7 +23,6 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.statLifeMax2 += MaxLifeBoost; CalamityPlayer modPlayer = player.Calamity(); modPlayer.honeyDew = true; } diff --git a/Items/Accessories/InfectedJewel.cs b/Items/Accessories/InfectedJewel.cs index fbd7f2306e..c88977e5ba 100644 --- a/Items/Accessories/InfectedJewel.cs +++ b/Items/Accessories/InfectedJewel.cs @@ -14,16 +14,13 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenBoost = 2; - public static int DebuffedRegenBoost = 3; // Added on top of the baseline regen boost - public static int DebuffedDefenseBoost = 8; - public static int ExtraDebuffDefenseBoost = 3; // Per additional debuff - public static int FramesToDecayDefense = 15; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), DebuffedDefenseBoost, DebuffedRegenBoost.ToRegenPerSecond(), ExtraDebuffDefenseBoost); + public static int ReducedDoTAmount = 8; + public static int PostDebuffRegenTimeBoost = CalamityUtils.SecondsToFrames(10); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RegenBoost.ToRegenPerSecond(), ReducedDoTAmount.ToRegenPerSecond(), PostDebuffRegenTimeBoost.FramesToSeconds()); public override void SetDefaults() { Item.width = 26; Item.height = 26; - Item.defense = 2; Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; Item.accessory = true; @@ -33,6 +30,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.infectedJewel = true; + player.lifeRegen += RegenBoost; } public override void AddRecipes() diff --git a/Items/Accessories/LivingDew.cs b/Items/Accessories/LivingDew.cs index 938341e256..2ab98916c6 100644 --- a/Items/Accessories/LivingDew.cs +++ b/Items/Accessories/LivingDew.cs @@ -11,9 +11,9 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxLifeBoost = 25; - public static int RegenTimeBoost = 1; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost, RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent()); + public static int RegenTimeBoost => 1; + public static float NaturalRegenPower => 1.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((NaturalRegenPower - 1f).ToPercent(), RegenTimeBoost.ToPercent()); public override void SetDefaults() { Item.width = 34; @@ -25,11 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - player.statLifeMax2 += MaxLifeBoost; - - // Inherits all effects of Honey Dew CalamityPlayer modPlayer = player.Calamity(); - modPlayer.honeyDew = true; modPlayer.livingDew = true; } diff --git a/Items/Accessories/Radiance.cs b/Items/Accessories/Radiance.cs index dcf0f695a2..46823c36ed 100644 --- a/Items/Accessories/Radiance.cs +++ b/Items/Accessories/Radiance.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using CalamityMod.Rarities; @@ -13,18 +14,17 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { [LegacyName("AstralArcanum", "Purity")] - public class Radiance : ModItem, ILocalizedModType, IHoldShiftTooltipItem + public class Radiance : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxLifeBoost = 70; - public static int DebuffedRegenBoost = 4; // Added on top of the baseline regen boost - public static int DebuffedDefenseBoost = 9; - public static int ExtraDebuffDefenseBoost = 4; // Per additional debuff - public static int FramesToDecayDefense = 15; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxLifeBoost); - public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(LivingDew.RegenTimeBoost.ToPercent(), (HoneyDew.NaturalRegenPower - 1f).ToPercent(), - RadiantOoze.MinRegenBoost.ToRegenPerSecond(), RadiantOoze.MaxRegenBoost.ToRegenPerSecond(), DebuffedDefenseBoost, DebuffedRegenBoost.ToRegenPerSecond(), ExtraDebuffDefenseBoost); + public static int MinRegenBoost => 2; + public static int MaxRegenBoost => 8; + public static int ReducedDoTAmount => 20; + public static int PostDebuffRegenTimeBoost => CalamityUtils.SecondsToFrames(10); + public static float RegenTimeBoost => 1; + public static float NaturalRegenPower => 1.5f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(),MaxRegenBoost.ToRegenPerSecond(),ReducedDoTAmount.ToRegenPerSecond(), (NaturalRegenPower - 1f).ToPercent(),RegenTimeBoost.ToPercent()); public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7)); @@ -35,7 +35,6 @@ namespace CalamityMod.Items.Accessories { Item.width = 18; Item.height = 44; - Item.defense = 3; Item.accessory = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; Item.rare = ModContent.RarityType(); @@ -44,17 +43,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - player.statLifeMax2 += MaxLifeBoost; - - // Abyss light, debuff near-immunity, and life regen effects modPlayer.purity = true; - - // Inherits effects from Honey Dew and Living Dew - modPlayer.honeyDew = true; - modPlayer.livingDew = true; - - // Add light if the other accessories aren't equipped and visibility is turned on - if (!(modPlayer.rOoze || modPlayer.aAmpoule) && !hideVisual) + if (!hideVisual) Lighting.AddLight(player.Center, new Vector3(1.32f, 1.32f, 1.82f)); } @@ -64,8 +54,7 @@ namespace CalamityMod.Items.Accessories var player = Main.LocalPlayer; if (player != null) { - list.FindAndReplace("[REGEN]", player.Calamity().purityRegen.ToString("0.##")); - list.FindAndReplace("[DEFENSE]", player.Calamity().jewelBonusDefense.ToString()); + list.FindAndReplace("[REGEN]", ((int)MathF.Round(MathHelper.Lerp(MaxRegenBoost, MinRegenBoost, (player.statLife / (float)player.statLifeMax2)))).ToRegenPerSecond()); } } diff --git a/Items/Accessories/RadiantOoze.cs b/Items/Accessories/RadiantOoze.cs index 0164304a0d..e4f31b3ee8 100644 --- a/Items/Accessories/RadiantOoze.cs +++ b/Items/Accessories/RadiantOoze.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using CalamityMod.CalPlayer; using CalamityMod.Items.Materials; using Microsoft.Xna.Framework; @@ -13,8 +14,8 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MinRegenBoost = 1; - public static int MaxRegenBoost = 5; + public static int MinRegenBoost => 1; + public static int MaxRegenBoost => 5; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MinRegenBoost.ToRegenPerSecond(), MaxRegenBoost.ToRegenPerSecond()); public override void SetDefaults() @@ -29,11 +30,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - - // bool left in for abyss light purposes and life regen effects modPlayer.rOoze = true; - // Add light if the other accessories aren't equipped and visibility is turned on if (!(modPlayer.aAmpoule || modPlayer.purity) && !hideVisual) Lighting.AddLight(player.Center, new Vector3(1f, 1f, 0.6f)); } @@ -43,7 +41,7 @@ namespace CalamityMod.Items.Accessories var player = Main.LocalPlayer; if (player != null) { - list.FindAndReplace("[REGEN]", (player.Calamity().radiantOozeRegen).ToString("0.##")); + list.FindAndReplace("[REGEN]", ((int)MathF.Round(MathHelper.Lerp(MaxRegenBoost, MinRegenBoost, (player.statLife / (float)player.statLifeMax2)))).ToRegenPerSecond()); } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 605100e9e8..b019cbc856 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -98,11 +98,8 @@ AmbrosialAmpoule: { DisplayName: Ambrosial Ampoule Tooltip: ''' - +{0} max life - Natural life regen is {1}% faster and {2}% more potent - Grants +{2} to +{3} HP/s life regen based on missing health - Current boost: +[REGEN] HP/s - Fire and sickness debuff durations are halved + +{0} to +{1} HP/s life regen based on missing health [c/999999:(Current: +[REGEN] HP/s)] + Natural life regen is {2}% more potent and returns {3}% faster You emit yellow light if visibility is enabled ''' } @@ -468,7 +465,7 @@ CrownJewel: { Tooltip: ''' +{0} HP/s life regen - You gain an additional +{1} HP/s life regen while afflicted with any debuff + Reduces damage over time taken by {1} HP/s ''' } @@ -946,11 +943,7 @@ HideofAstrumDeus: { HoneyDew: { DisplayName: Honey Dew - Tooltip: - ''' - +{0} max life - Natural life regen is {1}% more potent - ''' + Tooltip: Natural life regen is {0}% more potent } HowlsHeart: { @@ -976,11 +969,9 @@ InfectedJewel: { DisplayName: Infected Jewel Tooltip: ''' - Passively grants +{0} HP/s life regen - Grants {1} defense and +{2} HP/s life regen while afflicted with any debuff - Granted defense fades away when not afflicted with any debuffs - Each debuff beyond the first grants {3} additional defense - Nullifies the [cbuffplr:CalamityMod/AstralInfectionDebuff] + +{0} HP/s life regen + Reduces damage over time taken by {1} HP/s + Jump-starts regeneration after a damaging debuff ends 'A beautiful gemstone tarnished by spaceborne rot' ''' } @@ -1077,11 +1068,7 @@ LifeJelly: { LivingDew: { DisplayName: Living Dew - Tooltip: - ''' - +{0} max life - Natural life regen is {1}% faster and {2}% more potent - ''' + Tooltip: Natural life regen is {0}% more potent and returns {1}% faster } LuxorsGift: { @@ -1390,30 +1377,21 @@ Radiance: { DisplayName: Radiance Tooltip: ''' - +{0} max life - Provides greatly improved life regen, increasing with lost health - Gain increased defense from debuffs inflicted on you, and greatly reduces their effectiveness - Current boosts: +[REGEN] HP/s and [DEFENSE] defense. + +{0} to +{1} HP/s life regen based on missing health [c/999999:(Current: +[REGEN] HP/s)] + Reduces damage over time taken by {2} HP/s and jump-starts regeneration after a damaging debuff ends + Natural life regen is {3}% more potent and returns {4}% faster You emit shining blue light if visibility is enabled 'A once putrid crystal, now glimmering with immaculate purity' ''' - HoldShiftTooltip: - ''' - [c/CDF69C:Natural life regen is {0}% faster and {1}% more potent] - [c/CDF69C:Grants +{2} to +{3} HP/s life regen based on missing health] - [c/CDF69C:Grants {4} defense and +{5} HP/s life regen while afflicted with any debuff] - [c/CDF69C:Each additional debuff grants {6} defense, which decays while not debuffed] - [c/CDF69C:Causes weak damaging debuffs to be harmless] - ''' } RadiantOoze: { DisplayName: Radiant Ooze Tooltip: ''' - Grants +{0} to +{1} HP/s life regen based on missing health - Current boost: +[REGEN] HP/s + +{0} to +{1} HP/s life regen based on missing health You emit yellow light if visibility is enabled + [c/999999:(Current regen: +[REGEN] HP/s)] ''' } From 7f7d8d326fd70a27e507141e128dbe02d6dc8259 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 23 Mar 2026 22:00:49 -0700 Subject: [PATCH 150/346] 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 151/346] 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 5298eabafdb1b80a86b158d4960fb19454d006df Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 24 Mar 2026 17:29:47 +0700 Subject: [PATCH 152/346] Spirit Glyph line, Concoction, Chi --- Buffs/StatBuffs/ChiBuff.cs | 5 +++-- CalPlayer/CalamityPlayerLifeRegen.cs | 7 +----- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Accessories/HallowedRune.cs | 5 +++-- Items/Accessories/PhantomicArtifact.cs | 3 ++- Items/Accessories/SpiritGlyph.cs | 5 +++-- Items/Accessories/TrinketofChi.cs | 7 +++++- .../Mods.CalamityMod.Items.Accessories.hjson | 22 +++++++++---------- 8 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Buffs/StatBuffs/ChiBuff.cs b/Buffs/StatBuffs/ChiBuff.cs index d1c94aef0d..1465a83301 100644 --- a/Buffs/StatBuffs/ChiBuff.cs +++ b/Buffs/StatBuffs/ChiBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.Items.Accessories; +using Terraria; using Terraria.ModLoader; namespace CalamityMod.Buffs.StatBuffs @@ -15,7 +16,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void Update(Player player, ref int buffIndex) { - player.endurance += 0.08f; + player.endurance += TrinketofChi.ChiBuffDamageReductionBoost; } } } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index e6b70c8528..a206d926ce 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -320,12 +320,7 @@ namespace CalamityMod.CalPlayer // Permafrost's Concoction increases life regen while afflicted with a fire debuff if (permafrostsConcoction && Player.buffType.Any(l => BuffDatasets.DebuffDataset[l] is not null && BuffDatasets.DebuffDataset[l].HeatDebuffScaling > 0)) - { - if (Player.lifeRegenTime < 900) - Player.lifeRegenTime = 900; - Player.lifeRegen += 6; - } if (grandDadHealTimer == 0 && grandDadHealPool >= 7) { @@ -493,7 +488,7 @@ namespace CalamityMod.CalPlayer Player.lifeRegen += Affliction.RegenBoost; if (trinketOfChi || chiRegen) - Player.lifeRegen += 2; + Player.lifeRegen += TrinketofChi.RegenBoost; if (darkSunRing) { diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 0e2be84687..b5f0bb8acc 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3362,7 +3362,7 @@ namespace CalamityMod.CalPlayer // Trinket of Chi bonus if (trinketOfChi) { - if (chiBuffTimer < TrinketofChi.ChiBuffTimerMax) + if (chiBuffTimer < TrinketofChi.ChiBuffHitlessTime) chiBuffTimer++; else Player.AddBuff(ModContent.BuffType(), 6); diff --git a/Items/Accessories/HallowedRune.cs b/Items/Accessories/HallowedRune.cs index 2630de753f..9bb739c49d 100644 --- a/Items/Accessories/HallowedRune.cs +++ b/Items/Accessories/HallowedRune.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -8,10 +9,10 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int RegenBoost = 3; + public static int RegenBoost = 2; public static int DefenseBoost = 5; public static float SummonDamageBoost = 0.1f; - + public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(SummonDamageBoost.ToPercent(), DefenseBoost, RegenBoost.ToRegenPerSecond()); public override void SetDefaults() { Item.width = 26; diff --git a/Items/Accessories/PhantomicArtifact.cs b/Items/Accessories/PhantomicArtifact.cs index ab6f1b20eb..a222eb5a95 100644 --- a/Items/Accessories/PhantomicArtifact.cs +++ b/Items/Accessories/PhantomicArtifact.cs @@ -8,6 +8,7 @@ using Terraria; using Terraria.DataStructures; using Terraria.GameContent; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -19,7 +20,7 @@ namespace CalamityMod.Items.Accessories public static int RegenBoost = 2; public static int DefenseBoost = 10; public static float SummonDamageBoost = 0.1f; - + public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(SummonDamageBoost.ToPercent(), DefenseBoost, RegenBoost.ToRegenPerSecond()); public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(5, 7)); diff --git a/Items/Accessories/SpiritGlyph.cs b/Items/Accessories/SpiritGlyph.cs index c190df2877..89187a46fa 100644 --- a/Items/Accessories/SpiritGlyph.cs +++ b/Items/Accessories/SpiritGlyph.cs @@ -1,6 +1,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -10,10 +11,10 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int RegenBoost = 2; + public static int RegenBoost = 1; public static int DefenseBoost = 3; public static float SummonDamageBoost = 0.1f; - + public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(SummonDamageBoost.ToPercent(), DefenseBoost, RegenBoost.ToRegenPerSecond()); public override void SetDefaults() { Item.width = 24; diff --git a/Items/Accessories/TrinketofChi.cs b/Items/Accessories/TrinketofChi.cs index 0730b3c78a..2330eb43f7 100644 --- a/Items/Accessories/TrinketofChi.cs +++ b/Items/Accessories/TrinketofChi.cs @@ -2,6 +2,7 @@ using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,7 +10,11 @@ namespace CalamityMod.Items.Accessories public class TrinketofChi : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - internal const int ChiBuffTimerMax = 600; + + public static float ChiBuffDamageReductionBoost = 0.08f; + public static int ChiBuffHitlessTime = CalamityUtils.SecondsToFrames(10); + public static int RegenBoost = 1; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ChiBuffDamageReductionBoost.ToPercent(), ChiBuffHitlessTime.FramesToSeconds(), RegenBoost.ToRegenPerSecond()); public override void SetDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b019cbc856..e42af31808 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -905,9 +905,9 @@ HallowedRune: { ''' HoldShiftTooltip: ''' - [c/8ce0ff: Hallowed Power] [c/ccf1ff: grants 10% increased summon damage and rains stars on enemies] - [c/d08aff: Hallowed Defense] [c/eed4ff: grants 5 defense] - [c/ff8cb5: Hallowed Regen] [c/ffccde: grants +1.5 HP/s life regen] + [c/8ce0ff: Hallowed Power] [c/ccf1ff: grants {0}% increased summon damage and rains stars on enemies] + [c/d08aff: Hallowed Defense] [c/eed4ff: grants {1} defense] + [c/ff8cb5: Hallowed Regen] [c/ffccde: grants +{2} HP/s life regen] ''' } @@ -1277,9 +1277,9 @@ PhantomicArtifact: { ''' HoldShiftTooltip: ''' - [c/8ce0ff: Phantomic Empowerment] [c/ccf1ff: grants 10% increased summon damage and throws knives at enemies] - [c/d08aff: Phantomic Shield] [c/eed4ff: grants 10 defense and a 20% damage reduction bulwark] - [c/ff8cb5: Phantomic Regen] [c/ffccde: grants 1 HP/s life regen and occasionally drops phantom hearts which grant an additional 1 HP/s life regen] + [c/8ce0ff: Phantomic Empowerment] [c/ccf1ff: grants {0}% increased summon damage and throws knives at enemies] + [c/d08aff: Phantomic Shield] [c/eed4ff: grants {1} defense and a 20% damage reduction bulwark] + [c/ff8cb5: Phantomic Regen] [c/ffccde: grants {2} HP/s life regen and occasionally drops phantom hearts which grant an additional 1 HP/s life regen] ''' } @@ -1650,9 +1650,9 @@ SpiritGlyph: { Tooltip: Minion attacks provide various buffs HoldShiftTooltip: ''' - [c/8ce0ff: Spirit Power] [c/ccf1ff:grants 10% increased summon damage] - [c/d08aff: Spirit Defense] [c/eed4ff:grants 3 defense] - [c/ff8cb5: Spirit Regen] [c/ffccde:grants +1 HP/s life regeneration] + [c/8ce0ff: Spirit Power] [c/ccf1ff:grants {0}% increased summon damage] + [c/d08aff: Spirit Defense] [c/eed4ff:grants {1} defense] + [c/ff8cb5: Spirit Regen] [c/ffccde:grants +{2} HP/s life regeneration] ''' } @@ -1989,9 +1989,9 @@ TrinketofChi: { DisplayName: Trinket of Chi Tooltip: ''' - Increases damage reduction by 8% if you avoid taking damage for 10 seconds + Increases damage reduction by {0}% if you avoid taking damage for {1} seconds This buff expires on hit - +1 HP/s life regen for you and your teammates + +{2} HP/s life regen for you and your teammates ''' } From 2c70d9dac8ba33c53c7cf41486d654212ef6dc34 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:06:05 +0700 Subject: [PATCH 153/346] "Partial Life Regen" --- CalPlayer/CalamityPlayer.cs | 5 +++++ CalPlayer/CalamityPlayerLifeRegen.cs | 20 ++++++++++++++++--- Items/Weapons/Summon/WulfrumController.cs | 14 +++++++------ .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 2 +- .../en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- Prefixes/AccessoryPrefix.cs | 11 +++------- Utilities/LocalizationUtils.cs | 3 ++- 8 files changed, 38 insertions(+), 21 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index f979990cc6..4de4b778ee 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -132,6 +132,7 @@ namespace CalamityMod.CalPlayer /// If set to true, completely disables ALL life regeneration effects. Used by Omega Blue armor. public bool noLifeRegen = false; public float ammoCost = 1f; + public float partialLifeRegen = 0f; public float healingPotionMultiplier = 1f; /// /// Tracks whether or not the player is currently holding Gael's Greatsword.
@@ -311,6 +312,7 @@ namespace CalamityMod.CalPlayer #endregion #region Timer and Counter + public float partialLifeRegenCounter = 0f; public int gaelSwipes = 0; public int arsenalCooldown = 0; public int killModeCooldown = 0; @@ -2513,6 +2515,7 @@ namespace CalamityMod.CalPlayer lunicCorpsLegs = false; ammoCost = 1f; + partialLifeRegen = 0f; healingPotionMultiplier = 1f; avertorBonus = false; @@ -3048,6 +3051,7 @@ namespace CalamityMod.CalPlayer if (Player.HeldItem.IsAir || Player.HeldItem.fishingPole == 0) consecutiveCaughtFish = 0; heldGaelsLastFrame = false; + partialLifeRegenCounter = 0f; gaelSwipes = 0; whitewaterHeal = 0; luxorHit = false; @@ -3282,6 +3286,7 @@ namespace CalamityMod.CalPlayer healCounter = 300; danceOfLightCharge = 0; ammoCost = 1f; + partialLifeRegen = 0f; healingPotionMultiplier = 1f; avertorBonus = false; divineBless = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index a206d926ce..5e33e56b73 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -428,6 +428,20 @@ namespace CalamityMod.CalPlayer //This method runs BEFORE UpdateBadLifeRegen. Put most effects here. Ran at the end of PostUpdateEquips public void GeneralLifeRegen() { + // Apply partial life regeneration + // Regenerator applies partial life regen as a part of its damage conversion straight up, so it will avoid this function + if (regenerator) + partialLifeRegenCounter = 0f; + else + { + partialLifeRegenCounter += partialLifeRegen; + if (partialLifeRegenCounter >= 1f || partialLifeRegenCounter <= -1f) + { + int flooredRegenAdded = (int)MathF.Floor(partialLifeRegenCounter); + Player.lifeRegen += flooredRegenAdded; + partialLifeRegenCounter -= flooredRegenAdded; + } + } float lifeRatio = (Player.statLife) / (float)Player.statLifeMax2; @@ -692,13 +706,13 @@ namespace CalamityMod.CalPlayer // Regenerator trades all positive regen for damage, and caps your health gain at 50% if (regenerator) { - int finalRegen = Player.lifeRegen + (int)Math.Round(regen * (Player.statLifeMax2 / 400f * 0.85f + 0.15f)); - finalRegen = (int)Math.Max(finalRegen, 0); + float finalRegen = Player.lifeRegen + partialLifeRegen + MathF.Round(regen * (Player.statLifeMax2 / 400f * 0.85f + 0.15f)); + finalRegen = MathF.Max(finalRegen, 0f); // Rapid Healing increments RegenCount directly so it needs to be manually added // It also works while debuffs are active so the same logic applies here if (Player.palladiumRegen) - finalRegen += 4; + finalRegen += 4f; regeneratorDamage = finalRegen * Regenerator.RegenToDamageRatio; Player.GetDamage() += regeneratorDamage; diff --git a/Items/Weapons/Summon/WulfrumController.cs b/Items/Weapons/Summon/WulfrumController.cs index 5d433d0621..6352a8efc2 100644 --- a/Items/Weapons/Summon/WulfrumController.cs +++ b/Items/Weapons/Summon/WulfrumController.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon @@ -13,6 +14,9 @@ namespace CalamityMod.Items.Weapons.Summon { public new string LocalizationCategory => "Items.Weapons.Summon"; + public static float PartialRegenBoostPerBuffDroid = 0.5f; + public static int DefenseBoostPerBuffDroid = 3; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(PartialRegenBoostPerBuffDroid.ToRegenPerSecond(), DefenseBoostPerBuffDroid); public override void SetDefaults() { Item.width = 28; @@ -68,15 +72,13 @@ namespace CalamityMod.Items.Weapons.Summon buffingDrones = 0; } - public override void UpdateLifeRegen() + // This needs to be a fair bit earlier for partial life regen to work + public override void PostUpdateBuffs() { if (buffingDrones > 0) { - // 1 life regen per drone. - Player.lifeRegen += (int)(buffingDrones); - - // 3 defense per drone. - Player.statDefense += buffingDrones * 3; + Player.Calamity().partialLifeRegen += buffingDrones * WulfrumController.PartialRegenBoostPerBuffDroid; + Player.statDefense += buffingDrones * WulfrumController.DefenseBoostPerBuffDroid; buffingDrones = 0; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index e42af31808..7f617d1645 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1316,7 +1316,7 @@ ProfanedSoulArtifact: { [ADREN] Once depleted, the rocks are flung outward and will regenerate 5 seconds after being hit Taking damage resets the timer - The healer guardian restores 15 health every few seconds + The healer guardian restores 10 health every few seconds Purity ''' ShieldAdren: Halved Adrenaline loss if all damage is absorbed diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 46493b2f39..7a935bbcfe 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -932,7 +932,7 @@ WulfrumController: { Summons a wulfrum droid to fight for you Hold while holding the remote to switch all of your drones between regular and supercharge mode Supercharged droids will stop attacking and focus wulfrum energy onto you - Supercharged droids provide +0.5 HP/s life regen and 3 defense per droid + Supercharged droids provide +{0} HP/s life regen and {1} defense per droid Can also be used to heal other players by keeping your mouse cursor close enough to them ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 6d3948119d..b1c86da692 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -23,7 +23,7 @@ AddedTooltip: { FairyBoots: ''' Fairies can spawn at any time on the surface and spawn far more frequently - Nearby fairies grant +2 HP/s life regen, 6 defense and 10% movement speed + Nearby fairies grant +1 HP/s life regen, 6 defense and 10% movement speed Fairies are immune to damage and will no longer flee ''' FleshKnucklesLine: Max life increased by 25 diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs index 389f304da9..c38c1172b2 100644 --- a/Prefixes/AccessoryPrefix.cs +++ b/Prefixes/AccessoryPrefix.cs @@ -11,9 +11,10 @@ namespace CalamityMod.Prefixes public new string LocalizationCategory => "Prefixes.Accessory"; public override PrefixCategory Category => PrefixCategory.Accessory; + public static float GetPartialLifeRegenAmount = 0.5f; public override void ApplyAccessoryEffects(Player player) { - player.lifeRegen += GetLifeRegenAmount(); + player.Calamity().partialLifeRegen += GetPartialLifeRegenAmount; } public override void ModifyValue(ref float valueMult) @@ -24,17 +25,11 @@ namespace CalamityMod.Prefixes public LocalizedText LifeRegenTooltip => CalamityUtils.GetText($"{LocalizationCategory}.LifeRegenTooltip"); public override IEnumerable GetTooltipLines(Item item) { - var perSecHP = (GetLifeRegenAmount() / 2.0f).ToString("0.#"); - yield return new TooltipLine(Mod, "CalamityMod:PrefixLifeRegenBoost", LifeRegenTooltip.Format(perSecHP)) + yield return new TooltipLine(Mod, "CalamityMod:PrefixLifeRegenBoost", LifeRegenTooltip.Format(GetPartialLifeRegenAmount.ToRegenPerSecond())) { IsModifier = true }; } - - public static int GetLifeRegenAmount() - { - return 1; - } } public class Dauntless : ModPrefix, ILocalizedModType diff --git a/Utilities/LocalizationUtils.cs b/Utilities/LocalizationUtils.cs index 58729ababd..f65c49f08d 100644 --- a/Utilities/LocalizationUtils.cs +++ b/Utilities/LocalizationUtils.cs @@ -91,7 +91,8 @@ namespace CalamityMod public static string ToMphps(this float velocity) => Round(velocity * 60f * 216000f / 42240f, "N2"); public static string ToTiles(this float pixel) => Round(pixel / 16f); - public static string ToRegenPerSecond(this int regen) => Round(regen * 0.5f, "N2"); + public static string ToRegenPerSecond(this float partialRegen) => Round(partialRegen * 0.5f, "N2"); + public static string ToRegenPerSecond(this int regen, float partialRegen = 0f) => Round((regen + partialRegen) * 0.5f, "N2"); public static string ToJumpSpeedPercent(this float boost) => Round(boost * 20f, "N2"); public static string ToStealth(this float stealth) => Round(stealth * 100f, "N0"); From 01a1666839c64cb79545b46448c7a3c1566a536e Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 24 Mar 2026 10:32:43 -0700 Subject: [PATCH 154/346] 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 155/346] 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 156/346] 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 157/346] 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 16a071d572dbe6171e4e110aa44a84ea2a9bb05c Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 24 Mar 2026 18:22:59 -0500 Subject: [PATCH 158/346] Lifesteal rebalancing Reduced the lifesteal counter recovery speed from 0.15 -> 0.1(9 -> 6 HP/s) (classic, 0.2 -> 0.15). This nerfs all lifesteal item's HP/s by 33%, counterbalancing the major buff BS gave lifesteal pool. - Mana Polarizer 1.75x -> 2x cooldown (3 HP/s) - Gilded Proboscis 1x -> 0.5x cooldown (12 hp/s, but Proboscis never hits the current cap it has so this leaves it overall the same) - Hydothermic Mage 1.25x -> 1x cooldown, but added it's own limiter of 3 HP/s. This nerfs its lifesteal but means it no longer consumes the entire lifesteal pool, allowing comboing with other lifesteal sources. - Omega Blue 0.5x (18/s) -> 0.4x. (15/s) This is slightly weaker than the old lifesteal amount in HP/s, but has a slightly larger lifesteal pool. - Spectre Healing 1x (9/s) -> 0.66x (9/s). Keeps it the same strength, but reworks Spectre Healing to not waste lifesteal so it can take advantage of the pool. Set Bonus now reduces dmg with it on by 20% - Removed lifesteal from Bloodflare Rogue, replaced with +2 HP/s flat. Nerf on it's own, but a buff overall since now it can be used with lifesteal gear. - Reduced Monstrous Knife count from 4-7 to 3-5 as it was vastly overperforming in damage, 4x -> 3x cooldown mult (2/s) --- Balancing/BalancingConstants.cs | 8 ++-- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++ CalPlayer/CalamityPlayerOnHit.cs | 11 +++-- ILEditing/BalancingILChanges.cs | 44 +++++++++++++++++++ ILEditing/ILChangesLoading.cs | 2 +- Items/Armor/Bloodflare/BloodflareHeadRogue.cs | 4 +- .../Hydrothermic/HydrothermicHeadMagic.cs | 2 +- Items/CalamityGlobalItem.cs | 2 +- Items/Weapons/Melee/MonstrousKnives.cs | 2 +- ...CalamityMod.Items.Armor.PostMoonLord.hjson | 2 +- .../Mods.CalamityMod.Vanilla.Armor.hjson | 2 +- Projectiles/Melee/MonstrousKnife.cs | 2 +- .../Melee/Spears/GildedProboscisProj.cs | 2 +- Projectiles/Typeless/OmegaBlueTentacle.cs | 2 +- 15 files changed, 70 insertions(+), 20 deletions(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index e8d05be133..9135f782d7 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -126,11 +126,11 @@ internal static readonly float LifeStealRecoveryRate_Classic = 0.6f; internal static readonly float LifeStealRecoveryRate_Expert = 0.5f; - // Nerfs the life steal recovery rate in Classic from 0.6 to 0.2 (36 HP/s to 12 HP/s) - internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.4f; + // Nerfs the life steal recovery rate in Classic from 0.6 to 0.15 (36 HP/s to 9 HP/s) + internal static readonly float LifeStealRecoveryRateReduction_Classic = 0.45f; - // Nerfs the life steal recovery rate in Expert from 0.5 to 0.15 (30 HP/s to 9 HP/s) - internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.35f; + // Nerfs the life steal recovery rate in Expert from 0.5 to 0.1 (30 HP/s to 6 HP/s) + internal static readonly float LifeStealRecoveryRateReduction_Expert = 0.4f; #endregion #region Rogue Base Stats diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 46ccedfca7..4049178508 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1272,6 +1272,7 @@ namespace CalamityMod.CalPlayer public bool plaguebringerPatronSet = false; public bool plaguebringerCarapace = false; public float ataxiaDmg; + public float hydroHealTimer = 0; public bool ataxiaMage = false; public bool ataxiaGeyser = false; public float xerocDmg; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index bfad7730dd..b5902d4576 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2250,6 +2250,10 @@ namespace CalamityMod.CalPlayer ataxiaDmg -= 1.5f; if (ataxiaDmg < 0f) ataxiaDmg = 0f; + if (hydroHealTimer > 0f) + hydroHealTimer -= 0.05f; + if (ataxiaDmg < 0f) + ataxiaDmg = 0f; if (xerocDmg > 0f) xerocDmg -= 2f; if (xerocDmg < 0f) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index ae18de7e06..1f4a128a71 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1327,21 +1327,20 @@ namespace CalamityMod.CalPlayer //Nanotech has the same heal as Electrician's glove Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, 2f); - if (bloodflareThrowing && proj.CountsAsClass() && crit) - Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, 2, 1.5f); - 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), 1.75f); + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), 2); } - if (ataxiaMage) + if (ataxiaMage && hydroHealTimer <= 0) { double healMult = HydrothermicHeadMagic.OrbHealingRatio - proj.numHits * HydrothermicHeadMagic.OrbHealingRatioLossPerPierce; - Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), (int)Math.Round(damage * healMult), HydrothermicHeadMagic.OrbHealingCooldownMult); + var heal = (int)Math.Round(damage * healMult); + hydroHealTimer += heal; + Player.SpawnLifeStealProjectile(target, proj, ProjectileType(), heal, HydrothermicHeadMagic.OrbHealingCooldownMult); } } } diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index bb03985b48..60daf878c3 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -686,5 +686,49 @@ namespace CalamityMod.ILEditing return orig(self); } #endregion + + #region Adjust Spectre Healing lifesteal cost + /// + /// Reimplemnts our own implementation of Spectre Healing so we can customize effects + /// Also means it will no longer reduce lifesteal cooldown when hitting with non-magic attacks, and not proc if every player is full HP + /// + /// + /// + /// + /// + /// + private static void AdjustSpectreHealing(On_Projectile.orig_ghostHeal orig, Projectile self, int dmg, Vector2 Position, Entity victim) + { + float HealingMultiplier = 0.2f; + float LifestealCooldownMult = 0.66f; + + var owner = Main.player[self.owner]; + HealingMultiplier -= self.numHits * 0.05f; + int AmountToHeal = (int)Math.Round(dmg * HealingMultiplier); + if (!self.magic || AmountToHeal <= 0 || Main.player[Main.myPlayer].lifeSteal <= 0f) + { + return; + } + float MissingLifeGoal = 0f; + int targetPlayer = self.owner; + foreach (var player in Main.ActivePlayers) + { + if (!player.dead && ((!self.hostile && !owner.hostile) || owner.team == player.team) && self.Distance(player.Center) <= 3000f) + { + int MissingLife = player.statLifeMax2 - player.statLife; + if ((float)MissingLife > MissingLifeGoal) + { + MissingLifeGoal = MissingLife; + targetPlayer = player.whoAmI; + } + } + } + AmountToHeal = (int)MathHelper.Min(AmountToHeal, MissingLifeGoal); + if (AmountToHeal <= 0) + return; + owner.lifeSteal -= AmountToHeal * LifestealCooldownMult; + Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.SetBonus_GhostHeal)), Position.X, Position.Y, 0f, 0f, ProjectileID.SpiritHeal, 0, 0f, self.owner, targetPlayer, AmountToHeal); + } + #endregion } } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 0e39b0ffa5..4b6f044f57 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -3,7 +3,6 @@ using CalamityMod.Tiles.FurnitureExo; using Terraria; using Terraria.DataStructures; using Terraria.GameContent; -using Terraria.GameContent.Biomes; using Terraria.GameContent.Drawing; using Terraria.GameContent.Events; using Terraria.GameContent.ItemDropRules; @@ -112,6 +111,7 @@ namespace CalamityMod.ILEditing On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable; IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges; IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR; + On_Projectile.ghostHeal += AdjustSpectreHealing; // Movement speed balance IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 1eb93b9746..1f2d58976c 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -16,7 +16,8 @@ namespace CalamityMod.Items.Armor.Bloodflare public static float RogueDamageBoost = 0.15f; public static int RogueCritBoost = 10; public static float MoveSpeedBoost = 0.05f; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent()); + public static int RegenBonus = 4; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RogueDamageBoost.ToPercent(), RogueCritBoost, MoveSpeedBoost.ToPercent(),RegenBonus.ToRegenPerSecond()); // Set Bonus public static float SetBonusRogueStealth = 1.2f; @@ -52,6 +53,7 @@ namespace CalamityMod.Items.Armor.Bloodflare player.GetDamage() += RogueDamageBoost; player.GetCritChance() += RogueCritBoost; player.moveSpeed += MoveSpeedBoost; + player.lifeRegen += 4; } public override void AddRecipes() diff --git a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs index a6a9ad4c88..1eb312a365 100644 --- a/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs +++ b/Items/Armor/Hydrothermic/HydrothermicHeadMagic.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Armor.Hydrothermic public static float OrbDamageCooldownMult = 0.5f; public static double OrbHealingRatio = 0.1D; public static double OrbHealingRatioLossPerPierce = 0.05D; - public static float OrbHealingCooldownMult = 1.25f; + public static float OrbHealingCooldownMult = 1f; public override void SetDefaults() { diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index b43082acc4..d28cad197b 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -953,7 +953,7 @@ namespace CalamityMod.Items } else if (set == "SpectreHealing") { - player.GetDamage() += 0.4f; + player.GetDamage() += 0.2f; player.setBonus = CalamityUtils.GetTextValue("Vanilla.Armor.SetBonus.SpectreHealing"); } else if (set == "SolarFlare") diff --git a/Items/Weapons/Melee/MonstrousKnives.cs b/Items/Weapons/Melee/MonstrousKnives.cs index 72d7cdd46c..aeb2820dcd 100644 --- a/Items/Weapons/Melee/MonstrousKnives.cs +++ b/Items/Weapons/Melee/MonstrousKnives.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee xDist *= speedMult; yDist *= speedMult; - int knifeAmt = Main.rand.Next(4, 7); + int knifeAmt = Main.rand.Next(3, 5); for (int i = 0; i < knifeAmt; i++) { float xVec = xDist; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 071dab3909..b6b8d342ed 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -243,6 +243,7 @@ BloodflareHeadRogue: { ''' {$Common.RogueDamage} and {$Common.RogueCrit@1} {$CommonItemTooltip.PercentIncreasedMovementSpeed@2} + Increases regeneration by {3} HP/s ''' SetBonus: ''' @@ -252,7 +253,6 @@ BloodflareHeadRogue: { SetBonusEffect: ''' Grants {0} defense when above {1}% life - Rogue critical strikes have lifesteal {$BloodflareBodyArmor.CommonSetBonus} ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 037e38f91c..bcc871f221 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -121,7 +121,7 @@ SetBonus: { ''' SpectreHealing: ''' - Converts magic damage to healing force + Reduces Magic damage by 20% and converts it to healing force Magic damage done to enemies heals the player with lowest health ''' } diff --git a/Projectiles/Melee/MonstrousKnife.cs b/Projectiles/Melee/MonstrousKnife.cs index 8f2abedb44..9ba7015b77 100644 --- a/Projectiles/Melee/MonstrousKnife.cs +++ b/Projectiles/Melee/MonstrousKnife.cs @@ -45,6 +45,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 4f); //4x cooldown = 23.3 HP bank, 2.25 hp/s refill + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ProjectileID.VampireHeal, 1, 3f); //3x cooldown = 23.3 HP bank, 2 hp/s refill } } diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index b61bd6042b..817f251d32 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)); + 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/Typeless/OmegaBlueTentacle.cs b/Projectiles/Typeless/OmegaBlueTentacle.cs index 2febbae82d..e55fe098b7 100644 --- a/Projectiles/Typeless/OmegaBlueTentacle.cs +++ b/Projectiles/Typeless/OmegaBlueTentacle.cs @@ -174,7 +174,7 @@ namespace CalamityMod.Projectiles.Typeless modifiers.SetCrit(); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Owner.DoLifestealDirect(target, 10 * hit.Damage / Projectile.damage, 0.5f); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Owner.DoLifestealDirect(target, 10 * hit.Damage / Projectile.damage, 0.33f); public override bool PreDraw(ref Color lightColor) { From 3f0e1dad5d8aa4627c0e36523b3adf733305ab48 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 24 Mar 2026 19:04:22 -0500 Subject: [PATCH 159/346] vknives now also don't heal at full HP --- ILEditing/BalancingILChanges.cs | 20 +++++++++++++++++++- ILEditing/ILChangesLoading.cs | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 60daf878c3..2e0e15714d 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -687,7 +687,7 @@ namespace CalamityMod.ILEditing } #endregion - #region Adjust Spectre Healing lifesteal cost + #region Adjust lifesteal costs /// /// Reimplemnts our own implementation of Spectre Healing so we can customize effects /// Also means it will no longer reduce lifesteal cooldown when hitting with non-magic attacks, and not proc if every player is full HP @@ -729,6 +729,24 @@ namespace CalamityMod.ILEditing owner.lifeSteal -= AmountToHeal * LifestealCooldownMult; Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.SetBonus_GhostHeal)), Position.X, Position.Y, 0f, 0f, ProjectileID.SpiritHeal, 0, 0f, self.owner, targetPlayer, AmountToHeal); } + /// + /// Adjust Vampire Knives implementation, stopping them from trying to heal when at full HP + /// + /// + /// + /// + /// + /// + private static void AdjustVampireHealing(On_Projectile.orig_vampireHeal orig, Projectile self, int dmg, Vector2 Position, Entity victim) + { + int healAmount = (int)(dmg * 0.075f); + float LifestealCooldownMult = 1f; + if ((int)healAmount != 0 && !(Main.player[Main.myPlayer].lifeSteal <= 0f) && Main.player[Main.myPlayer].statLifeMax2 > Main.player[Main.myPlayer].statLife) + { + Main.player[Main.myPlayer].lifeSteal -= healAmount * LifestealCooldownMult; + Projectile.NewProjectile(self.GetSource_OnHit(victim, ProjectileSourceID.ToContextString(ProjectileSourceID.VampireKnives)), Position.X, Position.Y, 0f, 0f, ProjectileID.VampireHeal, 0, 0f, self.owner, self.owner, healAmount); + } + } #endregion } } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 4b6f044f57..d5fb8e25e0 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -112,6 +112,7 @@ namespace CalamityMod.ILEditing IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges; IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR; On_Projectile.ghostHeal += AdjustSpectreHealing; + On_Projectile.vampireHeal += AdjustVampireHealing; // Movement speed balance IL_Player.UpdateJumpHeight += FixJumpHeightBoosts; From 07ed23f066b23360aa05d05330b1da1717ad124f Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Tue, 24 Mar 2026 20:16:05 -0400 Subject: [PATCH 160/346] Bloodflare rogue helmet uses static value for mechanical effects --- Items/Armor/Bloodflare/BloodflareHeadRogue.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 1f2d58976c..89859b629f 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor.Bloodflare player.GetDamage() += RogueDamageBoost; player.GetCritChance() += RogueCritBoost; player.moveSpeed += MoveSpeedBoost; - player.lifeRegen += 4; + player.lifeRegen += RegenBonus; } public override void AddRecipes() 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 161/346] 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 63c4bdb0e3aa515e516bdffd48fb304444cc655f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:22:04 +0700 Subject: [PATCH 162/346] Bloodflare/Auric no longer inherit Crimson --- Items/Armor/Auric/AuricTeslaHeadMagic.cs | 1 - Items/Armor/Auric/AuricTeslaHeadMelee.cs | 1 - Items/Armor/Auric/AuricTeslaHeadRanged.cs | 1 - Items/Armor/Auric/AuricTeslaHeadRogue.cs | 1 - Items/Armor/Auric/AuricTeslaHeadSummon.cs | 1 - Items/Armor/Bloodflare/BloodflareHeadMagic.cs | 1 - Items/Armor/Bloodflare/BloodflareHeadMelee.cs | 1 - Items/Armor/Bloodflare/BloodflareHeadRanged.cs | 1 - Items/Armor/Bloodflare/BloodflareHeadRogue.cs | 1 - Items/Armor/Bloodflare/BloodflareHeadSummon.cs | 1 - .../en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 1 - 11 files changed, 11 deletions(-) diff --git a/Items/Armor/Auric/AuricTeslaHeadMagic.cs b/Items/Armor/Auric/AuricTeslaHeadMagic.cs index 7231f09ff0..e4a908579e 100644 --- a/Items/Armor/Auric/AuricTeslaHeadMagic.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMagic.cs @@ -50,7 +50,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.silvaSet = true; modPlayer.silvaMage = true; modPlayer.auricSet = true; - player.crimsonRegen = true; // Inherited from Bloodflare } public override void ModifyTooltips(List tooltips) diff --git a/Items/Armor/Auric/AuricTeslaHeadMelee.cs b/Items/Armor/Auric/AuricTeslaHeadMelee.cs index 33839d713e..feb38df486 100644 --- a/Items/Armor/Auric/AuricTeslaHeadMelee.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMelee.cs @@ -55,7 +55,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.godSlayerDamage = true; modPlayer.auricSet = true; modPlayer.auricSetMelee = true; - player.crimsonRegen = true; // Inherited from Bloodflare player.aggro += SetBonusAggroBoost; if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) diff --git a/Items/Armor/Auric/AuricTeslaHeadRanged.cs b/Items/Armor/Auric/AuricTeslaHeadRanged.cs index fa54b263bd..acd69acec9 100644 --- a/Items/Armor/Auric/AuricTeslaHeadRanged.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRanged.cs @@ -50,7 +50,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.godSlayer = true; modPlayer.godSlayerRanged = true; modPlayer.auricSet = true; - player.crimsonRegen = true; // Inherited from Bloodflare if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) modPlayer.DeferredDashID = GodslayerArmorDash.ID; diff --git a/Items/Armor/Auric/AuricTeslaHeadRogue.cs b/Items/Armor/Auric/AuricTeslaHeadRogue.cs index 6e73e4e0cc..ffe8c73ddf 100644 --- a/Items/Armor/Auric/AuricTeslaHeadRogue.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRogue.cs @@ -56,7 +56,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.auricSet = true; modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; - player.crimsonRegen = true; // Inherited from Bloodflare if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID)) modPlayer.DeferredDashID = GodslayerArmorDash.ID; diff --git a/Items/Armor/Auric/AuricTeslaHeadSummon.cs b/Items/Armor/Auric/AuricTeslaHeadSummon.cs index afe538c9a8..206c06785e 100644 --- a/Items/Armor/Auric/AuricTeslaHeadSummon.cs +++ b/Items/Armor/Auric/AuricTeslaHeadSummon.cs @@ -54,7 +54,6 @@ namespace CalamityMod.Items.Armor.Auric modPlayer.silvaSummon = true; modPlayer.auricSet = true; modPlayer.WearingPostMLSummonerSet = true; - player.crimsonRegen = true; // Inherited from Bloodflare player.maxMinions += SetBonusMinionSlotBoost; player.GetDamage() += SetBonusSummonDamageBoost; } diff --git a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs index a61f3e79c9..c4f3fea04a 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMagic.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMagic.cs @@ -46,7 +46,6 @@ namespace CalamityMod.Items.Armor.Bloodflare modPlayer.bloodflareSet = true; modPlayer.bloodflareMage = true; player.setBonus = this.GetLocalization("SetBonus").Format(GhostBoltCooldown.FramesToSeconds(), BloodsplosionCooldown.FramesToSeconds()); - player.crimsonRegen = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs index bf15e2dad8..ff42b9d5dd 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadMelee.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadMelee.cs @@ -47,7 +47,6 @@ namespace CalamityMod.Items.Armor.Bloodflare modPlayer.bloodflareMelee = true; player.aggro += SetBonusAggroBoost; player.setBonus = this.GetLocalization("SetBonus").Format(HitsToActivateFrenzy, FrenzyDuration.FramesToSeconds(), FrenzyMeleeDamageBoost.ToPercent(), FrenzyContactDamageReduction.ToPercent(), FrenzyCooldown.FramesToSeconds()); - player.crimsonRegen = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs index 79d94d6d44..f4c1376e75 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRanged.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRanged.cs @@ -47,7 +47,6 @@ namespace CalamityMod.Items.Armor.Bloodflare modPlayer.bloodflareSet = true; modPlayer.bloodflareRanged = true; player.setBonus = this.GetLocalization("SetBonus").Format(CalamityUtils.GetArmorSetBonusKey(), SoulCooldown.FramesToSeconds(), BloodBombCooldown.FramesToSeconds()); - player.crimsonRegen = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs index 1eb93b9746..e6c10091c8 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadRogue.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadRogue.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.Armor.Bloodflare modPlayer.rogueStealthMax += SetBonusRogueStealth; modPlayer.wearingRogueArmor = true; player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), DefenseBoostAboveHealthThreshold, DefenseBoostHealthThreshold.ToPercent()); - player.crimsonRegen = true; } public override void UpdateEquip(Player player) diff --git a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs index 22204e8e7c..2748a27213 100644 --- a/Items/Armor/Bloodflare/BloodflareHeadSummon.cs +++ b/Items/Armor/Bloodflare/BloodflareHeadSummon.cs @@ -46,7 +46,6 @@ namespace CalamityMod.Items.Armor.Bloodflare modPlayer.bloodflareSummon = true; modPlayer.WearingPostMLSummonerSet = true; player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), DefenseBoostBelowHealthThreshold, DefenseBoostHealthThreshold.ToPercent()); - player.crimsonRegen = true; player.maxMinions += SetBonusMinionSlotBoost; player.GetDamage() += SetBonusSummonDamageBoost; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 071dab3909..d71e0ef73a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -168,7 +168,6 @@ BloodflareBodyArmor: { Tooltip: "{$CommonItemTooltip.PercentIncreasedDamage} and {$CommonItemTooltip.PercentIncreasedCritChance@1}" CommonSetBonus: ''' - {$Mods.CalamityMod.Vanilla.Armor.SetBonus.Crimson} Enemies below 50% life drop a heart when struck This effect has a 5 second cooldown ''' From bdad99fe4b3c60d95bd0cf2df990e6f8677e4ee6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 10:39:14 +0700 Subject: [PATCH 163/346] bracket cleanup --- CalPlayer/CalamityPlayerMiscEffects.cs | 4 ++-- Items/Accessories/AmbrosialAmpoule.cs | 2 +- Items/CalamityGlobalItemTooltip.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index b5f0bb8acc..2074307b6b 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3654,7 +3654,7 @@ namespace CalamityMod.CalPlayer if (eutrophication) Player.velocity = Vector2.Zero; - if ((vaporfied) || galvanicCorrosion) + if (vaporfied || galvanicCorrosion) Player.velocity *= 0.98f; if (molluskHelmet) @@ -3664,7 +3664,7 @@ namespace CalamityMod.CalPlayer if (molluskLegs) Player.velocity.X *= 0.996f; - if ((warped) && !Player.slowFall && !Player.mount.Active) + if (warped && !Player.slowFall && !Player.mount.Active) { float velocityYMultiplier = 1.01f; Player.velocity.Y *= velocityYMultiplier; diff --git a/Items/Accessories/AmbrosialAmpoule.cs b/Items/Accessories/AmbrosialAmpoule.cs index 0011d11d15..7804ef5748 100644 --- a/Items/Accessories/AmbrosialAmpoule.cs +++ b/Items/Accessories/AmbrosialAmpoule.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.aAmpoule = true; - if (!(modPlayer.purity) && !hideVisual) + if (!modPlayer.purity && !hideVisual) Lighting.AddLight(player.Center, new Vector3(1.2f, 1.2f, 0.72f)); } diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 9ab199e038..c34384f019 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -188,7 +188,7 @@ namespace CalamityMod.Items // If holding SHIFT, actually display the extended tooltip. if (holdingShift && firstTooltipIndex != -1) { - string holdShiftText = (holdShiftItem.TooltipExtensionText == LocalizedText.Empty ? item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey) : holdShiftItem.TooltipExtensionText.ToString()); + string holdShiftText = holdShiftItem.TooltipExtensionText == LocalizedText.Empty ? item.ModItem.GetLocalizedValue(holdShiftItem.TooltipExtensionKey) : holdShiftItem.TooltipExtensionText.ToString(); TooltipLine holdShiftLine = new TooltipLine(Mod, IHoldShiftTooltipItem.ExtensionTooltipID, holdShiftText); if (holdShiftItem.TooltipExtensionColor is not null) holdShiftLine.OverrideColor = holdShiftItem.TooltipExtensionColor; From 19b363fa33c7c3a661c25d68972d7d409fe0124f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:31:14 +0700 Subject: [PATCH 164/346] The Guillotine --- CalPlayer/CalamityPlayer.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 6 +++--- Items/Accessories/AquaticEmblem.cs | 2 +- Items/Accessories/MarniteRepulsionShield.cs | 2 +- Items/Accessories/PhantomicArtifact.cs | 2 +- Items/Accessories/SandCloak.cs | 8 ++++++-- Items/Accessories/SpiritGlyph.cs | 2 +- Items/Accessories/StressPills.cs | 1 - Items/Accessories/UnholyTonic.cs | 9 +++++---- Items/Accessories/ViciousTonic.cs | 9 +++++---- Items/CalamityGlobalItemTweaks.cs | 10 ++++------ Items/Placeables/Furniture/CorruptionEffigy.cs | 2 +- Items/Placeables/Furniture/CrimsonEffigy.cs | 2 +- Items/Tools/Grax.cs | 9 +++++---- Items/Weapons/Summon/BrittleStarStaff.cs | 3 +++ .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 10 +++++----- Localization/en-US/Mods.CalamityMod.Items.Tools.hjson | 2 +- .../en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson | 2 +- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- Projectiles/Typeless/SandCloakVeil.cs | 5 ++--- 20 files changed, 48 insertions(+), 42 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 4049178508..15c5c092ec 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5145,7 +5145,7 @@ namespace CalamityMod.CalPlayer (dragonScales ? 0.1f : 0f) + (CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) + (silvaSet ? SilvaArmor.AccelerationBoost : 0f) + - (getSandCloakAccelBoost ? 0.75f : 0f) + + (getSandCloakAccelBoost ? SandCloak.SandVeilAccelerationBoost : 0f) + (ascendantInsignia ? (AscendantInsignia.AccelerationBoost - 0.25f) : 0f) + // Subtracted 0.25 provided by Soaring Insignia (statisNinjaBelt ? 0.6f : 0f) + (statisVoidSash ? 0.85f : 0f) + diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index b5902d4576..0dd8abd585 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -45,6 +45,7 @@ using CalamityMod.Items.VanillaArmorChanges; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs; using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.Astral; @@ -1224,7 +1225,7 @@ namespace CalamityMod.CalPlayer } if (brittleStar && brittleStarBuffMode) - Player.statDefense += 4 * Player.ownedProjectileCounts[ModContent.ProjectileType()]; + Player.statDefense += BrittleStarStaff.DefenseBoostPerBuffStar * Player.ownedProjectileCounts[ModContent.ProjectileType()]; // Reduce the rate of recovery of the Lifesteal variable // Classic Mode: 36 HP/s to 12 HP/s @@ -2665,7 +2666,7 @@ namespace CalamityMod.CalPlayer if (Player.isNearFairy()) { Player.lifeRegen += 4; - Player.statDefense += 6; + Player.statDefense += 4; Player.moveSpeed += 0.1f; } } @@ -3359,7 +3360,6 @@ namespace CalamityMod.CalPlayer if (graxDefense) { Player.statDefense += Grax.DefenseBoost; - Player.endurance += Grax.DamageReductionBoost; Player.GetDamage() += Grax.DamageBoost; } diff --git a/Items/Accessories/AquaticEmblem.cs b/Items/Accessories/AquaticEmblem.cs index dbe9935d5d..c3106ab870 100644 --- a/Items/Accessories/AquaticEmblem.cs +++ b/Items/Accessories/AquaticEmblem.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxDefenseBoost = 20; + public static int MaxDefenseBoost = 15; public static float MaxMoveSpeedReduction = 0.1f; public static int TimeToReachMaxBoost = CalamityUtils.SecondsToFrames(10); public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(TimeToReachMaxBoost.FramesToSeconds(), MaxDefenseBoost, MaxMoveSpeedReduction.ToPercent()); diff --git a/Items/Accessories/MarniteRepulsionShield.cs b/Items/Accessories/MarniteRepulsionShield.cs index 094772ac70..13913e6373 100644 --- a/Items/Accessories/MarniteRepulsionShield.cs +++ b/Items/Accessories/MarniteRepulsionShield.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Blue; Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.accessory = true; - Item.defense = 3; + Item.defense = 2; } public override void UpdateAccessory(Player player, bool hideVisual) diff --git a/Items/Accessories/PhantomicArtifact.cs b/Items/Accessories/PhantomicArtifact.cs index ab6f1b20eb..d6401dda38 100644 --- a/Items/Accessories/PhantomicArtifact.cs +++ b/Items/Accessories/PhantomicArtifact.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenBoost = 2; - public static int DefenseBoost = 10; + public static int DefenseBoost = 8; public static float SummonDamageBoost = 0.1f; public override void SetStaticDefaults() diff --git a/Items/Accessories/SandCloak.cs b/Items/Accessories/SandCloak.cs index bfe585034b..fad5af576a 100644 --- a/Items/Accessories/SandCloak.cs +++ b/Items/Accessories/SandCloak.cs @@ -1,5 +1,6 @@ using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -8,8 +9,11 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int SandVeilDefenseBoost = 4; - + public static int SandVeilDuration = CalamityUtils.SecondsToFrames(15); + public static int SandVeilDefenseBoost = 3; + public static float SandVeilAccelerationBoost = 0.75f; + public static int SandVeilCooldown = CalamityUtils.SecondsToFrames(15); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(SandVeilDuration.FramesToSeconds(), SandVeilDefenseBoost, SandVeilAccelerationBoost.ToPercent(), SandVeilCooldown.FramesToSeconds()); public override void SetDefaults() { Item.width = 30; diff --git a/Items/Accessories/SpiritGlyph.cs b/Items/Accessories/SpiritGlyph.cs index c190df2877..2140080c95 100644 --- a/Items/Accessories/SpiritGlyph.cs +++ b/Items/Accessories/SpiritGlyph.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public static int RegenBoost = 2; - public static int DefenseBoost = 3; + public static int DefenseBoost = 2; public static float SummonDamageBoost = 0.1f; public override void SetDefaults() diff --git a/Items/Accessories/StressPills.cs b/Items/Accessories/StressPills.cs index 40a8d86dd4..b7a3dd4452 100644 --- a/Items/Accessories/StressPills.cs +++ b/Items/Accessories/StressPills.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Items.Accessories { Item.width = 26; Item.height = 26; - Item.defense = 4; Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; Item.rare = ItemRarityID.Orange; Item.accessory = true; diff --git a/Items/Accessories/UnholyTonic.cs b/Items/Accessories/UnholyTonic.cs index bef8b0ba72..1f3fa71470 100644 --- a/Items/Accessories/UnholyTonic.cs +++ b/Items/Accessories/UnholyTonic.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,6 +10,9 @@ namespace CalamityMod.Items.Accessories public class UnholyTonic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int DefenseBoostInCorruption = 3; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseBoostInCorruption); public override void SetDefaults() { Item.width = 20; @@ -22,10 +26,7 @@ namespace CalamityMod.Items.Accessories { player.buffImmune[ModContent.BuffType()] = true; if (player.ZoneCorrupt) - { - player.statDefense += 6; - player.endurance += 0.04f; - } + player.statDefense += DefenseBoostInCorruption; } public override void AddRecipes() diff --git a/Items/Accessories/ViciousTonic.cs b/Items/Accessories/ViciousTonic.cs index 6df1a140cd..9cff8eb659 100644 --- a/Items/Accessories/ViciousTonic.cs +++ b/Items/Accessories/ViciousTonic.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -9,6 +10,9 @@ namespace CalamityMod.Items.Accessories public class ViciousTonic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int DefenseBoostInCrimson = 3; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseBoostInCrimson); public override void SetDefaults() { Item.width = 20; @@ -22,10 +26,7 @@ namespace CalamityMod.Items.Accessories { player.buffImmune[ModContent.BuffType()] = true; if (player.ZoneCrimson) - { - player.statDefense += 6; - player.endurance += 0.04f; - } + player.statDefense += DefenseBoostInCrimson; } public override void AddRecipes() diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 94410c1bc9..0bc4a75a80 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -288,12 +288,10 @@ namespace CalamityMod.Items #endregion #region CATEGORY 2: Defense Balancing - { ItemID.LavaSkull, Do(DefenseExact(3)) }, // Magma Skull - { ItemID.MoltenCharm, Do(DefenseExact(3)) }, //Magma Charm - { ItemID.MoltenSkullRose, Do(DefenseExact(4)) }, - { ItemID.ObsidianSkull, Do(DefenseExact(2)) }, - { ItemID.ObsidianSkullRose, Do(DefenseExact(3)) }, - { ItemID.Shackle, Do(DefenseExact(3)) }, + { 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)) }, diff --git a/Items/Placeables/Furniture/CorruptionEffigy.cs b/Items/Placeables/Furniture/CorruptionEffigy.cs index f4518459b6..a8a1a05932 100644 --- a/Items/Placeables/Furniture/CorruptionEffigy.cs +++ b/Items/Placeables/Furniture/CorruptionEffigy.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Placeables.Furniture public static float MoveSpeedBoost = 0.1f; public static int CritBoost = 10; // Both 10% so we only need just one in the tooltip - public static float DamageReductionLoss = 0.05f; + public static float DamageReductionLoss = 0.1f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(CritBoost, DamageReductionLoss.ToPercent()); public override void SetDefaults() diff --git a/Items/Placeables/Furniture/CrimsonEffigy.cs b/Items/Placeables/Furniture/CrimsonEffigy.cs index 3a69a53431..1662948a74 100644 --- a/Items/Placeables/Furniture/CrimsonEffigy.cs +++ b/Items/Placeables/Furniture/CrimsonEffigy.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Placeables.Furniture public new string LocalizationCategory => "Items.Placeables"; public static float DamageBoost = 0.15f; - public static int DefenseBoost = 10; + public static int DefenseBoost = 6; public static float MaxHealthLossPercent = 0.1f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), DefenseBoost, MaxHealthLossPercent.ToPercent()); diff --git a/Items/Tools/Grax.cs b/Items/Tools/Grax.cs index 1cd4cc87d7..73deccfbe7 100644 --- a/Items/Tools/Grax.cs +++ b/Items/Tools/Grax.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Tools @@ -14,9 +15,9 @@ namespace CalamityMod.Items.Tools private const int AxePower = 180 / 5; public static float DamageBoost = 0.15f; - public static int DefenseBoost = 30; - public static float DamageReductionBoost = 0.1f; - + public static int DefenseBoost = 15; + public static int GraxBoostDuration = CalamityUtils.SecondsToFrames(10); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DamageBoost.ToPercent(), DefenseBoost, GraxBoostDuration.FramesToSeconds()); public override void SetStaticDefaults() { ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; @@ -72,7 +73,7 @@ namespace CalamityMod.Items.Tools public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { - player.AddBuff(ModContent.BuffType(), 600); + player.AddBuff(ModContent.BuffType(), GraxBoostDuration); } } } diff --git a/Items/Weapons/Summon/BrittleStarStaff.cs b/Items/Weapons/Summon/BrittleStarStaff.cs index 7eb8ef10a1..647b17cfac 100644 --- a/Items/Weapons/Summon/BrittleStarStaff.cs +++ b/Items/Weapons/Summon/BrittleStarStaff.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon @@ -14,6 +15,8 @@ namespace CalamityMod.Items.Weapons.Summon { public new string LocalizationCategory => "Items.Weapons.Summon"; public float Knockback = 2f; + public static int DefenseBoostPerBuffStar = 3; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(DefenseBoostPerBuffStar); public override void SetDefaults() { Item.width = 44; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 52d2f71605..e0892af4e9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1522,9 +1522,9 @@ SandCloak: { Tooltip: ''' Dashing creates a large protective sand veil which damages enemies inside it - The sand veil lasts 15 seconds, but dissipates early if you dash again - The veil slowly follows you, and any player inside it gains 4 defense and 1.75x acceleration - After dissipating, the sand veil has a 15 second cooldown before it can be used again + The sand veil lasts {0} seconds, but dissipates early if you dash again + The veil slowly follows you, and any player inside it gains {1} defense and {2}% acceleration + After dissipating, the sand veil has a {3} second cooldown before it can be used again ''' } @@ -2025,7 +2025,7 @@ UnholyTonic: { DisplayName: Unholy Tonic Tooltip: ''' - Increases damage reduction by 4% and defense by 6 while in the corruption + Increases defense by {0} while in the corruption Grants immunity to [cbuffplr:CalamityMod/BrainRot] ''' } @@ -2066,7 +2066,7 @@ ViciousTonic: { DisplayName: Vicious Tonic Tooltip: ''' - Increases damage reduction by 4% and defense by 6 while in the crimson + Increases defense by {0} while in the crimson Grants immunity to [cbuffplr:CalamityMod/BurningBlood] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 75bc1378a2..0719eba5fb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -195,7 +195,7 @@ Grax: { DisplayName: Grax Tooltip: ''' - Hitting an enemy will greatly boost your damage, defense, and damage reduction for a short time + Hitting an enemy increases your damage by {0}% and defense by {1} for {2} seconds Press to use without hammering down walls or chopping down trees ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 46493b2f39..17ce5b2c53 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -103,7 +103,7 @@ BrittleStarStaff: { Summons a small brittle starfish that will dash through enemies until it shatters Starfish will quickly regenerate after shattering Holding will swap starfish between dashing and circling you - When the starfish are circling, each one provides you with 4 defense + When the starfish are circling, each one provides you with {0} defense ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 6d3948119d..8d31286a5b 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -23,7 +23,7 @@ AddedTooltip: { FairyBoots: ''' Fairies can spawn at any time on the surface and spawn far more frequently - Nearby fairies grant +2 HP/s life regen, 6 defense and 10% movement speed + Nearby fairies grant +2 HP/s life regen, 4 defense and 10% movement speed Fairies are immune to damage and will no longer flee ''' FleshKnucklesLine: Max life increased by 25 diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index 83fe0d5eb8..1165ba2a42 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Projectiles.Typeless { public new string LocalizationCategory => "Projectiles.Typeless"; private const float Radius = 360f; - private const int Duration = 900; public override void SetDefaults() { @@ -22,7 +21,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.ignoreWater = true; Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.timeLeft = Duration; + Projectile.timeLeft = SandCloak.SandVeilDuration; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 10; Projectile.scale = 1.5f; @@ -74,7 +73,7 @@ namespace CalamityMod.Projectiles.Typeless } // Add Sand Cloak cooldown after the sand veil dies - public override void OnKill(int timeLeft) => Main.player[Projectile.owner].AddCooldown(Cooldowns.SandCloak.ID, CalamityUtils.SecondsToFrames(15)); + public override void OnKill(int timeLeft) => Main.player[Projectile.owner].AddCooldown(Cooldowns.SandCloak.ID, SandCloak.SandVeilCooldown); public override bool PreDraw(ref Color lightColor) { From 291e0dffb3923188dc0e28b95c53c48f08b452e5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:32:46 +0700 Subject: [PATCH 165/346] Buffed Chi --- Items/Accessories/TrinketofChi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/TrinketofChi.cs b/Items/Accessories/TrinketofChi.cs index 2330eb43f7..5222c8b13a 100644 --- a/Items/Accessories/TrinketofChi.cs +++ b/Items/Accessories/TrinketofChi.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static float ChiBuffDamageReductionBoost = 0.08f; + public static float ChiBuffDamageReductionBoost = 0.2f; public static int ChiBuffHitlessTime = CalamityUtils.SecondsToFrames(10); public static int RegenBoost = 1; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ChiBuffDamageReductionBoost.ToPercent(), ChiBuffHitlessTime.FramesToSeconds(), RegenBoost.ToRegenPerSecond()); From 2b76ee195b4ee61c2c114d16c46dfa854dacce80 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:38:56 +0700 Subject: [PATCH 166/346] compile pls --- CalPlayer/CalamityPlayer.cs | 2 +- Projectiles/Typeless/SandCloakVeil.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2ace19afda..9992307e78 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5151,7 +5151,7 @@ namespace CalamityMod.CalPlayer (dragonScales ? 0.1f : 0f) + (CobaltSet ? CobaltArmorSetChange.SpeedBoostSetBonusPercentage * 0.01f : 0f) + (silvaSet ? SilvaArmor.AccelerationBoost : 0f) + - (getSandCloakAccelBoost ? SandCloak.SandVeilAccelerationBoost : 0f) + + (getSandCloakAccelBoost ? Items.Accessories.SandCloak.SandVeilAccelerationBoost : 0f) + (ascendantInsignia ? (AscendantInsignia.AccelerationBoost - 0.25f) : 0f) + // Subtracted 0.25 provided by Soaring Insignia (statisNinjaBelt ? 0.6f : 0f) + (statisVoidSash ? 0.85f : 0f) + diff --git a/Projectiles/Typeless/SandCloakVeil.cs b/Projectiles/Typeless/SandCloakVeil.cs index 1165ba2a42..9b788095e1 100644 --- a/Projectiles/Typeless/SandCloakVeil.cs +++ b/Projectiles/Typeless/SandCloakVeil.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.Center += Vector2.Normalize(Owner.Center - Projectile.Center) * (ownerDist > Radius * 0.5f ? 2.5f : 1.25f); // Kill the sand veil early if the owner dashes - if (Owner.dashDelay == -1 && Projectile.timeLeft < Duration - 45) + if (Owner.dashDelay == -1 && Projectile.timeLeft < SandCloak.SandVeilDuration - 45) { if (Projectile.timeLeft > 25) Projectile.timeLeft = 25; @@ -84,8 +84,8 @@ namespace CalamityMod.Projectiles.Typeless Color drawCol = Projectile.GetAlpha(Color.Lerp(lightColor, Color.White, 0.5f)); float drawTransparency = 0.1f; - if (Projectile.timeLeft > Duration - 10) - drawTransparency = (Duration - Projectile.timeLeft) * 0.01f; + if (Projectile.timeLeft > SandCloak.SandVeilDuration - 10) + drawTransparency = (SandCloak.SandVeilDuration - Projectile.timeLeft) * 0.01f; else if (Projectile.timeLeft < 25) drawTransparency = Projectile.timeLeft * 0.004f; From 25f924b96402415a4c53f81cbeeee851c6698662 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 25 Mar 2026 11:45:45 +0700 Subject: [PATCH 167/346] i forgot these --- Prefixes/AccessoryPrefix.cs | 2 +- Prefixes/VanillaPrefixChanges/DefensePrefixChanges.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs index c38c1172b2..5a2128f08a 100644 --- a/Prefixes/AccessoryPrefix.cs +++ b/Prefixes/AccessoryPrefix.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Prefixes public static int GetHealthBoostAmount() { - return 15; + return 20; } } } diff --git a/Prefixes/VanillaPrefixChanges/DefensePrefixChanges.cs b/Prefixes/VanillaPrefixChanges/DefensePrefixChanges.cs index 8d7d538926..88bec366ee 100644 --- a/Prefixes/VanillaPrefixChanges/DefensePrefixChanges.cs +++ b/Prefixes/VanillaPrefixChanges/DefensePrefixChanges.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Prefixes.VanillaPrefixChanges public override IEnumerator PopulateStats() { - yield return new PrefixDefenseStat(5); + yield return new PrefixDRStat(0.03f); } } @@ -47,7 +47,6 @@ namespace CalamityMod.Prefixes.VanillaPrefixChanges public override IEnumerator PopulateStats() { yield return new PrefixDefenseStat(4); - yield return new PrefixDRStat(0.01f); } } } From fff96eb9fbb9cbbf4efcf43d5e8744609d567dcd Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 25 Mar 2026 09:30:17 -0700 Subject: [PATCH 168/346] 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 169/346] 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 170/346] 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 171/346] 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 172/346] 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 173/346] 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 174/346] 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 175/346] 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 176/346] 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 177/346] 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 178/346] 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 179/346] 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 180/346] 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 181/346] 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 182/346] 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 183/346] 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 184/346] 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 185/346] 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 186/346] 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 187/346] 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 188/346] 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 189/346] 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 60846f2b9dac60a87dd1eba81405a54e1edb513a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 29 Mar 2026 00:56:18 -0500 Subject: [PATCH 190/346] eclipse fall --- Items/Weapons/Rogue/EclipsesFall.cs | 14 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 5 + Projectiles/Rogue/EclipseFragment.cs | 107 ++++++++++ Projectiles/Rogue/EclipseFragment.png | Bin 0 -> 5097 bytes Projectiles/Rogue/EclipseSpark.cs | 82 ++++++++ Projectiles/Rogue/EclipseSpear.cs | 182 ++++++++++++++++++ Projectiles/Rogue/EclipseSpear.png | Bin 0 -> 9821 bytes Projectiles/Rogue/EclipsesFallMain.cs | 78 -------- Projectiles/Rogue/EclipsesFallSpear.cs | 154 +++++++++++++++ Projectiles/Rogue/EclipsesSmol.cs | 44 ----- Projectiles/Rogue/EclipsesSmol.png | Bin 1416 -> 0 bytes Projectiles/Rogue/EclipsesSmolGlow.png | Bin 1051 -> 0 bytes Projectiles/Rogue/EclipsesStealth.cs | 129 ------------- Projectiles/Rogue/VegaStar.cs | 3 +- 14 files changed, 536 insertions(+), 262 deletions(-) create mode 100644 Projectiles/Rogue/EclipseFragment.cs create mode 100644 Projectiles/Rogue/EclipseFragment.png create mode 100644 Projectiles/Rogue/EclipseSpark.cs create mode 100644 Projectiles/Rogue/EclipseSpear.cs create mode 100644 Projectiles/Rogue/EclipseSpear.png delete mode 100644 Projectiles/Rogue/EclipsesFallMain.cs create mode 100644 Projectiles/Rogue/EclipsesFallSpear.cs delete mode 100644 Projectiles/Rogue/EclipsesSmol.cs delete mode 100644 Projectiles/Rogue/EclipsesSmol.png delete mode 100644 Projectiles/Rogue/EclipsesSmolGlow.png delete mode 100644 Projectiles/Rogue/EclipsesStealth.cs diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 073d54b200..476e665729 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -17,13 +17,13 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 82; Item.height = 88; - Item.damage = 500; + Item.damage = 900; Item.knockBack = 3.5f; Item.useAnimation = Item.useTime = 24; Item.autoReuse = true; Item.DamageType = RogueDamageClass.Instance; - Item.shootSpeed = 15f; - Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 32f; + Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -35,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.Calamity().StealthStrikeAvailable()) - type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); @@ -50,9 +47,8 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(8). - AddIngredient(8). - AddIngredient(12). + AddIngredient(5). + AddIngredient(15). AddTile(). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 5d761dc64b..4a9d6a9c32 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -334,3 +334,8 @@ WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals +EclipseFragment.DisplayName: Eclipse Fragment +EclipseGuandao.DisplayName: Eclipse Guandao +EclipsesFallSpear.DisplayName: Eclipses Fall Spear +EclipseSpark.DisplayName: Eclipse Spark +EclipseSpear.DisplayName: Eclipse Spear diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs new file mode 100644 index 0000000000..fe05b515d8 --- /dev/null +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -0,0 +1,107 @@ +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipseFragment : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public static int lifetime => 1200; + Color? color = null; + public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * 0.02f; + if (Projectile.ai[0] < -1) + { + Projectile.penetrate = 1; + Projectile.damage = Projectile.originalDamage; + Projectile.stopsDealingDamageAfterPenetrateHits = false; + var target = Projectile.FindTargetWithinRange(4000); + if (target is not null) + { + Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; + Projectile.velocity *= 0.95f; + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); + } + } + + if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) + { + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) + { + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); + Projectile.velocity *= Projectile.ai[2]; + Projectile.ai[2]--; + } + if (Projectile.ai[2] > 0 && Projectile.velocity.Length() > 1) + { + + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); + } + } + else + { + if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) + { + if (Projectile.timeLeft > 100) + Projectile.timeLeft = 100; + Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.velocity *= 0f; + if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) + { + Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; + Main.projectile[(int)Projectile.ai[0] - 1].netUpdate = true; + Projectile.active = false; + } + } + } + } + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) + return false; + return null; + } + + public override void OnKill(int timeLeft) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(Projectile.GetSource_Death(),Projectile.Center,Vector2.Zero,ModContent.ProjectileType(),Projectile.damage,Projectile.knockBack,Projectile.owner); + } + public override bool PreDraw(ref Color lightColor) + { + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + } +} diff --git a/Projectiles/Rogue/EclipseFragment.png b/Projectiles/Rogue/EclipseFragment.png new file mode 100644 index 0000000000000000000000000000000000000000..93296c6a1e958f87d706f2e6c3d1322550eea3dc GIT binary patch literal 5097 zcmZ8lc|25K*guA>S+ayEd!t0zcgAEJ3L#_+CB{0GHO5v*CHoKADH1Z1h9NEf`yT-xT=Dpf~K$Em>zx18+Qi;8i6Ylx2hnSFi)^BASMR zdKQ7SxZ@)GXPMikg^C$~&1KDhVx#uHekoqNH0%T3uFaL(l?8}$0RGvO^XvEV=H4#; z9QBMP$me?Uc$6G#@DU)}b1InuHuVAmIxaJU8a-bCvnHf#KvnIvjhCO%RZbH{7JF~} z06W-zlJ%=n^)vS=N0aB+a_V#xh*4=k0@&G=$7Crcz)B@+0^4$zpa(W*+LAp$s%>a; zLJ;ollcCNa8OS8RH4B`0Nv}NUrf~Wuee$29;Kv^MD1ZkJ zgbB$I8=Um~p*2R4K_%*q@Wltnk%@lHG3`UR6yb|Sdxa)3S^*T{MJZn7I2-6o=I)|Y zhg4U+n*7cN+Q`admoBq|v;DsFnw=`WptyA`Z;%N{w0x7nOI1ux;NN|zVaME_hFa0qjI5X>esN3|2L!Jab-1>#>wXmf3L1}m*1Iius<*`T9n+WnywkQX?X}qeJaRzdm8GYPz04O(&DPe=Ar`0E zerhNu%iF!Xm|nYaAgyjI0APF=PsMsh;1#r0IIIt0yL7nm2u@I<>l4;A^e0bx*x2t4 z)I|WmD}5GM-h`aYQQc1ZG3A(y{r5#p_>a}6md=SX*1KBRU)7mvQHX=k^@r4Gbivf2 z3Lcb4Vo=7b^Q3( zTUxu{qL?z8x=0S#Zda82eIr{zZO^qq$&lJER?sVrzY5GOYxGp4hGiDj-6m8o6DUR;1Zha$|`c}Ya> zd;Y!@Ug|dUIf~UHK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jta6-?DLQV5Vnx0j+n|92Z)uClH()Y#3);l6bR`L}?)QMZQCdkYZ?~ z=kJ7`hf7$>NxT|`9mW}77fNu}YUL@R61GyFdy`xnLoq}VjQdN=X4kOku={f#na3P! z#y1K(#wPF2)i2!)9CMN2Ze;$?xBCo+36mqOv)!cAhranwtNN?D;jA1?zCGIPxvk1e zX!@7Zv3}ImTa%i3w>mzcHIqi2iwR3x!thHdTJtYvlmnhTsk|+>8SlD*$qP#>nA>>` zekNqtT(R6d{4-7p8hWzC+|rkJr|4~G@|M^q3!11IuL!9i%Hq|hNBjHTrg|JU%NIUr zyE3t{j^_;&rVWv8CXI|KUO6A(kw2=YwABcfbBmIL!!%3b^{mCZV+&;Mop-}_FQOw* zktnRoF|gNEqL~~qPWgjelN@F&t8pttt~FCS7<+qt{*7!m|m==Z=L_+!_@2q*$6F8-n4e^9Bp zDCg=t-$H}ef9DBBpNR%|GaTPo?`rdU^Z>MzQec(MS1Fz*hiE!;2-SomT)nK*&iQ5P z#cySNIk!2~2>3(e+o@N8#Al0tx$)~jU90M~#bLNurI)mlzf-CemQB4N)HrS+G7OuO z^FC5zu~0oaaJSDO)^5JTqsT9!s4rOM@F-#f>Wv&KKMYaSp3+$SxsDT#VACTH&#Mqd L7KS+Z^?UyVm-2Oe literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs new file mode 100644 index 0000000000..db09560aa8 --- /dev/null +++ b/Projectiles/Rogue/EclipseSpark.cs @@ -0,0 +1,82 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipseSpark : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int lifetime = 150; + Color? color = null; + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 6; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localAI[0] = 20f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * Projectile.ai[0]; + + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) + { + Projectile.velocity.Normalize(); + Projectile.velocity *= Projectile.localAI[0]; + Projectile.localAI[0]--; + } + + if (Projectile.localAI[0] == 0) + { + Projectile.Kill(); + } + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73),Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center,Projectile.velocity* 0.001f,false,10,1, color.Value)); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); + Projectile.Kill(); + return false; + } + + public override void OnKill(int timeLeft) + { + return; + for (int i = 0; i < 5; i++) + { + int dustToUse = Main.rand.Next(0, 3); + int dustType = 0; + switch (dustToUse) + { + case 0: + dustType = 109; + break; + case 1: + dustType = 111; + break; + case 2: + dustType = 132; + break; + } + + int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, Projectile.velocity.X, Projectile.velocity.Y, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0.75f; + } + } + } +} diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs new file mode 100644 index 0000000000..05dc251e75 --- /dev/null +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs; +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + [PierceResistException] + public class EclipseSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + bool initialized = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + (Vector2 start, Vector2 end) LinePos = (new(), new()); + float LineWidth = 0; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 48; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 1; + Projectile.timeLeft = 600 * Projectile.MaxUpdates; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void AI() + { + if (!initialized) + { + Projectile.ai[0] = -1; + Projectile.localAI[0] = Projectile.ai[2]; + Projectile.ai[2] = 0; + initialized = true; + } + + Projectile.originalDamage = (int)(1000 * (Projectile.ai[2]/20f)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0]) + { + LinePos.end = Projectile.position; + Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; + Projectile.Damage(); + Projectile.ai[0] = -1; + LineWidth = 1f; + LinePos.start = Projectile.Center; + } + Projectile.velocity *= 0.9f; + LineWidth -= 0.05f; + } + public override bool PreDraw(ref Color lightColor) + { + + if (LineWidth > 0) + { + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + + using (Main.spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + + List posList = []; + //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. + for (var i = 0; i <= 10; i++) + { + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 10f)); + } + var pos = posList.ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 32); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 24); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + } + } + var tex = TextureAssets.Item[ModContent.ItemType()]; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied,null,null,null,null,Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * (Projectile.localAI[0] > 0 ? Projectile.ai[2]/Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(),targetHitbox.Size(),Projectile.oldPosition+ new Vector2(Projectile.width,Projectile.height)*0.5f,Projectile.Center,48f,ref _)) + { + return true; + } + + return base.Colliding(projHitbox, targetHitbox); + } + + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < 0) + return false; + return null; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + //Half damage to any NPC that isn't the primary target + if (Projectile.ai[0] != target.whoAmI) + modifiers.SourceDamage *= 0.5f; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Projectile.ai[0] = -1; + Projectile.netUpdate = true; + } + + public override void OnKill(int timeLeft) + { + return; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); + return mainColor * MathF.Pow(1 - completion*1.1f, 0.5f); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + } +} diff --git a/Projectiles/Rogue/EclipseSpear.png b/Proj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ooLZ)!q4eV8HXnu6&M#S;OzE;`b>H0fdQPeA27AFSfjy&3v*8Q4ZYBioz zYBi540ol)sqZs;m+C8nkwBCTBj~BC{U!0y_S8xkFKwtr$2Pp?nWbAGFmubQbkZW42 zio`L?I1y4gE1!OEG1u}R{33WdsNxQcV_;t9tm}`P{eO=hf#VP4`Qv-Q zx90vpkq+#28~A~GjwIXs_gjustib4<#Fec-cf(je7%db`73`hfdFALe3HDXmzBir8 aUZCc`R0755@6Nq5QpQ(IFOv*iAN(I9Qatzo literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipsesFallMain.cs b/Projectiles/Rogue/EclipsesFallMain.cs deleted file mode 100644 index acae2f710c..0000000000 --- a/Projectiles/Rogue/EclipsesFallMain.cs +++ /dev/null @@ -1,78 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesFallMain : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - - // these also affect KB - public static float RainDamageMult = 0.4f; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f); - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => SpawnSpears(target); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => SpawnSpears(target); - - private void SpawnSpears(Entity target) - { - int spearAmt = Main.rand.Next(3, 4 + 1); // 3 or 4 spears - for (int n = 0; n < spearAmt; n++) - { - Vector2 spawnPos = target.Center - new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(500f, 800f)); - Vector2 spearVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, target, 29f, 2) + Vector2.UnitX * Main.rand.NextFloat(-6f, 6f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, spearVel, ModContent.ProjectileType(), (int)(Projectile.damage * RainDamageMult), Projectile.knockBack * RainDamageMult, Projectile.owner); - } - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs new file mode 100644 index 0000000000..f6857c153e --- /dev/null +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.CalPlayer; +using CalamityMod.Particles; +using CalamityMod.Systems.Mechanic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipsesFallSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + private int SplitProjDamage => (int)(Projectile.damage * 0.5f); + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 2; + Projectile.penetrate = 1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; + Projectile.timeLeft = 150 * Projectile.MaxUpdates; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(5)) + { + Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); + float trailScale = Main.rand.NextFloat(0.8f, 1.2f); + Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; + Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); + GeneralParticleHandler.SpawnParticle(eclipseTrail); + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + int onHitCount = 6; + float spread = 20f; + int projectileDamage = SplitProjDamage; + float kb = 5f; + int sparkID = ModContent.ProjectileType(); + int starID = ModContent.ProjectileType(); + for (int i = 0; i < onHitCount; i++) + { + int projID = i % 3 == 0 ? starID : sparkID; + Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; + float speed = Main.rand.NextFloat(1.5f, 2f); + float moveDuration = Main.rand.Next(5, 15); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration,20); + } + + SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); + + + List frags = new(); + var p = -2; + foreach (var item in Main.ActiveProjectiles) + { + + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner) + { + if (Projectile.Calamity().stealthStrike) + { + if (item.timeLeft < 520) + { + item.Kill(); + continue; + } + item.timeLeft = 600; + p = item.whoAmI; + } + item.ai[0] = target.whoAmI; + } + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) + { + frags.Add(item); + } + } + if (Projectile.Calamity().stealthStrike && p < 0) + for (int i = 0; i < 1; i++) + { + int projID = ModContent.ProjectileType(); + Vector2 velocity = Vector2.Zero; + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI,0,Math.Min(20,frags.Count(x => x.ai[0] == 0))); + proj.rotation = Projectile.rotation; + p = proj.whoAmI; + } + + + frags = frags.OrderBy(x => x.timeLeft).ToList(); + int toRemove = frags.Count(x => x.ai[0] == 0) - 20; + foreach (var item in frags) + { + if (toRemove > 0 && item.ai[0] == 0) + { + item.ai[0] = -2; + item.timeLeft = EclipseFragment.lifetime; + toRemove--; + continue; + } + if (Projectile.Calamity().stealthStrike) + { + if (item.ai[0] == 0) + { + item.ai[1] = Main.rand.Next(5, 15); + item.ai[2] = 20; + } + item.ai[0] = p + 1; + item.timeLeft = EclipseFragment.lifetime; + item.damage = 0; + item.netUpdate = true; + } + } + + + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } +} diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs deleted file mode 100644 index f9831d85bc..0000000000 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesSmol : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; - public override void SetDefaults() - { - Projectile.width = Projectile.height = 24; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.timeLeft = 75 * Projectile.MaxUpdates; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 0.5f, 0.4f, 0.15f); - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 16f, 20f); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesSmol.png b/Projectiles/Rogue/EclipsesSmol.png deleted file mode 100644 index 96e05053b1abe262e187e51ede1a71de07e44673..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1416 zcmV;31$X+1P)MyaEkY6BF?SBSi!?+!aJH5zNVlJ+ZdbK~-RmZ=7KW9=QC%%2IDW9JV@8iRb~;xrxWD$BqvN ztt^UJFlg1h0j{i>G2O~>OUGKd`@kbB&)$1u4O*U24wNt}^r{ubtQdo8E3VlSZQkE! z<%8bsRz838wzU}LKt(i38AEe4iNEu{f~gE5K1}Mky)&at)K{)iZ3|TFgKO6M)U!O} zmtYbMQig@HUS0+fch};n_AA-%$c-NvZ7PjX4pdI932DrP!?)~pS3vPEU+#RhJ86HI zqz)P;bZwn${m5QC?ysBcGQLPZ#>Zu6?NUga3TIR(jjI?tP=UFb0vG}cKw;LFD|_vd zY7&fME*2s>b2J!tspCwBIWTF{$6asba3#4ki&c#3<@#c23D; z%T<#`X0jIyB763|cxm-qCr(V83TG4n9jHjwqdMe^v^yiMOd@N2KDr{)g?1xXUbn2N zS`~Bh%-!zqnPqWdSWKHrW0V7xlTqr6=&sJ2cItm<53}fZal=WgV!ep$#dUlbS+D>7 zPiqg8h)X@|O|g$x_*@T0IZzSkLyjB9;FKA8!i_(4bI8cF*KCOY>3=kk{FGTR4n{q_ zFyGqsUU+OJ{VHRW0~LFTrCtGxF(x!eQ|75wDMNS+ox`0zJ};wfsZ1&@>k-(2iZDyX zyfGs6HR(`y)gomQzK2x;&3ZU&G>QA**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Ue~_e?wT+*K^kT9->W!;$P~?5Y6K=h&8P@9i1S$g^trV3gM0im z%A~nbQC*~Hwga-(kH-t81-8@d#duMcjZDU{T5N(e%49U7v@QZ>SdEG*XUt;1m8;K6 zi&?}(`WcU`2WqOEeJvD|(Sxr0fU}O8!ZrC2khFbrqSsKfJy<055ufF)j(sBnnc~hDuHIb zT7}Jd_04vWMwv7-Dl$n?v#67_?$SydV>I>+HKZ?Tl*!byq4f(yF-fzTR_amZ&h~1M z8>6NrjWTI&R4uy!&(ZWA4YcmUM9p?;;#g*-Q6|-^&&+|&m}Wb-UcwCa*NQvJj?_~; zw_`td?RzL`l!IX5PxQG|I%j%4(LzBsBoE z4$>Hd5yUE>A4Al<$T0d_XTLPcr1w=-M2|x^PuncE@_lWbEC9=(rnZ>ri^7sU(zU(=Cgz` zdQTTIE5_7FqfDlrMa^nstyv#5X_U#-7pgO<`|Gk8nd~r;t4G5 z*OS;;Cyg@Mv4pkmH0a-?QAu(D%+37<=V5@&?!?X10000EWmrjOO-%qQ0000800000 V0002eQ "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - - // these also affect KB - public const float RainDamageMult = 0.2f; - public const float ExplosionDamageMult = 0.5f; - - private bool changedTimeLeft = false; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - // Uses localAI[1] to decide how many frames until the next spear drops. - public override void AI() - { - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f); - // Behavior when not sticking to anything - if (Projectile.ai[0] == 0f) - { - // Keep the spear oriented in the correct direction - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - // Behavior when having impaled a target - else - { - // Eclipse's Fall is guaranteed to impale for 10 seconds, no more, no less - if (!changedTimeLeft) - { - Projectile.MaxUpdates = 1; - Projectile.timeLeft = 600; - changedTimeLeft = true; - } - - // Spawn spears. As this uses local AI, it's done client-side only. - if (Projectile.owner == Main.myPlayer) - { - Projectile.localAI[1] -= 1f; - if (Projectile.localAI[1] <= 0f) - { - // Set up the spear counter for next time. Used to be every 5 frames there was a 50% chance; now it's more reliable but slower. - Projectile.localAI[1] = Main.rand.Next(8, 10+1); // 8 to 10 frames between each spearfall - - int type = ModContent.ProjectileType(); - Vector2 spawnPos = Projectile.Center - new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(500f, 800f)); - Vector2 spearVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, Main.npc[(int)Projectile.ai[1]], 29f, 2) + Vector2.UnitX * Main.rand.NextFloat(-6f, 6f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, spearVel, type, (int)(Projectile.damage * RainDamageMult), Projectile.knockBack * RainDamageMult, Projectile.owner); - } - } - } - - // Sticky behavior. Lets the projectile impale enemies and sticks to its impaled enemy automatically. - Projectile.StickyProjAI(10); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(1); - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (targetHitbox.Width > 8 && targetHitbox.Height > 8) - { - targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); - } - return null; - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - - public override bool? CanHitNPC(NPC target) => Projectile.ai[0] == 1f ? false : base.CanHitNPC(target); - - public override bool CanHitPvp(Player target) => Projectile.ai[0] != 1f; - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * ExplosionDamageMult), Projectile.knockBack * ExplosionDamageMult, Projectile.owner); - } - } -} diff --git a/Projectiles/Rogue/VegaStar.cs b/Projectiles/Rogue/VegaStar.cs index 4c2240f9f7..0986d31102 100644 --- a/Projectiles/Rogue/VegaStar.cs +++ b/Projectiles/Rogue/VegaStar.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public class VegaStar : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public static int lifetime = 300; + public static int lifetime => 600; public override void SetStaticDefaults() { @@ -29,7 +29,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 5; - lifetime = 600; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 20f; From d5d5ab26a5b8d74f51a5ca9d7a2d7b0813ede0e8 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 29 Mar 2026 10:26:20 -0700 Subject: [PATCH 191/346] 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 192/346] 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 193/346] 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 975cc6b13d678eb9a9904135ceb6df56477311cd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 30 Mar 2026 19:47:50 -0500 Subject: [PATCH 194/346] paleo / partisan pt 1 --- Items/Weapons/Rogue/ProfanedPartisan.cs | 7 +- Items/Weapons/Rogue/SpearofPaleolith.cs | 5 +- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 19 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 1 + Projectiles/Rogue/EclipseFragment.png | Bin 5097 -> 5334 bytes Projectiles/Rogue/EclipseSpear.cs | 2 +- Projectiles/Rogue/EclipsesFallSpear.cs | 2 +- Projectiles/Rogue/FossilShardThrown.cs | 29 +++- Projectiles/Rogue/ProfanedPartisanFlare.cs | 124 +++++++++++++ Projectiles/Rogue/ProfanedPartisanProj.cs | 164 ++++++++++++------ Projectiles/Rogue/ProfanedPartisanSpear.cs | 90 ++++------ Projectiles/Rogue/SpearofPaleolithProj.cs | 89 ++++++---- 12 files changed, 380 insertions(+), 152 deletions(-) create mode 100644 Projectiles/Rogue/ProfanedPartisanFlare.cs diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 5814d9db9d..11510f690f 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -11,19 +11,20 @@ namespace CalamityMod.Items.Weapons.Rogue { public class ProfanedPartisan : RogueWeapon { + public static int ShardBaseDamage => 88; public override void SetDefaults() { Item.width = 68; Item.height = 68; - Item.damage = 222; + Item.damage = 333; Item.crit = 15; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.noUseGraphic = true; - Item.useTime = 18; - Item.useAnimation = 18; + Item.useTime = 21; + Item.useAnimation = 21; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index 519c1c8cb2..32a36636f4 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -9,11 +9,12 @@ namespace CalamityMod.Items.Weapons.Rogue { public class SpearofPaleolith : RogueWeapon { + public static int ShardBaseDamage => 25; public override void SetDefaults() { Item.width = 54; Item.height = 54; - Item.damage = 65; + Item.damage = 70; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 27; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 35f; + Item.shootSpeed = 6f; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 79545b4952..24cfc9a19e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -358,8 +358,10 @@ EclipsesFall: { DisplayName: Eclipse's Fall Tooltip: ''' - Summons spears from the sky on hit - Stealth strikes impale enemies and summon a constant barrage of spears over time + Throws a javelin that shatters into fragments of primordial light upon enemy hits + If more than 20 fragments exist, the oldest fragments will seek out enemies to attack + Stealth strikes coalsce fragments into an eclipse spear, gaining power based on the number of fragments + The eclipse spear will pierce though any enemy hit by Eclipse's Fall 'When the sun goes dark, you will know judgement' ''' } @@ -865,8 +867,10 @@ ProfanedPartisan: { DisplayName: Profaned Partisan Tooltip: ''' - Fires an unholy spear that explodes on enemy hits - Stealth strikes spawn smaller spears to fly along side it + Throws a profaned spear that splits into miniature spears upon hitting an enemy + Stealth strikes remain impaled in an enemy for 10 seconds + While an enemy is impaled, all spears that strike them instead erupt into homing fireballs + Inflicts [cbuff:CalamityMod/HolyFlames] ''' } @@ -1086,9 +1090,10 @@ SpearofPaleolith: { DisplayName: Spear of Paleolith Tooltip: ''' - Throws an ancient spear that shatters enemy armor - Spears rain fossil shards as they travel - Stealth strikes travel slower but further, raining more fossil shards + Throws an ancient spear that shatters into fossil shards upon hitting an enemy + Stealth strikes remain impaled in the enemy for 10 seconds + While an enemy is impaled, all spears that strike them erupt into even more fossil shards + Inflicts [cbuff:CalamityMod/ArmorCrunch] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 4a9d6a9c32..74ea651bdb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -339,3 +339,4 @@ EclipseGuandao.DisplayName: Eclipse Guandao EclipsesFallSpear.DisplayName: Eclipses Fall Spear EclipseSpark.DisplayName: Eclipse Spark EclipseSpear.DisplayName: Eclipse Spear +ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare diff --git a/Projectiles/Rogue/EclipseFragment.png b/Projectiles/Rogue/EclipseFragment.png index 93296c6a1e958f87d706f2e6c3d1322550eea3dc..fc489108d07fce3d76d96c5523b5ab3ce9a1fe14 100644 GIT binary patch delta 5101 zcmVI(iuxktoFlY50~hjP{LCx??J_X?ae znftg7-90)GHF00BS* zko$8y<+%5{DOazPa<2oq1IFZD3!FN+`>GwvwNUS=lZ!nf-E|=rha~sWkH4Yg!RXPC zzaa;ho*q@X`!@E+2jk>p88=36q>e`Kk2H$!y%6u3ivR%BqNMt%SlWoS4FKfwJOW6= z#UG=c0SdrAOg+!SRSkS(^nY)CsB;LD1ONwvhlhIF18n~H@AzRqRW}`7GH?YiRj z=1aT%G`a1~6&=~cjJ}*pYE}@e0YGz`{Py9F(8=TP+ORLb`d5aZRDbBOKelJE*-n<+ z(L)U6y8Z#IFT?Kx;h5cfU5oWwPdv=_=1c0@r2;^l-3>M<*H312#SO{rdz!XAxpfNb zdl3L~v9K|@0MO1}l=a&{dm4DQzSn^`giM2s;ti;;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VHvaWFM%F(*b5VDr9-hcWKBI33lZ6iH-Solhr0v5Ne zx==|8Sh4H=Nk*J_N?zz@SpC+y-*o?7K5F!_NISxVRO5YEA6Z&NedyxEfCuY(1)xy5ICVFM)g(TDE`pRVAA9aLK_3 z^`agT;ibdl%ozE8?aulv0+kS!$-OrH<>SlxE#DHAM&y`XCse?9!Ve6~Rgp7MT)baR z`?L)Xa%X(dZ431n%zXC(7dhghLuJEL#*&t1+WZ$D(`+MZ6ZRU$J>PZoc~wI4 zR4LrC_o(M!CcnVeduuKWEmac;z71}y8zE7q*;KY92=^+_Ia&N-Sflr!_}<4$INC`f zl*R+&i>nPIx#_kF7Sl;v$uE7|-5bNOWKa_8`P!!0J$yR+;oK*VF_-G`je^dx$%k`w zOSgi?(6R!J9RJsPzrk<`YLs1;heF!W_kd~508I~qt+V;}C!4)@HHAn`|I#|wkGlKn z&@=8=#RaxzFz9pm@YE%&i0nl>k;U{fKrmN6cgthOw{~Fi!qN)%Zf^Z;b1Dd%D^i+= ze<8?2!cG=j+4wW=6~6CE+LHck&5*Jbl5Ee9wtn;Z$^L$ig(0u~@`cZO?(E!LXJ9z+O|a zPEzDJ?JsgoZkVmK+M@uu1~$_=+4}nYluipx3aEn^s$sG|hWEnhybq(HUeaBaGnemO zKQskU>p5LijDu546FRKQzpq%K{FeqR-eX3uXWQJ=All7at!;ZLhFrvq-UgLsY%^78@m$V6u zF|wxBCX^GICApY>LZSASOB!-u!)_rCa&dnrR{JUsf6>uH@~M=!R#}FNime8%qwu=9GMoR9i1p zjSk$W7{@rycX}1xjx3~vXdLz`HXy#pp|V5I0)5Wl4B$UbI)Y1!Vz#sZgsHU&0e<7b F{{Y=#Uj_gG diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 05dc251e75..50161ddbd0 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - Projectile.ai[0] = -1; + //Projectile.ai[0] = -1; Projectile.netUpdate = true; } diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs index f6857c153e..80da75fd77 100644 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = Projectile.height = 40; + Projectile.width = Projectile.height = 50; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index dc34689d70..4dce7a9c4e 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -1,4 +1,6 @@ using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,17 +16,30 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 10; Projectile.height = 10; Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.Arrow; - Projectile.timeLeft = 90; - AIType = ProjectileID.WoodenArrowFriendly; + Projectile.penetrate = 4; + Projectile.aiStyle = ProjAIStyleID.GroundProjectile; + Projectile.timeLeft = 600; + AIType = ProjectileID.SpikyBall; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localNPCHitCooldown = 15; + Projectile.usesLocalNPCImmunity = true; } - public override void AI() + public override bool PreAI() { - Projectile.rotation += Projectile.velocity.Y; - Projectile.velocity.Y *= 1.05f; + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = SpearofPaleolith.ShardBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + + Projectile.velocity.X *= 0.975f; + return true; + } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) + { + fallThrough = false; + return true; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60); diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs new file mode 100644 index 0000000000..231f372217 --- /dev/null +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -0,0 +1,124 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs.Providence; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ProfanedPartisanFlare : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public int timer = 0; + public override string Texture => "CalamityMod/Projectiles/Boss/HolyFire"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 4; + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + } + public override void SetDefaults() + { + Projectile.width = 20; + Projectile.height = 20; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = 3; + Projectile.extraUpdates = 0; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; + Projectile.timeLeft = 600; + Projectile.tileCollide = false; + } + + public override bool? CanHitNPC(NPC target) + { + return true; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + NPC target = null; + public override void AI() + { + + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = ProfanedPartisan.ShardBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0 && target.active && !target.dontTakeDamage) + { + Projectile.Calamity().HomingTarget = target.whoAmI; + var dis = Projectile.Distance(target.Center); + Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis/160)*0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); + } + else + { + target = GetTargetInRange(2000); + } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + public override void OnKill(int timeLeft) + { + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + + for (int i = 0; i < 25; i++) + { + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.8f, 1.2f), hiColor)); + } + + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, 0f, 0.5f, 0.1f, 4)); + + for (float i = 0; i < 1; i += 0.25f) + { + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f * i, 0.075f * i, 24)); + } + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 16)); + + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); + SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + NPC GetTargetInRange(float range) + { + var player = Main.player[Projectile.owner]; + { + NPC gotTarget = null; + float currentDistance = range; + foreach (var npc in Main.ActiveNPCs) + { + if (Projectile.localNPCImmunity[npc.whoAmI] > 0) + continue; + var myDistance = npc.Distance(Projectile.Center); + + if (npc.CanBeChasedBy() && myDistance < currentDistance) + { + currentDistance = myDistance; + gotTarget = npc; + } + } + return gotTarget; + } + } + } +} diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index b7c056a4ad..68b13ed38f 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -1,5 +1,8 @@ -using CalamityMod.Buffs.DamageOverTime; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -13,10 +16,13 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/ProfanedPartisan"; + + public static int Lifetime => 600; + public int ExplodeTime => 60 * Projectile.MaxUpdates; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailingMode[Type] = -1; } public override void SetDefaults() @@ -24,47 +30,91 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; - Projectile.penetrate = 9; - Projectile.timeLeft = 600; - Projectile.extraUpdates = 3; - Projectile.tileCollide = false; + Projectile.penetrate = 1; + Projectile.extraUpdates = 5; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 12; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + } + public float StuckEnemyID + { + get { return Projectile.ai[0]; } + set { Projectile.ai[0] = value; } + } + public float StuckEnemyDistance + { + get { return Projectile.ai[1]; } + set { Projectile.ai[1] = value; } + } + public float StuckEnemyRotation + { + get { return Projectile.ai[2]; } + set { Projectile.ai[2] = value; } } public override void AI() { - if (Projectile.ai[0] < 0.4f) + Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.2f); + if (StuckEnemyID > 0) { - Projectile.ai[0] += 0.1f; + Projectile.tileCollide = false; + if (!Main.npc[(int)StuckEnemyID - 1].active) + { + StuckEnemyID = 0; + Projectile.velocity = -Vector2.UnitY.RotatedByRandom(0.25f) * Main.rand.NextFloat(0, 1f); + Projectile.tileCollide = true; + return; + } + Projectile.Center = Main.npc[(int)StuckEnemyID - 1].Center + Vector2.UnitX.RotatedBy(StuckEnemyRotation) * StuckEnemyDistance; + return; } - else + else if (Projectile.damage == 0) //after running out of penetrate hits, if not impaled or dead { - Projectile.tileCollide = true; + Projectile.velocity *= 0.975f; + float intensity = 1 - Projectile.timeLeft / (float)ExplodeTime; + Projectile.position += Main.rand.NextVector2CircularEdge(intensity, intensity); + + if (Projectile.timeLeft == 1) + { + + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + + for (int i = 0; i < 25; i++) + { + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.8f, 1.2f), hiColor)); + } + + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, 0f, 0.5f, 0.1f, 4)); + + for (float i = 0; i < 1; i += 0.25f) + { + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f * i, 0.075f * i, 24)); + } + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 16)); + + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); + SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); + if (Main.myPlayer == Projectile.owner) + { + for (var i = 0; i < 3; i++) + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i - 1) * 0.25f + Main.rand.NextFloat(-0.1f, 0.1f)) * 24f, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + } + } + } + return; } - //Backwards projectile fix - Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); - Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); - //Rotating 45 degrees if shooting right - if (Projectile.spriteDirection == 1) - { - Projectile.rotation += MathHelper.ToRadians(45f); - DrawOffsetX = -26; - DrawOriginOffsetX = 13; - DrawOriginOffsetY = 2; - } - //Rotating 45 degrees if shooting right - if (Projectile.spriteDirection == -1) - { - Projectile.rotation -= MathHelper.ToRadians(45f); - DrawOffsetX = 2; - DrawOriginOffsetX = -13; - DrawOriginOffsetY = 2; - } + Projectile.velocity *= 0.998f; + if (Projectile.timeLeft < (Lifetime - 45)*Projectile.MaxUpdates) + Projectile.velocity.Y += 0.02f; + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Main.rand.NextBool(3)) { int d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); @@ -72,20 +122,6 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[d].velocity *= 0.3f; Main.dust[d].velocity += Projectile.velocity * 0.85f; } - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.2f); - - if (Projectile.Calamity().stealthStrike) //Stealth strike - { - Vector2 spearPosition = new Vector2(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f)); - Vector2 spearSpeed = Projectile.velocity; - if (Projectile.timeLeft % 18 == 0) - { - int projID = ModContent.ProjectileType(); - int spearDamage = (int)(Projectile.damage * 0.4f); - float spearKB = 1f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner); - } - } } public override void OnKill(int timeLeft) @@ -95,20 +131,48 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 50, default, 2.6f); } SoundEngine.PlaySound(SoundID.Item45, Projectile.position); - - int projID = ModContent.ProjectileType(); - int explosionDamage = (int)(Projectile.damage * 0.8f); - float explosionKB = 8f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner); } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); + float glowIntensity = Projectile.damage == 0 && StuckEnemyID == 0 ? 4f * (1-(Projectile.timeLeft/(float)ExplodeTime)) : 0f; + Projectile.DrawProjectileWithBackglow(Color.Yellow, lightColor, glowIntensity); return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Projectile.tileCollide = false; + if (Projectile.Calamity().stealthStrike) + { + StuckEnemyID = target.whoAmI + 1; + StuckEnemyDistance = Projectile.Distance(target.Center); + StuckEnemyRotation = Projectile.DirectionFrom(target.Center).ToRotation(); + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + } + else + { + Projectile.timeLeft = ExplodeTime; + } + bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); + int splitType = strongSplit ? ModContent.ProjectileType() : ModContent.ProjectileType(); + if (!strongSplit) + for (var i = 0; i < 3; i++) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, 0f); + p.hostile = false; + p.friendly = true; + p.DamageType = Projectile.DamageType; + if (strongSplit) + p.Calamity().conditionalHomingRange = 600; + p.localNPCImmunity[target.whoAmI] = 60; + } + target.AddBuff(ModContent.BuffType(), 180); + if (!strongSplit) + { + Projectile.Kill(); + } + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); } diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 0f9ab63c40..0c9a9b8ab3 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.Providence; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -10,9 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class ProfanedPartisanSpear : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public int timer = 0; - - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; public override void SetDefaults() { Projectile.width = 10; @@ -20,72 +18,60 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; + Projectile.penetrate = 5; + Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (Projectile.ai[1] != 1f) - { - if (Projectile.velocity.X != oldVelocity.X) - { - Projectile.velocity.X = -oldVelocity.X; - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - Projectile.velocity.Y = -oldVelocity.Y; - } - Projectile.ai[1] = 1f; - Projectile.ai[0] = 1f; - Projectile.extraUpdates = 2; - if (Projectile.timeLeft > 280) - Projectile.timeLeft = 280; - } - return false; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 180); - OnHitEffects(); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(ModContent.BuffType(), 180); - OnHitEffects(); - } - - private void OnHitEffects() - { - if (Projectile.ai[1] != 1f) - { - Projectile.velocity.X *= -1f; - Projectile.velocity.Y *= -1f; - Projectile.ai[1] = 1f; - Projectile.ai[0] = 1f; - Projectile.extraUpdates = 2; - if (Projectile.timeLeft > 280) - Projectile.timeLeft = 280; - } } public override void AI() { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - - if (Projectile.ai[0] == 1f) - timer++; - if (timer >= 5) - Projectile.penetrate = 1; - if (timer >= 10) + float timeGateValue = 30f; + if (Projectile.ai[0] <= 0f) //Copied from HolySpear.cs { - CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 300f, 7f, 20f); + Projectile.ai[1] += 1f; + + float slowGateValue = 25f; + float fastGateValue = 10f; + float minVelocity = 2f; + float maxVelocity = minVelocity * 5f; + float extremeVelocity = maxVelocity * 2f; + float deceleration = 0.9f; + float acceleration = 2f; + + if (Projectile.localAI[1] >= timeGateValue) + { + if (Projectile.velocity.Length() < extremeVelocity) + Projectile.velocity *= acceleration; + } + else + { + if (Projectile.ai[1] <= slowGateValue) + { + if (Projectile.velocity.Length() > minVelocity) + Projectile.velocity *= deceleration; + } + else if (Projectile.ai[1] < slowGateValue + fastGateValue) + { + if (Projectile.velocity.Length() < maxVelocity) + Projectile.velocity *= acceleration; + } + else + Projectile.ai[1] = 0f; + } } + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index 1ddf1453bf..f818062d6a 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.StatDebuffs; +using System.Linq; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -11,14 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofPaleolith"; - private bool stealthInit = false; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - + public static int Lifetime => 600; public override void SetDefaults() { Projectile.width = 12; @@ -26,33 +20,51 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.StickProjectile; - Projectile.timeLeft = 600; - AIType = ProjectileID.BoneJavelin; + Projectile.extraUpdates = 5; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; Projectile.DamageType = RogueDamageClass.Instance; } - + public float StuckEnemyID + { + get { return Projectile.ai[0]; } + set { Projectile.ai[0] = value; } + } + public float StuckEnemyDistance + { + get { return Projectile.ai[1]; } + set { Projectile.ai[1] = value; } + } + public float StuckEnemyRotation + { + get { return Projectile.ai[2]; } + set { Projectile.ai[2] = value; } + } public override void AI() { - if (Projectile.Calamity().stealthStrike && !stealthInit) + if (StuckEnemyID > 0) { - Projectile.velocity *= 0.5f; - Projectile.timeLeft = 1800; - stealthInit = true; + Projectile.tileCollide = false; + if (!Main.npc[(int)StuckEnemyID - 1].active) + { + StuckEnemyID = 0; + Projectile.velocity = -Vector2.UnitY.RotatedByRandom(0.25f) * Main.rand.NextFloat(0, 1f); + Projectile.tileCollide = true; + return; + } + Projectile.Center = Main.npc[(int)StuckEnemyID - 1].Center + Vector2.UnitX.RotatedBy(StuckEnemyRotation) * StuckEnemyDistance; + return; } - if (Main.rand.NextBool(4)) + Projectile.velocity *= 0.998f; + if (Projectile.timeLeft < (Lifetime - 25) * Projectile.MaxUpdates) + Projectile.velocity.Y += 0.02f; + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(20)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); } - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); - if (Projectile.timeLeft % 3 == 0) - { - if (Projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } + } public override bool PreDraw(ref Color lightColor) @@ -63,13 +75,32 @@ namespace CalamityMod.Projectiles.Rogue public override void OnKill(int timeLeft) { - for (int i = 0; i <= 10; i++) + for (int i = 0; i <= 5; i++) { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.oldVelocity.X*2.5f, Projectile.oldVelocity.Y*2.5f); } } - 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) + { + if (Projectile.Calamity().stealthStrike) + { + Projectile.stopsDealingDamageAfterPenetrateHits = true; + StuckEnemyID = target.whoAmI + 1; + StuckEnemyDistance = Projectile.Distance(target.Center); + StuckEnemyRotation = Projectile.DirectionFrom(target.Center).ToRotation(); + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + } + + bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); + int shardCount = strongSplit ? 5 : 3; + for (var i = 0; i < shardCount; i++) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); + p.localNPCImmunity[target.whoAmI] = 30; + } + target.AddBuff(ModContent.BuffType(), 120); + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); } From f87b10f211a4ea4e0480f0a057d1ba917a1cbec3 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 30 Mar 2026 19:51:26 -0500 Subject: [PATCH 195/346] 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 196/346] 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 197/346] 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 198/346] 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 199/346] 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 200/346] 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 201/346] 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 202/346] 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 203/346] 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 204/346] 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 205/346] 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 206/346] 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 207/346] 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 208/346] 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 209/346] 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 210/346] 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 211/346] 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 212/346] 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 213/346] 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 214/346] 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 215/346] 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 216/346] 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 217/346] 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 79ab7fc4b33388400ca5d2a6e52a0dbd94c24aa3 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 2 Apr 2026 07:17:35 +0700 Subject: [PATCH 218/346] Manaflation begins (rarity 0-4) --- Items/Weapons/DraedonsArsenal/PulsePistol.cs | 5 ++--- Items/Weapons/Magic/AbyssShocker.cs | 2 +- Items/Weapons/Magic/AquamarineStaff.cs | 5 ++--- Items/Weapons/Magic/BlackAnurian.cs | 5 ++--- Items/Weapons/Magic/BloodBath.cs | 2 +- Items/Weapons/Magic/CoralSpout.cs | 5 ++--- Items/Weapons/Magic/EldritchTome.cs | 2 +- Items/Weapons/Magic/FlareBolt.cs | 5 ++--- Items/Weapons/Magic/FrigidflashBolt.cs | 5 ++--- Items/Weapons/Magic/GloriousEnd.cs | 2 +- Items/Weapons/Magic/HyphaeRod.cs | 5 ++--- Items/Weapons/Magic/ManaRose.cs | 5 ++--- Items/Weapons/Magic/NightsRay.cs | 5 ++--- Items/Weapons/Magic/ParasiticSceptor.cs | 2 +- Items/Weapons/Magic/SandstreamScepter.cs | 5 ++--- Items/Weapons/Magic/Serpentine.cs | 5 ++--- Items/Weapons/Magic/ShaderainStaff.cs | 2 +- Items/Weapons/Magic/SkyGlaze.cs | 5 ++--- Items/Weapons/Magic/TheCauldron.cs | 2 +- Items/Weapons/Magic/Tradewinds.cs | 5 ++--- Items/Weapons/Magic/WulfrumProsthesis.cs | 5 ++--- 21 files changed, 35 insertions(+), 49 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PulsePistol.cs b/Items/Weapons/DraedonsArsenal/PulsePistol.cs index 45033681b3..73226ea694 100644 --- a/Items/Weapons/DraedonsArsenal/PulsePistol.cs +++ b/Items/Weapons/DraedonsArsenal/PulsePistol.cs @@ -24,10 +24,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.DamageType = DamageClass.Magic; Item.damage = 42; Item.knockBack = 3f; - Item.useTime = 64; - Item.useAnimation = 64; + Item.useAnimation = Item.useTime = 64; Item.autoReuse = true; - Item.mana = 15; + Item.mana = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = PulseRifle.FireSound with { Pitch = 0.3f, Volume = 0.7f }; diff --git a/Items/Weapons/Magic/AbyssShocker.cs b/Items/Weapons/Magic/AbyssShocker.cs index bc02df607b..fd4f94262e 100644 --- a/Items/Weapons/Magic/AbyssShocker.cs +++ b/Items/Weapons/Magic/AbyssShocker.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 32; Item.damage = 27; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 14; Item.useAnimation = Item.useTime = 19; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/AquamarineStaff.cs b/Items/Weapons/Magic/AquamarineStaff.cs index a5eab40668..a933cc1bdf 100644 --- a/Items/Weapons/Magic/AquamarineStaff.cs +++ b/Items/Weapons/Magic/AquamarineStaff.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 84; Item.damage = 17; Item.DamageType = DamageClass.Magic; - Item.mana = 3; - Item.useTime = 22; - Item.useAnimation = 22; + Item.mana = 10; + Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.5f; diff --git a/Items/Weapons/Magic/BlackAnurian.cs b/Items/Weapons/Magic/BlackAnurian.cs index 3c40c780a5..0db1cb1d79 100644 --- a/Items/Weapons/Magic/BlackAnurian.cs +++ b/Items/Weapons/Magic/BlackAnurian.cs @@ -16,9 +16,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 38; Item.damage = 21; Item.DamageType = DamageClass.Magic; - Item.mana = 9; - Item.useTime = 18; - Item.useAnimation = 18; + Item.mana = 13; + Item.useAnimation = Item.useTime = 18; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2.75f; diff --git a/Items/Weapons/Magic/BloodBath.cs b/Items/Weapons/Magic/BloodBath.cs index 53bf0748d8..3485e92f94 100644 --- a/Items/Weapons/Magic/BloodBath.cs +++ b/Items/Weapons/Magic/BloodBath.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 50; Item.damage = 24; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 12; Item.useTime = 15; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/CoralSpout.cs b/Items/Weapons/Magic/CoralSpout.cs index 29915efe9f..495e00f293 100644 --- a/Items/Weapons/Magic/CoralSpout.cs +++ b/Items/Weapons/Magic/CoralSpout.cs @@ -25,9 +25,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 9; Item.DamageType = DamageClass.Magic; - Item.mana = 7; - Item.useTime = 26; - Item.useAnimation = 26; + Item.mana = 30; + Item.useAnimation = Item.useTime = 26; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.channel = true; diff --git a/Items/Weapons/Magic/EldritchTome.cs b/Items/Weapons/Magic/EldritchTome.cs index db855f0b79..fefa3f26ea 100644 --- a/Items/Weapons/Magic/EldritchTome.cs +++ b/Items/Weapons/Magic/EldritchTome.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 32; Item.DamageType = DamageClass.Magic; Item.crit = 5; - Item.mana = 7; + Item.mana = 13; Item.useTime = 7; Item.useAnimation = 21; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/FlareBolt.cs b/Items/Weapons/Magic/FlareBolt.cs index 2dfac6fc97..8f3e2f1489 100644 --- a/Items/Weapons/Magic/FlareBolt.cs +++ b/Items/Weapons/Magic/FlareBolt.cs @@ -16,9 +16,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 38; Item.damage = 40; Item.DamageType = DamageClass.Magic; - Item.mana = 22; - Item.useTime = 80; - Item.useAnimation = 80; + Item.mana = 40; + Item.useAnimation = Item.useTime = 80; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Items/Weapons/Magic/FrigidflashBolt.cs b/Items/Weapons/Magic/FrigidflashBolt.cs index c88eaef054..65e04f2664 100644 --- a/Items/Weapons/Magic/FrigidflashBolt.cs +++ b/Items/Weapons/Magic/FrigidflashBolt.cs @@ -27,9 +27,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 42; Item.damage = 95; Item.DamageType = DamageClass.Magic; - Item.mana = 13; - Item.useTime = 20; - Item.useAnimation = 20; + Item.mana = 20; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; diff --git a/Items/Weapons/Magic/GloriousEnd.cs b/Items/Weapons/Magic/GloriousEnd.cs index fa31df187f..77556189d3 100644 --- a/Items/Weapons/Magic/GloriousEnd.cs +++ b/Items/Weapons/Magic/GloriousEnd.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 100; Item.knockBack = 10f; Item.useAnimation = Item.useTime = 30; - Item.mana = 20; + Item.mana = 40; Item.DamageType = DamageClass.Magic; Item.channel = true; Item.shootSpeed = 7f; diff --git a/Items/Weapons/Magic/HyphaeRod.cs b/Items/Weapons/Magic/HyphaeRod.cs index 1a4654ad88..8d9e965715 100644 --- a/Items/Weapons/Magic/HyphaeRod.cs +++ b/Items/Weapons/Magic/HyphaeRod.cs @@ -21,9 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 34; Item.damage = 22; Item.DamageType = DamageClass.Magic; - Item.mana = 7; - Item.useTime = 24; - Item.useAnimation = 24; + Item.mana = 10; + Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; diff --git a/Items/Weapons/Magic/ManaRose.cs b/Items/Weapons/Magic/ManaRose.cs index 79a5e5bdbf..09233ac96a 100644 --- a/Items/Weapons/Magic/ManaRose.cs +++ b/Items/Weapons/Magic/ManaRose.cs @@ -19,9 +19,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 38; Item.damage = 20; Item.DamageType = DamageClass.Magic; - Item.mana = 8; - Item.useTime = 38; - Item.useAnimation = 38; + Item.mana = 15; + Item.useAnimation = Item.useTime = 38; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; diff --git a/Items/Weapons/Magic/NightsRay.cs b/Items/Weapons/Magic/NightsRay.cs index 7cdb460325..89b098e73e 100644 --- a/Items/Weapons/Magic/NightsRay.cs +++ b/Items/Weapons/Magic/NightsRay.cs @@ -20,9 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 54; Item.damage = 20; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 20; - Item.useAnimation = 20; + Item.mana = 15; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.25f; diff --git a/Items/Weapons/Magic/ParasiticSceptor.cs b/Items/Weapons/Magic/ParasiticSceptor.cs index ecae376a81..5a87c385ae 100644 --- a/Items/Weapons/Magic/ParasiticSceptor.cs +++ b/Items/Weapons/Magic/ParasiticSceptor.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = Item.height = 52; Item.damage = 12; Item.knockBack = 3f; - Item.mana = 10; + Item.mana = 12; Item.useAnimation = Item.useTime = 35; Item.autoReuse = true; Item.DamageType = DamageClass.Magic; diff --git a/Items/Weapons/Magic/SandstreamScepter.cs b/Items/Weapons/Magic/SandstreamScepter.cs index f4cb2ed872..fcd7ce5a95 100644 --- a/Items/Weapons/Magic/SandstreamScepter.cs +++ b/Items/Weapons/Magic/SandstreamScepter.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 56; Item.damage = 16; Item.DamageType = DamageClass.Magic; - Item.mana = 4; - Item.useTime = 20; - Item.useAnimation = 20; + Item.mana = 7; + Item.useAnimation = Item.useTime = 20; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1f; diff --git a/Items/Weapons/Magic/Serpentine.cs b/Items/Weapons/Magic/Serpentine.cs index 2a9e1ff387..24722773df 100644 --- a/Items/Weapons/Magic/Serpentine.cs +++ b/Items/Weapons/Magic/Serpentine.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 10; Item.ArmorPenetration = ArmorPenetration; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 35; - Item.useAnimation = 35; + Item.mana = 22; + Item.useAnimation = Item.useTime = 35; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; diff --git a/Items/Weapons/Magic/ShaderainStaff.cs b/Items/Weapons/Magic/ShaderainStaff.cs index 8fc506cf8e..883a3f8033 100644 --- a/Items/Weapons/Magic/ShaderainStaff.cs +++ b/Items/Weapons/Magic/ShaderainStaff.cs @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = Item.height = 42; Item.damage = 19; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 14; Item.useAnimation = Item.useTime = 34; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index cc5d6061da..0af3e7787a 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 74; Item.damage = 8; Item.DamageType = DamageClass.Magic; - Item.mana = 8; - Item.useTime = 25; - Item.useAnimation = 25; + Item.mana = 9; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; diff --git a/Items/Weapons/Magic/TheCauldron.cs b/Items/Weapons/Magic/TheCauldron.cs index 065b00b449..7ba64395a2 100644 --- a/Items/Weapons/Magic/TheCauldron.cs +++ b/Items/Weapons/Magic/TheCauldron.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.useStyle = ItemUseStyleID.Swing; Item.useTime = Item.useAnimation = 60; Item.knockBack = 8f; - Item.mana = 18; + Item.mana = 30; Item.UseSound = SoundID.DD2_MonkStaffSwing; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityOrangeBuyPrice; diff --git a/Items/Weapons/Magic/Tradewinds.cs b/Items/Weapons/Magic/Tradewinds.cs index 7a665800ad..1b3f482bb5 100644 --- a/Items/Weapons/Magic/Tradewinds.cs +++ b/Items/Weapons/Magic/Tradewinds.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 23; Item.DamageType = DamageClass.Magic; - Item.mana = 5; - Item.useTime = 15; - Item.useAnimation = 15; + Item.mana = 6; + Item.useAnimation = Item.useTime = 15; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5; diff --git a/Items/Weapons/Magic/WulfrumProsthesis.cs b/Items/Weapons/Magic/WulfrumProsthesis.cs index 1028f4af5a..adbbc94821 100644 --- a/Items/Weapons/Magic/WulfrumProsthesis.cs +++ b/Items/Weapons/Magic/WulfrumProsthesis.cs @@ -32,9 +32,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 42; Item.damage = 18; Item.DamageType = DamageClass.Magic; - Item.mana = 5; - Item.useTime = 24; - Item.useAnimation = 24; + Item.mana = 10; + Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3; From 6f489446a0e02f59961985748af265c3b291d742 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Wed, 1 Apr 2026 18:16:49 -0700 Subject: [PATCH 219/346] reverted nearly all mana cost edits for vanilla weapons --- Items/CalamityGlobalItemTweaks.cs | 33 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index d51e357e31..69e36d61f1 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -52,19 +52,18 @@ namespace CalamityMod.Items { 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.BeeGun, Do(DamageExact(11)) }, // VANILLA: 9 DMG { 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.BlizzardStaff, Do(DamageExact(41)) }, // VANILLA: 58 DMG { 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)) }, // 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 @@ -114,10 +113,10 @@ namespace CalamityMod.Items { 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.Flamelash, Do(DamageExact(36)) }, // VANILLA: 32 DMG { 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.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed + { ItemID.FlowerofFrost, Do(DamageExact(70), UseExact(22), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 12 UT, 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 @@ -147,18 +146,18 @@ namespace CalamityMod.Items { 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.LaserRifle, Do(DamageExact(46), UseExact(10)) }, // VANILLA: 29 DMG, 12 UT + { ItemID.LastPrism, Do(DamageExact(57)) }, // VANILLA: 100 DMG { 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.MagicMissile, Do(DamageExact(23), UseAnimationExact(20), UseTimeExact(10)) }, // VANILLA: 35 DMG, 22 UT/UA { ItemID.Marrow, Do(DamageExact(60)) }, // VANILLA: 53 DMG - { ItemID.MedusaHead, Do(DamageExact(75), ManaExact(6)) }, // VANILLA: 40 DMG, 15 MANA + { ItemID.MedusaHead, Do(DamageExact(75)) }, // VANILLA: 40 DMG { 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.MeteorStaff, Do(DamageExact(58), ShootSpeedExact(13f)) }, // VANILLA: 50 DMG, 10 VEL { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG @@ -175,7 +174,7 @@ namespace CalamityMod.Items { 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.NettleBurst, Do(DamageExact(65)) }, // VANILLA: 35 DMG { ItemID.NightsEdge, Do(TrueMelee, DamageExact(45)) }, // VANILLA: 40 DMG { ItemID.NorthPole, Do(UseMeleeSpeed) }, { ItemID.OrangePhaseblade, phaseblade }, @@ -200,8 +199,8 @@ namespace CalamityMod.Items { ItemID.PurplePhaseblade, phaseblade }, { ItemID.PurplePhasesaber, phasesaber }, { 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.RainbowGun, Do(DamageExact(60)) }, // VANILLA: 45 DMG + { ItemID.RainbowRod, Do(DamageExact(40), KnockbackExact(8f)) }, // VANILLA: 50 DMG, 6 KB { ItemID.Rally, Do(DamageExact(18)) }, // VANILLA: 14 DMG { ItemID.RavenStaff, Do(DamageExact(36)) }, // VANILLA: 55 DMG { ItemID.RazorbladeTyphoon, Do(DamageExact(103)) }, // VANILLA: 85 DMG @@ -232,7 +231,7 @@ namespace CalamityMod.Items { 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.SpiritFlame, Do(UseExact(20), ShootSpeedExact(2f)) }, // VANILLA: 22 UT, 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 @@ -257,7 +256,7 @@ namespace CalamityMod.Items { 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.ToxicFlask, Do(DamageExact(62), UseExact(33)) }, // VANILLA: 52 DMG, 45 UT { 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 @@ -267,7 +266,7 @@ namespace CalamityMod.Items { 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.UnholyTrident, Do(DamageRatio(0.91f)) }, // VANILLA: 88 DMG. 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 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 220/346] 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 221/346] 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 dc302f59e8841d52e2a558564342b77de4ae0470 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 13:04:03 -0700 Subject: [PATCH 222/346] Several debuff changes --- Projectiles/Melee/Spears/NadirSpear.cs | 2 +- Projectiles/Melee/VoidEssence.cs | 2 +- Projectiles/Rogue/CosmicKunaiProj.cs | 6 +++++- Projectiles/Rogue/HypothermiaChunk.cs | 4 ++-- Projectiles/Rogue/HypothermiaShard.cs | 2 -- Projectiles/Summon/CosmilampBeam.cs | 2 -- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Projectiles/Melee/Spears/NadirSpear.cs b/Projectiles/Melee/Spears/NadirSpear.cs index 1f02d2c570..672789f03f 100644 --- a/Projectiles/Melee/Spears/NadirSpear.cs +++ b/Projectiles/Melee/Spears/NadirSpear.cs @@ -71,6 +71,6 @@ namespace CalamityMod.Projectiles.Melee.Spears Main.dust[idx].velocity = Vector2.Zero; } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); } } diff --git a/Projectiles/Melee/VoidEssence.cs b/Projectiles/Melee/VoidEssence.cs index 52d4a597c0..c14a4dc8c7 100644 --- a/Projectiles/Melee/VoidEssence.cs +++ b/Projectiles/Melee/VoidEssence.cs @@ -154,7 +154,7 @@ namespace CalamityMod.Projectiles.Melee Main.dust[idx].scale = scale; } - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(ModContent.BuffType(), 30); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Rogue/CosmicKunaiProj.cs b/Projectiles/Rogue/CosmicKunaiProj.cs index ce32ce7a81..fbf7c948a3 100644 --- a/Projectiles/Rogue/CosmicKunaiProj.cs +++ b/Projectiles/Rogue/CosmicKunaiProj.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -32,5 +34,7 @@ namespace CalamityMod.Projectiles.Rogue Lighting.AddLight(Projectile.Center, (255 - Projectile.alpha) * 0.5f / 255f, (255 - Projectile.alpha) * 0f / 255f, (255 - Projectile.alpha) * 0.5f / 255f); CalamityUtils.HomeInOnNPC(Projectile, true, 300f, 12f, 20f); } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60); + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 60); } } diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index eb0ba1a84b..889f1f140f 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -73,13 +73,13 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 300); + target.AddBuff(ModContent.BuffType(), 300); target.AddBuff(BuffID.Frozen, 150); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { - target.AddBuff(ModContent.BuffType(), 300); + target.AddBuff(ModContent.BuffType(), 300); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/HypothermiaShard.cs b/Projectiles/Rogue/HypothermiaShard.cs index 987c2786bd..4da315507f 100644 --- a/Projectiles/Rogue/HypothermiaShard.cs +++ b/Projectiles/Rogue/HypothermiaShard.cs @@ -59,8 +59,6 @@ namespace CalamityMod.Projectiles.Rogue return 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); public override void OnKill(int timeLeft) { for (int k = 0; k < 3; k++) diff --git a/Projectiles/Summon/CosmilampBeam.cs b/Projectiles/Summon/CosmilampBeam.cs index 4c97013286..36b9c5cd24 100644 --- a/Projectiles/Summon/CosmilampBeam.cs +++ b/Projectiles/Summon/CosmilampBeam.cs @@ -105,8 +105,6 @@ namespace CalamityMod.Projectiles.Summon return MathHelper.Lerp(0f, maxWidth, expansionCompletion); } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 240); - public override bool PreDraw(ref Color lightColor) { Projectile.localAI[0] = 0f; From 3e43dc4d6cc80c15694df413212c2de66a71571f Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 13:06:33 -0700 Subject: [PATCH 223/346] Retired ENNWAY, HaguriHat is now ArchonSystem --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index f50c787909..50e46ed2b4 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings { "Altixal", "apotofkoolaid", + "ArchonSystem", "Atalya", "Ben-TK", "Big E", @@ -64,11 +65,9 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Dia", "Done", "dozezoze", - "ENNWAY", "Flowaria", "Fluffy", "fryzahh", - "HaguriHat", "jasper", "LordMetarex", "math2", @@ -120,6 +119,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Ein", "enamoured", "Enreden", + "ENNWAY", "Epsilon", "Fargowilta", "Frous", 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 224/346] 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 347b5e6dc09603bd998257089601b335d6b5410a Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 13:31:01 -0700 Subject: [PATCH 225/346] Endo Hydra no longer inflicts Voidfrost --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- Projectiles/Summon/EndoHydraRay.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index ec4d7d4bc6..1c17da98f8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -906,7 +906,7 @@ Nadir: { DisplayName: Nadir Tooltip: ''' - Fires void essences which flay nearby enemies with [cbuff:CalamityMod/Nightwither] tentacles + Fires void essences which flay nearby enemies with [cbuff:CalamityMod/Voidfrost] tentacles 'The abyss has stared back at you long enough. It now speaks, and it does not speak softly' ''' } diff --git a/Projectiles/Summon/EndoHydraRay.cs b/Projectiles/Summon/EndoHydraRay.cs index afc80011de..4493110678 100644 --- a/Projectiles/Summon/EndoHydraRay.cs +++ b/Projectiles/Summon/EndoHydraRay.cs @@ -46,9 +46,5 @@ namespace CalamityMod.Projectiles.Summon } } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 180); - } } } From c3aec4c29d17a86cd200db6465e272b34d4854da Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 13:33:28 -0700 Subject: [PATCH 226/346] Removed (Universe) from TYESKI's Thank You name --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index 50e46ed2b4..7d1da4f007 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "_tofu", "Tomat", "Triangle", - "TYESKI (Universe)", + "TYESKI", "Xyk", "YuH", // Former devs From 94200b251de9dfc0c6df5af861e5297cc70b7bec Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 14:16:30 -0700 Subject: [PATCH 227/346] Helium Flash now always crits and scales with crit damage --- Items/Weapons/Magic/HeliumFlash.cs | 9 ++++++++- Projectiles/Magic/HeliumFlashBlast.cs | 2 ++ Projectiles/Magic/VolatileStarcore.cs | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 356a140f32..c6f37bff86 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; using CalamityMod.Rarities; +using CalamityMod.Systems.Collections; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Terraria; @@ -23,12 +24,18 @@ namespace CalamityMod.Items.Weapons.Magic public static int AftershotCooldownFrames = 17; public static int FullChargeFrames = 88; + public override void SetStaticDefaults() + { + base.SetStaticDefaults(); + CalamityItemSets.ShowScalingCritDamageTooltip[Type] = true; + } + public override void SetDefaults() { Item.width = 112; Item.height = 112; Item.DamageType = DamageClass.Magic; - Item.damage = 5100; + Item.damage = 2700; Item.knockBack = 9.5f; Item.mana = 80; Item.useAnimation = Item.useTime = AftershotCooldownFrames; diff --git a/Projectiles/Magic/HeliumFlashBlast.cs b/Projectiles/Magic/HeliumFlashBlast.cs index d0d7bb0ca4..551012e2a7 100644 --- a/Projectiles/Magic/HeliumFlashBlast.cs +++ b/Projectiles/Magic/HeliumFlashBlast.cs @@ -1,4 +1,5 @@ using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -130,6 +131,7 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + modifiers.ApplyScalingForcedCrit(Projectile); if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.85f); if (Projectile.damage < 1) diff --git a/Projectiles/Magic/VolatileStarcore.cs b/Projectiles/Magic/VolatileStarcore.cs index 8a061d7cf4..a37f329c4f 100644 --- a/Projectiles/Magic/VolatileStarcore.cs +++ b/Projectiles/Magic/VolatileStarcore.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Particles; +using CalamityMod.Utilities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -109,6 +110,11 @@ namespace CalamityMod.Projectiles.Magic target.AddBuff(BuffID.Daybreak, 180); } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.ApplyScalingForcedCrit(Projectile); + } + public override void OnKill(int timeLeft) { if (Projectile.owner != Main.myPlayer) From d77bef02b0e4eea2eadb5101422cebc7d99f5e6f Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 15:06:22 -0700 Subject: [PATCH 228/346] Added more items to CannotProc --- CalPlayer/CalamityPlayerOnHit.cs | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 4 ++-- Projectiles/Rogue/SamsaraSlicerSmallDisk.cs | 1 + Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f6ea8ea8b2..3470795176 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1100,12 +1100,12 @@ namespace CalamityMod.CalPlayer if (npcCheck) { // Umbraphile cannot trigger off of itself. It is guaranteed on stealth strikes and 20% chance otherwise. - if (umbraphileSet && ((modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) || Main.rand.NextBool(5))) + if (umbraphileSet && ((modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) || Main.rand.NextBool(5)) && !modProj.CannotProc) { int umbraBlastDamage = CalamityUtils.DamageSoftCap(proj.damage * UmbraphileHood.ExplosionDamageRatio, UmbraphileHood.ExplosionDamageSoftcap); Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), umbraBlastDamage, 0f, Player.whoAmI); } - if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 3) + if (electricianGlove && modProj.stealthStrike && modProj.stealthStrikeHitCount < 3 && !modProj.CannotProc) { for (int s = 0; s < 3; s++) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 5aea36abe3..062dc15c5c 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4699,7 +4699,7 @@ namespace CalamityMod.Projectiles } // Scuttler's Jewel projectiles can spawn either on-hit or on-kill, but only spawn once per projectile. - if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.CountsAsClass() && modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) + if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.CountsAsClass() && modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned && !CannotProc) { int damage = (int)player.GetTotalDamage().ApplyTo(16); @@ -5195,7 +5195,7 @@ namespace CalamityMod.Projectiles } // Make sure the spike doesn't spawn again if it's already been spawned by on-hit. - if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) + if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned && !CannotProc) { int damage = (int)player.GetTotalDamage().ApplyTo(16); diff --git a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs index 94be412dca..b2e33bb877 100644 --- a/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs +++ b/Projectiles/Rogue/SamsaraSlicerSmallDisk.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 5; Projectile.ArmorPenetration = 20; + Projectile.Calamity().CannotProc = true; } public override void AI() diff --git a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs index cbbd158e99..3a187f0a0a 100644 --- a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs +++ b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs @@ -29,6 +29,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.alpha = 255; Projectile.timeLeft = 360; Projectile.penetrate = 1; + Projectile.Calamity().CannotProc = true; } public override void AI() From 6e1030178dc0d94ab8d410ece8b78d0b02eb2a02 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 18:34:54 -0700 Subject: [PATCH 229/346] Flesh Totem buff --- CalPlayer/CalamityPlayerHitHurt.cs | 1 - .../en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- Projectiles/Magic/FleshTotemMinion.cs | 9 ++++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 2c8276d8ee..b3f5d7ba00 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -2348,7 +2348,6 @@ namespace CalamityMod.CalPlayer } } } - fleshTotemManaStorage = 0; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b2ab571ea3..f76d61f256 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -794,7 +794,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 20 mana + The effigy occasionally pulses, restoring 25 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/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 065e405317..0fcca92b6b 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -76,15 +76,14 @@ 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); + //Pulses happen every 4 seconds, divided by how much mana the totem has stored + int pulseMax = (modPlayer.fleshTotemManaStorage * 3 / 10); //Ensure the pulse timer can never go below 1 second if (pulseMax < 60) { pulseMax = 60; } - //When the timer reaches max, pulse and restore 20 mana + //When the timer reaches max, pulse and restore 25 mana if (pulseTimer >= pulseMax) { if (visuals) @@ -114,7 +113,7 @@ namespace CalamityMod.Projectiles.Magic } } } - int manaGained = 20; + int manaGained = 25; player.statMana += manaGained; if (Main.myPlayer == player.whoAmI) player.ManaEffect(manaGained); From 412cd3db499ad60de02e33d7a64c1c023d5ef150 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 18:48:03 -0700 Subject: [PATCH 230/346] Fixed Flesh Totem scaling backwards --- Items/Accessories/FleshTotem.cs | 2 ++ Projectiles/Magic/FleshTotemMinion.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index 0d19323f73..078e6827e3 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -13,6 +13,8 @@ namespace CalamityMod.Items.Accessories public static int manaStorageMax = 600; public const int lostSoulDamage = 200; + public static int MinDelay => 60; + public static int MaxDelay => 240; public override void SetDefaults() { diff --git a/Projectiles/Magic/FleshTotemMinion.cs b/Projectiles/Magic/FleshTotemMinion.cs index 0fcca92b6b..392cdbc545 100644 --- a/Projectiles/Magic/FleshTotemMinion.cs +++ b/Projectiles/Magic/FleshTotemMinion.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation = 0f; } //Pulses happen every 4 seconds, divided by how much mana the totem has stored - int pulseMax = (modPlayer.fleshTotemManaStorage * 3 / 10); + float pulseMax = Utils.Remap(modPlayer.fleshTotemManaStorage, 0, FleshTotem.manaStorageMax, FleshTotem.MaxDelay, FleshTotem.MinDelay); //Ensure the pulse timer can never go below 1 second if (pulseMax < 60) { From dfdb16a17526c9baaeb6a1e927146d9cc774e7cb Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 2 Apr 2026 21:35:19 -0500 Subject: [PATCH 231/346] phantomic artifact buff 100 -> 300 base dmg --- CalPlayer/CalamityPlayerOnHit.cs | 2 +- Items/Accessories/PhantomicArtifact.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 3470795176..5e6113ca74 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -899,7 +899,7 @@ namespace CalamityMod.CalPlayer { if (Player.ownedProjectileCounts[ProjectileType()] < 3 && Main.rand.NextBool(4)) { - int damage = (int)Player.GetTotalDamage().ApplyTo(100); + int damage = (int)Player.GetTotalDamage().ApplyTo(PhantomicArtifact.DaggerDamage); Projectile.NewProjectile(source, Player.Center, new Vector2(Player.velocity.X,Player.velocity.Y-10).RotatedByRandom(0.3f), ProjectileType(), damage, 1f, Player.whoAmI); } } diff --git a/Items/Accessories/PhantomicArtifact.cs b/Items/Accessories/PhantomicArtifact.cs index 9804f10732..28a37b992d 100644 --- a/Items/Accessories/PhantomicArtifact.cs +++ b/Items/Accessories/PhantomicArtifact.cs @@ -17,9 +17,10 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int RegenBoost = 2; - public static int DefenseBoost = 8; - public static float SummonDamageBoost = 0.1f; + public static int RegenBoost => 2; + public static int DefenseBoost => 8; + public static float SummonDamageBoost => 0.1f; + public static float DaggerDamage => 300; public LocalizedText TooltipExtensionText => this.GetLocalization("HoldShiftTooltip").WithFormatArgs(SummonDamageBoost.ToPercent(), DefenseBoost, RegenBoost.ToRegenPerSecond()); public override void SetStaticDefaults() { From 2fbb5a3d2fea34be688519b264ddb3a2d81a7cb8 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 2 Apr 2026 23:48:57 -0700 Subject: [PATCH 232/346] Reduced Dryad's Tear Screenshake --- Projectiles/Ranged/DryadsTearMain.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index b014d84d92..6c3da77866 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -336,7 +336,7 @@ namespace CalamityMod.Projectiles.Ranged blast.ArmorPenetration = Projectile.ArmorPenetration; } if (damageMult >= 0.75f) - Owner.SetScreenshake(6f * damageMult); + Owner.SetScreenshake(3f * damageMult); } } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) @@ -351,7 +351,6 @@ namespace CalamityMod.Projectiles.Ranged } if (damageMult >= 0.75f) { - Owner.SetScreenshake(4f * damageMult); float angle = Main.rand.NextFloat(0, MathHelper.TwoPi); for (int i = -6; i <= 6; i++) // 12 { From 60489f54c299a0dc94b62256c1a78fd7313d60e6 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 3 Apr 2026 15:28:53 -0500 Subject: [PATCH 233/346] 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 234/346] 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 650d39d2d5cc0ff3f307f797489702da03c2c075 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 3 Apr 2026 21:29:41 -0500 Subject: [PATCH 235/346] prim fix + whole line tweaks --- Graphics/Primitives/PrimitiveRenderer.cs | 4 +- Graphics/Primitives/PrimitiveSettings.cs | 2 +- Projectiles/Rogue/EclipseFragment.cs | 104 ++++++++++++++--- Projectiles/Rogue/EclipseSpark.cs | 124 ++++++++++++++++----- Projectiles/Rogue/EclipseSpear.cs | 8 +- Projectiles/Rogue/FossilShardThrown.cs | 11 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 74 +++++++++++- Projectiles/Rogue/ProfanedPartisanSpear.cs | 5 +- Projectiles/Rogue/SpearofPaleolithProj.cs | 16 ++- 9 files changed, 287 insertions(+), 61 deletions(-) diff --git a/Graphics/Primitives/PrimitiveRenderer.cs b/Graphics/Primitives/PrimitiveRenderer.cs index 8c9a78f382..d962242faa 100644 --- a/Graphics/Primitives/PrimitiveRenderer.cs +++ b/Graphics/Primitives/PrimitiveRenderer.cs @@ -322,7 +322,7 @@ namespace CalamityMod.Graphics.Primitives } // Legacy behaviour: sample based on requested point count using Catmull-Rom style interpolation. - PositionsIndex = 1; + PositionsIndex = 0; float controlCountMinusOne = controlCount - 1f; PrimitiveSmoothingType legacyType = settings.SmoothingType; @@ -344,8 +344,6 @@ namespace CalamityMod.Graphics.Primitives MainPositions[PositionsIndex] = EvaluateCurve(legacyType, p0, p1, p2, p3, localSplineInterpolant, settings); PositionsIndex++; } - - MainPositions[0] = controlPoints[0]; MainPositions[PositionsIndex] = controlPoints[controlCount - 1]; PositionsIndex++; controlPoints.Clear(); diff --git a/Graphics/Primitives/PrimitiveSettings.cs b/Graphics/Primitives/PrimitiveSettings.cs index ebc4b51fcd..7996352e4e 100644 --- a/Graphics/Primitives/PrimitiveSettings.cs +++ b/Graphics/Primitives/PrimitiveSettings.cs @@ -309,7 +309,7 @@ namespace CalamityMod.Graphics.Primitives SmoothingTension = smoothingTension; FrameTransportMode = frameTransportMode; Topology = topology; - CapStyle = PrimitiveCapStyle.Flat; + CapStyle = capStyle; } } } diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs index fe05b515d8..d3a9935295 100644 --- a/Projectiles/Rogue/EclipseFragment.cs +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -1,10 +1,13 @@ -using CalamityMod.Particles; +using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.Audio; using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -15,7 +18,12 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public static int lifetime => 1200; Color? color = null; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 40; @@ -29,6 +37,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.idStaticNPCHitCooldown = 10; Projectile.MaxUpdates = 2; Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.tileCollide = false; } public override void AI() @@ -44,8 +53,6 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; Projectile.velocity *= 0.95f; - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); } } @@ -54,15 +61,9 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) { Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); - Projectile.velocity *= Projectile.ai[2]; + Projectile.velocity *= Projectile.ai[2]; Projectile.ai[2]--; } - if (Projectile.ai[2] > 0 && Projectile.velocity.Length() > 1) - { - - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); - } } else { @@ -71,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft > 100) Projectile.timeLeft = 100; Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); - Projectile.velocity *= 0f; + Projectile.velocity = new(0, 1E-05f); if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) { Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; @@ -91,10 +92,39 @@ namespace CalamityMod.Projectiles.Rogue public override void OnKill(int timeLeft) { if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(Projectile.GetSource_Death(),Projectile.Center,Vector2.Zero,ModContent.ProjectileType(),Projectile.damage,Projectile.knockBack,Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } public override bool PreDraw(ref Color lightColor) { + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16).ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + using (Main.spriteBatch.Scope()) { Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); @@ -103,5 +133,51 @@ namespace CalamityMod.Projectiles.Rogue } return false; } + + // Matches Saros Possesion sunfire with slight edits + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(238, 226, 153); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return mainColor; + } } } diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs index db09560aa8..00b437d0a9 100644 --- a/Projectiles/Rogue/EclipseSpark.cs +++ b/Projectiles/Rogue/EclipseSpark.cs @@ -1,7 +1,13 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Particles; +using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -12,6 +18,12 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public static int lifetime = 150; Color? color = null; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 6; @@ -25,6 +37,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; } public override void AI() @@ -36,47 +49,98 @@ namespace CalamityMod.Projectiles.Rogue Projectile.velocity.Normalize(); Projectile.velocity *= Projectile.localAI[0]; Projectile.localAI[0]--; + Projectile.timeLeft++; } if (Projectile.localAI[0] == 0) { - Projectile.Kill(); + Projectile.velocity = new(0, 1E-05f); + Projectile.damage = 0; + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); + if (dis < 0.1f) + Projectile.Kill(); } - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73),Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center,Projectile.velocity* 0.001f,false,10,1, color.Value)); } - public override bool OnTileCollide(Vector2 oldVelocity) + public override bool PreDraw(ref Color lightColor) { - Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); - Projectile.Kill(); + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + return false; } - public override void OnKill(int timeLeft) + public float FireWidthFunction(float completion, Vector2 vertexPos) { - return; - for (int i = 0; i < 5; i++) - { - int dustToUse = Main.rand.Next(0, 3); - int dustType = 0; - switch (dustToUse) - { - case 0: - dustType = 109; - break; - case 1: - dustType = 111; - break; - case 2: - dustType = 132; - break; - } + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, Projectile.velocity.X, Projectile.velocity.Y, 0, default, 1.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 0.75f; - } + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = color.Value; + return mainColor; } } } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 50161ddbd0..4b297972ea 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -93,16 +93,16 @@ namespace CalamityMod.Projectiles.Rogue List posList = []; //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. - for (var i = 0; i <= 10; i++) + for (var i = 0; i <= 2; i++) { - posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 10f)); + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); } var pos = posList.ToArray(); GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 32); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 24); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index 4dce7a9c4e..c7d160009e 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -34,7 +34,16 @@ namespace CalamityMod.Projectiles.Rogue } Projectile.velocity.X *= 0.975f; - return true; + var tile = Main.tile[(Projectile.Bottom + Vector2.UnitY).ToTileCoordinates()]; + if (tile.HasUnactuatedTile && tile.TileType == TileID.ConveyorBeltLeft) + { + Projectile.velocity.X = 2; + } + else if (tile.HasUnactuatedTile && tile.TileType == TileID.ConveyorBeltRight) + { + Projectile.velocity.X = -2; + } + return true; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 231f372217..6ddbec8df3 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -1,13 +1,17 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.Providence; using CalamityMod.Particles; -using CalamityMod.Projectiles.Boss; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Graphics.PackedVector; using Terraria; using Terraria.Audio; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -25,6 +29,8 @@ namespace CalamityMod.Projectiles.Rogue } public override void SetDefaults() { + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; @@ -36,6 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; + Projectile.scale = 0.75f; } public override bool? CanHitNPC(NPC target) @@ -51,6 +58,14 @@ namespace CalamityMod.Projectiles.Rogue NPC target = null; public override void AI() { + Projectile.frameCounter++; + if (Projectile.frameCounter > 3) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.frame = 0; if (Projectile.originalDamage == 0) { @@ -61,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.Calamity().HomingTarget = target.whoAmI; var dis = Projectile.Distance(target.Center); - Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis/160)*0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); + Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis / 160) * 0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); } else { @@ -90,14 +105,61 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); } - public override bool PreDraw(ref Color lightColor) { + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(8).ToList(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() *0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 16f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } NPC GetTargetInRange(float range) { diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 0c9a9b8ab3..aac6cd529b 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -13,6 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetDefaults() { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; Projectile.width = 10; Projectile.height = 10; Projectile.friendly = true; @@ -23,6 +25,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; + Projectile.tileCollide = false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { @@ -77,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + CalamityUtils.DrawAfterimagesCentered(Projectile, 2, Color.White); return false; } } diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index f818062d6a..21c51c8af3 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,5 +1,6 @@ using System.Linq; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -96,9 +97,22 @@ namespace CalamityMod.Projectiles.Rogue int shardCount = strongSplit ? 5 : 3; for (var i = 0; i < shardCount; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f) * Main.rand.NextFloat(0.9f,1.1f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 30; } + for (int i = 0; i < shardCount; i++) + { + int sparkLifetime = Main.rand.Next(8, 22); + float sparkScale = Main.rand.NextFloat(0.5f, 1f); + var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } target.AddBuff(ModContent.BuffType(), 120); } From 87887ba2830cd37089de0fd62a3ae8e543b04a4e Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 10:18:43 +0700 Subject: [PATCH 236/346] Rarity 5-8 --- Items/Weapons/Magic/AlulaAustralis.cs | 5 ++--- Items/Weapons/Magic/AstralachneaStaff.cs | 5 ++--- Items/Weapons/Magic/Atlantis.cs | 5 ++--- Items/Weapons/Magic/BelchingSaxophone.cs | 2 +- Items/Weapons/Magic/BrimroseStaff.cs | 5 ++--- Items/Weapons/Magic/Cryophobia.cs | 5 ++--- Items/Weapons/Magic/GleamingMagnolia.cs | 5 ++--- Items/Weapons/Magic/InfernalRift.cs | 2 +- Items/Weapons/Magic/LashesofChaos.cs | 5 ++--- Items/Weapons/Magic/Miasma.cs | 2 +- Items/Weapons/Magic/Poseidon.cs | 5 ++--- Items/Weapons/Magic/SHPC.cs | 2 +- Items/Weapons/Magic/SeethingDischarge.cs | 5 ++--- Items/Weapons/Magic/ShadecrystalBarrage.cs | 2 +- Items/Weapons/Magic/SlitheringEels.cs | 2 +- Items/Weapons/Magic/SnowstormStaff.cs | 5 ++--- Items/Weapons/Magic/Vesuvius.cs | 2 +- Items/Weapons/Magic/Wingman.cs | 5 ++--- Items/Weapons/Magic/WyvernsCall.cs | 5 ++--- 19 files changed, 31 insertions(+), 43 deletions(-) diff --git a/Items/Weapons/Magic/AlulaAustralis.cs b/Items/Weapons/Magic/AlulaAustralis.cs index 2bf63f0bd7..7f6cb2cda0 100644 --- a/Items/Weapons/Magic/AlulaAustralis.cs +++ b/Items/Weapons/Magic/AlulaAustralis.cs @@ -20,9 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 52; Item.damage = 65; Item.DamageType = DamageClass.Magic; - Item.mana = 8; - Item.useTime = 17; - Item.useAnimation = 17; + Item.mana = 15; + Item.useAnimation = Item.useTime = 17; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; diff --git a/Items/Weapons/Magic/AstralachneaStaff.cs b/Items/Weapons/Magic/AstralachneaStaff.cs index a4338c8a20..ed1cac00a0 100644 --- a/Items/Weapons/Magic/AstralachneaStaff.cs +++ b/Items/Weapons/Magic/AstralachneaStaff.cs @@ -21,9 +21,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 52; Item.damage = 55; Item.DamageType = DamageClass.Magic; - Item.mana = 19; - Item.useTime = 21; - Item.useAnimation = 21; + Item.mana = 16; + Item.useAnimation = Item.useTime = 21; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; diff --git a/Items/Weapons/Magic/Atlantis.cs b/Items/Weapons/Magic/Atlantis.cs index 9aaf1df0bd..4a6587427b 100644 --- a/Items/Weapons/Magic/Atlantis.cs +++ b/Items/Weapons/Magic/Atlantis.cs @@ -24,9 +24,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 81; Item.DamageType = DamageClass.Magic; - Item.mana = 12; - Item.useTime = 25; - Item.useAnimation = 25; + Item.mana = 15; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Items/Weapons/Magic/BelchingSaxophone.cs b/Items/Weapons/Magic/BelchingSaxophone.cs index f9e5d70960..37e6ec4379 100644 --- a/Items/Weapons/Magic/BelchingSaxophone.cs +++ b/Items/Weapons/Magic/BelchingSaxophone.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 22; Item.damage = BaseDamage; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 16; Item.useTime = 12; Item.useAnimation = 24; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/BrimroseStaff.cs b/Items/Weapons/Magic/BrimroseStaff.cs index 3baf578096..a451948664 100644 --- a/Items/Weapons/Magic/BrimroseStaff.cs +++ b/Items/Weapons/Magic/BrimroseStaff.cs @@ -20,9 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 34; Item.damage = 45; Item.DamageType = DamageClass.Magic; - Item.mana = 6; - Item.useTime = 16; - Item.useAnimation = 16; + Item.mana = 12; + Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7f; diff --git a/Items/Weapons/Magic/Cryophobia.cs b/Items/Weapons/Magic/Cryophobia.cs index cb6f719579..646bddac01 100644 --- a/Items/Weapons/Magic/Cryophobia.cs +++ b/Items/Weapons/Magic/Cryophobia.cs @@ -14,9 +14,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 34; Item.damage = 96; Item.DamageType = DamageClass.Magic; - Item.mana = 18; - Item.useTime = 40; - Item.useAnimation = 40; + Item.mana = 22; + Item.useAnimation = Item.useTime = 40; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; diff --git a/Items/Weapons/Magic/GleamingMagnolia.cs b/Items/Weapons/Magic/GleamingMagnolia.cs index f3806aa889..56a4cd3c5b 100644 --- a/Items/Weapons/Magic/GleamingMagnolia.cs +++ b/Items/Weapons/Magic/GleamingMagnolia.cs @@ -19,9 +19,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 54; Item.damage = 53; Item.DamageType = DamageClass.Magic; - Item.mana = 11; - Item.useTime = 27; - Item.useAnimation = 27; + Item.mana = 15; + Item.useAnimation = Item.useTime = 27; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; diff --git a/Items/Weapons/Magic/InfernalRift.cs b/Items/Weapons/Magic/InfernalRift.cs index 5b4f710290..773ea06d41 100644 --- a/Items/Weapons/Magic/InfernalRift.cs +++ b/Items/Weapons/Magic/InfernalRift.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 50; Item.DamageType = DamageClass.Magic; Item.crit = 25; - Item.mana = 15; + Item.mana = 25; Item.useTime = 2; Item.useAnimation = 30; Item.reuseDelay = Item.useAnimation + 6; diff --git a/Items/Weapons/Magic/LashesofChaos.cs b/Items/Weapons/Magic/LashesofChaos.cs index 7da3eaaf27..804d04f2f5 100644 --- a/Items/Weapons/Magic/LashesofChaos.cs +++ b/Items/Weapons/Magic/LashesofChaos.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 111; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 46; - Item.useAnimation = 46; + Item.mana = 28; + Item.useAnimation = Item.useTime = 46; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; diff --git a/Items/Weapons/Magic/Miasma.cs b/Items/Weapons/Magic/Miasma.cs index e2d1fb0d40..9adc8327e4 100644 --- a/Items/Weapons/Magic/Miasma.cs +++ b/Items/Weapons/Magic/Miasma.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 64; Item.damage = 40; Item.DamageType = DamageClass.Magic; - Item.mana = 16; + Item.mana = 22; Item.useAnimation = Item.useTime = 27; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/Poseidon.cs b/Items/Weapons/Magic/Poseidon.cs index c1bb33dcf2..d6192eacb9 100644 --- a/Items/Weapons/Magic/Poseidon.cs +++ b/Items/Weapons/Magic/Poseidon.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 32; Item.damage = 52; Item.DamageType = DamageClass.Magic; - Item.mana = 12; - Item.useTime = 49; - Item.useAnimation = 49; + Item.mana = 30; + Item.useAnimation = Item.useTime = 49; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6f; diff --git a/Items/Weapons/Magic/SHPC.cs b/Items/Weapons/Magic/SHPC.cs index f7fa8e662f..3c886885ef 100644 --- a/Items/Weapons/Magic/SHPC.cs +++ b/Items/Weapons/Magic/SHPC.cs @@ -45,7 +45,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 52; Item.damage = 117; Item.DamageType = DamageClass.Magic; - Item.mana = 15; + Item.mana = 30; Item.useAnimation = Item.useTime = 60; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/SeethingDischarge.cs b/Items/Weapons/Magic/SeethingDischarge.cs index 45cd4e9c0e..7ed607b5d1 100644 --- a/Items/Weapons/Magic/SeethingDischarge.cs +++ b/Items/Weapons/Magic/SeethingDischarge.cs @@ -20,9 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 32; Item.damage = 40; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 60; - Item.useAnimation = 60; + Item.mana = 30; + Item.useAnimation = Item.useTime = 60; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 6.75f; diff --git a/Items/Weapons/Magic/ShadecrystalBarrage.cs b/Items/Weapons/Magic/ShadecrystalBarrage.cs index 1858eb3dc1..007414071b 100644 --- a/Items/Weapons/Magic/ShadecrystalBarrage.cs +++ b/Items/Weapons/Magic/ShadecrystalBarrage.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 24; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 40; Item.useTime = 7; Item.useAnimation = 14; Item.reuseDelay = 49; diff --git a/Items/Weapons/Magic/SlitheringEels.cs b/Items/Weapons/Magic/SlitheringEels.cs index 64ddf0ec5d..ac30f155d5 100644 --- a/Items/Weapons/Magic/SlitheringEels.cs +++ b/Items/Weapons/Magic/SlitheringEels.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 40; Item.damage = 50; Item.DamageType = DamageClass.Magic; - Item.mana = 11; + Item.mana = 20; Item.useAnimation = Item.useTime = 40; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/SnowstormStaff.cs b/Items/Weapons/Magic/SnowstormStaff.cs index 674b3ffb97..62f3485b23 100644 --- a/Items/Weapons/Magic/SnowstormStaff.cs +++ b/Items/Weapons/Magic/SnowstormStaff.cs @@ -15,9 +15,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 39; Item.DamageType = DamageClass.Magic; Item.channel = true; - Item.mana = 18; - Item.useTime = 70; - Item.useAnimation = 70; + Item.mana = 40; + Item.useAnimation = Item.useTime = 70; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.knockBack = 5; diff --git a/Items/Weapons/Magic/Vesuvius.cs b/Items/Weapons/Magic/Vesuvius.cs index c5095b7d93..6b9d38be46 100644 --- a/Items/Weapons/Magic/Vesuvius.cs +++ b/Items/Weapons/Magic/Vesuvius.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 62; Item.height = 62; Item.damage = 50; - Item.mana = 7; + Item.mana = 8; Item.DamageType = DamageClass.Magic; Item.useAnimation = Item.useTime = 15; Item.noMelee = true; diff --git a/Items/Weapons/Magic/Wingman.cs b/Items/Weapons/Magic/Wingman.cs index b083e19c88..e5e24a1386 100644 --- a/Items/Weapons/Magic/Wingman.cs +++ b/Items/Weapons/Magic/Wingman.cs @@ -16,9 +16,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 42; Item.damage = 82; Item.DamageType = DamageClass.Magic; - Item.mana = 5; - Item.useTime = 15; - Item.useAnimation = 15; + Item.mana = 8; + Item.useAnimation = Item.useTime = 15; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 1.5f; diff --git a/Items/Weapons/Magic/WyvernsCall.cs b/Items/Weapons/Magic/WyvernsCall.cs index 67b618de61..a60e099d50 100644 --- a/Items/Weapons/Magic/WyvernsCall.cs +++ b/Items/Weapons/Magic/WyvernsCall.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 74; Item.damage = 65; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 23; - Item.useAnimation = 23; + Item.mana = 14; + Item.useAnimation = Item.useTime = 23; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4.75f; From f4becb2628f40354cfb5be0d6d690e0036d6855b Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 10:19:55 +0700 Subject: [PATCH 237/346] Reverted Mana Flower upgrade mana cost buffs --- Items/CalamityGlobalItem.cs | 5 ----- Items/CalamityGlobalItemTooltip.cs | 4 ---- 2 files changed, 9 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 5f20ad405b..08ec78519a 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1088,14 +1088,9 @@ namespace CalamityMod.Items modPlayer.fairyBoots = true; // Mana Flower tinker buffs - if (item.type == ItemID.MagnetFlower) - player.manaCost -= 0.02f; - if (item.type == ItemID.ArcaneFlower || item.type == ItemID.ManaCloak) - player.manaCost -= 0.04f; if (item.type == ItemID.ArcaneFlower) player.GetDamage() += 0.05f; - if (item.type == ItemID.EyeoftheGolem) { player.Calamity().critDamage += 0.15f; diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 314a51650a..d9a7ae7a3f 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -823,10 +823,6 @@ namespace CalamityMod.Items } // Mana Flower tinker buffs. - if (item.type == ItemID.MagnetFlower) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("8%", "10%")); - if (item.type == ItemID.ArcaneFlower || item.type == ItemID.ManaCloak) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("8%", "12%")); if (item.type == ItemID.ArcaneFlower) EditTooltipByNum(2, (line) => line.Text += AddedTooltip("ArcaneFlower")); From 9f81cb03e9794c88d4e69a84158b85c601be3e2d Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 11:02:38 +0700 Subject: [PATCH 238/346] Rarity 9-12 --- Items/Weapons/DraedonsArsenal/PlasmaCaster.cs | 5 ++--- Items/Weapons/Magic/Apathanull.cs | 2 +- Items/Weapons/Magic/ApoctosisArray.cs | 3 +-- Items/Weapons/Magic/ArchAmaryllis.cs | 5 ++--- Items/Weapons/Magic/ChronomancersScythe.cs | 2 +- Items/Weapons/Magic/EventHorizon.cs | 2 +- Items/Weapons/Magic/MagneticMeltdown.cs | 5 ++--- Items/Weapons/Magic/Mistlestorm.cs | 5 ++--- Items/Weapons/Magic/NuclearFury.cs | 5 ++--- Items/Weapons/Magic/Nucleosynthesis.cs | 2 +- Items/Weapons/Magic/PurgeGuzzler.cs | 5 ++--- Items/Weapons/Magic/RecitationoftheBeast.cs | 5 ++--- Items/Weapons/Magic/SanguineFlare.cs | 3 +-- Items/Weapons/Magic/ThePrince.cs | 2 +- Items/Weapons/Magic/ThornBlossom.cs | 5 ++--- Items/Weapons/Magic/Volterion.cs | 2 +- 16 files changed, 24 insertions(+), 34 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs index 7520d358ee..a7d095df89 100644 --- a/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs +++ b/Items/Weapons/DraedonsArsenal/PlasmaCaster.cs @@ -33,10 +33,9 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.DamageType = DamageClass.Magic; Item.damage = 705; Item.knockBack = 7f; - Item.useTime = 45; - Item.useAnimation = 45; + Item.useAnimation = Item.useTime = 45; Item.autoReuse = true; - Item.mana = 24; + Item.mana = 36; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = FireSound; diff --git a/Items/Weapons/Magic/Apathanull.cs b/Items/Weapons/Magic/Apathanull.cs index 799f6e63bc..be57d1a227 100644 --- a/Items/Weapons/Magic/Apathanull.cs +++ b/Items/Weapons/Magic/Apathanull.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 63; Item.DamageType = DamageClass.Magic; Item.crit = 12; - Item.mana = 20; + Item.mana = 26; Item.useTime = 8; Item.useAnimation = 20; Item.reuseDelay = 8; diff --git a/Items/Weapons/Magic/ApoctosisArray.cs b/Items/Weapons/Magic/ApoctosisArray.cs index db3036dc29..2052a2ec6f 100644 --- a/Items/Weapons/Magic/ApoctosisArray.cs +++ b/Items/Weapons/Magic/ApoctosisArray.cs @@ -18,8 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 40; Item.DamageType = DamageClass.Magic; Item.mana = 14; - Item.useAnimation = 5; - Item.useTime = 5; + Item.useAnimation = Item.useTime = 5; Item.useStyle = ItemUseStyleID.Shoot; Item.knockBack = 6f; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ArchAmaryllis.cs b/Items/Weapons/Magic/ArchAmaryllis.cs index 654f269409..60dcbb5cbb 100644 --- a/Items/Weapons/Magic/ArchAmaryllis.cs +++ b/Items/Weapons/Magic/ArchAmaryllis.cs @@ -19,9 +19,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 68; Item.damage = 58; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 23; - Item.useAnimation = 23; + Item.mana = 23; + Item.useAnimation = Item.useTime = 23; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 7.5f; diff --git a/Items/Weapons/Magic/ChronomancersScythe.cs b/Items/Weapons/Magic/ChronomancersScythe.cs index 7785365ef0..33b9019373 100644 --- a/Items/Weapons/Magic/ChronomancersScythe.cs +++ b/Items/Weapons/Magic/ChronomancersScythe.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.autoReuse = false; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = SoundID.Item71; - Item.mana = 10; + Item.mana = 30; Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; Item.rare = ItemRarityID.Purple; diff --git a/Items/Weapons/Magic/EventHorizon.cs b/Items/Weapons/Magic/EventHorizon.cs index 70401af4c4..332b0e7281 100644 --- a/Items/Weapons/Magic/EventHorizon.cs +++ b/Items/Weapons/Magic/EventHorizon.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.knockBack = 3.5f; Item.noMelee = true; Item.DamageType = DamageClass.Magic; - Item.mana = 12; + Item.mana = 32; Item.useAnimation = Item.useTime = 32; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/MagneticMeltdown.cs b/Items/Weapons/Magic/MagneticMeltdown.cs index c3a329728b..f08a786564 100644 --- a/Items/Weapons/Magic/MagneticMeltdown.cs +++ b/Items/Weapons/Magic/MagneticMeltdown.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 78; Item.damage = 200; Item.DamageType = DamageClass.Magic; - Item.mana = 32; - Item.useTime = 37; - Item.useAnimation = 37; + Item.mana = 45; + Item.useAnimation = Item.useTime = 37; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 4f; diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index 426c3841ea..b78c3e8fa9 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 48; Item.damage = 54; Item.DamageType = DamageClass.Magic; - Item.mana = 5; - Item.useTime = 6; - Item.useAnimation = 6; + Item.mana = 7; + Item.useAnimation = Item.useTime = 6; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3.5f; diff --git a/Items/Weapons/Magic/NuclearFury.cs b/Items/Weapons/Magic/NuclearFury.cs index 8dddf82b8d..53f67402a2 100644 --- a/Items/Weapons/Magic/NuclearFury.cs +++ b/Items/Weapons/Magic/NuclearFury.cs @@ -16,9 +16,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 40; Item.damage = 108; Item.DamageType = DamageClass.Magic; - Item.mana = 22; - Item.useTime = 25; - Item.useAnimation = 25; + Item.mana = 30; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Items/Weapons/Magic/Nucleosynthesis.cs b/Items/Weapons/Magic/Nucleosynthesis.cs index 76e953984c..9e1bfad48f 100644 --- a/Items/Weapons/Magic/Nucleosynthesis.cs +++ b/Items/Weapons/Magic/Nucleosynthesis.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 116; Item.damage = 70; Item.DamageType = DamageClass.Magic; - Item.mana = 18; + Item.mana = 30; Item.useTime = 4; Item.useAnimation = 16; Item.reuseDelay = 14; diff --git a/Items/Weapons/Magic/PurgeGuzzler.cs b/Items/Weapons/Magic/PurgeGuzzler.cs index e75ae3fdfe..456e071c89 100644 --- a/Items/Weapons/Magic/PurgeGuzzler.cs +++ b/Items/Weapons/Magic/PurgeGuzzler.cs @@ -19,9 +19,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 48; Item.damage = 152; Item.DamageType = DamageClass.Magic; - Item.mana = 50; - Item.useTime = 38; - Item.useAnimation = 38; + Item.mana = 100; + Item.useAnimation = Item.useTime = 38; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/RecitationoftheBeast.cs b/Items/Weapons/Magic/RecitationoftheBeast.cs index 96af4794a6..171a1c539b 100644 --- a/Items/Weapons/Magic/RecitationoftheBeast.cs +++ b/Items/Weapons/Magic/RecitationoftheBeast.cs @@ -18,11 +18,10 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 54; Item.damage = 60; Item.crit = 20; - Item.mana = 17; + Item.mana = 22; Item.noMelee = true; - Item.useAnimation = 22; + Item.useAnimation = Item.useTime = 22; Item.useStyle = ItemUseStyleID.Shoot; - Item.useTime = 22; Item.knockBack = 8.5f; Item.UseSound = SoundID.Item8; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/SanguineFlare.cs b/Items/Weapons/Magic/SanguineFlare.cs index 90da4ae001..b2cb6a3820 100644 --- a/Items/Weapons/Magic/SanguineFlare.cs +++ b/Items/Weapons/Magic/SanguineFlare.cs @@ -24,8 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 1050; Item.DamageType = DamageClass.Magic; Item.mana = 36; - Item.useTime = 25; - Item.useAnimation = 25; + Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.channel = true; Item.noMelee = true; diff --git a/Items/Weapons/Magic/ThePrince.cs b/Items/Weapons/Magic/ThePrince.cs index 7aec53e0f5..c176711d29 100644 --- a/Items/Weapons/Magic/ThePrince.cs +++ b/Items/Weapons/Magic/ThePrince.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.shootSpeed = 23.5f; Item.DamageType = DamageClass.Magic; Item.noMelee = true; - Item.mana = 12; + Item.mana = 16; Item.useAnimation = Item.useTime = 21; Item.useStyle = ItemUseStyleID.Shoot; Item.autoReuse = true; diff --git a/Items/Weapons/Magic/ThornBlossom.cs b/Items/Weapons/Magic/ThornBlossom.cs index d948d7f944..0b35898e83 100644 --- a/Items/Weapons/Magic/ThornBlossom.cs +++ b/Items/Weapons/Magic/ThornBlossom.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 68; Item.damage = 120; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 23; - Item.useAnimation = 23; + Item.mana = 27; + Item.useAnimation = Item.useTime = 23; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 2f; diff --git a/Items/Weapons/Magic/Volterion.cs b/Items/Weapons/Magic/Volterion.cs index 8ce8aee871..e212d83ebb 100644 --- a/Items/Weapons/Magic/Volterion.cs +++ b/Items/Weapons/Magic/Volterion.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 60; Item.damage = 890; Item.DamageType = DamageClass.Magic; - Item.mana = 50; + Item.mana = 90; Item.useAnimation = Item.useTime = 80; // 42 frames of firing animation Item.knockBack = 2f; Item.shoot = ModContent.ProjectileType(); 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 239/346] 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 80127c6aa5ddfa5ac008d0cf40fab8dad85a1bb0 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 12:12:35 +0700 Subject: [PATCH 240/346] Rarity 13+ --- Items/Weapons/DraedonsArsenal/TeslaCannon.cs | 2 +- Items/Weapons/Magic/AlphaDraconis.cs | 5 ++--- Items/Weapons/Magic/Apotheosis.cs | 2 +- Items/Weapons/Magic/DarkSpark.cs | 2 +- Items/Weapons/Magic/EidolicWail.cs | 2 +- Items/Weapons/Magic/EidolonStaff.cs | 5 ++--- Items/Weapons/Magic/Eternity.cs | 2 +- Items/Weapons/Magic/FaceMelter.cs | 2 +- Items/Weapons/Magic/FatesReveal.cs | 3 +-- Items/Weapons/Magic/GhastlyVisage.cs | 5 ++--- Items/Weapons/Magic/HeliumFlash.cs | 2 +- Items/Weapons/Magic/IceBarrage.cs | 2 +- Items/Weapons/Magic/NebulousCataclysm.cs | 2 +- Items/Weapons/Magic/Omicron.cs | 2 +- Items/Weapons/Magic/PhantasmalFury.cs | 2 +- Items/Weapons/Magic/PhoenixFlameBarrage.cs | 2 +- Items/Weapons/Magic/PrimordialAncient.cs | 2 +- Items/Weapons/Magic/RainbowPartyCannon.cs | 2 +- Items/Weapons/Magic/ShadowboltStaff.cs | 2 +- Items/Weapons/Magic/SoulPiercer.cs | 2 +- Items/Weapons/Magic/SubsumingVortex.cs | 2 +- Items/Weapons/Magic/TheDanceofLight.cs | 2 +- Items/Weapons/Magic/TheWand.cs | 2 +- Items/Weapons/Magic/Vehemence.cs | 2 +- Items/Weapons/Magic/VenusianTrident.cs | 5 ++--- Items/Weapons/Magic/VitriolicViper.cs | 2 +- Items/Weapons/Magic/VividClarity.cs | 2 +- Items/Weapons/Magic/VoidVortex.cs | 2 +- Items/Weapons/Magic/VoltaicClimax.cs | 2 +- Items/Weapons/Magic/YharimsCrystal.cs | 2 +- 30 files changed, 34 insertions(+), 39 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs index 4abbc9858a..6745f8807d 100644 --- a/Items/Weapons/DraedonsArsenal/TeslaCannon.cs +++ b/Items/Weapons/DraedonsArsenal/TeslaCannon.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal Item.knockBack = 10f; Item.useTime = Item.useAnimation = 90; Item.autoReuse = true; - Item.mana = 60; + Item.mana = 120; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = FireSound; diff --git a/Items/Weapons/Magic/AlphaDraconis.cs b/Items/Weapons/Magic/AlphaDraconis.cs index ee0ed26f78..9789aa3161 100644 --- a/Items/Weapons/Magic/AlphaDraconis.cs +++ b/Items/Weapons/Magic/AlphaDraconis.cs @@ -28,9 +28,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 74; Item.damage = 150; Item.DamageType = DamageClass.Magic; - Item.mana = 12; - Item.useTime = 12; - Item.useAnimation = 12; + Item.mana = 16; + Item.useAnimation = Item.useTime = 12; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.2f; diff --git a/Items/Weapons/Magic/Apotheosis.cs b/Items/Weapons/Magic/Apotheosis.cs index 278a72e01e..dbfc18e573 100644 --- a/Items/Weapons/Magic/Apotheosis.cs +++ b/Items/Weapons/Magic/Apotheosis.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 34; Item.damage = 222; Item.DamageType = DamageClass.Magic; - Item.mana = 42; + Item.mana = 277; Item.useAnimation = Item.useTime = 167; Item.useStyle = ItemUseStyleID.Shoot; Item.useTurn = false; diff --git a/Items/Weapons/Magic/DarkSpark.cs b/Items/Weapons/Magic/DarkSpark.cs index ed3956944a..a7bd4d6d42 100644 --- a/Items/Weapons/Magic/DarkSpark.cs +++ b/Items/Weapons/Magic/DarkSpark.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 16; Item.damage = 60; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 12; Item.useAnimation = Item.useTime = 10; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/EidolicWail.cs b/Items/Weapons/Magic/EidolicWail.cs index 6eb2576e61..15de8c3c0b 100644 --- a/Items/Weapons/Magic/EidolicWail.cs +++ b/Items/Weapons/Magic/EidolicWail.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 60; Item.damage = 943; Item.DamageType = DamageClass.Magic; - Item.mana = 30; + Item.mana = 90; Item.useTime = 10; Item.useAnimation = 30; Item.reuseDelay = 40; diff --git a/Items/Weapons/Magic/EidolonStaff.cs b/Items/Weapons/Magic/EidolonStaff.cs index f3c14ab5b0..cbd9a58959 100644 --- a/Items/Weapons/Magic/EidolonStaff.cs +++ b/Items/Weapons/Magic/EidolonStaff.cs @@ -24,9 +24,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 56; Item.damage = 180; Item.DamageType = DamageClass.Magic; - Item.mana = 20; - Item.useTime = 18; - Item.useAnimation = 18; + Item.mana = 24; + Item.useAnimation = Item.useTime = 18; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 3f; diff --git a/Items/Weapons/Magic/Eternity.cs b/Items/Weapons/Magic/Eternity.cs index 39d89390ce..913475841f 100644 --- a/Items/Weapons/Magic/Eternity.cs +++ b/Items/Weapons/Magic/Eternity.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 40; Item.damage = BaseDamage; Item.DamageType = DamageClass.Magic; - Item.mana = 30; + Item.mana = 300; Item.useAnimation = Item.useTime = 120; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/FaceMelter.cs b/Items/Weapons/Magic/FaceMelter.cs index bff3fc20e7..a2182c7753 100644 --- a/Items/Weapons/Magic/FaceMelter.cs +++ b/Items/Weapons/Magic/FaceMelter.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 50; Item.damage = 130; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 14; Item.useTime = 5; Item.useAnimation = 10; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/FatesReveal.cs b/Items/Weapons/Magic/FatesReveal.cs index 26f28c4056..b89d9b77dd 100644 --- a/Items/Weapons/Magic/FatesReveal.cs +++ b/Items/Weapons/Magic/FatesReveal.cs @@ -25,8 +25,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 120; Item.DamageType = DamageClass.Magic; Item.mana = 20; - Item.useTime = 16; - Item.useAnimation = 16; + Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5.5f; diff --git a/Items/Weapons/Magic/GhastlyVisage.cs b/Items/Weapons/Magic/GhastlyVisage.cs index 1e24726a97..cfa6466d6a 100644 --- a/Items/Weapons/Magic/GhastlyVisage.cs +++ b/Items/Weapons/Magic/GhastlyVisage.cs @@ -22,9 +22,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.noUseGraphic = true; Item.channel = true; - Item.mana = 20; - Item.useTime = 27; - Item.useAnimation = 27; + Item.mana = 36; + Item.useAnimation = Item.useTime = 27; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Items/Weapons/Magic/HeliumFlash.cs b/Items/Weapons/Magic/HeliumFlash.cs index 356a140f32..e2601dd553 100644 --- a/Items/Weapons/Magic/HeliumFlash.cs +++ b/Items/Weapons/Magic/HeliumFlash.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.damage = 5100; Item.knockBack = 9.5f; - Item.mana = 80; + Item.mana = 120; Item.useAnimation = Item.useTime = AftershotCooldownFrames; Item.autoReuse = true; Item.noMelee = true; diff --git a/Items/Weapons/Magic/IceBarrage.cs b/Items/Weapons/Magic/IceBarrage.cs index 6b23620bef..258c342866 100644 --- a/Items/Weapons/Magic/IceBarrage.cs +++ b/Items/Weapons/Magic/IceBarrage.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 60; Item.useStyle = ItemUseStyleID.HoldUp; Item.DamageType = DamageClass.Magic; - Item.mana = 180; + Item.mana = 300; Item.noMelee = true; Item.UseSound = CastSound; diff --git a/Items/Weapons/Magic/NebulousCataclysm.cs b/Items/Weapons/Magic/NebulousCataclysm.cs index 00b99ac405..b83032ebf9 100644 --- a/Items/Weapons/Magic/NebulousCataclysm.cs +++ b/Items/Weapons/Magic/NebulousCataclysm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 124; Item.damage = 530; Item.DamageType = DamageClass.Magic; - Item.mana = 70; + Item.mana = 120; Item.useTime = Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; Item.UseSound = null; diff --git a/Items/Weapons/Magic/Omicron.cs b/Items/Weapons/Magic/Omicron.cs index 551aecb37b..d84b25394f 100644 --- a/Items/Weapons/Magic/Omicron.cs +++ b/Items/Weapons/Magic/Omicron.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 54; Item.damage = 80; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 15; Item.useAnimation = Item.useTime = 4; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/PhantasmalFury.cs b/Items/Weapons/Magic/PhantasmalFury.cs index 3c3c0b7f3f..bb4bbb35b7 100644 --- a/Items/Weapons/Magic/PhantasmalFury.cs +++ b/Items/Weapons/Magic/PhantasmalFury.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 60; Item.damage = 190; Item.DamageType = DamageClass.Magic; - Item.mana = 80; + Item.mana = 120; Item.useTime = 3; Item.useAnimation = 45; Item.reuseDelay = 75; diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 1d915a0feb..2bfd0561cf 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 140; Item.damage = 140; Item.DamageType = DamageClass.Magic; - Item.mana = 35; + Item.mana = 40; Item.useTime = 15; Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/PrimordialAncient.cs b/Items/Weapons/Magic/PrimordialAncient.cs index 7f76b27f3f..883e202d33 100644 --- a/Items/Weapons/Magic/PrimordialAncient.cs +++ b/Items/Weapons/Magic/PrimordialAncient.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 56; Item.damage = 3825; Item.DamageType = DamageClass.Magic; - Item.mana = 95; + Item.mana = 104; Item.useTime = Item.useAnimation = 72; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/RainbowPartyCannon.cs b/Items/Weapons/Magic/RainbowPartyCannon.cs index 49abe53755..bb50e67103 100644 --- a/Items/Weapons/Magic/RainbowPartyCannon.cs +++ b/Items/Weapons/Magic/RainbowPartyCannon.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 30; Item.damage = 170; Item.DamageType = DamageClass.Magic; - Item.mana = 25; + Item.mana = 60; Item.crit += 4; Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index f5639d3e79..d5699749e6 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 56; Item.damage = 285; Item.DamageType = DamageClass.Magic; - Item.mana = 15; + Item.mana = 72; Item.useTime = 8; Item.useAnimation = 24; Item.reuseDelay = 30; diff --git a/Items/Weapons/Magic/SoulPiercer.cs b/Items/Weapons/Magic/SoulPiercer.cs index 52b15901ca..93525a8476 100644 --- a/Items/Weapons/Magic/SoulPiercer.cs +++ b/Items/Weapons/Magic/SoulPiercer.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 64; Item.damage = 235; Item.DamageType = DamageClass.Magic; - Item.mana = 19; + Item.mana = 30; Item.useAnimation = Item.useTime = 25; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/SubsumingVortex.cs b/Items/Weapons/Magic/SubsumingVortex.cs index 0f21e8bc20..183d28823e 100644 --- a/Items/Weapons/Magic/SubsumingVortex.cs +++ b/Items/Weapons/Magic/SubsumingVortex.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.useAnimation = Item.useTime = 20; Item.shootSpeed = 7f; - Item.mana = 22; + Item.mana = 28; Item.knockBack = 5f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/TheDanceofLight.cs b/Items/Weapons/Magic/TheDanceofLight.cs index 9f50835ece..620409269f 100644 --- a/Items/Weapons/Magic/TheDanceofLight.cs +++ b/Items/Weapons/Magic/TheDanceofLight.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.damage = 515; Item.DamageType = DamageClass.Magic; Item.crit = 20; - Item.mana = 6; + Item.mana = 26; Item.knockBack = 4f; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Items/Weapons/Magic/TheWand.cs b/Items/Weapons/Magic/TheWand.cs index 4a02a8674c..66469c5d15 100644 --- a/Items/Weapons/Magic/TheWand.cs +++ b/Items/Weapons/Magic/TheWand.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.width = 40; Item.height = 36; Item.damage = 14; // same as 1.4 Wand of Sparking - Item.mana = 150; + Item.mana = 200; Item.DamageType = DamageClass.Magic; Item.noMelee = true; Item.useAnimation = 19; diff --git a/Items/Weapons/Magic/Vehemence.cs b/Items/Weapons/Magic/Vehemence.cs index 72df4ffb67..e871548ed1 100644 --- a/Items/Weapons/Magic/Vehemence.cs +++ b/Items/Weapons/Magic/Vehemence.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 44; Item.damage = 6666; Item.DamageType = DamageClass.Magic; - Item.mana = 41; + Item.mana = 120; Item.useAnimation = Item.useTime = 43; Item.noUseGraphic = true; Item.channel = true; diff --git a/Items/Weapons/Magic/VenusianTrident.cs b/Items/Weapons/Magic/VenusianTrident.cs index ea4d77de37..0c75f97dde 100644 --- a/Items/Weapons/Magic/VenusianTrident.cs +++ b/Items/Weapons/Magic/VenusianTrident.cs @@ -23,9 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 68; Item.damage = 2800; Item.DamageType = DamageClass.Magic; - Item.mana = 40; - Item.useTime = 65; - Item.useAnimation = 65; + Item.mana = 90; + Item.useAnimation = Item.useTime = 65; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 9f; diff --git a/Items/Weapons/Magic/VitriolicViper.cs b/Items/Weapons/Magic/VitriolicViper.cs index a384441b9a..00845c8521 100644 --- a/Items/Weapons/Magic/VitriolicViper.cs +++ b/Items/Weapons/Magic/VitriolicViper.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 62; Item.damage = 2626; //Some kind of... brainstorm Item.DamageType = DamageClass.Magic; - Item.mana = 45; + Item.mana = 60; Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index b4ea614361..01d72129df 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 140; Item.damage = 133; Item.DamageType = DamageClass.Magic; - Item.mana = 42; + Item.mana = 54; Item.useTime = 4; Item.useAnimation = 20; Item.reuseDelay = Item.useAnimation; diff --git a/Items/Weapons/Magic/VoidVortex.cs b/Items/Weapons/Magic/VoidVortex.cs index 8c0e9cfa2a..e929c61010 100644 --- a/Items/Weapons/Magic/VoidVortex.cs +++ b/Items/Weapons/Magic/VoidVortex.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 130; Item.damage = 210; Item.DamageType = DamageClass.Magic; - Item.mana = 60; + Item.mana = 70; Item.useAnimation = Item.useTime = 49; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); diff --git a/Items/Weapons/Magic/VoltaicClimax.cs b/Items/Weapons/Magic/VoltaicClimax.cs index 2f20bd1f80..055cd4f965 100644 --- a/Items/Weapons/Magic/VoltaicClimax.cs +++ b/Items/Weapons/Magic/VoltaicClimax.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 78; Item.damage = 215; Item.DamageType = DamageClass.Magic; - Item.mana = 32; + Item.mana = 45; Item.useTime = Item.useAnimation = 34; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/YharimsCrystal.cs b/Items/Weapons/Magic/YharimsCrystal.cs index d2173baeb2..b49a1b5680 100644 --- a/Items/Weapons/Magic/YharimsCrystal.cs +++ b/Items/Weapons/Magic/YharimsCrystal.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 16; Item.damage = 65; Item.DamageType = DamageClass.Magic; - Item.mana = 10; + Item.mana = 15; Item.useAnimation = Item.useTime = 10; Item.knockBack = 0.25f; Item.shoot = ModContent.ProjectileType(); From d1fe6b50aa50601e5ea76d835a7c144e133e3bf5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 12:28:53 +0700 Subject: [PATCH 241/346] hit the mana accessories on the wrists --- Items/Accessories/EtherealTalisman.cs | 16 ++++++++++++---- Items/Accessories/SigilofCalamitas.cs | 11 ++++++++--- .../Mods.CalamityMod.Items.Accessories.hjson | 8 ++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index b3c6331489..2b510e964e 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -7,6 +7,7 @@ using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Localization; using Terraria.ModLoader; using Terraria.ModLoader.IO; @@ -15,6 +16,13 @@ namespace CalamityMod.Items.Accessories public class EtherealTalisman : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int MaxManaBoost = 100; + public static float ManaCostReduction = 0.08f; + public static float MagicDamageBoost = 0.15f; + public static int MagicCritBoost = 5; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, ManaCostReduction.ToPercent(), MagicDamageBoost.ToPercent(), MagicCritBoost); + public override void SetDefaults() { Item.width = 28; @@ -72,10 +80,10 @@ namespace CalamityMod.Items.Accessories if (manaFlowerEnabled) player.manaFlower = true; - player.statManaMax2 += 150; - player.GetDamage() += 0.15f; - player.manaCost -= 0.1f; - player.GetCritChance() += 5; + player.statManaMax2 += MaxManaBoost; + player.manaCost -= ManaCostReduction; + player.GetDamage() += MagicDamageBoost; + player.GetCritChance() += MagicCritBoost; } public override void AddRecipes() diff --git a/Items/Accessories/SigilofCalamitas.cs b/Items/Accessories/SigilofCalamitas.cs index 94c5dd7487..91eac97715 100644 --- a/Items/Accessories/SigilofCalamitas.cs +++ b/Items/Accessories/SigilofCalamitas.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,11 @@ namespace CalamityMod.Items.Accessories public class SigilofCalamitas : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int MaxManaBoost = 100; + public static float MagicDamageBoost = 0.15f; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, MagicDamageBoost.ToPercent()); + public override void SetStaticDefaults() { Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(6, 8)); @@ -27,9 +33,8 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { player.manaMagnet = true; - player.statManaMax2 += 100; - player.GetDamage() += 0.15f; - player.manaCost -= 0.1f; + player.statManaMax2 += MaxManaBoost; + player.GetDamage() += MagicDamageBoost; } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index b2ab571ea3..a822256549 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -729,8 +729,8 @@ EtherealTalisman: { DisplayName: Ethereal Talisman Tooltip: ''' - 15% increased magic damage, 5% increased magic critical strike chance - +150 max mana and 10% decreased mana usage + {$CommonItemTooltip.IncreasesMaxManaBy} and {$CommonItemTooltip.PercentReducedManaCost@1} + {$CommonItemTooltip.PercentIncreasedMagicDamage@2} and {$CommonItemTooltip.PercentIncreasedMagicCritChance@3} Increases pickup range for mana stars You automatically use mana potions when needed [c/aaaaaa:Shift- in your inventory to toggle] [i:ManaFlower] [c/aaaaaa:Mana Flower's effect] @@ -1627,8 +1627,8 @@ SigilofCalamitas: { DisplayName: Sigil of Calamitas Tooltip: ''' - 15% increased magic damage and 10% decreased mana usage - +100 max mana + {$CommonItemTooltip.IncreasesMaxManaBy} + {$CommonItemTooltip.PercentIncreasedMagicDamage@1} Increases pickup range for mana stars ''' } From 02c1f9885ff7fd029c8621d2d779ddd8403797bd Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 12:54:14 +0700 Subject: [PATCH 242/346] Purge Guzzler constantly guzzles mana --- Items/Weapons/Magic/PurgeGuzzler.cs | 10 +++++++++- Projectiles/Magic/PurgeGuzzlerHoldout.cs | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/PurgeGuzzler.cs b/Items/Weapons/Magic/PurgeGuzzler.cs index 456e071c89..6745b62828 100644 --- a/Items/Weapons/Magic/PurgeGuzzler.cs +++ b/Items/Weapons/Magic/PurgeGuzzler.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 48; Item.damage = 152; Item.DamageType = DamageClass.Magic; - Item.mana = 100; + Item.mana = 14; Item.useAnimation = Item.useTime = 38; Item.autoReuse = true; Item.useStyle = ItemUseStyleID.Shoot; @@ -33,6 +33,14 @@ namespace CalamityMod.Items.Weapons.Magic Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); } + + // Cancels out the mana used to summon the holdout + public override void OnConsumeMana(Player player, int manaConsumed) + { + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.statMana += manaConsumed; + } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override void HoldItem(Player player) => player.Calamity().mouseRotationListener = true; diff --git a/Projectiles/Magic/PurgeGuzzlerHoldout.cs b/Projectiles/Magic/PurgeGuzzlerHoldout.cs index a465def812..1a04bce268 100644 --- a/Projectiles/Magic/PurgeGuzzlerHoldout.cs +++ b/Projectiles/Magic/PurgeGuzzlerHoldout.cs @@ -58,6 +58,15 @@ namespace CalamityMod.Projectiles.Magic return; } + if ((shootingTimer >= 10 && revFrames < 150) || (revFrames >= 150 && !isOnCooldown)) + { + if (!Owner.CheckMana(Owner.HeldItem, -1, true)) + { + Projectile.Kill(); + return; + } + } + revSpeed = Utils.Remap(revFrames, 0, 150, 1, 3, true); if (shootingTimer >= 10 && revFrames < 150) { From 25f2eb65e2b7c116648de8e66faab64c56e3e1f0 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sat, 4 Apr 2026 00:14:18 -0700 Subject: [PATCH 243/346] Flesh Totem and Crowns flattening --- Items/Accessories/FleshTotem.cs | 2 +- Items/Accessories/MoonstoneCrown.cs | 2 +- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/FleshTotem.cs b/Items/Accessories/FleshTotem.cs index 0d19323f73..06067a02c3 100644 --- a/Items/Accessories/FleshTotem.cs +++ b/Items/Accessories/FleshTotem.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Accessories modPlayer.fleshTotem = true; modPlayer.fleshTotemMinion = true; modPlayer.fleshTotemVisual = !hideVisual; - player.statManaMax2 += 30; + player.statManaMax2 += 20; player.GetCritChance() += 5; if (player.whoAmI == Main.myPlayer) { diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index cc6ed61b48..911e8cafbe 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories CalamityPlayer modPlayer = player.Calamity(); modPlayer.moonCrown = true; modPlayer.mageCrownVisibility = !hideVisual; - player.statManaMax2 += 70; + player.statManaMax2 += 40; 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 >= 5) //At 5 sigils, grant a mana regen bonus diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index a822256549..60e2c4e391 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -792,7 +792,7 @@ FleshTotem: { Tooltip: ''' 5% increased magic critical strike chance - +30 max mana + +20 max mana Summons an effigy above your head that stores mana as you use it, up to 600 mana The effigy occasionally pulses, restoring 20 mana Pulses appear more frequently the more mana is stored @@ -1130,7 +1130,7 @@ MoonstoneCrown: { DisplayName: Moonstone Crown Tooltip: ''' - +70 max mana + +40 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% With 5 sigils, increases mana regeneration by +5 MP/s From 34c379530a8824ecbe1e33e6e27d901bcd851ab0 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 14:16:55 +0700 Subject: [PATCH 244/346] Polarizer, Concoction give 2 whole mana stars --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Accessories/ManaPolarizer.cs | 2 +- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 8f40b12dd9..44ed38d09a 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2784,7 +2784,7 @@ namespace CalamityMod.CalPlayer if (permafrostsConcoction) { Player.manaCost -= 0.15f; - Player.statManaMax2 += 50; + Player.statManaMax2 += 40; } if (encased) diff --git a/Items/Accessories/ManaPolarizer.cs b/Items/Accessories/ManaPolarizer.cs index 73fc472501..dbf71c47da 100644 --- a/Items/Accessories/ManaPolarizer.cs +++ b/Items/Accessories/ManaPolarizer.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories { CalamityPlayer modPlayer = player.Calamity(); modPlayer.manaOverloader = true; - player.statManaMax2 += 50; + player.statManaMax2 += 40; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index a822256549..a9b227d1dd 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1098,7 +1098,7 @@ ManaPolarizer: { DisplayName: Mana Polarizer Tooltip: ''' - Increases max mana by 50 + Increases max mana by 40 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 @@ -1281,7 +1281,7 @@ PermafrostsConcoction: { DisplayName: Permafrost's Concoction Tooltip: ''' - Increases maximum mana by 50 and reduces mana cost by 15% + Increases maximum mana by 40 and reduces mana cost by 15% +0.5 HP/s life regen below half health, +1 HP/s when below 25% health and +2 HP/s when below 10% health +3 HP/s life regen while afflicted with any fire debuff You will survive fatal damage and revive with 30% life on a 3 minute cooldown From 0041d876e2e5d8fd4618313a723a993b3214e8fb Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 4 Apr 2026 14:20:07 +0700 Subject: [PATCH 245/346] hit sigil and eth again --- Items/Accessories/EtherealTalisman.cs | 2 +- Items/Accessories/SigilofCalamitas.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/EtherealTalisman.cs b/Items/Accessories/EtherealTalisman.cs index 2b510e964e..d6135d8c6c 100644 --- a/Items/Accessories/EtherealTalisman.cs +++ b/Items/Accessories/EtherealTalisman.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxManaBoost = 100; + public static int MaxManaBoost = 60; public static float ManaCostReduction = 0.08f; public static float MagicDamageBoost = 0.15f; public static int MagicCritBoost = 5; diff --git a/Items/Accessories/SigilofCalamitas.cs b/Items/Accessories/SigilofCalamitas.cs index 91eac97715..a3dee2aa70 100644 --- a/Items/Accessories/SigilofCalamitas.cs +++ b/Items/Accessories/SigilofCalamitas.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; - public static int MaxManaBoost = 100; + public static int MaxManaBoost = 60; public static float MagicDamageBoost = 0.15f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, MagicDamageBoost.ToPercent()); 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 246/346] 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 277695a9bc324ead68d4b315a07207eedff42519 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 14:40:51 -0500 Subject: [PATCH 247/346] Finished until feedback --- Items/Weapons/Rogue/EclipsesFall.cs | 19 ++++ Items/Weapons/Rogue/SpearofPaleolith.cs | 3 + .../Mods.CalamityMod.Projectiles.Rogue.hjson | 3 +- Projectiles/Rogue/EclipseExplosion.cs | 87 ++++++++++++++++++ Projectiles/Rogue/EclipseExplosion.png | Bin 0 -> 10002 bytes Projectiles/Rogue/EclipseFragment.cs | 14 ++- Projectiles/Rogue/EclipseSpear.cs | 37 +++++--- Projectiles/Rogue/EclipsesFallSpear.cs | 36 +++----- Projectiles/Rogue/PaleoShatterExplosion.cs | 39 ++++++++ Projectiles/Rogue/PaleoShatterExplosion.png | Bin 0 -> 6870 bytes Projectiles/Rogue/ProfanedPartisanProj.cs | 11 ++- Projectiles/Rogue/SpearofPaleolithProj.cs | 48 +++++++--- 12 files changed, 244 insertions(+), 53 deletions(-) create mode 100644 Projectiles/Rogue/EclipseExplosion.cs create mode 100644 Projectiles/Rogue/EclipseExplosion.png create mode 100644 Projectiles/Rogue/PaleoShatterExplosion.cs create mode 100644 Projectiles/Rogue/PaleoShatterExplosion.png diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 476e665729..1ef8714b37 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -13,6 +13,25 @@ namespace CalamityMod.Items.Weapons.Rogue { public class EclipsesFall : RogueWeapon { + /// + /// Base damage of the spear, dynamically updated to match rogue stats. + /// This is reduced if the spear has less fragments than MaxFragmentCount + /// + public static int EclipseSpearBaseDmg => 1000; + /// + /// How much damage fragments and sparks should do + /// + public static float FragmentDmgMult => 0.5f; + /// + /// How many fragments are spawned per spear hit + /// + public static int FragmentCount => 2; + /// + /// How many fragments can exist before they start homing in. + /// Also the required amount of fragments for 100% base dmg on Eclipse Spear + /// + public static int MaxFragmentCount => 20; + public override void SetDefaults() { Item.width = 82; diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index 32a36636f4..b8be3087ac 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -10,6 +10,9 @@ namespace CalamityMod.Items.Weapons.Rogue public class SpearofPaleolith : RogueWeapon { public static int ShardBaseDamage => 25; + + public static int NormalShardCount => 3; + public static int ImpaledShardCount => 5; public override void SetDefaults() { Item.width = 54; diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 74ea651bdb..30e53d4f60 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -335,8 +335,9 @@ WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals EclipseFragment.DisplayName: Eclipse Fragment -EclipseGuandao.DisplayName: Eclipse Guandao EclipsesFallSpear.DisplayName: Eclipses Fall Spear EclipseSpark.DisplayName: Eclipse Spark EclipseSpear.DisplayName: Eclipse Spear ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare +EclipseExplosion.DisplayName: Eclipse Explosion +PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion diff --git a/Projectiles/Rogue/EclipseExplosion.cs b/Projectiles/Rogue/EclipseExplosion.cs new file mode 100644 index 0000000000..8ec802cdb2 --- /dev/null +++ b/Projectiles/Rogue/EclipseExplosion.cs @@ -0,0 +1,87 @@ +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Utilities.Daybreak; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + //Based on Terratomere explosion + public class EclipseExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 520; + Projectile.friendly = true; + Projectile.ignoreWater = false; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 150; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.scale = 0.2f; + Projectile.hide = true; + } + + public override void AI() + { + // Play an explosion sound on the first frame of this projectile's existence. + if (Projectile.localAI[0] == 0f) + { + SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); + Projectile.localAI[0] = 1f; + } + + // Emit a strong white light. + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); + + // Determine frames. Once the maximum frame is reached the projectile dies. + Projectile.frameCounter++; + if (Projectile.frameCounter % 5 == 4) + Projectile.frame++; + if (Projectile.frame >= 17) + Projectile.Kill(); + + // Exponentially accelerate. + Projectile.scale *= 1.013f; + Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); + } + + public override bool PreDraw(ref Color lightColor) + { + return base.PreDraw(ref lightColor); + } + + public void AdditiveDraw(SpriteBatch spriteBatch) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; + Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 origin = frame.Size() * 0.5f; + + for (int i = 0; i < 2; i++) + { + Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; + Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); + lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; + Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); + } + if (Projectile.timeLeft < 149) + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); + Main.spriteBatch.End(); + } + } + } +} diff --git a/Projectiles/Rogue/EclipseExplosion.png b/Projectiles/Rogue/EclipseExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..58635d492ab68802ba32b787b493389492d85bab GIT binary patch literal 10002 zcmb7q3p`Y7+qaUG<1Xd2F}pA-IZVPhjgF)yQ>kr}^Hh@*gJB$o31N4lEHa8wNm34# zgu*aRt%&U$jl*O)g~6aPjG1p~_dM_OJ-_#PzxP|e-&*%|U-$pM*P3--_y4-?Yt8i& z_O`N8s#0QNVzPEe4xJJcTf-F-6Q9{24r^AFWvbv}P2efp17ZcuYU6Na9by0R{bFLT z5~T&65^!DP1orgd-vizn+xm$_A}ux5*;s2K<0$v-PR`df5yNg3QXC2Q5R)REvUh+n ze;;D6n|8Or+Kt2`PJv=#ay6^xng+jT=U}BW>F^&U2fqs>vS+|~u@j!&z9fD7!>4~U z)<@}^UH0w8z?iq^|FFAYXSYji16+|1Q(Yq=wg#4t!so9)W%$>K?N}rJL%$Z5QES$U z{Q{TH@aY}D?uY&oEUz9O@VVOmALYN@R1AI}cO=Eu!3e`WMuux1{ypky4~d6=kCY6{ ztH)Y+oV7oYr_9i>^s^Vr&~UXC+fsEzJF)wrn3#5y-J$)bL)@nNZUziLd!5gAQ+Pzh?LlW?-VeA|_Yh>?wJ0a)EE}Lh1$blP8u5z3Y$qO@ENa%ffDE@`X zLA3TbEr`hv`Ta!sw$+iVKg%^=4A|2=bpQKu;4X!g!FwH>0YAw=gamogyX*#y@*B2t zo4RD7^Q3p^(Ho%Tn!z&_KcltU)3yZ`1I&iJ|~vYO2#yMfjDMvG{5`!xeFj zH5u6ct$?3S>KCcIc-&B^Ht6Q^aCK732IZPZJ{N^Jt4wwpSe|w*yj?gyfd`A_kMoie(LPvjApuJ14ev$Q&n=L-4%9CB9W`MEK_bP=CGt) zd@a$9*%LUaFryJA)KkQ37DxY6u?DbSkEn=iC$sr?moJ=b0*`knV!~u|rkQh^NUF>a zvASJT)L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sDlnN#ikw?s-}ZQG|CC@Xp`2d!LF5&8VHF*DBJus@Z1&DCpY@F zw1t1V4k`qg0`eOVvTo{=3s!$-fDRzP>v&YFPtk;xd1+9l8LI3d928fzDSOXnO`&r5Va;&6A8Ug)@9 zvvOxNm|+2OCNtImI`FmnF?haoDa7%6Q#=@}8$MEWIlxw@iBOx%VyV&uwJg!mQdLpI|GP&?aWqh;mAU)LF-PU`nwezl4isD~8kp7EYR@Vk_MK^+@N>elBADa2q=$6y5>10A-)T(K3q&P6> zE;Vzb4UpuFfUlQS?nu<3-ymlwteW~n->VdpuB?W)%T@_Dz5_Zg z{?Y(bW@bQumCy0vE^(fLG!h{NWa2H8%95iez~8L13NK>dcv}ky-96{QE!vZKUQvHv zNPFE8^smDNC{j-=(>jcMxFr^BIaWDV_JMKri30mca%Pgw5w?bJ+$wL4YP-*4p)cy2h(g9YQ0L3)Ek6s-OWHg_MfeuO&{UltSp% z`{5mBgXk}DmA0kw@RHwRZuuDFH_}!ta`~XXq|dg;3S+>AF7~$kRF{F8z=?lUD^k@) zkABM;R^LvJUA^Py=Zu*!oK^|-)z;CYmvV;rN$=}d4g7M7`=UyVR*6vD1MQgf;NECT zsS{FE4dELpZ1Ox#1Mzn2W1G;;xZ)<5+>VDlj|F2#lkjl?N5(I1ZaEBF3T*73~P9d!D7$0GiZ{AIe>o^P7eN3;$;O7XlG3AVy!$5cmcbdt5mhg)=Mxb1yPKs%;S(AK_Kk32CE}_NIOoUDrBS}apU!2w9k7@!>gxF7 zSN8B<4{D)Ot`fSz2_9 z_t{DB(WsVAD8M7^IX>7%>-v 100) Projectile.timeLeft = 100; - Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); Projectile.velocity = new(0, 1E-05f); - if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) + if (Projectile.Distance(proj.Center) < 16) { - Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; - Main.projectile[(int)Projectile.ai[0] - 1].netUpdate = true; + proj.ai[2]++; + proj.netUpdate = true; + if (proj.ai[2] == proj.localAI[0]) + SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); Projectile.active = false; + } } } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 4b297972ea..03f1b8635c 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -1,15 +1,13 @@ using System; using System.Collections.Generic; -using System.Linq; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs; -using CalamityMod.Particles; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -45,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 1; - Projectile.timeLeft = 600 * Projectile.MaxUpdates; + Projectile.timeLeft = 1200 * Projectile.MaxUpdates; Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() @@ -58,8 +56,8 @@ namespace CalamityMod.Projectiles.Rogue initialized = true; } - Projectile.originalDamage = (int)(1000 * (Projectile.ai[2]/20f)); - if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0]) + Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) { LinePos.end = Projectile.position; Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; @@ -75,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - + if (LineWidth > 0) { var device = Main.instance.GraphicsDevice; @@ -112,11 +110,12 @@ namespace CalamityMod.Projectiles.Rogue } } var tex = TextureAssets.Item[ModContent.ItemType()]; - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + if (Projectile.Opacity > 0.5f) + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); using (Main.spriteBatch.Scope()) { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied,null,null,null,null,Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * (Projectile.localAI[0] > 0 ? Projectile.ai[2]/Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); Main.spriteBatch.End(); } return false; @@ -125,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float _ = 0; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(),targetHitbox.Size(),Projectile.oldPosition+ new Vector2(Projectile.width,Projectile.height)*0.5f,Projectile.Center,48f,ref _)) + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) { return true; } @@ -149,12 +148,24 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - //Projectile.ai[0] = -1; + + if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) + { + Projectile.Opacity = 0; + Projectile.Center = target.Center; + Projectile.timeLeft = 60 * Projectile.MaxUpdates; + Projectile.velocity = new(0, 1E-05f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + } Projectile.netUpdate = true; + if (Projectile.ai[0] == target.whoAmI) + SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); } public override void OnKill(int timeLeft) { + if (Projectile.Opacity > 0) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); return; } @@ -166,7 +177,7 @@ namespace CalamityMod.Projectiles.Rogue public Color FireColorFunction(float completion, Vector2 vertexPos) { Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); - return mainColor * MathF.Pow(1 - completion*1.1f, 0.5f); + return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); } public float FireCoreWidthFunction(float completion, Vector2 vertexPos) diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs index 80da75fd77..82f3bb6bf6 100644 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; -using CalamityMod.Systems.Mechanic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -18,13 +17,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - private int SplitProjDamage => (int)(Projectile.damage * 0.5f); - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } + private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); public override void SetDefaults() { @@ -55,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - int onHitCount = 6; + int onHitCount = EclipsesFall.FragmentCount + 4; float spread = 20f; int projectileDamage = SplitProjDamage; float kb = 5f; @@ -63,36 +56,37 @@ namespace CalamityMod.Projectiles.Rogue int starID = ModContent.ProjectileType(); for (int i = 0; i < onHitCount; i++) { - int projID = i % 3 == 0 ? starID : sparkID; + int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; float speed = Main.rand.NextFloat(1.5f, 2f); float moveDuration = Main.rand.Next(5, 15); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration,20); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); } SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); - + List frags = new(); var p = -2; foreach (var item in Main.ActiveProjectiles) { - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner) + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) { - if (Projectile.Calamity().stealthStrike) + if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) { - if (item.timeLeft < 520) + if (item.timeLeft < 1120 * item.MaxUpdates) { - item.Kill(); + item.timeLeft = 60 * item.MaxUpdates; + item.ai[0] = target.whoAmI; continue; } - item.timeLeft = 600; + item.timeLeft = 1200 * item.MaxUpdates; p = item.whoAmI; } - item.ai[0] = target.whoAmI; + item.ai[0] = target.whoAmI; } if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) { @@ -104,14 +98,14 @@ namespace CalamityMod.Projectiles.Rogue { int projID = ModContent.ProjectileType(); Vector2 velocity = Vector2.Zero; - var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI,0,Math.Min(20,frags.Count(x => x.ai[0] == 0))); + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); proj.rotation = Projectile.rotation; p = proj.whoAmI; } frags = frags.OrderBy(x => x.timeLeft).ToList(); - int toRemove = frags.Count(x => x.ai[0] == 0) - 20; + int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; foreach (var item in frags) { if (toRemove > 0 && item.ai[0] == 0) diff --git a/Projectiles/Rogue/PaleoShatterExplosion.cs b/Projectiles/Rogue/PaleoShatterExplosion.cs new file mode 100644 index 0000000000..d9366c8580 --- /dev/null +++ b/Projectiles/Rogue/PaleoShatterExplosion.cs @@ -0,0 +1,39 @@ +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class PaleoShatterExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.width = 84; + Projectile.height = 152; + Projectile.friendly = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 60; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.tileCollide = false; + } + + public override void AI() + { + if (Projectile.timeLeft == 60) + Projectile.Bottom = Projectile.Center + new Vector2(0,16); + if (Projectile.timeLeft % 3f == 2f) + Projectile.frame++; + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.Kill(); + } + } +} diff --git a/Projectiles/Rogue/PaleoShatterExplosion.png b/Projectiles/Rogue/PaleoShatterExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..7740b1ff36b35d048c9e08dbfb75ae370a8c4024 GIT binary patch literal 6870 zcmbVRc{rPCyVseoozHaC46U{lQz96pQ;MQwYLC6BCACaTElF)96qU@hhSI7^?1V`X zNo^Cv+R#odweMS$bZTso$XF5;!g(^+`ObH)>zqH%b#Uc<-@Nbhyw7vrzx(&Q?^}wK zgO$XWvR{gciAlh%&7Hx~RZQ$3YX3Y2&N4f8gTUb*f!FM>iHT9ukMG|)3a*btI$N2F zRS%w91sC7?Sv%W{iN!(1#C}Q?6BB^1ep(R|Lw_$O#`;lA%rI9>>~wfx%k`_^#X)6lcU_Gxo;ccP`Wf9C`TaKZH1u@#CFqsY#I)4e4%*F! z3-2sa@64p~YH`sjFnX>rBXDpq&meFKrW5GK97>}zmSg#`yT*rG+ROdcU~T{3pI>2h z)Z(8a*@J#W-vO7Ry;a|01s<9$$E)F9D^aai%G=UQUue&!;%rRQ(z2c2`cJlzh`~e(3npJn`De#O7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00WJCG>F@0^_>a=&(L$7rZmo!o&EtZ>U+sF=P^059g+!l+@l(GO-5%2BI?_V z+WPU7Bte}^|1|e#d_<}1?;Z-^A1Ss=!eLTLR4G$)9@++ZdqD2#6)9@^!X_~v-|5iUCaP7$d8k`Y* zb2mmo7SND0sdwY$Y9QbFE!g0Bsr=5DS9GWD;g~Yo zQXscx)l{17Akfr(Sywujf7h`m{*(r`0zgf;gOlj literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 68b13ed38f..16c12acd08 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -21,8 +22,8 @@ namespace CalamityMod.Projectiles.Rogue public int ExplodeTime => 60 * Projectile.MaxUpdates; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = -1; + ProjectileID.Sets.TrailCacheLength[Type] = 24; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -135,6 +136,12 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { + + for (var i = 0; i < ProjectileID.Sets.TrailCacheLength[Type]; i += 3) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition, null, lightColor * Projectile.Opacity * (i > 0 ? (1 - i / (float)ProjectileID.Sets.TrailCacheLength[Type]) * 0.25f : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + } + float glowIntensity = Projectile.damage == 0 && StuckEnemyID == 0 ? 4f * (1-(Projectile.timeLeft/(float)ExplodeTime)) : 0f; Projectile.DrawProjectileWithBackglow(Color.Yellow, lightColor, glowIntensity); return false; diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index 21c51c8af3..a6f3267548 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,8 +1,11 @@ using System.Linq; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -14,6 +17,12 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofPaleolith"; public static int Lifetime => 600; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 24; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 12; @@ -70,7 +79,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); + for (var i = 0; i < ProjectileID.Sets.TrailCacheLength[Type]; i += 3) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition, null, lightColor * Projectile.Opacity * (i>0 ? (1 - i / (float)ProjectileID.Sets.TrailCacheLength[Type]) * 0.25f : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + } return false; } @@ -94,25 +106,37 @@ namespace CalamityMod.Projectiles.Rogue } bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); - int shardCount = strongSplit ? 5 : 3; + int shardCount = strongSplit ? SpearofPaleolith.ImpaledShardCount : SpearofPaleolith.NormalShardCount; for (var i = 0; i < shardCount; i++) { var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f) * Main.rand.NextFloat(0.9f,1.1f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 30; } - for (int i = 0; i < shardCount; i++) + if (strongSplit) { - int sparkLifetime = Main.rand.Next(8, 22); - float sparkScale = Main.rand.NextFloat(0.5f, 1f); - var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; - if (Main.rand.NextBool(5)) - sparkScale *= 1.4f; - - Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); - SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); - GeneralParticleHandler.SpawnParticle(spark); + SoundEngine.PlaySound(SoundID.DeerclopsRubbleAttack with { PitchVariance = 0.5f}, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner); } + else + { + for (int i = 0; i < shardCount; i++) + { + int sparkLifetime = Main.rand.Next(8, 22); + float sparkScale = Main.rand.NextFloat(0.5f, 1f); + var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + } + SoundEngine.PlaySound(SoundID.DeerclopsStep with { Pitch = 0.5f, PitchVariance = 0.5f, Volume = 1f, }, Projectile.Center); + SoundEngine.PlaySound(SoundID.DD2_CrystalCartImpact with { Pitch = -0.5f, PitchVariance = 0.5f, Volume = 1f, }, Projectile.Center); + target.AddBuff(ModContent.BuffType(), 120); } From 5a5b5bb6dc0d1609f9383d94802d2ebe665e973a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 16:00:11 -0500 Subject: [PATCH 248/346] spear following + partisan star --- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- Projectiles/Rogue/EclipseSpear.cs | 13 ++- Projectiles/Rogue/ProfanedPartisanFlare.cs | 87 +++++++++++++++---- 3 files changed, 84 insertions(+), 18 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 24cfc9a19e..2cbc368d64 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -869,7 +869,7 @@ ProfanedPartisan: { ''' Throws a profaned spear that splits into miniature spears upon hitting an enemy Stealth strikes remain impaled in an enemy for 10 seconds - While an enemy is impaled, all spears that strike them instead erupt into homing fireballs + While an enemy is impaled, all spears that strike them instead shatter into exploding stars Inflicts [cbuff:CalamityMod/HolyFlames] ''' } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 03f1b8635c..6fc0cec0af 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -67,9 +67,20 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ai[0] = -1; LineWidth = 1f; LinePos.start = Projectile.Center; + Projectile.localAI[1] = 0; + } + + + LineWidth -= 0.05f; + Projectile.localAI[1]++; + if (Projectile.localAI[1] > 60) + { + var dis = Projectile.Distance(Main.player[Projectile.owner].Center); + Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + } Projectile.velocity *= 0.9f; - LineWidth -= 0.05f; } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 6ddbec8df3..d5f6e15ffb 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -3,8 +3,8 @@ using System.Linq; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs.Providence; using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; - Projectile.scale = 0.75f; + Projectile.scale = 1f; } public override bool? CanHitNPC(NPC target) @@ -107,32 +107,87 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + Projectile.Opacity = 1; Main.spriteBatch.End(out var ss); var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( + using var trailLease = RenderTargetPool.Shared.Rent( device, Main.screenWidth / 2, Main.screenHeight / 2, RenderTargetDescriptor.Default ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(8).ToList(); + //Everything is drawn to this lease, which then is drawn to screen with the desired opacity. + //This is used to allow projectile opacity to scale nicely + using var mainLease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth, + Main.screenHeight, + RenderTargetDescriptor.Default + ); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + using (mainLease.Scope(clearColor: Color.Transparent)) + { + using (trailLease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(5).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(trailLease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + + + float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); + + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[ModContent.ProjectileType()].Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color baseColor = Color.Lerp(hiColor, loColor, 0.5f); + Color baseColor2 = hiColor; + baseColor.A = 0; + baseColor *= lerpMult; + baseColor2 *= lerpMult; + Vector2 origin = texture.Size() / 2f; + Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult - 1) * 0.5f + 1f) * 1.2f * Projectile.scale; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); + + float upRight = MathHelper.PiOver4; + float up = MathHelper.PiOver2; + float upLeft = 3f * MathHelper.PiOver4; + float left = MathHelper.Pi; + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + + scale = new Vector2(1f, 1f); + texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; + using (Main.spriteBatch.Scope()) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, baseColor2, 0, texture.Size() * 0.5f, 1f, 0, 0f); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); + Main.spriteBatch.End(); + } + Main.spriteBatch.End(); } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White * Projectile.Opacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); Main.spriteBatch.End(); - Main.spriteBatch.Begin(ss); - - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() *0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } public float FireWidthFunction(float completion, Vector2 pos) @@ -156,9 +211,9 @@ namespace CalamityMod.Projectiles.Rogue public Color FireColorFunction(float completion, Vector2 pos) { - Color mainColor = ProvUtils.GetProjectileColor(255); + Color mainColor = new Color(255, 155, 25, 255); Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); - return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + return Color.Lerp(mainColor, Color.Transparent, completion); } NPC GetTargetInRange(float range) From 16284e5020bf6d1c6754a84f07332a765c9f3e3e Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 18:19:02 -0500 Subject: [PATCH 249/346] Balance --- Items/Weapons/Rogue/EclipsesFall.cs | 6 +++--- Items/Weapons/Rogue/ProfanedPartisan.cs | 5 +++-- Projectiles/Rogue/EclipseFragment.cs | 2 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 2 +- Projectiles/Rogue/ProfanedPartisanProj.cs | 7 +------ Projectiles/Rogue/ProfanedPartisanSpear.cs | 8 +++++++- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 1ef8714b37..864a04ef16 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -17,11 +17,11 @@ namespace CalamityMod.Items.Weapons.Rogue /// Base damage of the spear, dynamically updated to match rogue stats. /// This is reduced if the spear has less fragments than MaxFragmentCount /// - public static int EclipseSpearBaseDmg => 1000; + public static int EclipseSpearBaseDmg => 1250; /// /// How much damage fragments and sparks should do /// - public static float FragmentDmgMult => 0.5f; + public static float FragmentDmgMult => 0.33f; /// /// How many fragments are spawned per spear hit /// @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 82; Item.height = 88; - Item.damage = 900; + Item.damage = 1000; Item.knockBack = 3.5f; Item.useAnimation = Item.useTime = 24; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 11510f690f..ae93270b57 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -11,12 +11,13 @@ namespace CalamityMod.Items.Weapons.Rogue { public class ProfanedPartisan : RogueWeapon { - public static int ShardBaseDamage => 88; + public static int SpearBaseDamage => 125; + public static int StarBaseDamage => 80; public override void SetDefaults() { Item.width = 68; Item.height = 68; - Item.damage = 333; + Item.damage = 300; Item.crit = 15; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs index 6e37ffc635..c10b177f24 100644 --- a/Projectiles/Rogue/EclipseFragment.cs +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 40; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 5; + Projectile.penetrate = 4; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index d5f6e15ffb..0d30035773 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.originalDamage == 0) { - Projectile.originalDamage = ProfanedPartisan.ShardBaseDamage; + Projectile.originalDamage = ProfanedPartisan.StarBaseDamage; Projectile.ContinuouslyUpdateDamageStats = true; } if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0 && target.active && !target.dontTakeDamage) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 16c12acd08..cdf91a2dd2 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -166,12 +166,7 @@ namespace CalamityMod.Projectiles.Rogue if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, 0f); - p.hostile = false; - p.friendly = true; - p.DamageType = Projectile.DamageType; - if (strongSplit) - p.Calamity().conditionalHomingRange = 600; + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index aac6cd529b..76b9fae7af 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -1,5 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.NPCs.Providence; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -39,6 +39,12 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = ProfanedPartisan.SpearBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + float timeGateValue = 30f; if (Projectile.ai[0] <= 0f) //Copied from HolySpear.cs { From 5d0197fca714220792367ac1a70aac7114a7ace7 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 20:45:01 -0500 Subject: [PATCH 250/346] Localization + Reorg + Darksun Effect --- ChatTags/CustomColorEffectHandler.cs | 51 ++ Items/Weapons/Rogue/EclipsesFall.cs | 772 +++++++++++++++++- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 6 +- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 4 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 22 +- .../Mods.CalamityMod.Projectiles.Summon.hjson | 2 +- Projectiles/Rogue/EclipseExplosion.cs | 87 -- Projectiles/Rogue/EclipseFragment.cs | 189 ----- Projectiles/Rogue/EclipseSpark.cs | 146 ---- Projectiles/Rogue/EclipseSpear.cs | 204 ----- Projectiles/Rogue/EclipseStealthBoom.cs | 48 -- Projectiles/Rogue/EclipsesFallSpear.cs | 148 ---- ...om.png => EclipsesFall_LightExplosion.png} | Bin ...ng => EclipsesFall_LightExplosionGlow.png} | Bin ...ent.png => EclipsesFall_LightFragment.png} | Bin ...pear.png => EclipsesFall_StealthSpear.png} | Bin ...=> EclipsesFall_StealthSpearExplosion.png} | Bin 17 files changed, 834 insertions(+), 845 deletions(-) create mode 100644 ChatTags/CustomColorEffectHandler.cs delete mode 100644 Projectiles/Rogue/EclipseExplosion.cs delete mode 100644 Projectiles/Rogue/EclipseFragment.cs delete mode 100644 Projectiles/Rogue/EclipseSpark.cs delete mode 100644 Projectiles/Rogue/EclipseSpear.cs delete mode 100644 Projectiles/Rogue/EclipseStealthBoom.cs delete mode 100644 Projectiles/Rogue/EclipsesFallSpear.cs rename Projectiles/Rogue/{EclipseStealthBoom.png => EclipsesFall_LightExplosion.png} (100%) rename Projectiles/Rogue/{EclipseStealthBoomGlow.png => EclipsesFall_LightExplosionGlow.png} (100%) rename Projectiles/Rogue/{EclipseFragment.png => EclipsesFall_LightFragment.png} (100%) rename Projectiles/Rogue/{EclipseSpear.png => EclipsesFall_StealthSpear.png} (100%) rename Projectiles/Rogue/{EclipseExplosion.png => EclipsesFall_StealthSpearExplosion.png} (100%) diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs new file mode 100644 index 0000000000..5f63ba48fb --- /dev/null +++ b/ChatTags/CustomColorEffectHandler.cs @@ -0,0 +1,51 @@ +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); + 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; + } + } +} diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 864a04ef16..7513b6be7c 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -1,14 +1,33 @@ -using CalamityMod.Items.Materials; +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.DataStructures; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs; +using CalamityMod.Particles; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using Terraria.UI.Chat; +#region Item namespace CalamityMod.Items.Weapons.Rogue { public class EclipsesFall : RogueWeapon @@ -42,14 +61,13 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.DamageType = RogueDamageClass.Instance; Item.shootSpeed = 32f; - Item.shoot = ModContent.ProjectileType(); - + Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.noUseGraphic = true; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; - 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) @@ -59,7 +77,6 @@ namespace CalamityMod.Items.Weapons.Rogue Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; } - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request(Texture + "Glow").Value); public override void AddRecipes() @@ -73,3 +90,748 @@ namespace CalamityMod.Items.Weapons.Rogue } } } +#endregion + +namespace CalamityMod.Projectiles.Rogue +{ + #region Main Javelin + public class EclipsesFall_Javelin : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 50; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 2; + Projectile.penetrate = 1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; + Projectile.timeLeft = 150 * Projectile.MaxUpdates; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(5)) + { + Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); + float trailScale = Main.rand.NextFloat(0.8f, 1.2f); + Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; + Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); + GeneralParticleHandler.SpawnParticle(eclipseTrail); + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + int onHitCount = EclipsesFall.FragmentCount + 4; + float spread = 20f; + int projectileDamage = SplitProjDamage; + float kb = 5f; + int sparkID = ModContent.ProjectileType(); + int starID = ModContent.ProjectileType(); + for (int i = 0; i < onHitCount; i++) + { + int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; + Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; + float speed = Main.rand.NextFloat(1.5f, 2f); + float moveDuration = Main.rand.Next(5, 15); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); + } + + SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); + + + List frags = new(); + var p = -2; + foreach (var item in Main.ActiveProjectiles) + { + + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) + { + if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) + { + if (item.timeLeft < 1120 * item.MaxUpdates) + { + item.timeLeft = 60 * item.MaxUpdates; + item.ai[0] = target.whoAmI; + continue; + } + item.timeLeft = 1200 * item.MaxUpdates; + p = item.whoAmI; + } + item.ai[0] = target.whoAmI; + } + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) + { + frags.Add(item); + } + } + if (Projectile.Calamity().stealthStrike && p < 0) + for (int i = 0; i < 1; i++) + { + int projID = ModContent.ProjectileType(); + Vector2 velocity = Vector2.Zero; + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); + proj.rotation = Projectile.rotation; + p = proj.whoAmI; + } + + + frags = frags.OrderBy(x => x.timeLeft).ToList(); + int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; + foreach (var item in frags) + { + if (toRemove > 0 && item.ai[0] == 0) + { + item.ai[0] = -2; + item.timeLeft = EclipsesFall_LightFragment.lifetime; + toRemove--; + continue; + } + if (Projectile.Calamity().stealthStrike) + { + if (item.ai[0] == 0) + { + item.ai[1] = Main.rand.Next(5, 15); + item.ai[2] = 20; + } + item.ai[0] = p + 1; + item.timeLeft = EclipsesFall_LightFragment.lifetime; + item.damage = 0; + item.netUpdate = true; + } + } + + + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } + #endregion + + #region Stealth Projectiles + + [PierceResistException] + public class EclipsesFall_StealthSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + bool initialized = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + (Vector2 start, Vector2 end) LinePos = (new(), new()); + float LineWidth = 0; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 48; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 1; + Projectile.timeLeft = 1200 * Projectile.MaxUpdates; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void AI() + { + if (!initialized) + { + Projectile.ai[0] = -1; + Projectile.localAI[0] = Projectile.ai[2]; + Projectile.ai[2] = 0; + initialized = true; + } + + Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) + { + LinePos.end = Projectile.position; + Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; + Projectile.Damage(); + Projectile.ai[0] = -1; + LineWidth = 1f; + LinePos.start = Projectile.Center; + Projectile.localAI[1] = 0; + } + + + LineWidth -= 0.05f; + Projectile.localAI[1]++; + if (Projectile.localAI[1] > 60) + { + var dis = Projectile.Distance(Main.player[Projectile.owner].Center); + Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + + } + Projectile.velocity *= 0.9f; + } + public override bool PreDraw(ref Color lightColor) + { + + if (LineWidth > 0) + { + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + + using (Main.spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + + List posList = []; + //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. + for (var i = 0; i <= 2; i++) + { + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); + } + var pos = posList.ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + } + } + var tex = TextureAssets.Item[ModContent.ItemType()]; + if (Projectile.Opacity > 0.5f) + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) + { + return true; + } + + return base.Colliding(projHitbox, targetHitbox); + } + + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < 0) + return false; + return null; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + //Half damage to any NPC that isn't the primary target + if (Projectile.ai[0] != target.whoAmI) + modifiers.SourceDamage *= 0.5f; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + + if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) + { + Projectile.Opacity = 0; + Projectile.Center = target.Center; + Projectile.timeLeft = 60 * Projectile.MaxUpdates; + Projectile.velocity = new(0, 1E-05f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + } + Projectile.netUpdate = true; + if (Projectile.ai[0] == target.whoAmI) + SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); + } + + public override void OnKill(int timeLeft) + { + if (Projectile.Opacity > 0) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + return; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); + return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + } + public class EclipsesFall_StealthSpearExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType + { + //Based on Terratomere explosion + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 520; + Projectile.friendly = true; + Projectile.ignoreWater = false; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 150; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.scale = 0.2f; + Projectile.hide = true; + } + + public override void AI() + { + // Play an explosion sound on the first frame of this projectile's existence. + if (Projectile.localAI[0] == 0f) + { + SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); + Projectile.localAI[0] = 1f; + } + + // Emit a strong white light. + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); + + // Determine frames. Once the maximum frame is reached the projectile dies. + Projectile.frameCounter++; + if (Projectile.frameCounter % 5 == 4) + Projectile.frame++; + if (Projectile.frame >= 17) + Projectile.Kill(); + + // Exponentially accelerate. + Projectile.scale *= 1.013f; + Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); + } + + public override bool PreDraw(ref Color lightColor) + { + return base.PreDraw(ref lightColor); + } + + public void AdditiveDraw(SpriteBatch spriteBatch) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; + Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 origin = frame.Size() * 0.5f; + + for (int i = 0; i < 2; i++) + { + Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; + Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); + lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; + Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); + } + if (Projectile.timeLeft < 149) + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); + Main.spriteBatch.End(); + } + } + } + #endregion + + #region Shatter Projectiles + public class EclipsesFall_LightFragment : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public static int lifetime => 1200; + Color? color = null; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 4; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * 0.02f; + if (Projectile.ai[0] < -1) + { + Projectile.penetrate = 1; + Projectile.damage = Projectile.originalDamage; + Projectile.stopsDealingDamageAfterPenetrateHits = false; + var target = Projectile.FindTargetWithinRange(4000); + if (target is not null) + { + Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; + Projectile.velocity *= 0.95f; + } + } + + if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) + { + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) + { + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); + Projectile.velocity *= Projectile.ai[2]; + Projectile.ai[2]--; + } + } + else + { + if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) + { + var proj = Main.projectile[(int)Projectile.ai[0] - 1]; + if (Projectile.timeLeft > 100) + Projectile.timeLeft = 100; + Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.velocity = new(0, 1E-05f); + if (Projectile.Distance(proj.Center) < 16) + { + proj.ai[2]++; + proj.netUpdate = true; + if (proj.ai[2] == proj.localAI[0]) + SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); + Projectile.active = false; + + } + } + } + } + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) + return false; + return null; + } + + public override void OnKill(int timeLeft) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + } + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16).ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + // Matches Saros Possesion sunfire with slight edits + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(238, 226, 153); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return mainColor; + } + } + public class EclipsesFall_LightExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + public const int Lifetime = 35; // 7 animation frames, 12 FPS + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 102; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = Lifetime; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + Projectile.frameCounter++; + Projectile.frame = Projectile.frameCounter / 5; + + if (Projectile.frameCounter > Lifetime) + Projectile.Kill(); + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } + public class EclipsesFall_LightSpark : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int lifetime = 150; + Color? color = null; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 6; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localAI[0] = 20f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * Projectile.ai[0]; + + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) + { + Projectile.velocity.Normalize(); + Projectile.velocity *= Projectile.localAI[0]; + Projectile.localAI[0]--; + Projectile.timeLeft++; + } + + if (Projectile.localAI[0] == 0) + { + Projectile.velocity = new(0, 1E-05f); + Projectile.damage = 0; + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); + if (dis < 0.1f) + Projectile.Kill(); + } + } + + public override bool PreDraw(ref Color lightColor) + { + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + + return false; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = color.Value; + return mainColor; + } + } + #endregion +} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 2cbc368d64..4253924887 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -360,9 +360,9 @@ EclipsesFall: { ''' Throws a javelin that shatters into fragments of primordial light upon enemy hits If more than 20 fragments exist, the oldest fragments will seek out enemies to attack - Stealth strikes coalsce fragments into an eclipse spear, gaining power based on the number of fragments - The eclipse spear will pierce though any enemy hit by Eclipse's Fall - 'When the sun goes dark, you will know judgement' + Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments + [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall + [ceffect/darksun:'When the sun goes dark, you will know judgement'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index b4cf866c6f..4e779544ce 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -679,8 +679,8 @@ SarosPossession: { ''' Summons a radiant aura harnessing the power of primordial light Repeated summons increase the power of the aura - with full summon slots to channel an eclipse beam that decays over time - This beam recharges when not in use + with full summon slots to channel [ceffect/darksun:Totality Ray] + [ceffect/darksun:Totality Ray] decays while in use and recharges when not in use ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 30e53d4f60..0506a934b0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -85,10 +85,13 @@ DynamicPursuerElectricity.DisplayName: Dynamic Electricity DynamicPursuerLaser.DisplayName: Dynamic Laser DynamicPursuerProjectile.DisplayName: Dynamic Pursuer EclipseMirrorBurst.DisplayName: Eclipse Mirror Flash -EclipsesFallMain.DisplayName: Eclipse's Fall -EclipsesSmol.DisplayName: Eclipse's Small -EclipsesStealth.DisplayName: Eclipse's Fall -EclipseStealthBoom.DisplayName: Eclipse Blast +EclipsesFall_Javelin.DisplayName: Eclipse's Fall +EclipsesFall_LightFragment.DisplayName: Fragment of Primordial Light +EclipsesFall_LightExplosion.DisplayName: Baily's Beads +EclipsesFall_LightSpark.DisplayName: Spark of Primodial Light +EclipsesFall_StealthSpear.DisplayName: Spear of Obscuration +EclipsesFall_StealthSpearExplosions.DisplayName: Third Contact +EclipsesFall_StealthSpearExplosion.DisplayName: Eclipses Fall_ Stealth Spear Explosion EGloveSpark.DisplayName: Electrician's Spark EnchantedAxe2.DisplayName: Enchanted Axe EnchantedAxeProj.DisplayName: Enchanted Axe @@ -208,7 +211,8 @@ PrismallineProj.DisplayName: Prismalline PrismRocket.DisplayName: Prism Rocket PrismShurikenBlade.DisplayName: Refraction Blade ProfanedPartisanProj.DisplayName: Profaned Partisan -ProfanedPartisanSpear.DisplayName: Profaned Spear +ProfanedPartisanSpear.DisplayName: Holy Spear +ProfanedPartisanFlare.DisplayName: Holy Light PumpkaboomSmall.DisplayName: Small Pumpkaboom PumpkaboomBoomSmall.DisplayName: Pump-kaboom! PumpkaboomBig.DisplayName: Big Pumpkaboom @@ -271,6 +275,7 @@ SpearofDestinyProjectile.DisplayName: Destiny Spear SpearofDestinyStealth.DisplayName: Empowered Holy Lance SpearofDestinyStealthExplosion.DisplayName: Strong Burst SpearofPaleolithProj.DisplayName: Paleolith Spear +PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion SpentFuelContainerProjectile.DisplayName: Spent Fuel Container SphereBladed.DisplayName: Bladed Sphere SphereBlue.DisplayName: Blue Thruster Sphere @@ -334,10 +339,3 @@ WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals -EclipseFragment.DisplayName: Eclipse Fragment -EclipsesFallSpear.DisplayName: Eclipses Fall Spear -EclipseSpark.DisplayName: Eclipse Spark -EclipseSpear.DisplayName: Eclipse Spear -ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare -EclipseExplosion.DisplayName: Eclipse Explosion -PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 1d481724b0..cb32d297b4 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -246,7 +246,7 @@ SandnadoMinion.DisplayName: Sandnado SandTornado.DisplayName: Tornado SarosAura.DisplayName: Saros Aura SarosSunfire.DisplayName: Saros Sunfire -SarosEclipseBeam.DisplayName: Eclipse Beam +SarosEclipseBeam.DisplayName: Totality Ray SeashineSwordProj.DisplayName: Seashine Sword SeekerSummonProj.DisplayName: Soul Seeker SepulcherMinion.DisplayName: Sepulcher diff --git a/Projectiles/Rogue/EclipseExplosion.cs b/Projectiles/Rogue/EclipseExplosion.cs deleted file mode 100644 index 8ec802cdb2..0000000000 --- a/Projectiles/Rogue/EclipseExplosion.cs +++ /dev/null @@ -1,87 +0,0 @@ -using CalamityMod.DataStructures; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Utilities.Daybreak; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - //Based on Terratomere explosion - public class EclipseExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetDefaults() - { - Projectile.width = Projectile.height = 520; - Projectile.friendly = true; - Projectile.ignoreWater = false; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.timeLeft = 150; - Projectile.MaxUpdates = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.scale = 0.2f; - Projectile.hide = true; - } - - public override void AI() - { - // Play an explosion sound on the first frame of this projectile's existence. - if (Projectile.localAI[0] == 0f) - { - SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); - Projectile.localAI[0] = 1f; - } - - // Emit a strong white light. - Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); - - // Determine frames. Once the maximum frame is reached the projectile dies. - Projectile.frameCounter++; - if (Projectile.frameCounter % 5 == 4) - Projectile.frame++; - if (Projectile.frame >= 17) - Projectile.Kill(); - - // Exponentially accelerate. - Projectile.scale *= 1.013f; - Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); - } - - public override bool PreDraw(ref Color lightColor) - { - return base.PreDraw(ref lightColor); - } - - public void AdditiveDraw(SpriteBatch spriteBatch) - { - Texture2D texture = TextureAssets.Projectile[Type].Value; - Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; - Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); - Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Vector2 origin = frame.Size() * 0.5f; - - for (int i = 0; i < 2; i++) - { - Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; - Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); - lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; - Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); - } - if (Projectile.timeLeft < 149) - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); - Main.spriteBatch.End(); - } - } - } -} diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs deleted file mode 100644 index c10b177f24..0000000000 --- a/Projectiles/Rogue/EclipseFragment.cs +++ /dev/null @@ -1,189 +0,0 @@ -using System; -using System.Linq; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseFragment : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public static int lifetime => 1200; - Color? color = null; - public override void SetStaticDefaults() - { - ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Type] = 32; - ProjectileID.Sets.TrailingMode[Type] = 2; - } - public override void SetDefaults() - { - Projectile.width = 40; - Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 4; - Projectile.timeLeft = lifetime; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - Projectile.MaxUpdates = 2; - Projectile.stopsDealingDamageAfterPenetrateHits = true; - Projectile.tileCollide = false; - } - - public override void AI() - { - Projectile.rotation += Projectile.direction * 0.02f; - if (Projectile.ai[0] < -1) - { - Projectile.penetrate = 1; - Projectile.damage = Projectile.originalDamage; - Projectile.stopsDealingDamageAfterPenetrateHits = false; - var target = Projectile.FindTargetWithinRange(4000); - if (target is not null) - { - Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; - Projectile.velocity *= 0.95f; - } - } - - if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) - { - if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) - { - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); - Projectile.velocity *= Projectile.ai[2]; - Projectile.ai[2]--; - } - } - else - { - if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) - { - var proj = Main.projectile[(int)Projectile.ai[0] - 1]; - if (Projectile.timeLeft > 100) - Projectile.timeLeft = 100; - Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); - Projectile.velocity = new(0, 1E-05f); - if (Projectile.Distance(proj.Center) < 16) - { - proj.ai[2]++; - proj.netUpdate = true; - if (proj.ai[2] == proj.localAI[0]) - SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); - Projectile.active = false; - - } - } - } - } - public override bool? CanHitNPC(NPC target) - { - if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) - return false; - return null; - } - - public override void OnKill(int timeLeft) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - } - public override bool PreDraw(ref Color lightColor) - { - Main.spriteBatch.End(out var ss); - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(16).ToArray(); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - } - float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; - if (dis > 1) - { - dis = 1f; - } - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - Main.spriteBatch.Begin(ss); - - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); - Main.spriteBatch.End(); - } - return false; - } - - // Matches Saros Possesion sunfire with slight edits - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = 24f * Projectile.scale; - float curveRatio = 0.2f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - if (completion < curveRatio) - width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - - // Pulse inwards and outwards over time. - float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; - float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); - return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(238, 226, 153); - return Color.Lerp(mainColor, Color.Transparent, completion); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = Projectile.scale * 16; - float curveRatio = 0.25f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - - if (completion < curveRatio) - width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(255, 191, 73); - return mainColor; - } - } -} diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs deleted file mode 100644 index 00b437d0a9..0000000000 --- a/Projectiles/Rogue/EclipseSpark.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Linq; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseSpark : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int lifetime = 150; - Color? color = null; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 32; - ProjectileID.Sets.TrailingMode[Type] = 2; - } - public override void SetDefaults() - { - Projectile.width = 6; - Projectile.height = 6; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 5; - Projectile.timeLeft = lifetime; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.localAI[0] = 20f; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - Projectile.MaxUpdates = 2; - Projectile.tileCollide = false; - } - - public override void AI() - { - Projectile.rotation += Projectile.direction * Projectile.ai[0]; - - if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) - { - Projectile.velocity.Normalize(); - Projectile.velocity *= Projectile.localAI[0]; - Projectile.localAI[0]--; - Projectile.timeLeft++; - } - - if (Projectile.localAI[0] == 0) - { - Projectile.velocity = new(0, 1E-05f); - Projectile.damage = 0; - float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); - if (dis < 0.1f) - Projectile.Kill(); - } - } - - public override bool PreDraw(ref Color lightColor) - { - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); - - Main.spriteBatch.End(out var ss); - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(16); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - } - float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; - if (dis > 1) - { - dis = 1f; - } - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - Main.spriteBatch.Begin(ss); - - return false; - } - - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = 24f * Projectile.scale; - float curveRatio = 0.2f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - if (completion < curveRatio) - width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - - // Pulse inwards and outwards over time. - float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; - float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); - return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(255, 191, 73); - return Color.Lerp(mainColor, Color.Transparent, completion); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = Projectile.scale * 16; - float curveRatio = 0.25f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - - if (completion < curveRatio) - width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = color.Value; - return mainColor; - } - } -} diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs deleted file mode 100644 index 6fc0cec0af..0000000000 --- a/Projectiles/Rogue/EclipseSpear.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using System.Collections.Generic; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - [PierceResistException] - public class EclipseSpear : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - - bool initialized = false; - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - (Vector2 start, Vector2 end) LinePos = (new(), new()); - float LineWidth = 0; - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 48; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 1; - Projectile.timeLeft = 1200 * Projectile.MaxUpdates; - Projectile.ContinuouslyUpdateDamageStats = true; - } - public override void AI() - { - if (!initialized) - { - Projectile.ai[0] = -1; - Projectile.localAI[0] = Projectile.ai[2]; - Projectile.ai[2] = 0; - initialized = true; - } - - Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); - if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) - { - LinePos.end = Projectile.position; - Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; - Projectile.Damage(); - Projectile.ai[0] = -1; - LineWidth = 1f; - LinePos.start = Projectile.Center; - Projectile.localAI[1] = 0; - } - - - LineWidth -= 0.05f; - Projectile.localAI[1]++; - if (Projectile.localAI[1] > 60) - { - var dis = Projectile.Distance(Main.player[Projectile.owner].Center); - Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - - } - Projectile.velocity *= 0.9f; - } - public override bool PreDraw(ref Color lightColor) - { - - if (LineWidth > 0) - { - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - - using (Main.spriteBatch.Scope()) - { - using (lease.Scope(clearColor: Color.Transparent)) - { - - List posList = []; - //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. - for (var i = 0; i <= 2; i++) - { - posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); - } - var pos = posList.ToArray(); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); - } - - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - } - } - var tex = TextureAssets.Item[ModContent.ItemType()]; - if (Projectile.Opacity > 0.5f) - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); - Main.spriteBatch.End(); - } - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float _ = 0; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) - { - return true; - } - - return base.Colliding(projHitbox, targetHitbox); - } - - public override bool? CanHitNPC(NPC target) - { - if (Projectile.ai[0] < 0) - return false; - return null; - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - //Half damage to any NPC that isn't the primary target - if (Projectile.ai[0] != target.whoAmI) - modifiers.SourceDamage *= 0.5f; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - - if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) - { - Projectile.Opacity = 0; - Projectile.Center = target.Center; - Projectile.timeLeft = 60 * Projectile.MaxUpdates; - Projectile.velocity = new(0, 1E-05f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); - } - Projectile.netUpdate = true; - if (Projectile.ai[0] == target.whoAmI) - SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); - } - - public override void OnKill(int timeLeft) - { - if (Projectile.Opacity > 0) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); - return; - } - - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); - return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); - } - } -} diff --git a/Projectiles/Rogue/EclipseStealthBoom.cs b/Projectiles/Rogue/EclipseStealthBoom.cs deleted file mode 100644 index d258de5353..0000000000 --- a/Projectiles/Rogue/EclipseStealthBoom.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseStealthBoom : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - - public const int Lifetime = 35; // 7 animation frames, 12 FPS - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 7; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 102; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.timeLeft = Lifetime; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - - public override void AI() - { - Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5; - - if (Projectile.frameCounter > Lifetime) - Projectile.Kill(); - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs deleted file mode 100644 index 82f3bb6bf6..0000000000 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesFallSpear : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 50; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = 1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - public override void AI() - { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - int onHitCount = EclipsesFall.FragmentCount + 4; - float spread = 20f; - int projectileDamage = SplitProjDamage; - float kb = 5f; - int sparkID = ModContent.ProjectileType(); - int starID = ModContent.ProjectileType(); - for (int i = 0; i < onHitCount; i++) - { - int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; - Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; - float speed = Main.rand.NextFloat(1.5f, 2f); - float moveDuration = Main.rand.Next(5, 15); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); - } - - SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); - SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); - SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); - - - List frags = new(); - var p = -2; - foreach (var item in Main.ActiveProjectiles) - { - - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) - { - if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) - { - if (item.timeLeft < 1120 * item.MaxUpdates) - { - item.timeLeft = 60 * item.MaxUpdates; - item.ai[0] = target.whoAmI; - continue; - } - item.timeLeft = 1200 * item.MaxUpdates; - p = item.whoAmI; - } - item.ai[0] = target.whoAmI; - } - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) - { - frags.Add(item); - } - } - if (Projectile.Calamity().stealthStrike && p < 0) - for (int i = 0; i < 1; i++) - { - int projID = ModContent.ProjectileType(); - Vector2 velocity = Vector2.Zero; - var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); - proj.rotation = Projectile.rotation; - p = proj.whoAmI; - } - - - frags = frags.OrderBy(x => x.timeLeft).ToList(); - int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; - foreach (var item in frags) - { - if (toRemove > 0 && item.ai[0] == 0) - { - item.ai[0] = -2; - item.timeLeft = EclipseFragment.lifetime; - toRemove--; - continue; - } - if (Projectile.Calamity().stealthStrike) - { - if (item.ai[0] == 0) - { - item.ai[1] = Main.rand.Next(5, 15); - item.ai[2] = 20; - } - item.ai[0] = p + 1; - item.timeLeft = EclipseFragment.lifetime; - item.damage = 0; - item.netUpdate = true; - } - } - - - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D tex = TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipseStealthBoom.png b/Projectiles/Rogue/EclipsesFall_LightExplosion.png similarity index 100% rename from Projectiles/Rogue/EclipseStealthBoom.png rename to Projectiles/Rogue/EclipsesFall_LightExplosion.png diff --git a/Projectiles/Rogue/EclipseStealthBoomGlow.png b/Projectiles/Rogue/EclipsesFall_LightExplosionGlow.png similarity index 100% rename from Projectiles/Rogue/EclipseStealthBoomGlow.png rename to Projectiles/Rogue/EclipsesFall_LightExplosionGlow.png diff --git a/Projectiles/Rogue/EclipseFragment.png b/Projectiles/Rogue/EclipsesFall_LightFragment.png similarity index 100% rename from Projectiles/Rogue/EclipseFragment.png rename to Projectiles/Rogue/EclipsesFall_LightFragment.png diff --git a/Projectiles/Rogue/EclipseSpear.png b/Projectiles/Rogue/EclipsesFall_StealthSpear.png similarity index 100% rename from Projectiles/Rogue/EclipseSpear.png rename to Projectiles/Rogue/EclipsesFall_StealthSpear.png diff --git a/Projectiles/Rogue/EclipseExplosion.png b/Projectiles/Rogue/EclipsesFall_StealthSpearExplosion.png similarity index 100% rename from Projectiles/Rogue/EclipseExplosion.png rename to Projectiles/Rogue/EclipsesFall_StealthSpearExplosion.png From 6eeccc5f66287c1f4550d9f9c8a7c2975b3e29f3 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 22:10:37 -0500 Subject: [PATCH 251/346] loc fix --- Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 0506a934b0..0aee56e272 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -90,8 +90,7 @@ EclipsesFall_LightFragment.DisplayName: Fragment of Primordial Light EclipsesFall_LightExplosion.DisplayName: Baily's Beads EclipsesFall_LightSpark.DisplayName: Spark of Primodial Light EclipsesFall_StealthSpear.DisplayName: Spear of Obscuration -EclipsesFall_StealthSpearExplosions.DisplayName: Third Contact -EclipsesFall_StealthSpearExplosion.DisplayName: Eclipses Fall_ Stealth Spear Explosion +EclipsesFall_StealthSpearExplosion.DisplayName: Third Contact EGloveSpark.DisplayName: Electrician's Spark EnchantedAxe2.DisplayName: Enchanted Axe EnchantedAxeProj.DisplayName: Enchanted Axe 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 252/346] 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 253/346] 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 254/346] 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 255/346] 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 256/346] 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 257/346] 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 258/346] 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 aa3f77f5b5ad751f73ff10b73ce1a69ae6b13add Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 6 Apr 2026 23:05:55 -0700 Subject: [PATCH 259/346] Aureus Cells no longer restore mana, Crowns now shatter on injection --- Items/CalamityGlobalItem.cs | 3 ++- Items/Potions/AureusCell.cs | 14 -------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 5f20ad405b..5e76d05a1d 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1,6 +1,7 @@ using System; using System.IO; using CalamityMod.Balancing; +using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; @@ -616,7 +617,7 @@ namespace CalamityMod.Items } //Mana Potion interactions - if (item.healMana > 0) + if (item.healMana > 0 || player.HasBuff(ModContent.BuffType())) { //If mana potion used, kill all active Crown projectiles if ((modPlayer.moonCrown || modPlayer.featherCrown) && modPlayer.mageCrownCount > 0) diff --git a/Items/Potions/AureusCell.cs b/Items/Potions/AureusCell.cs index 5878710f40..3297737fec 100644 --- a/Items/Potions/AureusCell.cs +++ b/Items/Potions/AureusCell.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Items.Potions { // Eating animation but gulp sound? Sure Item.DefaultToFood(22, 38, BuffID.MagicPower, CalamityUtils.MinutesToFrames(8)); - Item.healMana = 200; Item.UseSound = SoundID.Item3; Item.value = Item.sellPrice(silver: 50); // Based on material cost rather than potion cost Item.rare = ItemRarityID.Lime; @@ -32,19 +31,6 @@ namespace CalamityMod.Items.Potions public override void OnConsumeItem(Player player) { - if (PlayerInput.Triggers.JustPressed.QuickBuff) - { - player.statMana += Item.healMana; - if (player.statMana > player.statManaMax2) - { - player.statMana = player.statManaMax2; - } - player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); - if (Main.myPlayer == player.whoAmI) - { - player.ManaEffect(Item.healMana); - } - } player.AddBuff(BuffID.MagicPower, Item.buffTime); player.AddBuff(BuffID.ManaRegeneration, Item.buffTime); } From 3e8a6c7e3e5652ae382eb89b6d07d46c08af8f6b Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 6 Apr 2026 23:21:20 -0700 Subject: [PATCH 260/346] Eutrophic Sand can no longer be clentaminated --- Tiles/SunkenSea/EutrophicSand.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index c015c371b2..a4b10b3957 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -32,7 +32,6 @@ namespace CalamityMod.Tiles.SunkenSea TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Sand"]); TileID.Sets.Suffocate[Type] = true; TileID.Sets.CanBeDugByShovel[Type] = true; - TileID.Sets.Conversion.Sand[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; TileID.Sets.Falling[Type] = true; TileID.Sets.FallingBlockProjectile[Type] = new TileID.Sets.FallingBlockProjectileInfo(ModContent.ProjectileType(), 5); From bffc847f6dd92336b2bc72a5716a1c28de87867e Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Mon, 6 Apr 2026 23:45:56 -0700 Subject: [PATCH 261/346] Changed Evil Smasher charge sound --- Projectiles/Melee/EvilSmasherProjectile.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Projectiles/Melee/EvilSmasherProjectile.cs b/Projectiles/Melee/EvilSmasherProjectile.cs index f7182884f2..93f0a4c02a 100644 --- a/Projectiles/Melee/EvilSmasherProjectile.cs +++ b/Projectiles/Melee/EvilSmasherProjectile.cs @@ -1,18 +1,12 @@ using System; -using System.Collections.Generic; -using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Sounds; -using Humanizer; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; -using Terraria.DataStructures; -using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -76,8 +70,10 @@ namespace CalamityMod.Projectiles.Melee { Projectile.timeLeft++; timer--; - if (!playedChargeSound) { - SoundEngine.PlaySound(SoundID.Item178,Projectile.Center); + if (!playedChargeSound) + { + SoundEngine.PlaySound(SoundID.DeerclopsStep with { Volume = 2f, Pitch = 0.5f }, Projectile.Center); + SoundEngine.PlaySound(Murasama.InorganicHit with { Pitch = -0.5f }, Projectile.Center); playedChargeSound = true; for (int i = 0; i < 5; i++) { From f000ef00328850b66b0d90739d0aa7389e2bb28f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:49:53 +0700 Subject: [PATCH 262/346] Astral Injection changes --- Items/Potions/AstralInjection.cs | 21 ++++--------------- .../Mods.CalamityMod.Items.Potions.hjson | 2 +- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Items/Potions/AstralInjection.cs b/Items/Potions/AstralInjection.cs index 11496ee727..437146951b 100644 --- a/Items/Potions/AstralInjection.cs +++ b/Items/Potions/AstralInjection.cs @@ -13,9 +13,8 @@ namespace CalamityMod.Items.Potions { public new string LocalizationCategory => "Items.Potions"; - public static int ManaPerFrame = 2; - public static int SelfDamage = 5; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaPerFrame * 60, SelfDamage); + public static int ManaPerFrame = 1; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaPerFrame * 60); public override void SetStaticDefaults() { @@ -28,24 +27,12 @@ namespace CalamityMod.Items.Potions public override void SetDefaults() { - Item.DefaultToFood(14, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(5), true); + Item.DefaultToFood(14, 34, ModContent.BuffType(), CalamityUtils.SecondsToFrames(6), true); Item.value = Item.sellPrice(silver: 2); Item.rare = ItemRarityID.Lime; } - public override void OnConsumeItem(Player player) - { - player.AddBuff(BuffID.ManaSickness, Player.manaSickTime / 2, true); - player.statLife -= SelfDamage; - if (Main.myPlayer == player.whoAmI) - { - player.HealEffect(-SelfDamage, true); - } - if (player.statLife <= 0) - { - player.KillMe(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AstralInjection" + Main.rand.Next(1, 2 + 1)).ToNetworkText(player.name)), 1000.0, 0, false); - } - } + public override void OnConsumeItem(Player player) => player.AddBuff(BuffID.ManaSickness, Player.manaSickTime, true); public override void AddRecipes() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index a4c20d91d5..59892a74d0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -8,7 +8,7 @@ AstralInjection: { Tooltip: ''' Restores {0} mana per second - Lower your health by {1} and inflicts {$BuffName.ManaSickness} when used + Inflicts [cbuff:ManaSickness] when used ''' } 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 263/346] 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 264/346] + 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 265/346] 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 266/346] 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 267/346] 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 268/346] 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 269/346] 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 270/346] 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 271/346] 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 272/346] 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 5c3082ac5c0bd278e5c6d7920a4bdadde798ee61 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 7 Apr 2026 23:14:21 -0700 Subject: [PATCH 273/346] Removed Seven's Striker right click --- Items/Weapons/Ranged/TheSevensStriker.cs | 116 ++---------------- ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 - 2 files changed, 8 insertions(+), 110 deletions(-) diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index fc2338f5fe..2025d63308 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -25,13 +25,6 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly SoundStyle JackpotGFB = new("CalamityMod/Sounds/Item/SevensStrikerJackpotGFB"); public static readonly SoundStyle CoinSound = new("CalamityMod/Sounds/Item/SevensStrikerCoinShot") { MaxInstances = 0, PitchVariance = 0.5f }; - public static int ShotCoin = 0; // projectile ID to use for right click, affects damage multiplier - public static readonly float RightClickCopperMultiplier = 0.04f; - public static readonly float RightClickSilverMultiplier = 0.08f; - public static readonly float RightClickGoldMultiplier = 0.16f; - public static int RightClickAmmoSavedPercent = 80; - public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RightClickAmmoSavedPercent); - public static readonly float DoublesMultiplier = 1f; // Unfortunately doubles can't be doubles. Balancing! public static readonly float TriplesCherryMultiplier = 1f; public static readonly float TriplesCherrySplitMultiplier = 0.333f; @@ -39,11 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged public static readonly float JackpotMultiplier = 0.5f; // Jackpot fires 49 shots total and thus needs to be reduced somehow... public static readonly float JackpotMultiplierGFB = 7f; // ...Unless you simply cannot stop winning - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } - public override void SetDefaults() { Item.width = 170; @@ -57,114 +45,26 @@ namespace CalamityMod.Items.Weapons.Ranged Item.channel = true; Item.useTurn = true; Item.autoReuse = true; + Item.UseSound = null; + Item.noUseGraphic = true; Item.useStyle = ItemUseStyleID.Shoot; Item.useAmmo = AmmoID.Coin; + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 24f; Item.shoot = ProjectileID.PlatinumCoin; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); Item.Calamity().donorItem = true; } - - public override bool AltFunctionUse(Player player) => true; - - public override bool? UseItem(Player player) - { - // Right click has a chance to save money - if (player.altFunctionUse == 2) - { - bool consumeCoin = Main.rand.Next(100) >= RightClickAmmoSavedPercent; - long coinCount = Utils.CoinsCount(out bool overflow, player.inventory); - int price; - - if (overflow || coinCount > 10000) - { - price = 10000; - ShotCoin = ProjectileID.GoldCoin; - } - else if (coinCount > 100) - { - price = 100; - ShotCoin = ProjectileID.SilverCoin; - } - else - { - price = 1; - ShotCoin = ProjectileID.CopperCoin; - } - - if (consumeCoin) - player.BuyItem(price); - } - - // Left click does nothing, it just spawns the holdout - else - Item.shoot = ModContent.ProjectileType(); - - return base.UseItem(player); - } - public override Vector2? HoldoutOffset() => new Vector2(-30, -11); - - // Left click spawns a holdout, so the item must not appear normally. - // Right click uses the item like a standard gun, so draw it normally. - public override void UseAnimation(Player player) - { - if (player.altFunctionUse == 2) - { - Item.UseSound = CoinSound; - Item.noUseGraphic = false; - } - else - { - Item.UseSound = null; - Item.noUseGraphic = true; - } - } - - // Right click fires coins extremely rapidly (3 use time) - public override float UseTimeMultiplier(Player player) => player.altFunctionUse == 2 ? 0.1f : 1f; - - // Right click consumes coins manually instead of using Terraria's ammo system - // (otherwise it could shoot Platinum Coins) - public override bool CanConsumeAmmo(Item ammo, Player player) => player.altFunctionUse == 2 ? false : true; - - public override bool CanUseItem(Player player) - { - if (player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) - return true; - - if (player.altFunctionUse == 2) - { - Utils.CoinsCount(out bool overflow, player.inventory); - return overflow; - } - return true; - } - + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - // Right click damage multiplier varies by coin type - if (player.altFunctionUse == 2) - { - Vector2 shootDirection = velocity.SafeNormalize(Vector2.UnitX * player.direction); - Vector2 gunTip = position + shootDirection * Item.scale * 90f; - gunTip.Y -= 20f; + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - // spread copied from Onyxia, angular conic spread instead of Terraria's square spread - float randAngle = Main.rand.NextFloat(-0.05f, 0.05f); - float randVelMultiplier = Main.rand.NextFloat(0.92f, 1.08f); - Vector2 finalVelocity = velocity.RotatedBy(randAngle) * randVelMultiplier; - float damageMult = ShotCoin == ProjectileID.GoldCoin - ? RightClickGoldMultiplier : ShotCoin == ProjectileID.SilverCoin - ? RightClickSilverMultiplier : RightClickCopperMultiplier; - int finalDamage = (int)(damage * damageMult); - Projectile.NewProjectile(source, gunTip, finalVelocity, ShotCoin, finalDamage, knockback, player.whoAmI); - } - - // Left click just spawns the holdout - else - Projectile.NewProjectile(source, position, velocity, ModContent.ProjectileType(), damage, knockback, player.whoAmI, type, 0f); + // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction + // We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out. + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 3afeaa551b..d56be3963d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -1385,8 +1385,6 @@ TheSevensStriker: { ''' Press to consume 1 coin and play a slot machine The quality of the outcome depends on the coin used - Press to rapidly fire a barrage of coins - The coin barrage has an {0}% chance to save ammo and will not fire platinum coins 'A gun given to a great gunslinger Forged by the arms of a man given no name' ''' From e0a6f7f00fb720e4eb3f2a0ea455dcac6def6864 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 7 Apr 2026 23:35:40 -0700 Subject: [PATCH 274/346] Dryad's Tear can no longer hit friendly NPCs --- Items/Weapons/Ranged/TheSevensStriker.cs | 1 - Projectiles/Ranged/DryadsTearMain.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Items/Weapons/Ranged/TheSevensStriker.cs b/Items/Weapons/Ranged/TheSevensStriker.cs index 2025d63308..97516ab4c9 100644 --- a/Items/Weapons/Ranged/TheSevensStriker.cs +++ b/Items/Weapons/Ranged/TheSevensStriker.cs @@ -62,7 +62,6 @@ namespace CalamityMod.Items.Weapons.Ranged { Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction // We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out. holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); return false; diff --git a/Projectiles/Ranged/DryadsTearMain.cs b/Projectiles/Ranged/DryadsTearMain.cs index 6c3da77866..d4c6d6446c 100644 --- a/Projectiles/Ranged/DryadsTearMain.cs +++ b/Projectiles/Ranged/DryadsTearMain.cs @@ -379,7 +379,7 @@ namespace CalamityMod.Projectiles.Ranged modifiers.SourceDamage *= damageMult; } - public override bool? CanHitNPC(NPC target) => time > 1 && Projectile.numHits == 0; + public override bool? CanHitNPC(NPC target) => ((time > 1) ? null : false && Projectile.numHits == 0); public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float hitboxSize = 20 * Projectile.scale * damageMult; 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 275/346] 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 b895168dee4d61f043d9a15a8197d085b9c6eebd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 8 Apr 2026 23:21:59 -0500 Subject: [PATCH 276/346] Soul Artifact Renames + ESA stat changes --- CalPlayer/CalamityPlayer.cs | 18 +++++-------- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- CalPlayer/CalamityPlayerMiscEffects.cs | 10 ++------ ...ensionalSoulArtifact.cs => CrushingEgo.cs} | 5 ++-- ...sionalSoulArtifact.png => CrushingEgo.png} | Bin ...{AuricSoulArtifact.cs => FadedIdolatry.cs} | 6 ++--- ...uricSoulArtifact.png => FadedIdolatry.png} | Bin ...Artifact.cs => FragmentsOfAnotherWorld.cs} | 21 ++++++++++++--- ...tifact.png => FragmentsOfAnotherWorld.png} | Bin Items/CalamityGlobalItem.cs | 3 --- .../Mods.CalamityMod.Items.Accessories.hjson | 24 ++++++++++-------- 11 files changed, 47 insertions(+), 42 deletions(-) rename Items/Accessories/{DimensionalSoulArtifact.cs => CrushingEgo.cs} (88%) rename Items/Accessories/{DimensionalSoulArtifact.png => CrushingEgo.png} (100%) rename Items/Accessories/{AuricSoulArtifact.cs => FadedIdolatry.cs} (87%) rename Items/Accessories/{AuricSoulArtifact.png => FadedIdolatry.png} (100%) rename Items/Accessories/{EldritchSoulArtifact.cs => FragmentsOfAnotherWorld.cs} (55%) rename Items/Accessories/{EldritchSoulArtifact.png => FragmentsOfAnotherWorld.png} (100%) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index a3a0320242..05e5a34e2a 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -1039,9 +1039,9 @@ namespace CalamityMod.CalPlayer public int fallingBootVelCheckTimer = 0; public bool voidOfCalamity = false; public bool apollyon = false; - public bool eArtifact = false; - public bool dArtifact = false; - public bool auricSArtifact = false; + public bool fragmentsOfAnotherWorld = false; + public bool crushingEgo = false; + public bool fadedIdolatry = false; public bool pSoulArtifact = false; public bool giantPearl = false; public bool shieldOfTheOcean = false; @@ -2468,9 +2468,9 @@ namespace CalamityMod.CalPlayer baroclaw = false; voidOfCalamity = false; apollyon = false; - eArtifact = false; - dArtifact = false; - auricSArtifact = false; + fragmentsOfAnotherWorld = false; + crushingEgo = false; + fadedIdolatry = false; pSoulArtifact = false; giantPearl = false; shieldOfTheOcean = false; @@ -6115,12 +6115,6 @@ namespace CalamityMod.CalPlayer stealthGenMoving += ShadowPotion.StealthRegenBoost; } - if (eArtifact) - { - stealthGenStandstill += 0.15f; - stealthGenMoving += 0.15f; - } - // Accessory modifiers can boost these stats stealthGenStandstill += accStealthGenBoost; stealthGenMoving += accStealthGenBoost; diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 290e7e6d3e..a94e709a5b 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1624,7 +1624,7 @@ namespace CalamityMod.CalPlayer #region Player Incoming Damage Multiplier (Increases) double damageMult = 1D; - if (dArtifact) // Dimensional Soul Artifact increases incoming damage by 15%. + if (crushingEgo) // Dimensional Soul Artifact increases incoming damage by 15%. damageMult += 0.15; if (enraged) // Demonshade Enrage damageMult += DemonshadeHelm.MultDamageTakenBoost; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 3d5996fa8f..4c8833cff9 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3969,13 +3969,7 @@ namespace CalamityMod.CalPlayer Player.npcTypeNoAggro[ModContent.NPCType()] = true; } - if (eArtifact) - { - Player.manaCost -= 0.25f; - Player.maxMinions++; - } - - if (auricSArtifact && Player.FindBuffIndex(ModContent.BuffType()) != -1) + if (fadedIdolatry && Player.FindBuffIndex(ModContent.BuffType()) != -1) Player.maxMinions += Player.ownedProjectileCounts[ModContent.ProjectileType()]; if (pSoulArtifact) @@ -4410,7 +4404,7 @@ namespace CalamityMod.CalPlayer // Add any multiplicative damage bonuses here float multiplicativeDamage = 1; - if (dArtifact) + if (crushingEgo) multiplicativeDamage += 0.2f; if (WarbanneroftheRighteous) multiplicativeDamage += warbannerDamageMult; diff --git a/Items/Accessories/DimensionalSoulArtifact.cs b/Items/Accessories/CrushingEgo.cs similarity index 88% rename from Items/Accessories/DimensionalSoulArtifact.cs rename to Items/Accessories/CrushingEgo.cs index b8541a3f47..13c92cc9fb 100644 --- a/Items/Accessories/DimensionalSoulArtifact.cs +++ b/Items/Accessories/CrushingEgo.cs @@ -9,7 +9,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class DimensionalSoulArtifact : ModItem, ILocalizedModType + [LegacyName("DimensionalSoulArtifact")] + public class CrushingEgo : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; public override void SetDefaults() @@ -24,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.dArtifact = true; + modPlayer.crushingEgo = true; } public override void AddRecipes() diff --git a/Items/Accessories/DimensionalSoulArtifact.png b/Items/Accessories/CrushingEgo.png similarity index 100% rename from Items/Accessories/DimensionalSoulArtifact.png rename to Items/Accessories/CrushingEgo.png diff --git a/Items/Accessories/AuricSoulArtifact.cs b/Items/Accessories/FadedIdolatry.cs similarity index 87% rename from Items/Accessories/AuricSoulArtifact.cs rename to Items/Accessories/FadedIdolatry.cs index 9ff5405c94..72f213f81d 100644 --- a/Items/Accessories/AuricSoulArtifact.cs +++ b/Items/Accessories/FadedIdolatry.cs @@ -9,8 +9,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - [LegacyName("GodlySoulArtifact")] - public class AuricSoulArtifact : ModItem, ILocalizedModType + [LegacyName("GodlySoulArtifact", "AuricSoulArtifact")] + public class FadedIdolatry : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; public override void SetDefaults() @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.auricSArtifact = true; + modPlayer.fadedIdolatry = true; } public override void AddRecipes() diff --git a/Items/Accessories/AuricSoulArtifact.png b/Items/Accessories/FadedIdolatry.png similarity index 100% rename from Items/Accessories/AuricSoulArtifact.png rename to Items/Accessories/FadedIdolatry.png diff --git a/Items/Accessories/EldritchSoulArtifact.cs b/Items/Accessories/FragmentsOfAnotherWorld.cs similarity index 55% rename from Items/Accessories/EldritchSoulArtifact.cs rename to Items/Accessories/FragmentsOfAnotherWorld.cs index 0e1299f0ed..046e44ba43 100644 --- a/Items/Accessories/EldritchSoulArtifact.cs +++ b/Items/Accessories/FragmentsOfAnotherWorld.cs @@ -5,12 +5,20 @@ using CalamityMod.Items.Placeables.Ores; using CalamityMod.Items.Placeables.Plates; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories { - public class EldritchSoulArtifact : ModItem, ILocalizedModType + [LegacyName("EldritchSoulArtifact")] + public class FragmentsOfAnotherWorld : ModItem, ILocalizedModType { + static float MeleeSpeedIncrease => 0.2f; + static float RangedSpecialistDmgMult => 1.15f; + static float ManaCostReduction => 0.25f; + static int MaxSentries => 2; + static float RogueSpeedIncrease => 0.1f; + public new string LocalizationCategory => "Items.Accessories"; public override void SetDefaults() { @@ -21,12 +29,19 @@ namespace CalamityMod.Items.Accessories Item.rare = ItemRarityID.Purple; } + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MeleeSpeedIncrease.ToPercent(), RangedSpecialistDmgMult, ManaCostReduction.ToPercent(), MaxSentries, RogueSpeedIncrease.ToPercent()); + public override void UpdateAccessory(Player player, bool hideVisual) { CalamityPlayer modPlayer = player.Calamity(); - modPlayer.eArtifact = true; + modPlayer.fragmentsOfAnotherWorld = true; + player.buffImmune[ModContent.BuffType()] = true; - player.GetAttackSpeed() += 0.1f; + player.GetAttackSpeed() += MeleeSpeedIncrease; + player.specialistDamage *= RangedSpecialistDmgMult; + player.manaCost -= ManaCostReduction; + player.maxTurrets += MaxSentries; + player.GetAttackSpeed() += RogueSpeedIncrease; } public override void AddRecipes() diff --git a/Items/Accessories/EldritchSoulArtifact.png b/Items/Accessories/FragmentsOfAnotherWorld.png similarity index 100% rename from Items/Accessories/EldritchSoulArtifact.png rename to Items/Accessories/FragmentsOfAnotherWorld.png diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 5f20ad405b..c68295acb6 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -328,9 +328,6 @@ namespace CalamityMod.Items if (modPlayer.gloveOfRecklessness) velocity = velocity.RotatedByRandom(MathHelper.ToRadians(12f)); } - - if (modPlayer.eArtifact && item.CountsAsClass()) - velocity *= 1.25f; } public override bool Shoot(Item item, Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 0a39832510..aac2bb06a5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -247,12 +247,12 @@ AsgardsValor: { ''' } -AuricSoulArtifact: { - DisplayName: Auric Soul Artifact +FadedIdolatry: { + DisplayName: Faded Idolatry Tooltip: ''' For each Fiery Draconid you have summoned, you gain 1 minion slot - Loyalty + [c/ffe100:'Once everything has crumbled to dust, what will be left of the world you created?'] ''' } @@ -588,12 +588,12 @@ DiamondOfTheDeep: { ''' } -DimensionalSoulArtifact: { - DisplayName: Dimensional Soul Artifact +CrushingEgo: { + DisplayName: Crushing Ego Tooltip: ''' Multiplies all damage by 1.2x, but at the cost of taking 15% increased damage - Power + [c/ff00ff:'Don the mask of arrogance, and dance by your lonesome. Once the ball has gone quiet, you'll be the last man standing.'] ''' } @@ -658,13 +658,17 @@ EclipseMirror: { FlavorTooltip: "'Its reflection shows naught but darkness'" } -EldritchSoulArtifact: { - DisplayName: Eldritch Soul Artifact +FragmentsOfAnotherWorld: { + DisplayName: Fragments Of Another World Tooltip: ''' - Boosts melee speed by 10%, ranged velocity by 25%, rogue stealth regen by 15%, max minions by 1 and reduces mana cost by 25% Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] - Knowledge + {0}% increased melee speed + {1}x specialist ranged damage + {2}% reduced mana usage + +{3} maximum sentries + {4}% increased rogue attack speed + [c/ff0000:'Don't speak of your desires to the shadows, they listen.'] ''' } From f11a024342fa1d5c3fb59bd1d8f16b96021090ac Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Wed, 8 Apr 2026 22:33:10 -0700 Subject: [PATCH 277/346] Removed alternate firing modes from Holofibre, Condemnation and Fetid Emesis --- Items/Weapons/Ranged/Condemnation.cs | 30 ++----------------- ...ityMod.Items.Weapons.DraedonsArsenal.hjson | 1 - ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 2 -- .../HolofibreImmolatorHoldout.cs | 3 +- Projectiles/Ranged/FetidEmesisHoldout.cs | 2 +- 5 files changed, 4 insertions(+), 34 deletions(-) diff --git a/Items/Weapons/Ranged/Condemnation.cs b/Items/Weapons/Ranged/Condemnation.cs index b0a3d62c15..1886e256b9 100644 --- a/Items/Weapons/Ranged/Condemnation.cs +++ b/Items/Weapons/Ranged/Condemnation.cs @@ -14,11 +14,6 @@ namespace CalamityMod.Items.Weapons.Ranged public new string LocalizationCategory => "Items.Weapons.Ranged"; public static int MaxLoadedArrows = 9; - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } - public override void SetDefaults() { Item.width = 130; @@ -40,26 +35,15 @@ namespace CalamityMod.Items.Weapons.Ranged public override Vector2? HoldoutOffset() => new Vector2(-50f, 0f); - public override bool AltFunctionUse(Player player) => true; - public override void HoldItem(Player player) { var calPlayer = player.Calamity(); if (Main.myPlayer == player.whoAmI) { - calPlayer.rightClickListener = true; calPlayer.mouseRotationListener = true; } - - if (calPlayer.mouseRight && player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0) - { - Item.noUseGraphic = false; - } - else - { - Item.noUseGraphic = true; - } + Item.noUseGraphic = true; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; @@ -71,17 +55,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Vector2 shootVelocity = velocity; Vector2 shootDirection = shootVelocity.SafeNormalize(Vector2.UnitX * player.direction); - - // Single arrow firing. - if (player.Calamity().mouseRight) - { - Vector2 tipPosition = position + shootDirection * 110f; - Projectile.NewProjectile(source, tipPosition, shootVelocity, Item.shoot, damage, knockback, player.whoAmI); - } - - // Charge-up. Done via a holdout projectile. - else - Projectile.NewProjectile(source, position, shootDirection, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + Projectile.NewProjectile(source, position, shootDirection, ModContent.ProjectileType(), 0, 0f, player.whoAmI); return false; } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson index 0ab28aaaf8..3494c93a76 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson @@ -65,7 +65,6 @@ HolofibreImmolator: { Holding quickly charges the bow, firing a high-speed plasma arrow Plasma arrows will detonate after impact, creating stronger explosions if stuck into tiles Holding will repeatedly fire uncharged shots - Holding and will automatically fire charged arrows at a slightly slower rate [c/1FFBFF:'The elegance of holofibre is unmatched.] [c/1FFBFF:However, mechanical tension may have produced more consistent results.'] ''' diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index d56be3963d..1e650bbde7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -286,7 +286,6 @@ Condemnation: { ''' Fires powerful scarlet bolts suffused with hateful magics Hold to load up to nine bolts for powerful burst fire - Hold to use the repeater full auto ''' } @@ -426,7 +425,6 @@ FetidEmesis: { Fires an accelerating stream of bullets until the barrel overheats When the barrel overheats, a spread of fetid chunks is vomited out After firing, the gun must cool back down before it can be used again - Pressing while firing will instantly launch the chunks {$CommonItemTooltip.PercentChanceToSaveAmmo} ''' } diff --git a/Projectiles/DraedonsArsenal/HolofibreImmolatorHoldout.cs b/Projectiles/DraedonsArsenal/HolofibreImmolatorHoldout.cs index a8a735cb03..73f63de8c1 100644 --- a/Projectiles/DraedonsArsenal/HolofibreImmolatorHoldout.cs +++ b/Projectiles/DraedonsArsenal/HolofibreImmolatorHoldout.cs @@ -62,8 +62,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal spamDelay--; // Fire if the owner stops channeling or otherwise cannot use the weapon. bool autoSpam = (Owner.Calamity().mouseRight && !Main.mouseLeft); - bool chargeSpam = (Owner.Calamity().mouseRight && Main.mouseLeft && ChargeLV1 && spamDelay == 0); - if ((!Main.mouseLeft || autoSpam || chargeSpam) && downtime == 0 && time >= 1) + if ((!Main.mouseLeft || autoSpam) && downtime == 0 && time >= 1) { KeepRefreshingLifetime = false; diff --git a/Projectiles/Ranged/FetidEmesisHoldout.cs b/Projectiles/Ranged/FetidEmesisHoldout.cs index c712407bed..0cd504db1b 100644 --- a/Projectiles/Ranged/FetidEmesisHoldout.cs +++ b/Projectiles/Ranged/FetidEmesisHoldout.cs @@ -90,7 +90,7 @@ namespace CalamityMod.Projectiles.Ranged revFrames++; shineScale *= 0.77f; - if ((revFrames >= maxFrames && !isTired || (Owner.Calamity().mouseRight && revFrames > 2 )) && Owner.whoAmI == Main.myPlayer) + if (revFrames >= maxFrames && !isTired && Owner.whoAmI == Main.myPlayer) { Owner.SetScreenshake(6.5f); OffsetLengthFromArm -= 35f; From 6dc970b6b1376f9e8d3834f3199c296501a3b594 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 14:15:29 -0500 Subject: [PATCH 278/346] ven locket spawns visual portals + fixed Obliterator portals --- CalPlayer/CalamityPlayer.cs | 2 ++ Projectiles/Summon/DoGWeaponTeleportRift.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 05e5a34e2a..05987d066c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -5545,6 +5545,8 @@ namespace CalamityMod.CalPlayer { Main.projectile[p].DamageType = DamageClass.Generic; //Makes it not proc shit like nanotech, extorter and other stuff Main.projectile[p].Calamity().LocketClone = true; //To not have clones trigger effects like Sacrifice's Lifesteal and Final Dawn's stealth generation + + Projectile.NewProjectile(LocketSource, Main.projectile[p].Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Player.whoAmI); // Spawn a little portal! } // Handle AI edge-cases. These are like overlapping projectiles and the projectile not spawning at all diff --git a/Projectiles/Summon/DoGWeaponTeleportRift.cs b/Projectiles/Summon/DoGWeaponTeleportRift.cs index 2e8bbed414..1ca8c9ccb2 100644 --- a/Projectiles/Summon/DoGWeaponTeleportRift.cs +++ b/Projectiles/Summon/DoGWeaponTeleportRift.cs @@ -34,7 +34,8 @@ namespace CalamityMod.Projectiles.Summon public override void AI() { - Projectile.scale = Projectile.ai[1]; + if (Projectile.ai[1] != 0) + Projectile.scale = Projectile.ai[1]; if (Projectile.ai[0] == 0f) Projectile.ai[0] = 45f; From 28c45ddf24edefe6b6236b3b992a1b465393e4d5 Mon Sep 17 00:00:00 2001 From: Done_22 Date: Thu, 9 Apr 2026 22:28:32 +0300 Subject: [PATCH 279/346] spear of paleolith buff --- Items/Weapons/Rogue/SpearofPaleolith.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index b8be3087ac..bad85a5962 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Rogue { public class SpearofPaleolith : RogueWeapon { - public static int ShardBaseDamage => 25; + public static int ShardBaseDamage => 40; public static int NormalShardCount => 3; public static int ImpaledShardCount => 5; @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 54; Item.height = 54; - Item.damage = 70; + Item.damage = 90; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 27; From bfe8a355a8db115a3aa916e4fdbf1cdbb19fa03d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 14:54:09 -0500 Subject: [PATCH 280/346] Fixed Nanotech raider bonus not working, added Vampiric to recipe, and added cooldown indicator --- CalPlayer/CalamityPlayerMiscEffects.cs | 14 +++++++++----- CalPlayer/CalamityPlayerOnHit.cs | 5 ++--- Cooldowns/NanotechBoost.png | Bin 0 -> 510 bytes Cooldowns/NanotechBoostOutline.png | Bin 0 -> 432 bytes Cooldowns/NanotechBoostOverlay.png | Bin 0 -> 422 bytes Cooldowns/RaiderBoost.cs | 9 ++++++++- Items/Accessories/Nanotech.cs | 3 +++ Localization/en-US/Mods.CalamityMod.Buffs.hjson | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 4 ++-- Projectiles/CalamityGlobalProjectile.cs | 4 +--- 10 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 Cooldowns/NanotechBoost.png create mode 100644 Cooldowns/NanotechBoostOutline.png create mode 100644 Cooldowns/NanotechBoostOverlay.png diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 4c8833cff9..ebfdaaeb44 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2708,11 +2708,15 @@ namespace CalamityMod.CalPlayer } // Raider Talisman bonus - if (raiderTalisman && !vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f) - Player.GetCritChance() += RaidersTalisman.RaiderBonus; - if (vampiricTalisman && !StealthStrikeAvailable() && raiderCritLifespan > 0f) - Player.GetCritChance() += VampiricTalisman.RaiderBonus; - + if (!StealthStrikeAvailable() && raiderCritLifespan > 0f) + { + if (nanotech) + Player.GetCritChance() += Items.Accessories.Nanotech.RaiderBonus; + else if (vampiricTalisman) + Player.GetCritChance() += VampiricTalisman.RaiderBonus; + else if (raiderTalisman) + Player.GetCritChance() += RaidersTalisman.RaiderBonus; + } if (avertorBonus) Player.GetDamage() += 0.1f; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index f6ea8ea8b2..39b2b2a7dc 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1088,8 +1088,7 @@ namespace CalamityMod.CalPlayer if (raiderTalisman && modProj.stealthStrike) { raiderCritLifespan = CalamityUtils.SecondsToFrames(RaidersTalisman.RaiderCooldown); - // TO DO: Add nanotech here - Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, vampiricTalisman ? "Bloodfeast" : "default"); + Player.AddCooldown(RaiderBoost.ID, raiderCritLifespan, true, nanotech ? "Nanotech" : vampiricTalisman ? "Vampiric" : "default"); if (raiderSoundCooldown <= 0) { SoundEngine.PlaySound(RaidersTalisman.StealthHitSound, Player.Center); @@ -1297,7 +1296,7 @@ namespace CalamityMod.CalPlayer 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) + if (bloodyGlove && proj.CountsAsClass() && (modProj.stealthStrike || (nanotech && raiderCritLifespan > 0)) && proj.numHits < 1) //Nanotech has the same heal as Electrician's glove Player.SpawnLifeStealProjectile(target, proj, ProjectileID.VampireHeal, electricianGlove ? 10 : 5, electricianGlove ? 2f : 3f); diff --git a/Cooldowns/NanotechBoost.png b/Cooldowns/NanotechBoost.png new file mode 100644 index 0000000000000000000000000000000000000000..430bd3b98ca33553ae0e98ebd5c273545becc8b4 GIT binary patch literal 510 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc3?z4jzqJQajKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCil&0(?STC8gy<|2$32F7WUPY3`Xgf6)>{6ANY**23)@fl5|{GPVOLu96_X z;Quhdu<4A>d7vm~fk$L90|Vb-5N14{zaj-FC{f}XQ4*Y=R#Ki=l*$m0n3-3i=jR%t zV5(=RXPJ|C%MPe!TWW-7ny0500|$`9${@wa%D@O@c>%FBlnwHY1|u_AoC(M_WMpCx z0Mb!FoY~F-7S95*K_CH$LHc1dnxzcD@R-2PzyefZU}S8-xBy}*NC)czh)Gj`Y!F}q zn!^NE8DwbzWI=Tq8W@0Nea;{7Q0>3I0LaYsba4#P2rj)4$ag@2gE?T$))#;E_k?V( zRg`Cu<8(=W+hKn1T~l5ZbHlZB3yyW%V|;#3nc=zgB)wx2hm}9IF=$HKOz>FXHove^ z%=33h=gen5lg^l=UfU7&Zo-n_x7(*@%)7ky^Z)s(b=rKf9~f78uv`9h&Wr##!qe5y JWt~$(695=Sh6w-w literal 0 HcmV?d00001 diff --git a/Cooldowns/NanotechBoostOutline.png b/Cooldowns/NanotechBoostOutline.png new file mode 100644 index 0000000000000000000000000000000000000000..cdd0da28cc5f73d0488321540d33da4fcbdd3792 GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaAF%}28J29*~C-V}>VM%xNb!1@J z*w6hZkrl{i3-AeX{r~?zkQsXDavhLjDhcun{?G7qyMY&w$64SJSVM%xNb!1@J z*w6hZkrl{i3-AeX{r~?zkQsXDavhLjDhcun{?G7qyMY&w$64SJSzv5Fp;|6J;vr|5jnIl9kHBtsCikQR aYK#mM0~k8b{w?(e8RqHg=d#Wzp$PzesaID3 literal 0 HcmV?d00001 diff --git a/Cooldowns/RaiderBoost.cs b/Cooldowns/RaiderBoost.cs index 79bb9ae02d..9ea22fb9fd 100644 --- a/Cooldowns/RaiderBoost.cs +++ b/Cooldowns/RaiderBoost.cs @@ -26,7 +26,14 @@ namespace CalamityMod.Cooldowns { switch (skin) { - case "Bloodfeast": + case "Nanotech": + skinTexture = "NanotechBoost"; + outlineColor = new Color(14, 103, 129); + cooldownColorStart = new Color(85, 252, 229); + cooldownColorEnd = new Color(52,255,171); + break; + + case "Vampiric": skinTexture = "VampiricTalismanBoost"; outlineColor = new Color(143, 27, 27); cooldownColorStart = new Color(133, 5, 5); diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 270d1bbe1c..0d7c09a4df 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -11,6 +11,7 @@ namespace CalamityMod.Items.Accessories { //The stealth damage boost is handled in CalamityPlayer for some reason, maybe someone didn't want em to stack? public new string LocalizationCategory => "Items.Accessories"; + public const float RaiderBonus = 10f; public override void SetDefaults() { Item.width = 46; @@ -27,6 +28,7 @@ namespace CalamityMod.Items.Accessories modPlayer.electricianGlove = true; modPlayer.filthyGlove = true; modPlayer.bloodyGlove = true; + modPlayer.raiderTalisman = true; player.GetDamage() += 0.15f; player.Calamity().rogueVelocity += 0.15f; } @@ -35,6 +37,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(). + AddIngredient(). AddIngredient(). AddIngredient(4). AddTile(). 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: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index aac2bb06a5..595509d5f9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1155,9 +1155,9 @@ Nanotech: { ''' Rogue projectiles create nanoblades as they travel Stealth strikes summon nanobeams and sparks on enemy hits - Stealth strikes have +15 armor penetration, deal 5% more damage, and heal for 2 HP + Stealth strikes have lifesteal, +15 armor penetration, deal 5% more damage 15% increased rogue damage and 15% increased rogue velocity - Stealth strikes grant 10% critical strike chance to non-stealth strikes for 5 seconds + Stealth strikes grant lifesteal and 10% critical strike chance to non-stealth strikes for 10 seconds ''' } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 64e0f0e763..b0c553b8c1 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4690,9 +4690,7 @@ namespace CalamityMod.Projectiles else if (modPlayer.vampiricTalisman && projectile.Calamity().stealthStrike) { target.AddBuff(BuffType(), VampiricTalisman.ArmorCrunchDebuffTime); - - if (!modPlayer.nanotech) - target.AddBuff(BuffType(), VampiricTalisman.HeavyBleedingDebuffTime); + target.AddBuff(BuffType(), VampiricTalisman.HeavyBleedingDebuffTime); } if (modPlayer.flamingItemEnchant && !projectile.minion && !projectile.npcProj && !projectile.Calamity().CreatedByPlayerDash) From 4e2b00fe8a194b1251f519ed66b3380279c3aea1 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 15:44:47 -0500 Subject: [PATCH 281/346] Scuttler Jewel + Eth Extorter + bile fix Extorter now spawns souls on hit properly, nerf to compensate Scuttler Jewel no longer has a spawn timer but now uses static iframes. This has minimal net effect on tested weapons except Contaminated Bile, which i fixed seperately, but made them visually work more as expected. Fixed Contaminated Bile marking all subprojectiles as stealth strikes --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 - Items/Accessories/EtherealExtorter.cs | 2 + Projectiles/CalamityGlobalProjectile.cs | 39 +++++++++++++------ Projectiles/Rogue/BileExplosion.cs | 4 +- Projectiles/Typeless/JewelSpike.cs | 15 +++---- .../Typeless/SulphuricAcidBubbleFriendly.cs | 2 +- 6 files changed, 37 insertions(+), 27 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index ebfdaaeb44..5c7d52a83d 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2252,8 +2252,6 @@ namespace CalamityMod.CalPlayer bloodflareMageCooldown--; if (silvaMageCooldown > 0) silvaMageCooldown--; - if (scuttlerCooldown > 0) - scuttlerCooldown--; if (nanotechHitCooldown > 0) nanotechHitCooldown--; if (spectralVeilImmunity > 0) diff --git a/Items/Accessories/EtherealExtorter.cs b/Items/Accessories/EtherealExtorter.cs index 98ee31e460..50d9ae909a 100644 --- a/Items/Accessories/EtherealExtorter.cs +++ b/Items/Accessories/EtherealExtorter.cs @@ -8,6 +8,8 @@ namespace CalamityMod.Items.Accessories public class EtherealExtorter : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + + public static int soulDamage => 15; public override void SetDefaults() { Item.width = 28; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index b0c553b8c1..2d9425e0bc 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4740,17 +4740,34 @@ namespace CalamityMod.Projectiles } // Scuttler's Jewel projectiles can spawn either on-hit or on-kill, but only spawn once per projectile. - if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.CountsAsClass() && modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) + if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.CountsAsClass()) { - int damage = (int)player.GetTotalDamage().ApplyTo(16); + if (modPlayer.scuttlersJewel && stealthStrike && !JewelSpikeSpawned) + { + int damage = (int)player.GetTotalDamage().ApplyTo(16); - int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); - Main.projectile[spike].frame = 4; - if (spike.WithinBounds(Main.maxProjectiles)) - Main.projectile[spike].DamageType = DamageClass.Generic; - modPlayer.scuttlerCooldown = 30; - JewelSpikeSpawned = true; + int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); + Main.projectile[spike].frame = 4; + JewelSpikeSpawned = true; + } + if (modPlayer.etherealExtorter && extorterBoost && Main.player[projectile.owner].ownedProjectileCounts[ProjectileType()] < 5) + { + for (int i = 0; i < 2; i++) + { + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); + + int damage = (int)player.GetTotalDamage().ApplyTo(EtherealExtorter.soulDamage); + + int soul = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, velocity, ProjectileType(), damage, 0f, projectile.owner); + Main.projectile[soul].tileCollide = false; + if (soul.WithinBounds(Main.maxProjectiles)) + Main.projectile[soul].DamageType = DamageClass.Generic; + } + extorterBoost = false; + } } + + } #endregion @@ -5226,17 +5243,18 @@ namespace CalamityMod.Projectiles { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int damage = (int)player.GetTotalDamage().ApplyTo(20); + int damage = (int)player.GetTotalDamage().ApplyTo(EtherealExtorter.soulDamage); int soul = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, velocity, ProjectileType(), damage, 0f, projectile.owner); Main.projectile[soul].tileCollide = false; if (soul.WithinBounds(Main.maxProjectiles)) Main.projectile[soul].DamageType = DamageClass.Generic; } + extorterBoost = false; } // Make sure the spike doesn't spawn again if it's already been spawned by on-hit. - if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) + if (modPlayer.scuttlersJewel && stealthStrike && !JewelSpikeSpawned) { int damage = (int)player.GetTotalDamage().ApplyTo(16); @@ -5244,7 +5262,6 @@ namespace CalamityMod.Projectiles Main.projectile[spike].frame = 4; if (spike.WithinBounds(Main.maxProjectiles)) Main.projectile[spike].DamageType = DamageClass.Generic; - modPlayer.scuttlerCooldown = 30; } } } diff --git a/Projectiles/Rogue/BileExplosion.cs b/Projectiles/Rogue/BileExplosion.cs index d5dd26b9c3..087f55c3ab 100644 --- a/Projectiles/Rogue/BileExplosion.cs +++ b/Projectiles/Rogue/BileExplosion.cs @@ -47,11 +47,9 @@ namespace CalamityMod.Projectiles.Rogue { if (Main.rand.NextBool(4)) { - Projectile bubble = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(70, 70), Vector2.UnitY * Main.rand.NextFloat(-3.5f, -5f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner); + Projectile bubble = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(70, 70), Vector2.UnitY * Main.rand.NextFloat(-3.5f, -5f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner,0,0,Projectile.Calamity().stealthStrike ? 1 : 0); if (bubble.whoAmI.WithinBounds(Main.maxProjectiles)) { - //We mark it as a stealth strike to change its dust - bubble.Calamity().stealthStrike = Projectile.Calamity().stealthStrike; bubble.DamageType = RogueDamageClass.Instance; bubble.timeLeft = 45; } diff --git a/Projectiles/Typeless/JewelSpike.cs b/Projectiles/Typeless/JewelSpike.cs index aec3719911..5fcbe77d02 100644 --- a/Projectiles/Typeless/JewelSpike.cs +++ b/Projectiles/Typeless/JewelSpike.cs @@ -6,9 +6,6 @@ namespace CalamityMod.Projectiles.Typeless public class JewelSpike : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Typeless"; - public ref float RealPenetrate => ref Projectile.ai[0]; - public const int MaxPenetrate = 2; - public override void SetStaticDefaults() { Main.projFrames[Type] = 5; @@ -19,12 +16,14 @@ namespace CalamityMod.Projectiles.Typeless Projectile.width = 36; Projectile.height = 44; Projectile.friendly = true; - Projectile.penetrate = -1; // For the animation, only hits up to 3 times though + Projectile.penetrate = 3; Projectile.tileCollide = false; Projectile.timeLeft = 80; Projectile.DamageType = DamageClass.Generic; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.appliesImmunityTimeOnSingleHits = true; } public override void AI() @@ -47,10 +46,6 @@ namespace CalamityMod.Projectiles.Typeless Projectile.frame = 0; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => RealPenetrate++; - - public override bool? CanHitNPC(NPC target) => RealPenetrate > MaxPenetrate - 1f ? false : (bool?)null; - public override void OnKill(int timeLeft) { if (Projectile.owner == Main.myPlayer) diff --git a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs index cbbd158e99..e304722c76 100644 --- a/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs +++ b/Projectiles/Typeless/SulphuricAcidBubbleFriendly.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Typeless Projectile.position.Y = Projectile.position.Y - (float)(Projectile.height / 2); int inc; //For use with Contaminated Bile's Stealth Strike - if (Projectile.Calamity().stealthStrike) + if (Projectile.ai[2] > 0) { for (int k = 0; k < 15; k++) { From 3b74b6b7e3e2ae987a86da5ad8cdbf626d18b0ad Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 16:24:39 -0500 Subject: [PATCH 282/346] saros/efall tooltip fix, cut spark and fragment pierce --- Items/Weapons/Rogue/EclipsesFall.cs | 4 ++-- Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- .../en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 7513b6be7c..3e6437c8e5 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -508,7 +508,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 40; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 4; + Projectile.penetrate = 3; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; @@ -720,7 +720,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 6; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 5; + Projectile.penetrate = 3; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 20f; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 4253924887..842ac26def 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -362,7 +362,7 @@ EclipsesFall: { If more than 20 fragments exist, the oldest fragments will seek out enemies to attack Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall - [ceffect/darksun:'When the sun goes dark, you will know judgement'] + [ceffect/darksun:'When the sun goes dark, all will know terror'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 4e779544ce..b1754ae9aa 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -681,6 +681,7 @@ SarosPossession: { Repeated summons increase the power of the aura with full summon slots to channel [ceffect/darksun:Totality Ray] [ceffect/darksun:Totality Ray] decays while in use and recharges when not in use + [ceffect/darksun:'A ballet of light and shadow, torn from the sky'] ''' } 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 283/346] 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 284/346] 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 285/346] 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 286/346] 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 287/346] 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 8a222ff37017cd9d1ba5771764ba2f3b059f6d7f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 08:42:02 +0700 Subject: [PATCH 288/346] Art Attack & Gruesome Eminence --- Items/Weapons/Magic/ArtAttack.cs | 10 +++++++++- Items/Weapons/Magic/GruesomeEminence.cs | 2 +- Projectiles/Magic/ArtAttackHoldout.cs | 4 ++-- Projectiles/Magic/SpiritCongregation.cs | 10 ++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/ArtAttack.cs b/Items/Weapons/Magic/ArtAttack.cs index b16f045350..fddf40f2ab 100644 --- a/Items/Weapons/Magic/ArtAttack.cs +++ b/Items/Weapons/Magic/ArtAttack.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Magic; +using Terraria; using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -18,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 70; Item.damage = 80; Item.DamageType = DamageClass.Magic; - Item.mana = 20; + Item.mana = 100; Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; @@ -34,6 +35,13 @@ namespace CalamityMod.Items.Weapons.Magic Item.Calamity().donorItem = true; } + // Cancels out the mana used to summon the holdout + public override void OnConsumeMana(Player player, int manaConsumed) + { + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.statMana += manaConsumed; + } + public override void AddRecipes() { CreateRecipe(). diff --git a/Items/Weapons/Magic/GruesomeEminence.cs b/Items/Weapons/Magic/GruesomeEminence.cs index 2e56c3fd15..c69d389d19 100644 --- a/Items/Weapons/Magic/GruesomeEminence.cs +++ b/Items/Weapons/Magic/GruesomeEminence.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.DamageType = DamageClass.Magic; Item.noUseGraphic = true; Item.channel = true; - Item.mana = 400; + Item.mana = 30; Item.useTime = 27; Item.useAnimation = 27; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Projectiles/Magic/ArtAttackHoldout.cs b/Projectiles/Magic/ArtAttackHoldout.cs index 88b9ed5af2..ca54e8abe0 100644 --- a/Projectiles/Magic/ArtAttackHoldout.cs +++ b/Projectiles/Magic/ArtAttackHoldout.cs @@ -41,12 +41,12 @@ namespace CalamityMod.Projectiles.Magic int attackType = ModContent.ProjectileType(); if (Owner.ownedProjectileCounts[attackType] == 0) { - if (Projectile.ai[0] >= 0f && Owner.CheckMana(Owner.HeldItem, -1, true, false)) + if (Projectile.ai[0] >= 1f && Owner.CheckMana(Owner.HeldItem, -1, true, false)) { SoundEngine.PlaySound(ArtAttack.UseSound, Owner.Center); Vector2 initialStarVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 15f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.ClampedMouseWorld(), initialStarVelocity, attackType, Projectile.damage, Projectile.knockBack, Projectile.owner); - Projectile.ai[0] = -24f; + Projectile.ai[0] -= Owner.HeldItem.useAnimation; } else Projectile.ai[0]++; diff --git a/Projectiles/Magic/SpiritCongregation.cs b/Projectiles/Magic/SpiritCongregation.cs index 2858155357..caf48208a1 100644 --- a/Projectiles/Magic/SpiritCongregation.cs +++ b/Projectiles/Magic/SpiritCongregation.cs @@ -133,6 +133,16 @@ namespace CalamityMod.Projectiles.Magic if (Projectile.FinalExtraUpdate()) Time++; + if (Time % 12f == 11f) + { + if (!Owner.CheckMana(Owner.HeldItem, -1, true)) + { + DeathCounter = 1f; + Projectile.netUpdate = true; + return; + } + } + // Set the hover offset to a zero vector after enough time has passed and the projectile is powerful/tame enough. bool tame = CurrentPower > 0.97f; if (tame) From b7a056a8279ec9ff5db99a4895c5fd6f6705c415 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 08:59:21 +0700 Subject: [PATCH 289/346] Eye of Magnus --- Items/Weapons/Magic/GruesomeEminence.cs | 3 +-- Projectiles/Typeless/MagnusBeam.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/GruesomeEminence.cs b/Items/Weapons/Magic/GruesomeEminence.cs index c69d389d19..1ee7f0c77f 100644 --- a/Items/Weapons/Magic/GruesomeEminence.cs +++ b/Items/Weapons/Magic/GruesomeEminence.cs @@ -20,8 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.noUseGraphic = true; Item.channel = true; Item.mana = 30; - Item.useTime = 27; - Item.useAnimation = 27; + Item.useAnimation = Item.useTime = 27; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; diff --git a/Projectiles/Typeless/MagnusBeam.cs b/Projectiles/Typeless/MagnusBeam.cs index 8df2d4245f..11971b2105 100644 --- a/Projectiles/Typeless/MagnusBeam.cs +++ b/Projectiles/Typeless/MagnusBeam.cs @@ -114,9 +114,13 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 480); Player player = Main.player[Projectile.owner]; - player.statMana += 25; - player.ManaEffect(25); Main.player[Projectile.owner].SpawnLifeStealProjectile(target, Projectile, ModContent.ProjectileType(), (int)Math.Round(hit.Damage * 0.1), 0.75f); + int manaHeal = Math.Clamp(player.statManaMax2 - player.statMana, 0, 20); + if (manaHeal > 0) + { + player.statMana += manaHeal; + player.ManaEffect(manaHeal); + } } public override void OnKill(int timeLeft) From 7cf3c870bffba7a35d135089207e8c4b884f8884 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 09:16:19 +0700 Subject: [PATCH 290/346] straggling half star --- Items/Armor/Aerospec/AerospecHeadMagic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Armor/Aerospec/AerospecHeadMagic.cs b/Items/Armor/Aerospec/AerospecHeadMagic.cs index 5dda2d7b17..76456d1b89 100644 --- a/Items/Armor/Aerospec/AerospecHeadMagic.cs +++ b/Items/Armor/Aerospec/AerospecHeadMagic.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Armor.Aerospec { public new string LocalizationCategory => "Items.Armor.PreHardmode"; - public static int MaxManaBoost = 30; + public static int MaxManaBoost = 40; public static float MagicDamageBoost = 0.1f; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(MaxManaBoost, MagicDamageBoost.ToPercent()); From 069ca70a2f2d91fd78e1835d9ed70fc835b0bae2 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 11 Apr 2026 09:46:30 +0700 Subject: [PATCH 291/346] permanent mana upgrades give 60 --- Items/PermanentBoosters/CometShard.cs | 2 +- Items/PermanentBoosters/EtherealCore.cs | 2 +- Items/PermanentBoosters/PhantomHeart.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/PermanentBoosters/CometShard.cs b/Items/PermanentBoosters/CometShard.cs index 3511bc45e1..84aa0dd540 100644 --- a/Items/PermanentBoosters/CometShard.cs +++ b/Items/PermanentBoosters/CometShard.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.PermanentBoosters { public new string LocalizationCategory => "Items.Misc"; public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/CometShardUse"); - public const int ManaBoost = 50; + public const int ManaBoost = 60; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaBoost); public override void SetStaticDefaults() diff --git a/Items/PermanentBoosters/EtherealCore.cs b/Items/PermanentBoosters/EtherealCore.cs index 4f5d4438ce..ca91374064 100644 --- a/Items/PermanentBoosters/EtherealCore.cs +++ b/Items/PermanentBoosters/EtherealCore.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.PermanentBoosters { public new string LocalizationCategory => "Items.Misc"; public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/EtherealCoreUse"); - public const int ManaBoost = 50; + public const int ManaBoost = 60; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaBoost); public override void SetStaticDefaults() diff --git a/Items/PermanentBoosters/PhantomHeart.cs b/Items/PermanentBoosters/PhantomHeart.cs index bfa46677c1..bfc1d8f6c5 100644 --- a/Items/PermanentBoosters/PhantomHeart.cs +++ b/Items/PermanentBoosters/PhantomHeart.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.PermanentBoosters { public new string LocalizationCategory => "Items.Misc"; public static readonly SoundStyle UseSound = new("CalamityMod/Sounds/Item/PhantomHeartUse"); - public const int ManaBoost = 50; + public const int ManaBoost = 60; public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(ManaBoost); public override void SetStaticDefaults() 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 292/346] 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 293/346] 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 294/346] 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 295/346] 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 296/346] 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 297/346] 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 298/346] 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 299/346] 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 300/346] 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 301/346] 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 302/346] 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 303/346] 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 304/346] 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 305/346] 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 306/346] 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() { From c6c49ce461ba09052bf4d64b5233bc2115866c5d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 Apr 2026 16:42:08 -0400 Subject: [PATCH 307/346] Hi Gps, farewell math2 --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index f50c787909..9f03915994 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -68,10 +68,10 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Flowaria", "Fluffy", "fryzahh", + "Gpscorpion", "HaguriHat", "jasper", "LordMetarex", - "math2", "Moonburn", "Ozzatron", "Piky", @@ -147,6 +147,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Lompl Allimath", "Lucille Karma", "MarieArk", + "math2", "Mercutio 'Merkalto' Takle", "Mihaii", "Minecat", From 5c7a19c1886722063fce5491548c485cdc7e5eaf Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 11 Apr 2026 18:12:11 -0700 Subject: [PATCH 308/346] flying and idle anims --- Buffs/Pets/StarSwallowerPetBuff.png | Bin 617 -> 662 bytes CalPlayer/CalamityPlayer.cs | 2 + .../en-US/Mods.CalamityMod.Buffs.hjson | 5 + .../en-US/Mods.CalamityMod.Items.Pets.hjson | 5 + .../Mods.CalamityMod.Projectiles.Pets.hjson | 1 + Projectiles/Pets/StarSwallowerPet.cs | 104 +++++++++--------- Projectiles/Pets/StarSwallowerPet.png | Bin 4518 -> 2798 bytes Projectiles/Pets/StarSwallowerPetIdle.png | Bin 0 -> 2478 bytes 8 files changed, 64 insertions(+), 53 deletions(-) create mode 100644 Projectiles/Pets/StarSwallowerPetIdle.png diff --git a/Buffs/Pets/StarSwallowerPetBuff.png b/Buffs/Pets/StarSwallowerPetBuff.png index 2c9ccf32bf410be8f8ef89085a6ba029fb43c1f8..7a12cb7a9a2b11efe0520c4cf21f7c9ee5c50ba9 100644 GIT binary patch delta 575 zcmV-F0>J(01eOJmKz{-zNklF+A2_9(gi+9fB3Ks_hT4j;R4Ng~h*%Jfe&F|gzoBnCo{KKd zJNm%k^PY1M&-1*`^PczEZ4&2L;Flb>#s2(*9Q_-gc6RXJ9e+5p5IZCHT#w;GJh~2V zJ?)0c$=FvoxzYtY-nQN+t}9-+{-^?zQ0P0H%ZcAt7GJ>nWMFFPFfN#pS{sz3y*cXs zCP%G!OC`AC^TE0CB&=@@aIT5bobR3zwPAFh=wAbuCVFwfsM>c^ui?L#=@Y(J7M3{T z{cpjcz-zOgcFGfR zyp!i~;YZXD|4d|HMiv}A1D}ly!FLn0@aYp`ZqkGg>l?5dx!M)_uY`n|m>O=~4-~(M_kX5PfQj4Xf>}H48Z|SPXW-8RH1>ea`@qI~ zp6~j096xjr$AHI!!;D7FG}nzjHDI@)^;K}q&CBUj=2q3=4N?g@>)j2_(j44Zu;s&mhkQ{5?9p8@Ir_3PMX`wd-A N?Y4R_HYAfn0w((tB~JhV delta 530 zcmV+t0`2{l1?dEkKz{-GNklgT{rdvfMg9uHXU z&IL1xPEfHNRa11dVCWUp-vMS$?Z)F)q%>Gp1upIEgC*ksfznbdQetiVKL?n3cQ6Q^ zoX5bM>r;^8eSc~*5&`c;S9Hu2f%-bI-2Vj1%zgeQuszTUPEF5)4Yg{PNM|Z4>p|(1 zbi{TCvMpwOhck03G|&TvSJuIWFktl5FvHYNw6rLv4-U3LeQSW?)Z&wK&&S3`LDoV# zrK=Ivf<6w6Y&2tm^O~XqlyrjKK}GiuL9Vk#DE%GS8-G^)FJ}Rrm~8Wd6sMnbinD=T zz^("CalamityMod/Projectiles/Pets/EidolonSnail").Value; + Texture2D texture = TextureAssets.Projectile[Type].Value; + Vector2 scale = Vector2.One; + if (fly) + { + float animRate = Main.GlobalTimeWrappedHourly * 20; + float scaleMod = 0.2f; + scale += new Vector2(MathF.Cos(animRate), MathF.Sin(animRate)) * scaleMod; + } + SpriteEffects fx = fly ? (SpriteEffects.FlipVertically | (Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None)) : Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, texture.Frame(1, Main.projFrames[Type], 0, Projectile.frame), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2 / Main.projFrames[Type]), Projectile.scale * scale, fx, 0); - int height = texture.Height / Main.projFrames[Projectile.type]; - int frameHeight = height * Projectile.frame; - SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY + 2), - new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), lightColor, - Projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), Projectile.scale, spriteEffects, 0);*/ - - return true; - } - - public override void PostDraw(Color lightColor) - { - /* Texture2D texture = ModContent.Request("CalamityMod/Projectiles/Pets/EidolonSnailGlow").Value; - - int height = texture.Height / Main.projFrames[Projectile.type]; - int frameHeight = height * Projectile.frame; - SpriteEffects spriteEffects = Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY + 2), - new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, frameHeight, texture.Width, height)), Color.White, - Projectile.rotation, new Vector2(texture.Width / 2f, height / 2f), Projectile.scale, spriteEffects, 0);*/ + return false; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) @@ -94,6 +84,7 @@ namespace CalamityMod.Projectiles.Pets } Vector2 projPos = Projectile.position; + Vector2 mouthPos = Projectile.Center + new Vector2(-20 * Projectile.spriteDirection, -6f).RotatedBy(Projectile.rotation); if (!fly) { Projectile.rotation = 0; @@ -160,9 +151,12 @@ namespace CalamityMod.Projectiles.Pets //set frames when idle if (Projectile.position.X == Projectile.oldPosition.X && Projectile.position.Y == Projectile.oldPosition.Y && Projectile.velocity.X == 0) { - /*if (Main.rand.NextBool(200) && !idleAnimation) + // Idle animation where it opens its mouth and lets out some plasma mist + if (Main.rand.NextBool(600) && !idleAnimation) { idleAnimation = true; + Projectile.frame = 8; + Projectile.frameCounter = 0; } if (idleAnimation) @@ -170,21 +164,36 @@ namespace CalamityMod.Projectiles.Pets Projectile.frameCounter++; if (Projectile.frameCounter > 8) { - Projectile.frame++; + Projectile.frame += (Projectile.ai[0] != -1).ToDirectionInt(); Projectile.frameCounter = 0; } - if (Projectile.frame > 4) + if (Projectile.ai[0] != -1) { - Projectile.frame = 0; - idleAnimation = false; + if (Projectile.frame >= 12) + { + Projectile.ai[0] = -1; + Projectile.frame = 11; + } + } + else + { + if (Projectile.frame <= 7) + { + Projectile.ai[0] = 0; + Projectile.frame = 0; + idleAnimation = false; + } + } + if (Projectile.frame > 8) + { + GeneralParticleHandler.SpawnParticle(new MediumMistParticle(mouthPos, (Vector2.UnitX * -Projectile.spriteDirection).RotatedByRandom(MathHelper.ToRadians(10)) * Main.rand.NextFloat(4, 8), new Color(201, 234, 71), new Color(115, 192, 58), Main.rand.NextFloat(0.8f, 1.1f), 170f, Main.rand.NextFloat(0.1f, 0.2f) * Main.rand.NextFloatDirection())); } } else { Projectile.frame = 0; Projectile.frameCounter = 0; - }*/ - Projectile.frame = 0; + } } //falling frame else if (Projectile.velocity.Y > 0.3f && Projectile.position.Y != Projectile.oldPosition.Y) @@ -194,11 +203,6 @@ namespace CalamityMod.Projectiles.Pets } else if (Projectile.velocity.X != 0) { - if (Projectile.frame < 4) - { - //Projectile.frame = 4; - } - //moving animation Projectile.frameCounter++; if (Projectile.frameCounter >= 6) @@ -223,6 +227,8 @@ namespace CalamityMod.Projectiles.Pets } else if (fly) { + idleAnimation = false; + Projectile.ai[0] = 0; float flySpeed = 0.5f; Projectile.tileCollide = false; Vector2 flyDirection = new Vector2(Projectile.position.X + (float)Projectile.width * 0.5f, Projectile.position.Y + (float)Projectile.height * 0.5f); @@ -312,7 +318,7 @@ namespace CalamityMod.Projectiles.Pets } } - Projectile.rotation += (Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) * 0.01f * (float)Projectile.direction; + Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0); if (Projectile.Center.X < Main.player[Projectile.owner].Center.X) { @@ -323,18 +329,10 @@ namespace CalamityMod.Projectiles.Pets Projectile.spriteDirection = 1; } - //funny flying animation - Projectile.frame = 7; - /*Projectile.frameCounter++; - if (Projectile.frameCounter > 4) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame > 11) - { - Projectile.frame = 9; - }*/ + Projectile.frame = 12; + + // fly anim particles + GeneralParticleHandler.SpawnParticle(new MediumMistParticle(mouthPos, mouthPos.DirectionTo(Projectile.oldPosition).RotatedByRandom(MathHelper.ToRadians(20)).RotatedBy(MathHelper.ToRadians(10 * Projectile.spriteDirection)) * Main.rand.NextFloat(4, 8), new Color(201, 234, 71), new Color(115, 192, 58), Main.rand.NextFloat(0.7f, 1f), 200f, Main.rand.NextFloat(0.1f, 0.2f) * Main.rand.NextFloatDirection())); } } diff --git a/Projectiles/Pets/StarSwallowerPet.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N-E#p60B_coJZr1C-)9f9y@6GNKSl9v&RcS&wYY0pR5S7`YP=QH^DOes{`0dv+jn9#5H zV9#mG&CZ3@v%{SSkXz=gZxD$U;(H*>S>GV$DYU__eF}v_WG#2=f1l5jxbp$$J#DnJ z-V|bm;_fg;NjAV)AKF(?k&PDHLkV1i}D-@O0; diff --git a/Projectiles/Pets/StarSwallowerPetIdle.png b/Projectiles/Pets/StarSwallowerPetIdle.png new file mode 100644 index 0000000000000000000000000000000000000000..fd68a85ed701f82800df6ca2125e42492a3d6839 GIT binary patch literal 2478 zcmZ`*eK-?p8{b6OLDZ%bL&@0MuY)l15fvuob?{{C%b!VORK&gVXKmY(h z)$KIGONKDn{-m^9cFrGaD3t*))(hnVsO3Qakp=Q0&S+-Vm;3FMEwznOw4)v|}84x6W;yris^X#pA z{`ejhLhCDSe-!+pMM%Fo<-+@|!^Qj}^HNe2xZ&aW{AJSWYHu`M;`pEAC|e_%pw5}p zVX?j^OLya=FQ#4eTf%q>KXvBxIp4py$E_V;T<-ItqM5B*6K@qW?;`TPgcd-J3U4H2 z)n2IoW#vm$+y0cObtCfA{pRW!11j?&Ar|OLq~k^vkmVGE0OMQh@uUq>Pb{Oe?X^H4 zfT9+f*E}!))S6ge4l*je>1p6MCas&@(0)lgaza?LmZ`_u`=&8z?N@h1$Nb^S4PR1i zT>Y$f=`Hgo0jPEB1JPg_w62rZy3}k8)qzXy&n{GRAQ^dfcouFYBP2*&L2SG$GeJCZ z822+CEZz`XV{}yku0Xg_qdBF9%nxc4yI>?!B@@Wh)z(yxloXdFr-u}gMGHa=@b*;y z`FM}?(oFvDS?ztS(zB?h?AN@hQ|riALpA%}sHFRnmKhDo!`A{$>*{T9p^sWQz}P*p zaa-aM@<@IYoEWG)WZ~e+sN8;FEWFx|f1LIp zqX1&C^B3R_K!Ta0+;C1W8Y%GiN6PvvMtHOAYj81p&CbTAhueKsI@9RaYXrIWXeNfz z*PaINJ?F&2$qNWo<3M+0#S^0BhQs7nqdKg-$C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$!(ZNi*d1vGd8|($;b2xsV*Gor z9Q~fy-;-L)^?%A0&EDqxfY4T~?&6`NnsgXP6L#$=oT!hY1+@6Zb@?u?>c9_@Za=9$ zvUjHCpPBFr+DvR$o+wl^dhhxS5N}B5?$~i*ZjRhf#gZtMtMibID=p2ye>p4`KTcw{ z-TckV0nuteRuE;wO9NXl+ETF*8I>yCKKGZTS>s=UI=yn-$POSgh>6A^2J0cN-+7vG zaq(w0oWMv6W&{BW)Nm?%;m4a%n#>bma zqKNO6`m%gM$<=_G(WNtyOwJaq8=LTM`nj5j5*g+gI--WlL*OY5=|cu|9Y%%rsB?Jp z|G5yhPfePA&i_&2$9~J?iJgvB5SXcFnnSVvHk-e*qF)w>SU* literal 0 HcmV?d00001 From 7d4d0701c43a137edc5b8da16e8dd96f13e91c72 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 15 Mar 2026 00:15:25 -0500 Subject: [PATCH 309/346] see #bosses Message Link: https://discord.com/channels/458428222061936650/458430366139678742/1482606762874900480 --- .../Mods.CalamityMod.Projectiles.Boss.hjson | 2 + NPCs/Providence/Providence.cs | 21 +- Projectiles/Boss/HolyBlast.cs | 5 +- Projectiles/Boss/HolyBlastFrags.cs | 187 ++++++++++++++ Projectiles/Boss/HolyBomb.cs | 3 + Projectiles/Boss/HolyFire2.cs | 63 ++++- Projectiles/Boss/LingeringHolyInferno.cs | 238 ++++++++++++++++++ Projectiles/Boss/MoltenBlast.cs | 3 +- Projectiles/Boss/MoltenBlob.cs | 5 +- 9 files changed, 519 insertions(+), 8 deletions(-) create mode 100644 Projectiles/Boss/HolyBlastFrags.cs create mode 100644 Projectiles/Boss/LingeringHolyInferno.cs diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 80ab9a0ac6..2c0f14ed7d 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -87,6 +87,7 @@ HellfireExplosion.DisplayName: Brimstone Hellfire Explosion HiveBombGoliath.DisplayName: Hive Bomb HolyAura.DisplayName: Holy Aura HolyBlast.DisplayName: Holy Blast +HolyBlastFrags.DisplayName: Holy Blast Frag HolyBomb.DisplayName: Holy Bomb HolyBurnOrb.DisplayName: Holy Orb HolyExplosionBoom.DisplayName: Holy Explosion @@ -107,6 +108,7 @@ Infernado.DisplayName: Infernado Infernado2.DisplayName: Infernado InfernadoRevenge.DisplayName: Infernado JewelProjectile.DisplayName: Ruby Bolt +LingeringHolyInferno.DisplayName: Lingering Holy Inferno LeviathanBomb.DisplayName: Meteor Vomit LeviathanSpawner.DisplayName: Spawner MajesticSparkle.DisplayName: Majestic Sparkle diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 5005f77496..30a8bc1ed6 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1418,6 +1418,15 @@ namespace CalamityMod.NPCs.Providence } } + float shorterFlameCocoonDistance = 2800f - ((CalamityWorld.death || NPC.localAI[1] == (float)BossMode.Enraged) ? 600f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f); + if (attackerAlive || defenderAlive || healerAlive) + shorterFlameCocoonDistance = 2800f; + if (Main.netMode != NetmodeID.MultiplayerClient) + for (var i = 0; i < 100; i++) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + new Vector2(Main.rand.NextFloat(shorterFlameCocoonDistance, shorterFlameCocoonDistance + (death? 1000 : 500)), 0).RotatedBy(MathHelper.TwoPi * i / 100f + Main.rand.NextFloat(-0.0025f,0.0025f)), Vector2.Zero, ModContent.ProjectileType(), BlobDamage.CalculateProvidenceDamage(), 0f, Main.myPlayer, NPC.Center.X, NPC.Center.Y, shorterFlameCocoonDistance); + } + text = false; AIState = (int)Phase.PhaseChange; NPC.localAI[2] = attackDelayAfterCocoon; @@ -1596,6 +1605,16 @@ namespace CalamityMod.NPCs.Providence NPC.ai[3] += 1f; if (NPC.ai[3] >= phaseTime) { + + float shorterSpearCocoonDistance = 2800f - ((CalamityWorld.death || NPC.localAI[1] == (float)BossMode.Enraged) ? 1000f : CalamityWorld.revenge ? 650f : Main.expertMode ? 300f : 0f); + if (attackerAlive || defenderAlive || healerAlive) + shorterSpearCocoonDistance = 2800f; + if (Main.netMode != NetmodeID.MultiplayerClient) + for (var i = 0; i < 100; i++) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + new Vector2(Main.rand.NextFloat(shorterSpearCocoonDistance, shorterSpearCocoonDistance + (death ? 1000 : 500)),0).RotatedBy(MathHelper.TwoPi * i/100f + Main.rand.NextFloat(-0.0025f, 0.0025f)), Vector2.Zero, ModContent.ProjectileType(), BlobDamage.CalculateProvidenceDamage(), 0f, Main.myPlayer, NPC.Center.X,NPC.Center.Y, shorterSpearCocoonDistance); + } + AIState = (int)Phase.PhaseChange; NPC.localAI[2] = attackDelayAfterCocoon; NPC.TargetClosest(); @@ -1930,7 +1949,7 @@ namespace CalamityMod.NPCs.Providence Projectile projectile = Main.projectile[x]; if (projectile.active) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) projectile.Kill(); else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) projectile.active = false; diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index e1190825cb..3abbfc578f 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = 1; Projectile.timeLeft = TimeLeft; CooldownSlot = ImmunityCooldownID.Bosses; + Projectile.scale = 0; } public override void OnSpawn(IEntitySource source) @@ -66,6 +67,8 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { + if (Projectile.scale < 1) + Projectile.scale += 0.05f; ProvUtils.ApplyGFBDamage(Projectile, 180, 20); Lighting.AddLight(Projectile.Center, 0.9f, 0.7f, 0f); @@ -162,7 +165,7 @@ namespace CalamityMod.Projectiles.Boss totalProjectiles *= 2; float radians = MathHelper.TwoPi / totalProjectiles; - int type = ModContent.ProjectileType(); + int type = ModContent.ProjectileType(); float velocity = 5f; Vector2 spinningPoint = new Vector2(0f, -velocity); Vector2 additionalVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2.5f; diff --git a/Projectiles/Boss/HolyBlastFrags.cs b/Projectiles/Boss/HolyBlastFrags.cs new file mode 100644 index 0000000000..16c01fc3a1 --- /dev/null +++ b/Projectiles/Boss/HolyBlastFrags.cs @@ -0,0 +1,187 @@ +using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; +using CalamityMod.NPCs.Providence; +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using CalamityMod.World; +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.Boss +{ + public class HolyBlastFrags : ModProjectile, ILocalizedModType + { + public override string Texture => "CalamityMod/Projectiles/Boss/HolyFire2"; + + public new string LocalizationCategory => "Projectiles.Boss"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; + Main.projFrames[Type] = 4; + } + + public override void SetDefaults() + { + Projectile.width = 26; + Projectile.height = 26; + Projectile.hostile = true; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.timeLeft = 600; + CooldownSlot = ImmunityCooldownID.Bosses; + } + + public override void AI() + { + ProvUtils.ApplyGFBDamage(Projectile, 120, 10); + + Lighting.AddLight(Projectile.Center, 0.3f, 0.225f, 0f); + + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame > 3) + Projectile.frame = 0; + + float maxVelocity = Projectile.ai[0] == 0f ? 7f : CalamityWorld.death ? 11f : CalamityWorld.revenge ? 10f : Main.expertMode ? 9f : 7f; + if (Math.Abs(Projectile.velocity.X) < maxVelocity) + Projectile.velocity.X *= 1.05f; + + int playerTracker = Player.FindClosest(Projectile.Center, 1, 1); + + Projectile.ai[1] += 1f; + if (Projectile.ai[1] < 180f && Projectile.ai[1] > 60f) + { + float projVelocityMult = Projectile.velocity.Length(); + Vector2 playerDirection = Main.player[playerTracker].Center - Projectile.Center; + playerDirection.Normalize(); + playerDirection *= projVelocityMult; + float inertia = !ProvUtils.StandardAI() ? 20f : 25f; + Projectile.velocity = (Projectile.velocity * (inertia - 1f) + playerDirection) / inertia; + Projectile.velocity.Normalize(); + Projectile.velocity *= projVelocityMult; + } + + float vel = Math.Clamp(((Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) / 2), 0f, 1f); + + if (Projectile.timeLeft % 3 == 0) + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); + + if (Main.rand.NextBool()) + GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center, Vector2.Zero, Color.LightSlateGray, Color.DarkSlateGray, Main.rand.NextFloat(vel), 150, MathHelper.ToRadians(Main.rand.NextFloat(-1f, 1f)))); + + Projectile.rotation = MathHelper.Lerp(0f, MathHelper.WrapAngle(Vector2.Zero.AngleTo(Projectile.velocity) + MathHelper.ToRadians(-90f)), Math.Clamp(vel, 0f, 1f)); + } + + public override Color? GetAlpha(Color lightColor) => ProvUtils.GetProjectileColor(lightColor); + + public override bool PreDraw(ref Color lightColor) + { + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(12).ToList(); + + list.Insert(0, Projectile.position + (Projectile.rotation+MathHelper.PiOver2 * Projectile.spriteDirection).ToRotationVector2() * 16f); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + Texture2D texture = ProvUtils.StandardAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; + int framing = texture.Height / Main.projFrames[Type]; + int y6 = framing * Projectile.frame; + Projectile.DrawBackglow(ProvUtils.GetProjectileColor(lightColor, true), 4f, texture); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); + return false; + } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 38f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } + + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item20, Projectile.Center); + Projectile.position.X = Projectile.position.X + (Projectile.width / 2); + Projectile.position.Y = Projectile.position.Y + (Projectile.height / 2); + Projectile.width = 40; + Projectile.height = 40; + Projectile.position.X = Projectile.position.X - (Projectile.width / 2); + Projectile.position.Y = Projectile.position.Y - (Projectile.height / 2); + int dustType = ProvUtils.GetDustID(); + for (int i = 0; i < 5; i++) + { + int holyDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + Main.dust[holyDust].noGravity = true; + if (Main.rand.NextBool()) + { + Main.dust[holyDust].scale = 0.5f; + Main.dust[holyDust].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + } + } + for (int j = 0; j < 10; j++) + { + int holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 3f); + Main.dust[holyDust2].noGravity = true; + holyDust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dustType, 0f, 0f, 100, default, 2f); + Main.dust[holyDust2].noGravity = true; + } + } + + public override void OnHitPlayer(Player target, Player.HurtInfo info) + { + // If the player is dodging, don't apply debuffs + if (info.Damage <= 0 || target.creativeGodMode) + return; + + ProvUtils.ApplyDebuffs(target, 120); + } + } +} diff --git a/Projectiles/Boss/HolyBomb.cs b/Projectiles/Boss/HolyBomb.cs index 33bbb2ddf3..8222ad36d4 100644 --- a/Projectiles/Boss/HolyBomb.cs +++ b/Projectiles/Boss/HolyBomb.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = -1; Projectile.tileCollide = false; CooldownSlot = ImmunityCooldownID.Bosses; + Projectile.scale = 0; } public override void OnSpawn(IEntitySource source) @@ -46,6 +47,8 @@ namespace CalamityMod.Projectiles.Boss } public override void AI() { + if (Projectile.scale < 1) + Projectile.scale += 0.1f; ProvUtils.ApplyGFBDamage(Projectile, 120, 20); Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); diff --git a/Projectiles/Boss/HolyFire2.cs b/Projectiles/Boss/HolyFire2.cs index 8cfcd2206d..ca2de7a011 100644 --- a/Projectiles/Boss/HolyFire2.cs +++ b/Projectiles/Boss/HolyFire2.cs @@ -1,11 +1,16 @@ using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs.Providence; using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -30,10 +35,16 @@ namespace CalamityMod.Projectiles.Boss Projectile.tileCollide = false; Projectile.timeLeft = 600; CooldownSlot = ImmunityCooldownID.Bosses; + + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void AI() { + + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; ProvUtils.ApplyGFBDamage(Projectile, 120, 10); Lighting.AddLight(Projectile.Center, 0.3f, 0.225f, 0f); @@ -68,7 +79,8 @@ namespace CalamityMod.Projectiles.Boss float vel = Math.Clamp(((Math.Abs(Projectile.velocity.X) + Math.Abs(Projectile.velocity.Y)) / 2), 0f, 1f); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); + if (Projectile.timeLeft % 3 == 0) + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center + new Vector2(Main.rand.NextFloat(15), 0).RotatedByRandom(MathHelper.TwoPi), Projectile.velocity.RotatedBy(Math.PI) * 0.2f, false, 10, Main.rand.NextFloat(0.8f, 1.2f), ProvUtils.GetProjectileColor(255))); if (Main.rand.NextBool()) GeneralParticleHandler.SpawnParticle(new MediumMistParticle(Projectile.Center, Vector2.Zero, Color.LightSlateGray, Color.DarkSlateGray, Main.rand.NextFloat(vel), 150, MathHelper.ToRadians(Main.rand.NextFloat(-1f, 1f)))); @@ -80,6 +92,30 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(8).ToList(); + + list.Insert(0, Projectile.position + (Projectile.rotation + MathHelper.PiOver2 * Projectile.spriteDirection).ToRotationVector2() * 16f); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); Texture2D texture = ProvUtils.StandardAI() ? Terraria.GameContent.TextureAssets.Projectile[Type].Value : ModContent.Request("CalamityMod/Projectiles/Boss/HolyFire2Night").Value; int framing = texture.Height / Main.projFrames[Type]; int y6 = framing * Projectile.frame; @@ -87,6 +123,31 @@ namespace CalamityMod.Projectiles.Boss Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), new Microsoft.Xna.Framework.Rectangle?(new Rectangle(0, y6, texture.Width, framing)), Projectile.GetAlpha(lightColor), Projectile.rotation, new Vector2(texture.Width / 2f, framing / 2f), Projectile.scale, SpriteEffects.None, 0); return false; } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 16f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Boss/LingeringHolyInferno.cs b/Projectiles/Boss/LingeringHolyInferno.cs new file mode 100644 index 0000000000..867538eea1 --- /dev/null +++ b/Projectiles/Boss/LingeringHolyInferno.cs @@ -0,0 +1,238 @@ +using System; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; +using CalamityMod.NPCs.Providence; +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; +using static CalamityMod.NPCs.Providence.Providence; + +namespace CalamityMod.Projectiles.Boss +{ + public class LingeringHolyInferno : ModProjectile, ILocalizedModType + { + bool started = false; + public new string LocalizationCategory => "Projectiles.Boss"; + public override string Texture => "CalamityMod/Projectiles/StarProj"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.localAI[1] = Main.rand.NextFloat(30f); + Projectile.width = Projectile.height = 32; + Projectile.hostile = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.alpha = 0; + CooldownSlot = ImmunityCooldownID.Bosses; + Projectile.penetrate = 1; + Projectile.timeLeft = CalamityUtils.MinutesToFrames(2); + Projectile.Calamity().DealsDefenseDamage = true; + Projectile.MaxUpdates = 2; + } + Vector2 OrbitPos = new(); + public override void AI() + { + ProvUtils.ApplyGFBDamage(Projectile, 120, 50); + + Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); + + if (!started) + { + started = true; + OrbitPos = new Vector2(Projectile.ai[0], Projectile.ai[1]); + Projectile.ai[0] = OrbitPos.DirectionTo(Projectile.Center).ToRotation(); + Projectile.ai[1] = OrbitPos.Distance(Projectile.Center); + + } + + Projectile.ai[0] += (Projectile.ai[1] - (Projectile.ai[2]-1000)) * 0.0000025f * (CalamityWorld.death ? 6 : CalamityWorld.revenge ? 2 : 1); + + Projectile.Center = OrbitPos + Projectile.ai[0].ToRotationVector2() * Projectile.ai[1]; + + Projectile.position.X = MathHelper.Clamp(Projectile.position.X, 5, (Main.maxTilesX - 5) * 16); + Projectile.position.Y = MathHelper.Clamp(Projectile.position.Y, 5, (Main.maxTilesY - 5) * 16); + Projectile.localAI[1] += 0.1f; + } + + public override bool PreDraw(ref Color lightColor) + { + float totalOpacity = MathHelper.Clamp(1-(Projectile.Distance(Main.LocalPlayer.Center) - 600) / 80f, 0.5f, 1f); + if (totalOpacity == 0) + return false; + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using var mainLease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth, + Main.screenHeight, + RenderTargetDescriptor.Default + ); + + using (mainLease.Scope(clearColor: Color.Transparent)) + { + + using (lease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + + Vector2[] fireCoreLength = Projectile.oldPos.Take(8).ToArray(); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + + + float lerpMult = MathHelper.Lerp(0.5f, 1f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); + + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; + Color baseColor2 = ProvUtils.GetProjectileColor(255); + baseColor.A = 0; + baseColor *= lerpMult; + baseColor2 *= lerpMult; + Vector2 origin = texture.Size() / 2f; + Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult - 1) * 0.5f + 1f); + + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); + + float upRight = MathHelper.PiOver4; + float up = MathHelper.PiOver2; + float upLeft = 3f * MathHelper.PiOver4; + float left = MathHelper.Pi; + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + + + scale = new Vector2(1f, 1f); + texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; + using (Main.spriteBatch.Scope()) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, baseColor2, 0, texture.Size() * 0.5f, 1f, 0, 0f); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); + Main.spriteBatch.End(); + } + Main.spriteBatch.End(); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White * totalOpacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(ss); + return false; + } + + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 38f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255,true) * 1.3f; + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } + + public float FireCoreWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = Projectile.scale * 24; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color tipColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + Color fullBodyColor = Color.Lerp(mainColor, tipColor, completion); + return Color.Lerp(fullBodyColor, Color.White, 0.175f) * Projectile.Opacity; + } + + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); + Color particleColor = ProvUtils.GetProjectileColor(0); + Color smokeColor = Color.Lerp(particleColor, Color.DarkSlateGray, 0.5f); + Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, smokeColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0f, 0.06f, 18); + GeneralParticleHandler.SpawnParticle(pulse); + for (int i = 0; i < 7; i++) + { + Particle smoke = new HeavySmokeParticle(Projectile.Center, (Vector2.UnitX).RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(7f), smokeColor, 30, Main.rand.NextFloat(0.6f, 1f), 0.5f, Main.rand.NextFloat(-0.03f, 0.03f), true); + GeneralParticleHandler.SpawnParticle(smoke); + } + for (int i = 0; i < 8; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (Vector2.UnitX).RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.8f, 10f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(1f, 1.8f); + dust.color = particleColor; + dust.noLightEmittence = true; + } + } + + public override void OnHitPlayer(Player target, Player.HurtInfo info) + { + target.AddBuff(ModContent.BuffType(), 180); + } + } +} diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index 3ba0c09874..c5a137939a 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -161,10 +161,11 @@ namespace CalamityMod.Projectiles.Boss int blobAmt = !ProvUtils.StandardAI() ? 9 : 6; if (Projectile.owner == Main.myPlayer) { - Vector2 additionalBlobVelocity = new Vector2(Projectile.velocity.X * 0.1f, Projectile.velocity.Y); + Vector2 additionalBlobVelocity = new Vector2(Projectile.velocity.X, Projectile.velocity.Y); for (int b = 0; b < blobAmt; b++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f) + additionalBlobVelocity; + velocity.Y = -Math.Abs(velocity.Y); if (Main.getGoodWorld) velocity *= 2f; diff --git a/Projectiles/Boss/MoltenBlob.cs b/Projectiles/Boss/MoltenBlob.cs index e74a89430b..8a3f8a176c 100644 --- a/Projectiles/Boss/MoltenBlob.cs +++ b/Projectiles/Boss/MoltenBlob.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.height = 12; Projectile.hostile = true; Projectile.penetrate = -1; - Projectile.timeLeft = 900; + Projectile.timeLeft = 120; Projectile.scale = 1.5f; CooldownSlot = ImmunityCooldownID.Bosses; } @@ -65,9 +65,6 @@ namespace CalamityMod.Projectiles.Boss { if (!inLava) { - if (Projectile.velocity.Y < 0f) - Projectile.velocity.Y = 0f; - Projectile.velocity.Y += 0.15f; } } From 715ba8e59518fc70bdfa0b485ddb8ea5776b8445 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 15 Mar 2026 00:59:58 -0500 Subject: [PATCH 310/346] projectiles now despawn with provi --- NPCs/Providence/Providence.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 30a8bc1ed6..60de9e3c0e 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -364,6 +364,10 @@ namespace CalamityMod.NPCs.Providence public override void AI() { + //ensure projectiles all despawn when she does + if (NPC.timeLeft == 1) + DespawnSpecificProjectiles(true); + // Set the border drawing to true if it isn't set to true // Can happen when another mod sets to false for a difficulty and that difficulty is then toggled off. shouldDrawInfernoBorder = true; From 5f3475eec9b6e4d9c0d0d42a73cb6576e3b10595 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 20 Mar 2026 14:50:29 -0500 Subject: [PATCH 311/346] Further adjustments - Removed Lingering Holy Inferno and replaced it with Holy Inferno centerpoint being fixed on provi center once a cocoon happens, and remaining there till next cocoon - Made Holy Inferno always visible when on screen, but at low opacity until close - Replaced the old cocoon orb particle trails with better looking primtrails - Made cocoons alternate between clockwise and counter-clockwise --- NPCs/Providence/Providence.cs | 52 +++-- Projectiles/Boss/HolyBurnOrb.cs | 170 ++++++++++++---- Projectiles/Boss/HolyLight.cs | 163 +++++++++++++--- Projectiles/Boss/LingeringHolyInferno.cs | 238 ----------------------- 4 files changed, 292 insertions(+), 331 deletions(-) delete mode 100644 Projectiles/Boss/LingeringHolyInferno.cs diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 60de9e3c0e..086c1d6a9d 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -98,6 +98,9 @@ namespace CalamityMod.NPCs.Providence public bool Dying = false; public int DeathAnimationTimer; public static float borderRadius = 3000f; + int spearDir = 1; + int starDir = 1; + public Vector2? borderPosition = null; // Sounds public static readonly SoundStyle SpawnSound = new("CalamityMod/Sounds/Custom/Providence/ProvidenceSpawn") { Volume = 1.2f }; @@ -324,6 +327,7 @@ namespace CalamityMod.NPCs.Providence writer.Write((Half)SoundWarningLevel); writer.Write(DeathAnimationTimer); writer.Write(borderRadius); + writer.WriteVector2(borderPosition ?? Vector2.Zero); for (int i = 0; i < 4; i++) writer.Write(NPC.Calamity().newAI[i]); } @@ -353,6 +357,9 @@ namespace CalamityMod.NPCs.Providence SoundWarningLevel = (float)reader.ReadHalf(); DeathAnimationTimer = reader.ReadInt32(); borderRadius = reader.ReadSingle(); + borderPosition = reader.ReadVector2(); + if (borderPosition == Vector2.Zero) + borderPosition = null; for (int i = 0; i < 4; i++) NPC.Calamity().newAI[i] = reader.ReadSingle(); @@ -1250,6 +1257,8 @@ namespace CalamityMod.NPCs.Providence case (int)Phase.FlameCocoon: + borderPosition ??= NPC.Center; + borderPosition = Vector2.Lerp(borderPosition.Value, NPC.Center, 0.02f); Vector2 fireSparklesFrom = fireFrom + new Vector2(0, -30); if (!targetDead && !getFuckedAI) { @@ -1283,7 +1292,7 @@ namespace CalamityMod.NPCs.Providence Vector2 spinningPoint = normalSpread ? new Vector2(0f, -cocoonProjVelocity) : new Vector2(-velocityX, -cocoonProjVelocity); for (int i = 0; i < chains; i++) { - Vector2 vector2 = spinningPoint.RotatedBy(radians * i + MathHelper.ToRadians(NPC.ai[2])); + Vector2 vector2 = spinningPoint.RotatedBy(radians * i + MathHelper.ToRadians(NPC.ai[2]) * starDir); if (Main.rand.NextBool(healingStarChance) && !death) { @@ -1422,16 +1431,8 @@ namespace CalamityMod.NPCs.Providence } } - float shorterFlameCocoonDistance = 2800f - ((CalamityWorld.death || NPC.localAI[1] == (float)BossMode.Enraged) ? 600f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f); - if (attackerAlive || defenderAlive || healerAlive) - shorterFlameCocoonDistance = 2800f; - if (Main.netMode != NetmodeID.MultiplayerClient) - for (var i = 0; i < 100; i++) - { - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + new Vector2(Main.rand.NextFloat(shorterFlameCocoonDistance, shorterFlameCocoonDistance + (death? 1000 : 500)), 0).RotatedBy(MathHelper.TwoPi * i / 100f + Main.rand.NextFloat(-0.0025f,0.0025f)), Vector2.Zero, ModContent.ProjectileType(), BlobDamage.CalculateProvidenceDamage(), 0f, Main.myPlayer, NPC.Center.X, NPC.Center.Y, shorterFlameCocoonDistance); - } - text = false; + starDir *= -1; AIState = (int)Phase.PhaseChange; NPC.localAI[2] = attackDelayAfterCocoon; NPC.TargetClosest(); @@ -1528,6 +1529,10 @@ namespace CalamityMod.NPCs.Providence case (int)Phase.SpearCocoon: + + borderPosition ??= NPC.Center; + borderPosition = Vector2.Lerp(borderPosition.Value, NPC.Center, 0.02f); + if (!targetDead && !getFuckedAI) { if (NPC.velocity.Length() <= 2f) @@ -1583,7 +1588,7 @@ namespace CalamityMod.NPCs.Providence spearRateIncrease = 1f; float radialOffset = MathHelper.Lerp(0.2f, 0.4f, spearRateIncrease); - calamityGlobalNPC.newAI[1] += radialOffset; + calamityGlobalNPC.newAI[1] += radialOffset * spearDir; } calamityGlobalNPC.newAI[2] += 1f; @@ -1610,16 +1615,8 @@ namespace CalamityMod.NPCs.Providence if (NPC.ai[3] >= phaseTime) { - float shorterSpearCocoonDistance = 2800f - ((CalamityWorld.death || NPC.localAI[1] == (float)BossMode.Enraged) ? 1000f : CalamityWorld.revenge ? 650f : Main.expertMode ? 300f : 0f); - if (attackerAlive || defenderAlive || healerAlive) - shorterSpearCocoonDistance = 2800f; - if (Main.netMode != NetmodeID.MultiplayerClient) - for (var i = 0; i < 100; i++) - { - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + new Vector2(Main.rand.NextFloat(shorterSpearCocoonDistance, shorterSpearCocoonDistance + (death ? 1000 : 500)),0).RotatedBy(MathHelper.TwoPi * i/100f + Main.rand.NextFloat(-0.0025f, 0.0025f)), Vector2.Zero, ModContent.ProjectileType(), BlobDamage.CalculateProvidenceDamage(), 0f, Main.myPlayer, NPC.Center.X,NPC.Center.Y, shorterSpearCocoonDistance); - } - AIState = (int)Phase.PhaseChange; + spearDir *= -1; NPC.localAI[2] = attackDelayAfterCocoon; NPC.TargetClosest(); } @@ -1898,7 +1895,7 @@ namespace CalamityMod.NPCs.Providence public float CalculateBurnIntensity(float attackDelayAfterCocoon = 1f) { - float distanceToTarget = Vector2.Distance(Main.player[NPC.target].Center, NPC.Center); + float distanceToTarget = Vector2.Distance(Main.player[NPC.target].Center, borderPosition ?? NPC.Center); float aiTimer = NPC.ai[3]; // This bool is only relevant for non-Zenith enraged AI @@ -1907,7 +1904,7 @@ namespace CalamityMod.NPCs.Providence float baseDistance = 2800f; float shorterFlameCocoonDistance = (CalamityWorld.death || fullPower) ? 600f : CalamityWorld.revenge ? 400f : Main.expertMode ? 200f : 0f; float shorterSpearCocoonDistance = (CalamityWorld.death || fullPower) ? 1000f : CalamityWorld.revenge ? 650f : Main.expertMode ? 300f : 0f; - float shorterDistance = AIState == (int)Phase.FlameCocoon ? shorterFlameCocoonDistance : shorterSpearCocoonDistance; + float shorterDistance = baseDistance - (AIState == (int)Phase.FlameCocoon ? shorterFlameCocoonDistance : shorterSpearCocoonDistance); bool guardianAlive = false; if (CalamityGlobalNPC.holyBossAttacker != -1 && Main.npc[CalamityGlobalNPC.holyBossAttacker].active) @@ -1930,11 +1927,10 @@ namespace CalamityMod.NPCs.Providence // Distance does not get shorter if in GFB / Guardians are alive if (!guardianAlive && NPC.localAI[1] < (float)BossMode.Rainbow) { - maxDistance = baseDistance; if (AIState == (int)Phase.FlameCocoon || AIState == (int)Phase.SpearCocoon) - maxDistance -= shorterDistance * shorterDistanceFade; + maxDistance = MathHelper.Lerp(baseDistance, shorterDistance, shorterDistanceFade); else if (attackDelayAfterCocoon > 1f) - maxDistance -= shorterDistance * (NPC.localAI[2] / attackDelayAfterCocoon); + maxDistance = MathHelper.Lerp(baseDistance, shorterDistance, (NPC.localAI[2] / attackDelayAfterCocoon)); } float drawFireDistanceStart = maxDistance - 800f; @@ -1953,7 +1949,7 @@ namespace CalamityMod.NPCs.Providence Projectile projectile = Main.projectile[x]; if (projectile.active) { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) projectile.Kill(); else if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) projectile.active = false; @@ -2589,10 +2585,10 @@ namespace CalamityMod.NPCs.Providence shader.Parameters["colorMult"].SetValue(prov.hasBeenGivenFullPower ? 7.65f : 7.35f); //I want you to know it took considerable restraint to deliberately misspell colour. shader.Parameters["time"].SetValue(Main.GlobalTimeWrappedHourly); shader.Parameters["radius"].SetValue(borderDistance); - shader.Parameters["anchorPoint"].SetValue(npc.Center); + shader.Parameters["anchorPoint"].SetValue(prov.borderPosition ?? npc.Center); shader.Parameters["screenPosition"].SetValue(Main.screenPosition); shader.Parameters["screenSize"].SetValue(Main.ScreenSize.ToVector2()); - shader.Parameters["burnIntensity"].SetValue(holyInfernoIntensity); + shader.Parameters["burnIntensity"].SetValue(holyInfernoIntensity*0.5f + 0.5f); shader.Parameters["playerPosition"].SetValue(target.Center); shader.Parameters["maxOpacity"].SetValue(maxOpacity); shader.Parameters["day"].SetValue(!prov.hasBeenGivenFullPower); diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index cddfda4371..50e2f81e2b 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -1,11 +1,16 @@ using System; +using System.Linq; using CalamityMod.Dusts; +using CalamityMod.Graphics.Primitives; using CalamityMod.NPCs.Providence; using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -17,6 +22,11 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override string Texture => "CalamityMod/Projectiles/StarProj"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.localAI[1] = Main.rand.NextFloat(30f); @@ -24,7 +34,6 @@ namespace CalamityMod.Projectiles.Boss Projectile.hostile = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; - Projectile.alpha = 255; CooldownSlot = ImmunityCooldownID.Bosses; Projectile.penetrate = 1; Projectile.timeLeft = 200; @@ -68,50 +77,141 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity *= 1.01f; Projectile.localAI[1] += (Projectile.velocity.Length() / 20); - - Color col = ProvUtils.GetProjectileColor(255); - float vel = MathHelper.Clamp(Projectile.velocity.Length() / 5, 0, 1.5f); - GlowOrbParticle p = new GlowOrbParticle(Projectile.Center, Projectile.velocity + new Vector2(Main.rand.NextFloat(vel * 2), 0).RotatedByRandom(MathHelper.TwoPi), false, 4, 1f, col); - GeneralParticleHandler.SpawnParticle(p); - //Trail for visibilty - GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center + Projectile.velocity, Vector2.Zero, col, "CalamityMod/Particles/BlastCone", new Vector2(3f, 2f), Vector2.Zero.AngleFrom(Projectile.velocity), 1f, 0f, 3)); } public override bool PreDraw(ref Color lightColor) { - float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); - - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; - Color baseColor2 = ProvUtils.GetProjectileColor(255); - baseColor.A = 0; - baseColor *= lerpMult; - baseColor2 *= lerpMult; - Vector2 origin = texture.Size() / 2f; - Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult-1)*0.5f + 1f); + Projectile.Opacity = 1; + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using var mainLease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth, + Main.screenHeight, + RenderTargetDescriptor.Default + ); - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; + using (mainLease.Scope(clearColor: Color.Transparent)) + { - Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); + using (lease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(5).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); - float upRight = MathHelper.PiOver4; - float up = MathHelper.PiOver2; - float upLeft = 3f * MathHelper.PiOver4; - float left = MathHelper.Pi; - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + Vector2[] fireCoreLength = Projectile.oldPos.Take(5).ToArray(); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + + + float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); + + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; + Color baseColor2 = ProvUtils.GetProjectileColor(255); + baseColor.A = 0; + baseColor *= lerpMult; + baseColor2 *= lerpMult; + Vector2 origin = texture.Size() / 2f; + Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult - 1) * 0.5f + 1f); + + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); + + float upRight = MathHelper.PiOver4; + float up = MathHelper.PiOver2; + float upLeft = 3f * MathHelper.PiOver4; + float left = MathHelper.Pi; + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + + scale = new Vector2(1f, 1f); + texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; + using (Main.spriteBatch.Scope()) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, baseColor2, 0, texture.Size() * 0.5f, 1f, 0, 0f); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); + Main.spriteBatch.End(); + } + Main.spriteBatch.End(); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(ss); return false; } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 38f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255, true) * 1.3f; + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } + + public float FireCoreWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = Projectile.scale * 24; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color tipColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + Color fullBodyColor = Color.Lerp(mainColor, tipColor, completion); + return Color.Lerp(fullBodyColor, Color.White, 0.175f) * Projectile.Opacity; + } public override void OnKill(int timeLeft) { diff --git a/Projectiles/Boss/HolyLight.cs b/Projectiles/Boss/HolyLight.cs index d59abcff35..2cecc9803e 100644 --- a/Projectiles/Boss/HolyLight.cs +++ b/Projectiles/Boss/HolyLight.cs @@ -1,12 +1,17 @@ using System; +using System.Linq; using CalamityMod.Dusts; using CalamityMod.Enums; +using CalamityMod.Graphics.Primitives; using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -17,6 +22,11 @@ namespace CalamityMod.Projectiles.Boss public new string LocalizationCategory => "Projectiles.Boss"; public override string Texture => "CalamityMod/Projectiles/StarProj"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.localAI[1] = Main.rand.NextFloat(30f); @@ -71,54 +81,147 @@ namespace CalamityMod.Projectiles.Boss NetMessage.SendData(MessageID.SpiritHeal, -1, -1, null, index, healAmt); Projectile.Kill(); } - - Color col = new Color(54, 209, 54); - Particle spark = new GlowSparkParticle(Projectile.Center, -Projectile.velocity * 0.8f, false, 5, 0.06f, col * 0.85f, new Vector2(1, 0.3f), true, false, 1.5f); - GeneralParticleHandler.SpawnParticle(spark); } public override bool PreDraw(ref Color lightColor) { - float vel = Projectile.velocity.Length() / 8; - Projectile.localAI[1] += vel; + Projectile.Opacity = 1; + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using var mainLease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth, + Main.screenHeight, + RenderTargetDescriptor.Default + ); - Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Color brightGreen = new Color(54, 209, 54, 0); - Vector2 projDirection = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Vector2 halfTextureSize = drawTexture.Size() / 2f; - Color halfBrightGreen = brightGreen * 0.5f; - float timeLeftColorScale = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); - Projectile.rotation += MathHelper.ToRadians(timeLeftColorScale * 2f); - Vector2 timeLeftDrawEffect = new Vector2(0.5f, 1f) * timeLeftColorScale; - Vector2 timeLeftDrawEffect2 = new Vector2(0.5f, 1f) * timeLeftColorScale; - brightGreen *= timeLeftColorScale; - halfBrightGreen *= timeLeftColorScale; + using (mainLease.Scope(clearColor: Color.Transparent)) + { - Vector2 position3 = projDirection + Projectile.velocity.SafeNormalize(Vector2.Zero) * Utils.GetLerpValue(0.5f, 1f, Projectile.localAI[0] / 60f, clamped: true) * 0; + using (lease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(13).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; + Vector2[] fireCoreLength = Projectile.oldPos.Take(13).ToArray(); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); + } - Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver2 - Projectile.rotation, halfTextureSize, timeLeftDrawEffect, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, 0f - Projectile.rotation, halfTextureSize, timeLeftDrawEffect2, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver2 - Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, 0f - Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4 + Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4 * 3f + Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4 + Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.36f, spriteEffects, 0); - Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4 * 3f + Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.36f, spriteEffects, 0); + float vel = Projectile.velocity.Length() / 8; + Projectile.localAI[1] += vel; + + Texture2D drawTexture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Color brightGreen = new Color(54, 209, 54, 0); + Vector2 projDirection = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Vector2 halfTextureSize = drawTexture.Size() / 2f; + Color halfBrightGreen = brightGreen * 0.5f; + float timeLeftColorScale = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); + Projectile.rotation += MathHelper.ToRadians(timeLeftColorScale * 2f); + Vector2 timeLeftDrawEffect = new Vector2(0.5f, 1f) * timeLeftColorScale; + Vector2 timeLeftDrawEffect2 = new Vector2(0.5f, 1f) * timeLeftColorScale; + brightGreen *= timeLeftColorScale; + halfBrightGreen *= timeLeftColorScale; + + Vector2 position3 = projDirection + Projectile.velocity.SafeNormalize(Vector2.Zero) * Utils.GetLerpValue(0.5f, 1f, Projectile.localAI[0] / 60f, clamped: true) * 0; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver2 - Projectile.rotation, halfTextureSize, timeLeftDrawEffect, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, 0f - Projectile.rotation, halfTextureSize, timeLeftDrawEffect2, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver2 - Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, 0f - Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0); + + Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4 + Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, brightGreen, MathHelper.PiOver4 * 3f + Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4 + Projectile.rotation, halfTextureSize, timeLeftDrawEffect * 0.36f, spriteEffects, 0); + Main.EntitySpriteDraw(drawTexture, position3, null, halfBrightGreen, MathHelper.PiOver4 * 3f + Projectile.rotation, halfTextureSize, timeLeftDrawEffect2 * 0.36f, spriteEffects, 0); + var scale = new Vector2(1f, 1f); + var texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; + using (Main.spriteBatch.Scope()) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, new Color(54, 209, 54), 0, texture.Size() * 0.5f, 1f, 0, 0f); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); + Main.spriteBatch.End(); + } + Main.spriteBatch.End(); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + Main.spriteBatch.Begin(ss); return false; } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 38f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = new Color(54, 209, 54) * 1.3f; + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } + + public float FireCoreWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = Projectile.scale * 24; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 pos) + { + Color mainColor = new Color(54, 209, 54); + Color tipColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + Color fullBodyColor = Color.Lerp(mainColor, tipColor, completion); + return Color.Lerp(fullBodyColor, Color.White, 0.175f) * Projectile.Opacity; + } public override void OnKill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item14 with { Pitch = -0.3f, Volume = 0.7f }, Projectile.Center); SoundStyle fireHeal = new("CalamityMod/Sounds/Custom/PlantyMushMine", 3); SoundEngine.PlaySound(fireHeal with { Volume = 0.5f, Pitch = 0.3f }, Projectile.Center); - Color particleColor = new Color(54, 209, 54); + Color particleColor = new Color(54, 209, 54); Color smokeColor = Color.Lerp(particleColor, Color.DarkSlateGray, 0.5f); Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, smokeColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0f, 0.06f, 18); GeneralParticleHandler.SpawnParticle(pulse); diff --git a/Projectiles/Boss/LingeringHolyInferno.cs b/Projectiles/Boss/LingeringHolyInferno.cs deleted file mode 100644 index 867538eea1..0000000000 --- a/Projectiles/Boss/LingeringHolyInferno.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; -using System.Linq; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; -using CalamityMod.Graphics.Primitives; -using CalamityMod.NPCs.Providence; -using CalamityMod.Particles; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; -using static CalamityMod.NPCs.Providence.Providence; - -namespace CalamityMod.Projectiles.Boss -{ - public class LingeringHolyInferno : ModProjectile, ILocalizedModType - { - bool started = false; - public new string LocalizationCategory => "Projectiles.Boss"; - public override string Texture => "CalamityMod/Projectiles/StarProj"; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 15; - ProjectileID.Sets.TrailingMode[Type] = 2; - } - public override void SetDefaults() - { - Projectile.localAI[1] = Main.rand.NextFloat(30f); - Projectile.width = Projectile.height = 32; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.alpha = 0; - CooldownSlot = ImmunityCooldownID.Bosses; - Projectile.penetrate = 1; - Projectile.timeLeft = CalamityUtils.MinutesToFrames(2); - Projectile.Calamity().DealsDefenseDamage = true; - Projectile.MaxUpdates = 2; - } - Vector2 OrbitPos = new(); - public override void AI() - { - ProvUtils.ApplyGFBDamage(Projectile, 120, 50); - - Lighting.AddLight(Projectile.Center, 0.45f, 0.35f, 0f); - - if (!started) - { - started = true; - OrbitPos = new Vector2(Projectile.ai[0], Projectile.ai[1]); - Projectile.ai[0] = OrbitPos.DirectionTo(Projectile.Center).ToRotation(); - Projectile.ai[1] = OrbitPos.Distance(Projectile.Center); - - } - - Projectile.ai[0] += (Projectile.ai[1] - (Projectile.ai[2]-1000)) * 0.0000025f * (CalamityWorld.death ? 6 : CalamityWorld.revenge ? 2 : 1); - - Projectile.Center = OrbitPos + Projectile.ai[0].ToRotationVector2() * Projectile.ai[1]; - - Projectile.position.X = MathHelper.Clamp(Projectile.position.X, 5, (Main.maxTilesX - 5) * 16); - Projectile.position.Y = MathHelper.Clamp(Projectile.position.Y, 5, (Main.maxTilesY - 5) * 16); - Projectile.localAI[1] += 0.1f; - } - - public override bool PreDraw(ref Color lightColor) - { - float totalOpacity = MathHelper.Clamp(1-(Projectile.Distance(Main.LocalPlayer.Center) - 600) / 80f, 0.5f, 1f); - if (totalOpacity == 0) - return false; - - Main.spriteBatch.End(out var ss); - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using var mainLease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth, - Main.screenHeight, - RenderTargetDescriptor.Default - ); - - using (mainLease.Scope(clearColor: Color.Transparent)) - { - - using (lease.Scope(clearColor: Color.Transparent)) - { - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); - - Vector2[] fireCoreLength = Projectile.oldPos.Take(8).ToArray(); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); - } - - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - - - float lerpMult = MathHelper.Lerp(0.5f, 1f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); - - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - Color baseColor = ProvUtils.GetProjectileColor(255, true) * 4; - Color baseColor2 = ProvUtils.GetProjectileColor(255); - baseColor.A = 0; - baseColor *= lerpMult; - baseColor2 *= lerpMult; - Vector2 origin = texture.Size() / 2f; - Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult - 1) * 0.5f + 1f); - - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); - - float upRight = MathHelper.PiOver4; - float up = MathHelper.PiOver2; - float upLeft = 3f * MathHelper.PiOver4; - float left = MathHelper.Pi; - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); - Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); - - - scale = new Vector2(1f, 1f); - texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; - using (Main.spriteBatch.Scope()) - { - - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, baseColor2, 0, texture.Size() * 0.5f, 1f, 0, 0f); - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); - Main.spriteBatch.End(); - } - Main.spriteBatch.End(); - } - - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White * totalOpacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - Main.spriteBatch.Begin(ss); - return false; - } - - public float FireWidthFunction(float completion, Vector2 pos) - { - float width; - float maxBodyWidth = 38f * Projectile.scale; - float curveRatio = 0.2f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - // Crop the tip of the trail into a conic shape. - if (completion < curveRatio) - width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - - // Pulse inwards and outwards over time. - float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; - float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); - return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireColorFunction(float completion, Vector2 pos) - { - Color mainColor = ProvUtils.GetProjectileColor(255,true) * 1.3f; - Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); - return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; - } - - public float FireCoreWidthFunction(float completion, Vector2 pos) - { - float width; - float maxBodyWidth = Projectile.scale * 24; - float curveRatio = 0.25f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - - if (completion < curveRatio) - width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireCoreColorFunction(float completion, Vector2 pos) - { - Color mainColor = ProvUtils.GetProjectileColor(255); - Color tipColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); - Color fullBodyColor = Color.Lerp(mainColor, tipColor, completion); - return Color.Lerp(fullBodyColor, Color.White, 0.175f) * Projectile.Opacity; - } - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - Color particleColor = ProvUtils.GetProjectileColor(0); - Color smokeColor = Color.Lerp(particleColor, Color.DarkSlateGray, 0.5f); - Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, smokeColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0f, 0.06f, 18); - GeneralParticleHandler.SpawnParticle(pulse); - for (int i = 0; i < 7; i++) - { - Particle smoke = new HeavySmokeParticle(Projectile.Center, (Vector2.UnitX).RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(7f), smokeColor, 30, Main.rand.NextFloat(0.6f, 1f), 0.5f, Main.rand.NextFloat(-0.03f, 0.03f), true); - GeneralParticleHandler.SpawnParticle(smoke); - } - for (int i = 0; i < 8; i++) - { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (Vector2.UnitX).RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(1.8f, 10f)); - dust.noGravity = true; - dust.scale = Main.rand.NextFloat(1f, 1.8f); - dust.color = particleColor; - dust.noLightEmittence = true; - } - } - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - target.AddBuff(ModContent.BuffType(), 180); - } - } -} From 45b68054b5d24d50d9c906cc287fb5c5f965c329 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 3 Apr 2026 13:49:29 -0500 Subject: [PATCH 312/346] Final Cleanup - Ready To Merge --- Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson | 1 - 1 file changed, 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 2c0f14ed7d..33b2507e6c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -108,7 +108,6 @@ Infernado.DisplayName: Infernado Infernado2.DisplayName: Infernado InfernadoRevenge.DisplayName: Infernado JewelProjectile.DisplayName: Ruby Bolt -LingeringHolyInferno.DisplayName: Lingering Holy Inferno LeviathanBomb.DisplayName: Meteor Vomit LeviathanSpawner.DisplayName: Spawner MajesticSparkle.DisplayName: Majestic Sparkle From 1343875dea2cb581b5a839e9ed24a1035fa1bc9d Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Sat, 11 Apr 2026 12:20:59 -0400 Subject: [PATCH 313/346] Fix holy blast fragment localized projectile name --- Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 33b2507e6c..927a547bf4 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -87,7 +87,7 @@ HellfireExplosion.DisplayName: Brimstone Hellfire Explosion HiveBombGoliath.DisplayName: Hive Bomb HolyAura.DisplayName: Holy Aura HolyBlast.DisplayName: Holy Blast -HolyBlastFrags.DisplayName: Holy Blast Frag +HolyBlastFrags.DisplayName: Holy Blast Fragment HolyBomb.DisplayName: Holy Bomb HolyBurnOrb.DisplayName: Holy Orb HolyExplosionBoom.DisplayName: Holy Explosion From 6401a5c45b23e9eea85dd34a410145240cb2393a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 11 Apr 2026 14:39:55 -0500 Subject: [PATCH 314/346] star refactor --- NPCs/Providence/Providence.cs | 9 +++ Projectiles/Boss/HolyBurnOrb.cs | 102 +++++++++++++++++--------------- Projectiles/Boss/HolyLight.cs | 74 +++++++++++------------ 3 files changed, 97 insertions(+), 88 deletions(-) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 086c1d6a9d..39a7dc5f10 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -32,6 +32,7 @@ using CalamityMod.Systems.Graphic; using CalamityMod.Tiles.Ores; using CalamityMod.Utilities; using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -2885,6 +2886,14 @@ namespace CalamityMod.NPCs.Providence // These will be used for almost every single one of her projectiles, so it's useful to have. public static class ProvUtils { + /// + /// This lease should be used to draw all of a projectile's effects onto directly, then be drawn onto the screen as one. This is for opacity reasons + /// + public static RenderTargetLease PrimaryLease { get => field ??= ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); set; } + /// + /// This should be used for secondary effects like trails, then drawn to PrimaryLease. This is for opacity reasons. + /// + public static RenderTargetLease SecondaryLease { get => field ??= ScreenspaceTargetPool.Shared.Rent(Main.instance.GraphicsDevice); set; } public static bool StandardAI() => (CalamityGlobalNPC.holyBoss == -1 || !Main.npc[CalamityGlobalNPC.holyBoss].Calamity().CurrentlyEnraged) && !Main.zenithWorld; public static int CalculateProvidenceDamage(this int damage) diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index 50e2f81e2b..1b5bd9cb67 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Boss public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailCacheLength[Type] = 32; ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -38,6 +38,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = 1; Projectile.timeLeft = 200; Projectile.Calamity().DealsDefenseDamage = true; + Projectile.MaxUpdates = 4; } public override void AI() @@ -53,66 +54,69 @@ namespace CalamityMod.Projectiles.Boss started = true; } - if (Projectile.ai[0] < 240f) + if (Projectile.FinalExtraUpdate()) { - Projectile.ai[0] += 1f; + if (Projectile.ai[0] < 240f) + { + Projectile.ai[0] += 1f; - if (Projectile.timeLeft < 160) - Projectile.timeLeft = 160; + if (Projectile.timeLeft < 160) + Projectile.timeLeft = 160; + } + + if (Main.getGoodWorld) + { + if (Projectile.velocity.Length() < 12f && Projectile.ai[1] == 0f) + { + Projectile.velocity *= 1.02f; + } + else + { + Projectile.ai[1] += 0.05f; + Projectile.velocity *= MathHelper.Lerp(0.95f, 1.05f, (float)Math.Abs(Math.Sin(Projectile.ai[1]))); + } + } + else if (Projectile.velocity.Length() < 16f) + Projectile.velocity *= 1.01f; + + Projectile.localAI[1] += (Projectile.velocity.Length() / 20); } - if (Main.getGoodWorld) - { - if (Projectile.velocity.Length() < 12f && Projectile.ai[1] == 0f) - { - Projectile.velocity *= 1.02f; - } - else - { - Projectile.ai[1] += 0.05f; - Projectile.velocity *= MathHelper.Lerp(0.95f, 1.05f, (float)Math.Abs(Math.Sin(Projectile.ai[1]))); - } - } - else if (Projectile.velocity.Length() < 16f) - Projectile.velocity *= 1.01f; - - Projectile.localAI[1] += (Projectile.velocity.Length() / 20); + Projectile.position -= (Projectile.velocity / Projectile.MaxUpdates) * (Projectile.MaxUpdates - 1); } public override bool PreDraw(ref Color lightColor) { - Projectile.Opacity = 1; Main.spriteBatch.End(out var ss); var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using var mainLease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth, - Main.screenHeight, - RenderTargetDescriptor.Default - ); - using (mainLease.Scope(clearColor: Color.Transparent)) + using (Main.spriteBatch.Scope()) + { + using (ProvUtils.SecondaryLease.Scope(clearColor: Color.Transparent)) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + var tex = GeneralParticleHandler.GetTexture(GeneralParticleHandler.particleIDsByTypes[typeof(BloomParticle)]); + var len = Math.Min(Projectile.oldPos.Length, 32); + for (var i = 0; i < len; i++) + { + Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size*0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color color = FireColorFunction(i / (float)len, Projectile.oldPos[i]); + var color2 = ProvUtils.GetProjectileColor(255,true); + float width = FireWidthFunction(i / (float)len, Projectile.oldPos[i]); + Main.spriteBatch.Draw(tex, drawPos, null, (color2 with { A = 0 }) * (1 - i / (float)len), 0f, tex.Size() * 0.5f, new Vector2(width) / tex.Width, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(tex, drawPos, null, (color with { A = 0}) * (1- i / (float)len), 0f, tex.Size() * 0.5f, new Vector2(width) /tex.Width * 0.25f, SpriteEffects.None, 0f); + } + Main.spriteBatch.End(); + } + } + + using (ProvUtils.PrimaryLease.Scope(clearColor: Color.Transparent)) { - using (lease.Scope(clearColor: Color.Transparent)) - { - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(5).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); - - Vector2[] fireCoreLength = Projectile.oldPos.Take(5).ToArray(); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); - } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - + Main.spriteBatch.Draw(ProvUtils.SecondaryLease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); @@ -159,7 +163,7 @@ namespace CalamityMod.Projectiles.Boss } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(ProvUtils.PrimaryLease.Target, Vector2.Zero, null, Color.White * Projectile.Opacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); Main.spriteBatch.End(); Main.spriteBatch.Begin(ss); return false; @@ -167,7 +171,7 @@ namespace CalamityMod.Projectiles.Boss public float FireWidthFunction(float completion, Vector2 pos) { float width; - float maxBodyWidth = 38f * Projectile.scale; + float maxBodyWidth = 32f * Projectile.scale; float curveRatio = 0.2f; var positions = Projectile.oldPos.ToList(); positions.RemoveAll(x => x == Vector2.Zero); @@ -185,7 +189,7 @@ namespace CalamityMod.Projectiles.Boss public Color FireColorFunction(float completion, Vector2 pos) { - Color mainColor = ProvUtils.GetProjectileColor(255, true) * 1.3f; + Color mainColor = ProvUtils.GetProjectileColor(255) * 1.3f; Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; } diff --git a/Projectiles/Boss/HolyLight.cs b/Projectiles/Boss/HolyLight.cs index 2cecc9803e..7981939956 100644 --- a/Projectiles/Boss/HolyLight.cs +++ b/Projectiles/Boss/HolyLight.cs @@ -2,7 +2,7 @@ using System.Linq; using CalamityMod.Dusts; using CalamityMod.Enums; -using CalamityMod.Graphics.Primitives; +using CalamityMod.NPCs.Providence; using CalamityMod.Particles; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; @@ -11,7 +11,6 @@ using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; -using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -21,10 +20,9 @@ namespace CalamityMod.Projectiles.Boss { public new string LocalizationCategory => "Projectiles.Boss"; public override string Texture => "CalamityMod/Projectiles/StarProj"; - public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 15; + ProjectileID.Sets.TrailCacheLength[Type] = 32; ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -35,9 +33,9 @@ namespace CalamityMod.Projectiles.Boss Projectile.hostile = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; - Projectile.alpha = 255; Projectile.penetrate = 1; Projectile.timeLeft = 200; + Projectile.MaxUpdates = 4; } public override void OnSpawn(IEntitySource source) @@ -56,17 +54,21 @@ namespace CalamityMod.Projectiles.Boss public override void AI() { Lighting.AddLight(Projectile.Center, 0f, 0.6f, 0f); - - if (Projectile.ai[0] < 240f) + if (Projectile.FinalExtraUpdate()) { - Projectile.ai[0] += 1f; + if (Projectile.ai[0] < 240f) + { + Projectile.ai[0] += 1f; - if (Projectile.timeLeft < 160) - Projectile.timeLeft = 160; + if (Projectile.timeLeft < 160) + Projectile.timeLeft = 160; + } + + if (Projectile.velocity.Length() < 16f) + Projectile.velocity *= 1.01f; } - if (Projectile.velocity.Length() < 16f) - Projectile.velocity *= 1.01f; + Projectile.position -= (Projectile.velocity / Projectile.MaxUpdates) * (Projectile.MaxUpdates - 1); int index = Player.FindClosest(Projectile.position, Projectile.width, Projectile.height); Player player = Main.player[index]; @@ -85,37 +87,31 @@ namespace CalamityMod.Projectiles.Boss public override bool PreDraw(ref Color lightColor) { - Projectile.Opacity = 1; Main.spriteBatch.End(out var ss); var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using var mainLease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth, - Main.screenHeight, - RenderTargetDescriptor.Default - ); - using (mainLease.Scope(clearColor: Color.Transparent)) + using (ProvUtils.SecondaryLease.Scope(clearColor: Color.Transparent)) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + var tex = GeneralParticleHandler.GetTexture(GeneralParticleHandler.particleIDsByTypes[typeof(BloomParticle)]); + var len = Math.Min(Projectile.oldPos.Length, 32); + for (var i = 0; i < len; i++) + { + Vector2 drawPos = Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color color = FireCoreColorFunction(i / (float)len, Projectile.oldPos[i]); + var color2 = new Color(0, 25, 0); + float width = FireWidthFunction(i / (float)len, Projectile.oldPos[i]); + Main.spriteBatch.Draw(tex, drawPos, null, (color2 with { A = 0 }) * (1 - i / (float)len), 0f, tex.Size() * 0.5f, new Vector2(width) / tex.Width, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(tex, drawPos, null, (color with { A = 0 }) * (1 - i / (float)len), 0f, tex.Size() * 0.5f, new Vector2(width) / tex.Width * 0.25f, SpriteEffects.None, 0f); + } + Main.spriteBatch.End(); + } + + using (ProvUtils.PrimaryLease.Scope(clearColor: Color.Transparent)) { - using (lease.Scope(clearColor: Color.Transparent)) - { - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(13).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); - - Vector2[] fireCoreLength = Projectile.oldPos.Take(13).ToArray(); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(fireCoreLength, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), fireCoreLength.Length + 24); - } - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(ProvUtils.SecondaryLease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); float vel = Projectile.velocity.Length() / 8; @@ -162,7 +158,7 @@ namespace CalamityMod.Projectiles.Boss } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(ProvUtils.PrimaryLease.Target, Vector2.Zero, null, Color.White * Projectile.Opacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); Main.spriteBatch.End(); Main.spriteBatch.Begin(ss); return false; @@ -170,7 +166,7 @@ namespace CalamityMod.Projectiles.Boss public float FireWidthFunction(float completion, Vector2 pos) { float width; - float maxBodyWidth = 38f * Projectile.scale; + float maxBodyWidth = 32f * Projectile.scale; float curveRatio = 0.2f; var positions = Projectile.oldPos.ToList(); positions.RemoveAll(x => x == Vector2.Zero); From fb7964a965fc959082478a7bab4f6d8b0db30b64 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 11 Apr 2026 18:21:02 -0700 Subject: [PATCH 315/346] recipe --- Items/Pets/StarSwallowerUnit.cs | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Items/Pets/StarSwallowerUnit.cs b/Items/Pets/StarSwallowerUnit.cs index 93e0d26691..85fededc2a 100644 --- a/Items/Pets/StarSwallowerUnit.cs +++ b/Items/Pets/StarSwallowerUnit.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.Pets; +using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Pets; using CalamityMod.Rarities; using Microsoft.Xna.Framework; @@ -13,20 +14,10 @@ namespace CalamityMod.Items.Pets public new string LocalizationCategory => "Items.Pets"; public override void SetDefaults() { - Item.width = 42; - Item.height = 30; - Item.damage = 0; - Item.useAnimation = 20; - Item.useTime = 20; - Item.useStyle = ItemUseStyleID.Swing; - Item.noMelee = true; - + Item.DefaultToVanitypet(ModContent.ProjectileType(), ModContent.BuffType()); Item.value = Item.sellPrice(gold: 1); Item.rare = ModContent.RarityType(); - - Item.shoot = ModContent.ProjectileType(); - Item.buffType = ModContent.BuffType(); - Item.UseSound = SoundID.Item10; + Item.useStyle = ItemUseStyleID.HoldUp; } public override void UseStyle(Player player, Rectangle heldItemFrame) @@ -36,5 +27,15 @@ namespace CalamityMod.Items.Pets player.AddBuff(Item.buffType, 15, true); } } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.Frog). + AddIngredient(8). + AddIngredient(4). + AddTile(TileID.Anvils). + Register(); + } } } From c908a495c84e7fa5e06ddb52c3fcd357496c2a09 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 11 Apr 2026 18:26:37 -0700 Subject: [PATCH 316/346] remove unused sprite --- Projectiles/Pets/StarSwallowerPetIdle.png | Bin 2478 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Projectiles/Pets/StarSwallowerPetIdle.png diff --git a/Projectiles/Pets/StarSwallowerPetIdle.png b/Projectiles/Pets/StarSwallowerPetIdle.png deleted file mode 100644 index fd68a85ed701f82800df6ca2125e42492a3d6839..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2478 zcmZ`*eK-?p8{b6OLDZ%bL&@0MuY)l15fvuob?{{C%b!VORK&gVXKmY(h z)$KIGONKDn{-m^9cFrGaD3t*))(hnVsO3Qakp=Q0&S+-Vm;3FMEwznOw4)v|}84x6W;yris^X#pA z{`ejhLhCDSe-!+pMM%Fo<-+@|!^Qj}^HNe2xZ&aW{AJSWYHu`M;`pEAC|e_%pw5}p zVX?j^OLya=FQ#4eTf%q>KXvBxIp4py$E_V;T<-ItqM5B*6K@qW?;`TPgcd-J3U4H2 z)n2IoW#vm$+y0cObtCfA{pRW!11j?&Ar|OLq~k^vkmVGE0OMQh@uUq>Pb{Oe?X^H4 zfT9+f*E}!))S6ge4l*je>1p6MCas&@(0)lgaza?LmZ`_u`=&8z?N@h1$Nb^S4PR1i zT>Y$f=`Hgo0jPEB1JPg_w62rZy3}k8)qzXy&n{GRAQ^dfcouFYBP2*&L2SG$GeJCZ z822+CEZz`XV{}yku0Xg_qdBF9%nxc4yI>?!B@@Wh)z(yxloXdFr-u}gMGHa=@b*;y z`FM}?(oFvDS?ztS(zB?h?AN@hQ|riALpA%}sHFRnmKhDo!`A{$>*{T9p^sWQz}P*p zaa-aM@<@IYoEWG)WZ~e+sN8;FEWFx|f1LIp zqX1&C^B3R_K!Ta0+;C1W8Y%GiN6PvvMtHOAYj81p&CbTAhueKsI@9RaYXrIWXeNfz z*PaINJ?F&2$qNWo<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oA!`+zo&P5v@M>az~z1dRag$!(ZNi*d1vGd8|($;b2xsV*Gor z9Q~fy-;-L)^?%A0&EDqxfY4T~?&6`NnsgXP6L#$=oT!hY1+@6Zb@?u?>c9_@Za=9$ zvUjHCpPBFr+DvR$o+wl^dhhxS5N}B5?$~i*ZjRhf#gZtMtMibID=p2ye>p4`KTcw{ z-TckV0nuteRuE;wO9NXl+ETF*8I>yCKKGZTS>s=UI=yn-$POSgh>6A^2J0cN-+7vG zaq(w0oWMv6W&{BW)Nm?%;m4a%n#>bma zqKNO6`m%gM$<=_G(WNtyOwJaq8=LTM`nj5j5*g+gI--WlL*OY5=|cu|9Y%%rsB?Jp z|G5yhPfePA&i_&2$9~J?iJgvB5SXcFnnSVvHk-e*qF)w>SU* From b0232b13516ee5d133f26cdd34da72c4a756c11f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 06:14:17 +0700 Subject: [PATCH 317/346] fixed frog catching an infinite flight loop --- Projectiles/Pets/StarSwallowerPet.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Pets/StarSwallowerPet.cs b/Projectiles/Pets/StarSwallowerPet.cs index 17cd7e2f95..31646cbc32 100644 --- a/Projectiles/Pets/StarSwallowerPet.cs +++ b/Projectiles/Pets/StarSwallowerPet.cs @@ -256,7 +256,7 @@ namespace CalamityMod.Projectiles.Pets { playerStill = 0; } - if (playerStill > 10 && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) + if (playerStill > 10 && Projectile.Center.Y <= player.Center.Y && !Collision.SolidCollision(Projectile.position, Projectile.width, Projectile.height)) { fly = false; Projectile.velocity *= 0.2f; From ead7747a8a81088267e7250443600085b5d7dd67 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 06:21:31 +0700 Subject: [PATCH 318/346] shortcut --- Buffs/Pets/StarSwallowerPetBuff.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Buffs/Pets/StarSwallowerPetBuff.cs b/Buffs/Pets/StarSwallowerPetBuff.cs index 30c26a7850..210bc1ebf6 100644 --- a/Buffs/Pets/StarSwallowerPetBuff.cs +++ b/Buffs/Pets/StarSwallowerPetBuff.cs @@ -1,5 +1,4 @@ using CalamityMod.Projectiles.Pets; -using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -13,15 +12,6 @@ namespace CalamityMod.Buffs.Pets Main.vanityPet[Type] = true; } - public override void Update(Player player, ref int buffIndex) - { - player.buffTime[buffIndex] = 18000; - player.Calamity().starSwallowerPetFroge = true; - bool petProjectileNotSpawned = player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; - if (petProjectileNotSpawned && player.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(player.GetSource_Buff(buffIndex), player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI, 0f, 0f); - } - } + public override void Update(Player player, ref int buffIndex) => player.BuffHandle_SpawnPetIfNeededAndSetTime(buffIndex, ref player.Calamity().starSwallowerPetFroge, ModContent.ProjectileType()); } } From e45955b984d9dfe69409dcbb0b38c775303abb6e Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 06:35:17 +0700 Subject: [PATCH 319/346] tweaked fallthrough logic and made froge little faster --- Projectiles/Pets/StarSwallowerPet.cs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Projectiles/Pets/StarSwallowerPet.cs b/Projectiles/Pets/StarSwallowerPet.cs index 31646cbc32..7292b421c4 100644 --- a/Projectiles/Pets/StarSwallowerPet.cs +++ b/Projectiles/Pets/StarSwallowerPet.cs @@ -57,10 +57,8 @@ namespace CalamityMod.Projectiles.Pets public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { Player player = Main.player[Projectile.owner]; - Vector2 projCenter = Projectile.Center; - Vector2 playerDirection = player.Center - projCenter; - float playerDistance = playerDirection.Length(); - fallThrough = playerDistance > 200f; + float heightDif = player.Center.Y - Projectile.Center.Y; + fallThrough = fly || heightDif >= 160f; return true; } @@ -100,7 +98,7 @@ namespace CalamityMod.Projectiles.Pets { Projectile.velocity.Y = 15f; } - if (playerDistance > 520f) + if (playerDistance > 480f) { fly = true; Projectile.velocity.X = 0f; @@ -110,18 +108,18 @@ namespace CalamityMod.Projectiles.Pets { if (player.position.X - Projectile.position.X > 0f) { - Projectile.velocity.X += 0.12f; - if (Projectile.velocity.X > 6f) + Projectile.velocity.X += 0.125f; + if (Projectile.velocity.X > 6.75f) { - Projectile.velocity.X = 6f; + Projectile.velocity.X = 6.75f; } } else { - Projectile.velocity.X -= 0.12f; - if (Projectile.velocity.X < -6f) + Projectile.velocity.X -= 0.125f; + if (Projectile.velocity.X < -6.75f) { - Projectile.velocity.X = -6f; + Projectile.velocity.X = -6.75f; } } } From bf64a1945740a847fe7aecc5bdd72fcefdb7cb37 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 07:20:41 +0700 Subject: [PATCH 320/346] rebalanced glorious end ??? --- Items/Weapons/Magic/GloriousEnd.cs | 10 ++++++---- Projectiles/Magic/MeteorStar.cs | 2 +- Projectiles/Magic/MeteorStarExplosion.cs | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Magic/GloriousEnd.cs b/Items/Weapons/Magic/GloriousEnd.cs index 77556189d3..899d39a098 100644 --- a/Items/Weapons/Magic/GloriousEnd.cs +++ b/Items/Weapons/Magic/GloriousEnd.cs @@ -9,16 +9,18 @@ namespace CalamityMod.Items.Weapons.Magic public class GloriousEnd : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Magic"; - public static int PlayerExplosionDmgMin = 60; - public static int PlayerExplosionDmgMax = 80; + + // Scales with difficulty (Expert: 60-80) + public static int PlayerExplosionDmgMin = 30; + public static int PlayerExplosionDmgMax = 40; public override void SetDefaults() { Item.width = 30; Item.height = 58; - Item.damage = 100; + Item.damage = 60; Item.knockBack = 10f; Item.useAnimation = Item.useTime = 30; - Item.mana = 40; + Item.mana = 60; Item.DamageType = DamageClass.Magic; Item.channel = true; Item.shootSpeed = 7f; diff --git a/Projectiles/Magic/MeteorStar.cs b/Projectiles/Magic/MeteorStar.cs index 4640f39b2c..45f7cc3bf3 100644 --- a/Projectiles/Magic/MeteorStar.cs +++ b/Projectiles/Magic/MeteorStar.cs @@ -81,7 +81,7 @@ namespace CalamityMod.Projectiles.Magic Owner.RemoveAllGrapplingHooks(); // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction - Projectile.velocity = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld) * 14f; + Projectile.velocity = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld) * 12f; Owner.velocity = Projectile.velocity; Owner.ChangeDir(Math.Sign(Projectile.velocity.X) <= 0 ? -1 : 1); diff --git a/Projectiles/Magic/MeteorStarExplosion.cs b/Projectiles/Magic/MeteorStarExplosion.cs index 200e4d1f14..970630819f 100644 --- a/Projectiles/Magic/MeteorStarExplosion.cs +++ b/Projectiles/Magic/MeteorStarExplosion.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Projectiles.Magic int intendedDamage = Main.rand.Next(GloriousEnd.PlayerExplosionDmgMin, GloriousEnd.PlayerExplosionDmgMax + 1); modifiers.SourceDamage *= 0f; - modifiers.SourceDamage.Flat += intendedDamage * (Main.masterMode ? 2.4f : Main.expertMode ? 1.6f : 1f); + modifiers.SourceDamage.Flat += intendedDamage.ScaleWithDifficulty(); if (Projectile.ai[0] == 1f) modifiers.SourceDamage.Flat /= 2; } @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Magic int intendedDamage = Main.rand.Next(GloriousEnd.PlayerExplosionDmgMin, GloriousEnd.PlayerExplosionDmgMax + 1); modifiers.SourceDamage *= 0f; - modifiers.SourceDamage.Flat += intendedDamage * (Main.masterMode ? 2.4f : Main.expertMode ? 1.6f : 1f); + modifiers.SourceDamage.Flat += intendedDamage.ScaleWithDifficulty(); if (Projectile.ai[0] == 1f) modifiers.SourceDamage.Flat /= 2; } From d07bc00e2b1d5ce45519fcb365068bb08e5a34bc Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 08:12:23 +0700 Subject: [PATCH 321/346] vanilla stuf reverted mana boosts from cobalt/mythril/adamantite as they instead offer mana cost reduction --- Items/CalamityGlobalItemTooltip.cs | 12 ------------ Items/CalamityGlobalItemTweaks.cs | 3 +-- .../VanillaArmorChanges/AdamantiteArmorSetChange.cs | 7 ------- Items/VanillaArmorChanges/CobaltArmorSetChange.cs | 7 ------- Items/VanillaArmorChanges/MythrilArmorSetChange.cs | 7 ------- 5 files changed, 1 insertion(+), 35 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index d145d81983..60d2b7438a 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -932,18 +932,6 @@ namespace CalamityMod.Items #endregion #region Hardmode Armor - // Cobalt - if (item.type == ItemID.CobaltHat) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("40", $"{CobaltArmorSetChange.MaxManaBoost + 40}")); - - // Mythril - if (item.type == ItemID.MythrilHood) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("60", $"{MythrilArmorSetChange.MaxManaBoost + 60}")); - - // Adamantite - if (item.type == ItemID.AdamantiteHeadgear) - EditTooltipByNum(0, (line) => line.Text = line.Text.Replace("80", $"{AdamantiteArmorSetChange.MaxManaBoost + 80}")); - // Titanium if (item.type == ItemID.TitaniumMask) EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("9%", "14%")); diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 18100f2947..edbfa5fc68 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -116,7 +116,6 @@ namespace CalamityMod.Items { ItemID.Flamelash, Do(DamageExact(36)) }, // VANILLA: 32 DMG { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL { ItemID.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed - { ItemID.FlowerofFrost, Do(DamageExact(70), UseExact(22), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 12 UT, 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 @@ -146,7 +145,7 @@ namespace CalamityMod.Items { 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)) }, // VANILLA: 29 DMG, 12 UT + { ItemID.LaserRifle, Do(DamageExact(46)) }, // VANILLA: 29 DMG { ItemID.LastPrism, Do(DamageExact(57)) }, // VANILLA: 100 DMG { ItemID.LeadShortsword, Do(TrueMelee, DamageExact(11)) }, // VANILLA: 9 DMG { ItemID.LeafBlower, Do(DamageExact(61)) }, // VANILLA: 48 DMG diff --git a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs index 8ae7e117cf..e37abd0f63 100644 --- a/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs +++ b/Items/VanillaArmorChanges/AdamantiteArmorSetChange.cs @@ -17,18 +17,11 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Adamantite"; - public const int MaxManaBoost = 20; public const int DefenseBoostMax = 10; public const int TimeUntilDecayBeginsAfterAttacking = 60; public const int TimeUntilBoostCompletelyDecays = 210; // Unlisted use: this is also the amount of hits to max out defense. public const int CritToDRConversionPercent = 25; - public override void ApplyHeadPieceEffect(Player player) - { - if (player.armor[0].type == ItemID.AdamantiteHeadgear) - player.statManaMax2 += MaxManaBoost; - } - public override void UpdateSetBonusText(ref string setBonusText) { Player player = Main.LocalPlayer; diff --git a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs index d8cd7c5c0f..b4441ddbcd 100644 --- a/Items/VanillaArmorChanges/CobaltArmorSetChange.cs +++ b/Items/VanillaArmorChanges/CobaltArmorSetChange.cs @@ -18,16 +18,9 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Cobalt"; public const int SpeedBoostSetBonusPercentage = 10; - public const int MaxManaBoost = 20; public const int MovementSpeedBoostPercentageMax = 10; public const int MovementSpeedBoostMphThreshold = 80; - public override void ApplyHeadPieceEffect(Player player) - { - if (player.armor[0].type == ItemID.CobaltHat) - player.statManaMax2 += MaxManaBoost; - } - public override void UpdateSetBonusText(ref string setBonusText) { Player player = Main.LocalPlayer; diff --git a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs index 5ed1269dab..ac878db015 100644 --- a/Items/VanillaArmorChanges/MythrilArmorSetChange.cs +++ b/Items/VanillaArmorChanges/MythrilArmorSetChange.cs @@ -18,7 +18,6 @@ namespace CalamityMod.Items.VanillaArmorChanges public override string ArmorSetName => "Mythril"; - public const int MaxManaBoost = 20; public const int FlareFrameSpawnDelay = 12; public const int FlareDamageSoftcap = 40; @@ -27,12 +26,6 @@ namespace CalamityMod.Items.VanillaArmorChanges setBonusText += $"\n{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(FlareFrameSpawnDelay)}"; } - public override void ApplyHeadPieceEffect(Player player) - { - if (player.armor[0].type == ItemID.MythrilHood) - player.statManaMax2 += MaxManaBoost; - } - public override void ApplyArmorSetBonus(Player player) { player.Calamity().MythrilSet = true; From 72d3759e1f9e7d5f639a7eba5ef93493601ccd04 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 13 Apr 2026 10:25:54 +0700 Subject: [PATCH 322/346] Art Attack PLEASE also some other stuff i guess --- Items/CalamityGlobalItemTweaks.cs | 1 - Items/Weapons/Magic/ArtAttack.cs | 4 ++-- Items/Weapons/Magic/LashesofChaos.cs | 4 ++-- Projectiles/Magic/ArtAttackStar.cs | 8 ++++++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index edbfa5fc68..22342dbdb3 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -267,7 +267,6 @@ namespace CalamityMod.Items { ItemID.UnholyTrident, Do(DamageRatio(0.91f)) }, // VANILLA: 88 DMG. 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(41)) }, // VANILLA: 31 DMG { ItemID.WaterBolt, Do(DamageExact(23)) }, // VANILLA: 19 DMG { ItemID.WhitePhaseblade, phaseblade }, diff --git a/Items/Weapons/Magic/ArtAttack.cs b/Items/Weapons/Magic/ArtAttack.cs index fddf40f2ab..48eedfc601 100644 --- a/Items/Weapons/Magic/ArtAttack.cs +++ b/Items/Weapons/Magic/ArtAttack.cs @@ -17,9 +17,9 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 70; Item.height = 70; - Item.damage = 80; + Item.damage = 120; Item.DamageType = DamageClass.Magic; - Item.mana = 100; + Item.mana = 60; Item.useAnimation = Item.useTime = 24; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; diff --git a/Items/Weapons/Magic/LashesofChaos.cs b/Items/Weapons/Magic/LashesofChaos.cs index 804d04f2f5..542b049cc2 100644 --- a/Items/Weapons/Magic/LashesofChaos.cs +++ b/Items/Weapons/Magic/LashesofChaos.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 28; Item.height = 30; - Item.damage = 111; + Item.damage = 130; Item.DamageType = DamageClass.Magic; Item.mana = 28; Item.useAnimation = Item.useTime = 46; @@ -32,7 +32,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.rare = ItemRarityID.Lime; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 11f; + Item.shootSpeed = 14f; } // Shoots twice as fast (and uses half as much mana to compensate) during hellblasts diff --git a/Projectiles/Magic/ArtAttackStar.cs b/Projectiles/Magic/ArtAttackStar.cs index a69ca4e9c8..0d87884419 100644 --- a/Projectiles/Magic/ArtAttackStar.cs +++ b/Projectiles/Magic/ArtAttackStar.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = end - 1; i >= start; i--) { float distanceFromStar = Vector2.Distance(Projectile.position, Projectile.oldPos[i]); - if (distanceFromStar < (distanceTraveled * 0.7f + 30f)) + if (distanceFromStar < (distanceTraveled * 0.7f + 20f)) { shapeIsComplete = true; @@ -75,7 +75,7 @@ namespace CalamityMod.Projectiles.Magic averageDistanceFromStar /= end - start; // Cancel out intersection "completions" if the velocity is slow enough to be rebounding or the shape is relatively small. - if (averageDistanceFromStar < distanceTraveled + 70f) + if (averageDistanceFromStar < distanceTraveled + 100f) shapeIsComplete = false; } @@ -182,6 +182,10 @@ namespace CalamityMod.Projectiles.Magic if (Main.myPlayer == Projectile.owner) { Projectile.NewProjectile(Projectile.GetSource_FromThis(), n.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Projectile.owner, n.whoAmI); + + damage /= 2; + if (damage < 1) + damage = 1; } } } From 545b656d743fc0858bc4f9b64d1250442aaf29d6 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 14 Apr 2026 12:48:03 -0500 Subject: [PATCH 323/346] Raider Boost now works properly --- CalPlayer/CalamityPlayerHitHurt.cs | 14 +++++++++++++- CalPlayer/CalamityPlayerMiscEffects.cs | 10 ---------- CalPlayer/CalamityPlayerOnHit.cs | 11 +++++++++++ Items/Accessories/Nanotech.cs | 2 +- Items/Accessories/RaidersTalisman.cs | 4 ++-- Items/Accessories/VampiricTalisman.cs | 6 +++--- Projectiles/CalamityGlobalProjectile.cs | 11 +++++++++++ 7 files changed, 41 insertions(+), 17 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index a94e709a5b..e8b533e4d5 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -595,7 +595,19 @@ namespace CalamityMod.CalPlayer { if (proj.npcProj || proj.trap) return; - + + //Add raider crit before hit + if (!proj.Calamity().stealthStrike && !proj.Calamity().stealthStrikeSubProjectile && raiderCritLifespan > 0f) + { + if (nanotech) + proj.CritChance += Items.Accessories.Nanotech.RaiderBonus; + else if (vampiricTalisman) + proj.CritChance += VampiricTalisman.RaiderBonus; + else if (raiderTalisman) + proj.CritChance += RaidersTalisman.RaiderBonus; + } + + modifiers.CritDamage += critDamage; // All Calamity multipliers are added together to prevent insane exponential stacking diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 5c7d52a83d..e406cd1611 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2705,16 +2705,6 @@ namespace CalamityMod.CalPlayer } } - // Raider Talisman bonus - if (!StealthStrikeAvailable() && raiderCritLifespan > 0f) - { - if (nanotech) - Player.GetCritChance() += Items.Accessories.Nanotech.RaiderBonus; - else if (vampiricTalisman) - Player.GetCritChance() += VampiricTalisman.RaiderBonus; - else if (raiderTalisman) - Player.GetCritChance() += RaidersTalisman.RaiderBonus; - } if (avertorBonus) Player.GetDamage() += 0.1f; diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 39b2b2a7dc..5cfacc35d6 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -226,6 +226,17 @@ namespace CalamityMod.CalPlayer if (Player.whoAmI != Main.myPlayer) return; + //Undo raider crit after hit + if (!proj.Calamity().stealthStrike && !proj.Calamity().stealthStrikeSubProjectile && raiderCritLifespan > 0f) + { + if (nanotech) + proj.CritChance -= Items.Accessories.Nanotech.RaiderBonus; + else if (vampiricTalisman) + proj.CritChance -= VampiricTalisman.RaiderBonus; + else if (raiderTalisman) + proj.CritChance -= RaidersTalisman.RaiderBonus; + } + // Apply this to player equippable sources ie. Orichalcum set bonus petal spawns // Do not apply if this effect is an extension of a weapon ie. Pearl God round effect as it will mess up Old Fashioned var source = Player.GetSource_OnHit(target); diff --git a/Items/Accessories/Nanotech.cs b/Items/Accessories/Nanotech.cs index 0d7c09a4df..c327cbdd88 100644 --- a/Items/Accessories/Nanotech.cs +++ b/Items/Accessories/Nanotech.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories { //The stealth damage boost is handled in CalamityPlayer for some reason, maybe someone didn't want em to stack? public new string LocalizationCategory => "Items.Accessories"; - public const float RaiderBonus = 10f; + public static int RaiderBonus => 10; public override void SetDefaults() { Item.width = 46; diff --git a/Items/Accessories/RaidersTalisman.cs b/Items/Accessories/RaidersTalisman.cs index 775a842fa1..2e45d69df2 100644 --- a/Items/Accessories/RaidersTalisman.cs +++ b/Items/Accessories/RaidersTalisman.cs @@ -9,8 +9,8 @@ namespace CalamityMod.Items.Accessories public class RaidersTalisman : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public const float RaiderBonus = 15f; - public const int RaiderCooldown = 10; //seconds + public static int RaiderBonus => 15; + public static int RaiderCooldown => 10; //seconds public static readonly SoundStyle StealthHitSound = new("CalamityMod/Sounds/Custom/RaidersTalismanStealthHit"); public override void SetDefaults() diff --git a/Items/Accessories/VampiricTalisman.cs b/Items/Accessories/VampiricTalisman.cs index eb0800a9db..9967c7d23e 100644 --- a/Items/Accessories/VampiricTalisman.cs +++ b/Items/Accessories/VampiricTalisman.cs @@ -9,9 +9,9 @@ namespace CalamityMod.Items.Accessories { public class VampiricTalisman : ModItem, ILocalizedModType, IHoldShiftTooltipItem { - internal const int ArmorCrunchDebuffTime = 150; - internal const int HeavyBleedingDebuffTime = 300; - public const float RaiderBonus = 15f; + internal static int ArmorCrunchDebuffTime => 150; + internal static int HeavyBleedingDebuffTime => 300; + public static int RaiderBonus => 15; public bool ShowExtensionIndicator => false; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 2d9425e0bc..b626906ce8 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -260,6 +260,10 @@ namespace CalamityMod.Projectiles /// If true, this projectile is from a rogue stealth strike. The primary variable responsible for triggering stealth strike effects. public bool stealthStrike = false; /// + /// If true, this projectile is spawned from a stealth strike, but is not a primary projectile. Used to avoid proccing things like Raiders Talisman. + /// + public bool stealthStrikeSubProjectile = false; + /// /// Number of times this stealth strike projectile has pierced an enemy.
/// Used to limit the number of times a projectile can proc certain effects from rogue accessories. ///
@@ -407,6 +411,13 @@ namespace CalamityMod.Projectiles if (e.Context == "SetBonus_GhostHurt") projectile.damage /= 2; } + + if (source is EntitySource_Parent { Entity: Projectile parent }) + { + if (parent.Calamity().stealthStrike || parent.Calamity().stealthStrikeSubProjectile) + stealthStrikeSubProjectile = true; + } + } public override void SendExtraAI(Projectile projectile, BitWriter bitWriter, BinaryWriter binaryWriter) => binaryWriter.Write(ParentNPCIndex); public override void ReceiveExtraAI(Projectile projectile, BitReader bitReader, BinaryReader binaryReader) => ParentNPCIndex = binaryReader.ReadInt32(); From 2e9edf83c95d2f8430131e5b9461e319b9c0fbb2 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 14 Apr 2026 14:13:14 -0500 Subject: [PATCH 324/346] Fixed Molten Amputator consuming more stealth than intended - Can no longer begin flurry when full on flurry throws - lsts flurry count in tooltip --- Items/Weapons/Rogue/MoltenAmputator.cs | 14 +++++++++----- .../Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Items/Weapons/Rogue/MoltenAmputator.cs b/Items/Weapons/Rogue/MoltenAmputator.cs index 5c21deb49e..7b108c5096 100644 --- a/Items/Weapons/Rogue/MoltenAmputator.cs +++ b/Items/Weapons/Rogue/MoltenAmputator.cs @@ -1,5 +1,4 @@ using CalamityMod.Dusts; -using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using Microsoft.Xna.Framework; @@ -7,6 +6,7 @@ using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue @@ -14,6 +14,8 @@ namespace CalamityMod.Items.Weapons.Rogue public class MoltenAmputator : RogueWeapon { public float speed = 16; + + public static int FlurryCount => 30; public override void SetDefaults() { Item.width = 92; @@ -36,9 +38,9 @@ namespace CalamityMod.Items.Weapons.Rogue player.Calamity().mouseWorldListener = true; if (player.Calamity().mouseRight) { - if (player.Calamity().StealthStrikeAvailable()) + if (player.Calamity().StealthStrikeAvailable() && player.Calamity().focusFlurryAttackCount < FlurryCount) { - player.Calamity().focusFlurryAttackCount = 30; + player.Calamity().focusFlurryAttackCount = FlurryCount; player.Calamity().ConsumeStealthByAttacking(); SoundStyle buff = new("CalamityMod/Sounds/Custom/ProfanedGuardians/GuardianRay"); SoundEngine.PlaySound(buff with { Volume = 1f, Pitch = Main.rand.NextFloat(0.2f, 0.3f) }, player.Center); @@ -72,7 +74,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { bool fastToss = player.Calamity().focusFlurryAttackCount > 0; - + SoundStyle fire = new("CalamityMod/Sounds/Item/SpearofDestiny"); SoundEngine.PlaySound(fire with { Volume = 0.5f, Pitch = (player.Calamity().focusFlurryAttackCount > 0 ? -0.4f + (player.Calamity().focusFlurryAttackCount * 0.02f) : Main.rand.NextFloat(-0.4f, -0.65f)) }, position); // Since the positioning of the scythe is important, its velocity is based on your mouse position @@ -87,8 +89,10 @@ namespace CalamityMod.Items.Weapons.Rogue player.Calamity().focusFlurryAttackCount--; } player.Calamity().ConsumeStealthByAttacking(); - + return false; } + + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(FlurryCount); } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 79545b4952..eb42278017 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -762,7 +762,7 @@ MoltenAmputator: { Throw a spinning scythe that lingers at your cursor to recall all existing scythes Recalling a scythe while it's on an enemy rends them for massive damage - with sufficient stealth to empower yourself, greatly increasing attack speed for a short time + with sufficient stealth to empower the next {0} scythes and greatly increase attack speed You cannot recall scythes thrown while empowered ''' } From 693f113fd20c82c1e4eca71ef24a09c4fb294eef Mon Sep 17 00:00:00 2001 From: Done_22 Date: Wed, 15 Apr 2026 09:59:08 +0300 Subject: [PATCH 325/346] Several PML Mage weapons Manaflated --- Items/Weapons/Magic/EventHorizon.cs | 2 +- Items/Weapons/Magic/Mistlestorm.cs | 2 +- Items/Weapons/Magic/ThePrince.cs | 2 +- Items/Weapons/Magic/VividClarity.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/EventHorizon.cs b/Items/Weapons/Magic/EventHorizon.cs index 332b0e7281..a84120af62 100644 --- a/Items/Weapons/Magic/EventHorizon.cs +++ b/Items/Weapons/Magic/EventHorizon.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 40; Item.height = 46; - Item.damage = 70; + Item.damage = 77; Item.knockBack = 3.5f; Item.noMelee = true; Item.DamageType = DamageClass.Magic; diff --git a/Items/Weapons/Magic/Mistlestorm.cs b/Items/Weapons/Magic/Mistlestorm.cs index b78c3e8fa9..f9fd80822b 100644 --- a/Items/Weapons/Magic/Mistlestorm.cs +++ b/Items/Weapons/Magic/Mistlestorm.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 48; Item.height = 48; - Item.damage = 54; + Item.damage = 59; Item.DamageType = DamageClass.Magic; Item.mana = 7; Item.useAnimation = Item.useTime = 6; diff --git a/Items/Weapons/Magic/ThePrince.cs b/Items/Weapons/Magic/ThePrince.cs index c176711d29..ce8e78ee62 100644 --- a/Items/Weapons/Magic/ThePrince.cs +++ b/Items/Weapons/Magic/ThePrince.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 102; Item.height = 112; - Item.damage = 166; + Item.damage = 180; Item.knockBack = 4.25f; Item.shootSpeed = 23.5f; Item.DamageType = DamageClass.Magic; diff --git a/Items/Weapons/Magic/VividClarity.cs b/Items/Weapons/Magic/VividClarity.cs index 99798cf17d..f1d67cd0e7 100644 --- a/Items/Weapons/Magic/VividClarity.cs +++ b/Items/Weapons/Magic/VividClarity.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 140; Item.height = 140; - Item.damage = 133; + Item.damage = 162; Item.DamageType = DamageClass.Magic; Item.mana = 54; Item.useTime = 4; From 5cf85a6e42ca8fc5923e0adb63dcb7bdd9526193 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 15 Apr 2026 20:21:59 -0500 Subject: [PATCH 326/346] Pulse Grenade & Doomsday Device rogue velocity --- .../DraedonsArsenal/PulseGrenadeProjectile.cs | 2 +- Projectiles/Rogue/DoomsdayDeviceProjectile.cs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs index 2349a8ebe1..8c10d3311c 100644 --- a/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs @@ -122,7 +122,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.Center = Owner.Center; Projectile.extraUpdates = (Projectile.Calamity().stealthStrike ? 22 : 5); Projectile.rotation += Main.rand.NextFloat(-4, 4); - Vector2 velocity = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) * 9; + Vector2 velocity = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld) * 9 * Owner.Calamity().rogueVelocity; Projectile.velocity = velocity; if (Projectile.Calamity().stealthStrike) diff --git a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs index 7f049480b7..45cb58ae7e 100644 --- a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs +++ b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs @@ -137,12 +137,17 @@ namespace CalamityMod.Projectiles.Rogue float speedMult = (float)Math.Pow(Utils.GetLerpValue(1, 4, charge, true), 2) + 0.05f; float arcValue = hasReachedFullCharge ? 0 : (float)Math.Pow(Utils.Remap(speedMult, 0, 1f, 1f, 0.8f), 4); Projectile.ai[1] = arcValue; - Projectile.velocity = velocity * 9 * speedMult; + Projectile.velocity = velocity * 9 * speedMult * Owner.Calamity().rogueVelocity; SoundStyle w = new("CalamityMod/Sounds/Item/SwooshMid"); SoundEngine.PlaySound(w with { Volume = 1f, Pitch = 0.2f, MaxInstances = 6 }, Projectile.Center); if (hasReachedFullCharge) { + if (Owner.Calamity().StealthStrikeAvailable()) + { + Projectile.Calamity().stealthStrike = true; + Owner.Calamity().ConsumeStealthByAttacking(); + } rotSpeed *= 2; SoundStyle w2 = new("CalamityMod/Sounds/Item/SwooshMid"); SoundEngine.PlaySound(w2 with { Volume = 1f, Pitch = -0.4f, MaxInstances = 6 }, Projectile.Center); @@ -150,11 +155,7 @@ namespace CalamityMod.Projectiles.Rogue else Owner.Calamity().ConsumeStealthByAttacking(); - if (Owner.Calamity().StealthStrikeAvailable() && hasReachedFullCharge) - { - Projectile.Calamity().stealthStrike = true; - Owner.Calamity().ConsumeStealthByAttacking(); - } + Projectile.tileCollide = true; flung = true; From e2c10067a1d6769b7d97c1e8d87d1c02e85b02fb Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Wed, 15 Apr 2026 19:04:48 -0700 Subject: [PATCH 327/346] Pulse Grenade extra projectiles cannot proc --- Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs b/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs index 2bebbdd2fb..7ec723eb16 100644 --- a/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs +++ b/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.ArmorPenetration = 15; + Projectile.Calamity().CannotProc = true; } public override bool ShouldUpdatePosition() => (time < 120); public override void AI() From 9af6405b3d5ba1712f032fbbb64963b271d0f97d Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 16 Apr 2026 09:43:06 +0700 Subject: [PATCH 328/346] Fixed Weather Pain lifespan issues --- Projectiles/CalamityGlobalProjectile.cs | 6 ++++++ Projectiles/CalamityGlobalProjectileTweaks.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index f7b234d338..c0b17b8d5b 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -789,6 +789,12 @@ namespace CalamityMod.Projectiles return false; } + // This has extra updates but increments lifespan through AI slots, so we need to offset that + else if (projectile.type == ProjectileID.WeatherPainShot) + { + if (!projectile.FinalExtraUpdate()) + projectile.ai[1]--; + } else if (projectile.type == ProjectileID.BloodShot) { diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 2559da088c..1b6d0a7799 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -213,7 +213,7 @@ namespace CalamityMod.Projectiles { ProjectileID.VenomSpider, Do( ExtraUpdatesExact(2), LocalIFrames(90)) }, //Spider Staff spiders. It has Venom, Dangerous, and Jumping spiders. { ProjectileID.VortexDrill, standardDrillTweaks }, { ProjectileID.Wasp, Do(PiercingExact(2)) }, - { ProjectileID.WeatherPainShot, Do(ExtraUpdatesExact(3), TimeLeftExact(1920)) }, + { ProjectileID.WeatherPainShot, Do(ExtraUpdatesExact(3)) }, { ProjectileID.YellowCounterweight, counterweightTweaks }, #endregion From 1d41b5bb376dad871ad84670df4a258b041c37f7 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 15 Apr 2026 22:04:26 -0500 Subject: [PATCH 329/346] various pulse grenade fixes there's still more jank but i can't be bothered --- Projectiles/CalamityGlobalProjectile.cs | 4 ++-- Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs | 7 +++++-- Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs | 2 -- en-US.hjson | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 en-US.hjson diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index b626906ce8..0495b97847 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -412,9 +412,9 @@ namespace CalamityMod.Projectiles projectile.damage /= 2; } - if (source is EntitySource_Parent { Entity: Projectile parent }) + if (source is EntitySource_Parent { Entity: Projectile proj }) { - if (parent.Calamity().stealthStrike || parent.Calamity().stealthStrikeSubProjectile) + if (proj.Calamity().stealthStrike || proj.Calamity().stealthStrikeSubProjectile) stealthStrikeSubProjectile = true; } diff --git a/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs b/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs index 2bebbdd2fb..1b83746dd8 100644 --- a/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs +++ b/Projectiles/DraedonsArsenal/PulseGrenadeOrb.cs @@ -79,12 +79,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (time == 250 || Utils.Distance(Projectile.Center, Owner.Center) < 10) { - if (Projectile.ai[2] == 0 && Owner.HeldItem.type == ModContent.ItemType()) + if (Projectile.ai[2] == 0 && Owner.HeldItem.type == ModContent.ItemType() && Owner.controlUseItem) { - Projectile reformGrenade = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), goal, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0f, Owner.whoAmI, 0); + Projectile reformGrenade = Projectile.NewProjectileDirect(Owner.GetSource_ItemUse(Owner.HeldItem), goal, Vector2.Zero, ModContent.ProjectileType(), (int)Owner.GetTotalDamage().ApplyTo(Owner.HeldItem.damage), 0f, Owner.whoAmI, 0); reformGrenade.ai[1] = 5; reformGrenade.ai[0] = Owner.HeldItem.useTime * 0.7f; reformGrenade.Opacity = 0; + //Doze Apr 15 2026 - Because this isn't being spawnwed from the shoot, these bools break. Manually fixing here. + reformGrenade.Calamity().extorterBoost = true; + reformGrenade.Calamity().stealthStrikeSubProjectile = false; SoundStyle grab = new("CalamityMod/Sounds/Item/LightCatch"); SoundEngine.PlaySound(grab with { Volume = 1f, Pitch = 0 }, Projectile.Center); diff --git a/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs b/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs index 8c10d3311c..66bc8fecce 100644 --- a/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs +++ b/Projectiles/DraedonsArsenal/PulseGrenadeProjectile.cs @@ -300,11 +300,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // Do NOT change the damage of these here, do it on the on hit Projectile orb = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (vel * 7f).RotatedBy(MathHelper.PiOver4 / 2), ModContent.ProjectileType(), Projectile.damage, 0f, Owner.whoAmI, 0, spin, i); - orb.Calamity().stealthStrike = Projectile.Calamity().stealthStrike; if (Projectile.Calamity().stealthStrike) { Projectile orb2 = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (vel * 10f), ModContent.ProjectileType(), Projectile.damage, 0f, Owner.whoAmI, 0, -spin, i + 1); - orb2.Calamity().stealthStrike = Projectile.Calamity().stealthStrike; } } 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 a366c270063d3ed2a47943732aa37bfa6af531af Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 15 Apr 2026 22:05:05 -0500 Subject: [PATCH 330/346] I HATE THIS GARBAGE --- 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 70883341cbd522dbdc7d1fa92c5faffaaf567ece Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Thu, 16 Apr 2026 01:00:46 -0400 Subject: [PATCH 331/346] Rusty Beacon Prototype 1 damage nerf To compensate for summon damage bugfix --- Items/Weapons/Summon/RustyBeaconPrototype.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs index b70e451dc8..992fcc965a 100644 --- a/Items/Weapons/Summon/RustyBeaconPrototype.cs +++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.width = 28; Item.height = 20; Item.mana = 10; - Item.damage = 8; + Item.damage = 7; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; From be094e331d86e0517ac50d93766af0227e8d8cb3 Mon Sep 17 00:00:00 2001 From: Karina Date: Thu, 16 Apr 2026 04:46:51 -0500 Subject: [PATCH 332/346] Batholith nerf, phm balance --- Items/Accessories/BatholithBangle.cs | 2 +- Items/Weapons/Magic/AbyssShocker.cs | 2 +- Items/Weapons/Magic/BlackAnurian.cs | 2 +- Items/Weapons/Magic/SkyGlaze.cs | 2 +- Projectiles/Magic/BloodBeam.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Accessories/BatholithBangle.cs b/Items/Accessories/BatholithBangle.cs index c244cd51d4..94f50319a8 100644 --- a/Items/Accessories/BatholithBangle.cs +++ b/Items/Accessories/BatholithBangle.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public static int cooldown = 600; - public static int damage = 100; + public static int damage = 50; public override void SetDefaults() { Item.width = 36; diff --git a/Items/Weapons/Magic/AbyssShocker.cs b/Items/Weapons/Magic/AbyssShocker.cs index fd4f94262e..e168061648 100644 --- a/Items/Weapons/Magic/AbyssShocker.cs +++ b/Items/Weapons/Magic/AbyssShocker.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 86; Item.height = 32; - Item.damage = 27; + Item.damage = 30; Item.DamageType = DamageClass.Magic; Item.mana = 14; Item.useAnimation = Item.useTime = 19; diff --git a/Items/Weapons/Magic/BlackAnurian.cs b/Items/Weapons/Magic/BlackAnurian.cs index 0db1cb1d79..366922308f 100644 --- a/Items/Weapons/Magic/BlackAnurian.cs +++ b/Items/Weapons/Magic/BlackAnurian.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 58; Item.height = 38; - Item.damage = 21; + Item.damage = 24; Item.DamageType = DamageClass.Magic; Item.mana = 13; Item.useAnimation = Item.useTime = 18; diff --git a/Items/Weapons/Magic/SkyGlaze.cs b/Items/Weapons/Magic/SkyGlaze.cs index 0af3e7787a..05e3a9466b 100644 --- a/Items/Weapons/Magic/SkyGlaze.cs +++ b/Items/Weapons/Magic/SkyGlaze.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 52; Item.height = 74; - Item.damage = 8; + Item.damage = 11; Item.DamageType = DamageClass.Magic; Item.mana = 9; Item.useAnimation = Item.useTime = 25; diff --git a/Projectiles/Magic/BloodBeam.cs b/Projectiles/Magic/BloodBeam.cs index 80d7385459..6fdecf2031 100644 --- a/Projectiles/Magic/BloodBeam.cs +++ b/Projectiles/Magic/BloodBeam.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.friendly = true; Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = -1; + Projectile.penetrate = 2; Projectile.extraUpdates = 3; Projectile.timeLeft = 120; Projectile.usesIDStaticNPCImmunity = true; From 4d395835c98778f17d0be9c1049d5bb7f3cd6826 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 16 Apr 2026 11:16:31 -0500 Subject: [PATCH 333/346] Daawnlight Nerf, Crescent Moon now uses Blue Moon 100% -> 75% max crit, 60 -> 50% threshold for higher falloff. Monsoon typhoon is blacklisted. --- Items/Accessories/DaawnlightSpiritOrigin.cs | 4 ++-- Items/Weapons/Melee/CrescentMoon.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 3 ++- Systems/Collections/CalamityProjectileSets.cs | 5 +++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Items/Accessories/DaawnlightSpiritOrigin.cs b/Items/Accessories/DaawnlightSpiritOrigin.cs index 2fbb970c79..45154ca3ab 100644 --- a/Items/Accessories/DaawnlightSpiritOrigin.cs +++ b/Items/Accessories/DaawnlightSpiritOrigin.cs @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Accessories /// The amount of critical strike chance bonus where crit starts decaying faster.
/// When the crit bonus reaches this value, the decay rate increases by one tier. ///
- public static readonly int CritDecayThreshold = 60; + public static readonly int CritDecayThreshold = 50; /// /// When the critical strike chance bonus has exceeded , it continues to decay faster for every more. @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories /// /// The maximum amount of extra critical strike chance you can get from this accessory. /// - public static readonly int CritHardCap = 100; + public static readonly int CritHardCap = 75; #endregion diff --git a/Items/Weapons/Melee/CrescentMoon.cs b/Items/Weapons/Melee/CrescentMoon.cs index de1086891f..f09743e25f 100644 --- a/Items/Weapons/Melee/CrescentMoon.cs +++ b/Items/Weapons/Melee/CrescentMoon.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(ItemID.BlueMoon). AddIngredient(8). AddIngredient(3). AddIngredient(16). diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index decf8303fd..ea1ed3a49e 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3745,7 +3745,8 @@ namespace CalamityMod.NPCs // Hitbox criteria were changed to allow long one dimensional projectiles so that Condemnation would work. bool acceptableVelocity = projectile.velocity != Vector2.Zero; bool acceptableHitbox = (projectile.width <= 36) || (projectile.height <= 36); - if (bullseye != null && acceptableVelocity && acceptableHitbox) + + if (bullseye != null && acceptableVelocity && acceptableHitbox && !CalamityProjectileSets.DaawnlightBlacklist[projectile.type]) { // Bullseyes are visually different on bosses and thus have larger hitboxes. float bullseyeRadius = npc.IsABoss() ? DaawnlightSpiritOrigin.BossBullseyeRadius : DaawnlightSpiritOrigin.RegularEnemyBullseyeRadius; diff --git a/Systems/Collections/CalamityProjectileSets.cs b/Systems/Collections/CalamityProjectileSets.cs index bd3eb44325..4ced4a300a 100644 --- a/Systems/Collections/CalamityProjectileSets.cs +++ b/Systems/Collections/CalamityProjectileSets.cs @@ -77,6 +77,11 @@ namespace CalamityMod.Systems.Collections public static bool[] DoesNotGetHomingWithGrapeBeer = Factory.CreateBoolSet(ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType()); + + public static bool[] DaawnlightBlacklist = Factory.CreateNamedSet("DaawnlightBlacklist") + .Description("Disables a projectile from increasing Daawnlight Spirit Origin's extra crit") + .RegisterBoolSet(ProjectileType(), ProjectileType(), ProjectileType()); + /// /// Determines what other projectiles this projectile will share ID-static immunity frames with. Defaults to -1, which means that it does not share immunity frames.
/// Each "set" of projectile which shares immunity frames is registered to point to the same ID reference, usually the first projectile in the set. If a projectile with this reference hits an NPC, all other projectiles with that reference also have their ID-static immunity cooldown set for that NPC. From fc4f1fa36d7266cf8d49f541f88825238e5df3b0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 16 Apr 2026 18:38:55 -0400 Subject: [PATCH 334/346] Burning Sea rebalance Because I forgot about it on heldProj pierce resist exemption branch --- Items/Weapons/Magic/BurningSea.cs | 2 +- Projectiles/Magic/IncineratingFireball.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Magic/BurningSea.cs b/Items/Weapons/Magic/BurningSea.cs index 91257ae1d1..606e5db6e8 100644 --- a/Items/Weapons/Magic/BurningSea.cs +++ b/Items/Weapons/Magic/BurningSea.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 28; Item.height = 30; - Item.damage = 69; + Item.damage = 56; Item.DamageType = DamageClass.Magic; Item.mana = 8; Item.useTime = 20; diff --git a/Projectiles/Magic/IncineratingFireball.cs b/Projectiles/Magic/IncineratingFireball.cs index eee796c453..30bdd882b4 100644 --- a/Projectiles/Magic/IncineratingFireball.cs +++ b/Projectiles/Magic/IncineratingFireball.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 12; + Projectile.localNPCHitCooldown = 10; Projectile.hide = true; } @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Magic } // Can only deal damage while not fizzling out. - public override bool? CanDamage() => !Released; + public override bool? CanDamage() => !Released && Timer % Projectile.localNPCHitCooldown == 0; public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { @@ -160,6 +160,9 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(Burn, target.Center); target.AddBuff(ModContent.BuffType(), 180); + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.7f); + // Whoa buddy no smoking allowed for (int i = 0; i < 4; i++) { From e985468e6d637774c3acc76f9813e2176b2793fc Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 20:41:33 -0400 Subject: [PATCH 335/346] Bananarang, Flower of Frost, Laser Rifle balance --- Items/CalamityGlobalItemTweaks.cs | 6 +++--- Projectiles/CalamityGlobalProjectileTweaks.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 14b50af115..634199d82a 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items { 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.Bananarang, Do(DamageExact(60)) }, // VANILLA: 45 DMG { 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 @@ -117,7 +117,7 @@ namespace CalamityMod.Items { 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.FlowerofFrost, Do(DamageExact(49), ManaExact(7), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 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 @@ -147,7 +147,7 @@ namespace CalamityMod.Items { 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.LaserRifle, Do(DamageExact(41), 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 diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 2559da088c..951a42a51b 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -188,6 +188,7 @@ namespace CalamityMod.Projectiles { ProjectileID.PalladiumDrill, standardDrillTweaks }, { ProjectileID.PartyBullet, Do(ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.PurpleCounterweight, counterweightTweaks }, + { ProjectileID.PurpleLaser, Do(LocalIFrames(10 * 5)) }, // Laser Rifle, accounting for extra updates { ProjectileID.QueenSlimeGelAttack, Do(NoPiercing) }, { ProjectileID.QueenSlimeMinionPinkBall, Do(NoPiercing) }, { ProjectileID.RedCounterweight, counterweightTweaks }, @@ -491,7 +492,6 @@ namespace CalamityMod.Projectiles { ProjectileID.PulseBolt, defaultIFrames }, { ProjectileID.PureSpray, defaultIFrames }, { ProjectileID.PurificationPowder, defaultIFrames }, - { ProjectileID.PurpleLaser, defaultIFrames }, { ProjectileID.PygmySpear, defaultIFrames }, { ProjectileID.QuarterNote, defaultIFrames }, { ProjectileID.RainbowFlare, defaultIFrames }, From edb2db3d55512332b4760104d341de56e053e21d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 21:42:11 -0400 Subject: [PATCH 336/346] Meteor Staff nerf --- Items/CalamityGlobalItemTweaks.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 634199d82a..b93e7c0cd2 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -158,7 +158,7 @@ namespace CalamityMod.Items { 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.MeteorStaff, Do(ManaExact(7), ShootSpeedExact(13f)) }, // VANILLA: 9 MANA, 10 VEL { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG From 163b1bb473a935379b0f6d4ff0e3256853c892b5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 22:04:02 -0400 Subject: [PATCH 337/346] A few boss changes around mech tier * Decreased health and DR of Cryogen's Shield * Increased delay between Retinazer's charges, and decreased velocity of Spazmatism's charges, in phase 1 * Twins no longer fire projectiles during phase 2 transition in Death * Spazmatism no longer gains speed when its target is farther away during flamethrower attack * Retinazer is much slower in the time before it charges * Skeletron Prime skull spins have a smaller radius, and are now forced to trigger if it hasn't triggered for 4.5 seconds to prevent stalling the AI * Skeletron Prime missile attack now occurs after spinning charges instead of before --- NPCs/Cryogen/CryogenShield.cs | 4 +- .../Bosses/SkeletronPrimeAI.cs | 21 +++++----- NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 41 +++---------------- 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index a2befaa003..fc2faaee99 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.Cryogen NPC.width = 216; NPC.height = 216; NPC.scale *= (CalamityWorld.death || BossRushEvent.BossRushActive || Main.getGoodWorld) ? 0.8f : 1f; - NPC.DR_NERD(0.4f); - NPC.LifeMaxNERB(2800, 3360, 33600); + NPC.DR_NERD(0.25f); + NPC.LifeMaxNERB(2500, 3000, 30000); NPC.Opacity = 0f; NPC.HitSound = Cryogen.HitSound; NPC.DeathSound = BreakSound; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 870dd18391..972bc16f13 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -155,18 +155,19 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Start other phases; if arms are dead, start with spin phase if (phase2 || Main.getGoodWorld || allArmsDead) { - // Start spin phase after 1.5 seconds + // Start spin phase after 1.5 seconds if close enough; forced after 4.5 seconds NPC.ai[2] += phase3 ? 1.5f : 1f; if (NPC.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f))) { - bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[NPC.target].position.Y - 320f && - Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 400f; + bool shouldSpinAround = NPC.ai[1] == 4f && ((NPC.position.Y < Main.player[NPC.target].position.Y - 320f && + Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 400f) || + NPC.ai[2] >= (270f - (death ? 15f * (1f - lifeRatio) : 0f))); if (shouldSpinAround || NPC.ai[1] != 4f) { if (shouldSpinAround) { - NPC.localAI[3] = 300f; + NPC.localAI[3] = 200f; NPC.localAI[1] = 0; NPC.SyncVanillaLocalAI(); } @@ -309,7 +310,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults); NPC.ai[2] = 0f; - NPC.ai[1] = 4f; + // Fly overhead and spit missiles if on low health + NPC.ai[1] = phase3 ? 6f : 4f; NPC.localAI[0] = 0f; } @@ -475,7 +477,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Spin for about 3 seconds // Decreasing this number will INCREASE how fast he moves while spinning - float spinVelocity = 30f; + float spinVelocity = 25f; if (NPC.ai[2] == 2f) { // Play angry noise @@ -540,8 +542,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); - // Fly overhead and spit missiles if on low health - NPC.ai[1] = phase3 ? 6f : 1f; + NPC.ai[1] = 1f; NPC.ai[2] = 0f; NPC.localAI[3] = 0f; NPC.localAI[0] = 0f; @@ -590,8 +591,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (NPC.localAI[0] >= totalMissiles) { - NPC.ai[1] = 0f; - NPC.ai[2] = 0f; + NPC.ai[1] = 4f; + NPC.ai[2] = -60f; NPC.localAI[3] = 0f; calamityGlobalNPC.newAI[0] = 0f; NPC.localAI[0] = 0f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index f30880b7a5..227077741e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else NPC.rotation = NPC.velocity.ToRotation() - MathHelper.PiOver2; - float delayBeforeChargingAgain = death ? 48f : 56f; + float delayBeforeChargingAgain = death ? 50f : 60f; if (NPC.ai[2] >= delayBeforeChargingAgain) { NPC.ai[3] += 1f; @@ -314,21 +314,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.rotation += NPC.ai[2]; NPC.ai[1] += 1f; - if (death && NPC.ai[2] >= 0.2f) - { - if (NPC.ai[1] % 10f == 0f) - { - SoundEngine.PlaySound(SoundID.Item33, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ProjectileID.DeathLaser; - - Vector2 projectileVelocity = NPC.rotation.ToRotationVector2() * 7f; - float offset = 90f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(projectileVelocity) * offset, projectileVelocity, type, LaserDamage.CalculateMechDamage(), 0f, Main.myPlayer); - } - } - } if (NPC.ai[1] == 100f) { @@ -620,7 +605,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else if (NPC.ai[1] == 4f) { float chargeLineUpDistance = spazAlive ? 600f : 500f; - float chargeSpeed = (death ? 20f : 18f) + (death ? 1.5f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float chargeSpeed = death ? 5f : 3f; float chargeAcceleration = death ? 0.495f : 0.45f; if (spazAlive) @@ -844,7 +829,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Rotation and velocity NPC.rotation = hoverRotation; - float chargeSpeed = death ? 19.25f + (phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))) : 18f; + float chargeSpeed = 16f; + if (death) + chargeSpeed += (phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))); if (Main.getGoodWorld) chargeSpeed *= 1.2f; @@ -935,20 +922,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.rotation += NPC.ai[2]; NPC.ai[1] += 1f; - if (death && NPC.ai[2] >= 0.2f) - { - if (NPC.ai[1] % 10f == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = NPC.ai[1] % 20f == 0f ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); - - Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * 16f + Main.rand.NextVector2CircularEdge(3f, 3f); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 50f, projectileVelocity, type, FireballDamage.CalculateMechDamage(), 0f, Main.myPlayer, 0f, 1f); - Main.projectile[proj].tileCollide = false; - } - } - } if (NPC.ai[1] == 100f) { @@ -1025,10 +998,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!NPC.IsMechQueenUp) { - // Boost speed if too far from target - if (distanceFromDestination > distanceFromTarget) - maxVelocity += MathHelper.Lerp(0f, 6f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); - if (Main.getGoodWorld) { maxVelocity *= 1.15f; From 4ac32b8c771748fa224000f295a15a37493bd116 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 18 Apr 2026 11:31:00 -0400 Subject: [PATCH 338/346] Killed Astral Injection death message localization --- Localization/en-US/Mods.CalamityMod.Status.Death.hjson | 2 -- 1 file changed, 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index dd505cfd52..a5f4d7807f 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -7,8 +7,6 @@ Armageddon: "{0} failed the challenge at hand." AstralInfection1: "{0}'s infection spread too far." AstralInfection2: "{0}'s skin was replaced by the astral virus." AstralInfection3: "{0} succumbed to their spaceborne pustules." -AstralInjection1: "{0}'s blood vessels burst from drug overdose." -AstralInjection2: "{0} couldn't handle another cosmic mana transfer." AuricRebuke1: "{0}'s vital fluids violently vibrated out of their flesh." AuricRebuke2: "{0} did not survive their brief time as a supercapacitor." AuricRebuke3: "{0} could not contain the power overwhelming." From 5e6b0f5bed7b149e88a01dd2e780cf2567fe08ec Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 18 Apr 2026 15:49:03 -0400 Subject: [PATCH 339/346] Lowercase of --- 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 e4447536f4..4c4f005201 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -659,7 +659,7 @@ EclipseMirror: { } FragmentsOfAnotherWorld: { - DisplayName: Fragments Of Another World + DisplayName: Fragments of Another World Tooltip: ''' Grants immunity to [cbuffplr:CalamityMod/WhisperingDeath] From d18e7400cd8fb1809f7648e5b1ffa0476ccfd2ab Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 18 Apr 2026 14:11:07 -0700 Subject: [PATCH 340/346] Fixed --- Items/Weapons/Melee/EntropicClaymore.cs | 3 +-- NPCs/CalamityTileCollisionHarmNPC.cs | 6 ++---- Projectiles/Magic/CosmicTentacle.cs | 9 +++------ Projectiles/Melee/GrandDadHoldout.cs | 7 ++----- Projectiles/Ranged/CosmicFire.cs | 8 ++------ Projectiles/Ranged/DeadSunExplosion.cs | 6 ++---- Projectiles/Rogue/AntumbraShardProjectile.cs | 9 +++------ Projectiles/Rogue/DestructionBolt.cs | 3 +-- Projectiles/Rogue/DestructionStar.cs | 15 +++++---------- Projectiles/Rogue/RadiationRain.cs | 9 +++------ 10 files changed, 24 insertions(+), 51 deletions(-) diff --git a/Items/Weapons/Melee/EntropicClaymore.cs b/Items/Weapons/Melee/EntropicClaymore.cs index 8316a87785..d1978f29e1 100644 --- a/Items/Weapons/Melee/EntropicClaymore.cs +++ b/Items/Weapons/Melee/EntropicClaymore.cs @@ -90,8 +90,7 @@ namespace CalamityMod.Items.Weapons.Melee Particle spark3 = new AltSparkParticle(partPos, partVel, false, 24, partScale, Color.Black); GeneralParticleHandler.SpawnParticle(spark3); Particle spark2 = new SparkParticle(partPos, partVel, false, 24, partScale * 0.6f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } Vector2 dustVel2 = new Vector2(5 * swordDirection, -5).RotatedBy(swingRotation - 1.7f * swordDirection); diff --git a/NPCs/CalamityTileCollisionHarmNPC.cs b/NPCs/CalamityTileCollisionHarmNPC.cs index 65507bd0af..9b18e6fe5d 100644 --- a/NPCs/CalamityTileCollisionHarmNPC.cs +++ b/NPCs/CalamityTileCollisionHarmNPC.cs @@ -136,11 +136,9 @@ namespace CalamityMod.NPCs { Vector2 pulseVel = -safeVel; Particle pulse1 = new CustomSpark(npc.Center, pulseVel * 2, "CalamityMod/Particles/BloomCircle", false, (int)(23 * MathF.Pow(scale, 2)), 0.6f * MathF.Pow(scale, 2), Color.DodgerBlue, new Vector2(2f, 1f), shrinkSpeed: -0.1f / scale, noShrink: true, glowCenter: true, glowOpacity: 0.8f); - GeneralParticleHandler.SpawnParticle(pulse1); - pulse1.Pixelate = true; + GeneralParticleHandler.SpawnParticle(pulse1, true); Particle pulse2 = new CustomSpark(npc.Center, pulseVel, "CalamityMod/Particles/BloomRing", false, (int)(18 * MathF.Pow(scale, 2)), 0.5f * MathF.Pow(scale, 2), Color.Blue, new Vector2(4f, 0.7f), shrinkSpeed: -0.3f / scale, noShrink: true); - GeneralParticleHandler.SpawnParticle(pulse2); - pulse2.Pixelate = true; + GeneralParticleHandler.SpawnParticle(pulse2, true); } diff --git a/Projectiles/Magic/CosmicTentacle.cs b/Projectiles/Magic/CosmicTentacle.cs index f1edf2171f..d129b88402 100644 --- a/Projectiles/Magic/CosmicTentacle.cs +++ b/Projectiles/Magic/CosmicTentacle.cs @@ -58,8 +58,7 @@ namespace CalamityMod.Projectiles.Magic Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.6f * scaler, 0f, 4, false); GeneralParticleHandler.SpawnParticle(blastRing); Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor * 0.6f, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.48f * scaler, 0f, 4, true); - GeneralParticleHandler.SpawnParticle(blastRing2); - blastRing2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing2, false, GeneralDrawLayer.AfterEverything); } Projectile.velocity *= 0.96f; if (time == 3) @@ -90,8 +89,7 @@ namespace CalamityMod.Projectiles.Magic Particle spark = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark2", false, 12, 0.07f * scaling, Color.Black * 0.85f, new Vector2(1.7f - (1 - sharpScaling), 0.9f + (1 - sharpScaling) * 2), false); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark", false, 12, 0.035f * scaling, Color.LightGreen * 0.75f, new Vector2(1.7f - (1 - sharpScaling), 0.9f + (1 - sharpScaling) * 2)); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (Main.rand.NextBool(6)) { @@ -113,8 +111,7 @@ namespace CalamityMod.Projectiles.Magic for (int i = 0; i < 2; i++) { Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.36f, 0f, scalingTimerMax / 2, true); - GeneralParticleHandler.SpawnParticle(blastRing2); - blastRing2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing2, false, GeneralDrawLayer.AfterEverything); } Projectile.velocity = Vector2.Zero; } diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index 630fa6b82b..e1f52ba954 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -316,12 +316,9 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { Particle spark = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark2", false, (int)(16 - Projectile.numHits * 3), 0.145f - Projectile.numHits * 0.015f, Color.Black, new Vector2(2f, 1f), false, shrinkSpeed: 1f, colorFadeSpeed: 10); - GeneralParticleHandler.SpawnParticle(spark); - spark.Pixelate = true; + GeneralParticleHandler.SpawnParticle(spark, true); Particle spark2 = new CustomSpark(target.Center, launchVel * 65, "CalamityMod/Particles/GlowSpark", false, (int)(16 - Projectile.numHits * 3), 0.105f - Projectile.numHits * 0.015f, Color.Lerp(Color.Blue, Color.DodgerBlue, 0.65f), new Vector2(2f, 1f), true, false, shrinkSpeed: 1f, colorFadeSpeed: 10); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.Pixelate = true; - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, true, GeneralDrawLayer.AfterEverything); } for (int i = 0; i < 25 - Projectile.numHits * 3; i++) diff --git a/Projectiles/Ranged/CosmicFire.cs b/Projectiles/Ranged/CosmicFire.cs index 6105c72c87..989ceead5a 100644 --- a/Projectiles/Ranged/CosmicFire.cs +++ b/Projectiles/Ranged/CosmicFire.cs @@ -60,8 +60,7 @@ namespace CalamityMod.Projectiles.Ranged Particle spark = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark2", false, 17, 0.052f, Color.Black, new Vector2(0.6f, 1.3f), false); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity * 0.05f, "CalamityMod/Particles/GlowSpark", false, 17, 0.027f, Color.LightGreen, new Vector2(0.6f, 1.3f), true, false); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (Time == 9f) @@ -111,8 +110,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 3; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.48f, 0.52f, 38); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } float numberOfDusts = 10; @@ -124,8 +122,6 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(1.6f, 2.2f); dust.color = InnerColor; } - //Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, InnerColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1f, 1f), Main.rand.NextFloat(5, -5), 0f, 0.1f, 15); - //GeneralParticleHandler.SpawnParticle(pulse); if (BounceHits == 0f) SoundEngine.PlaySound(DeadSunsWind.Ricochet, Projectile.Center); diff --git a/Projectiles/Ranged/DeadSunExplosion.cs b/Projectiles/Ranged/DeadSunExplosion.cs index 18d952eb85..06872fddbf 100644 --- a/Projectiles/Ranged/DeadSunExplosion.cs +++ b/Projectiles/Ranged/DeadSunExplosion.cs @@ -33,8 +33,7 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { Particle explosion = new DetailedExplosion(Projectile.Center, Vector2.Zero, color1, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0065f + 0.1f, Main.rand.Next(15, 22)); - GeneralParticleHandler.SpawnParticle(explosion); - explosion.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(explosion, false, GeneralDrawLayer.AfterEverything); Particle explosion2 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0045f + 0.1f, Main.rand.Next(15, 22), false); GeneralParticleHandler.SpawnParticle(explosion2); Particle explosion3 = new DetailedExplosion(Projectile.Center, Vector2.Zero, Color.Black, Vector2.One, Main.rand.NextFloat(-5, 5), 0f, ExplosionRadius * 0.0030f + 0.1f, Main.rand.Next(15, 22), false); @@ -43,8 +42,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 4; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, color1, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0, ExplosionRadius * 0.005f + 0.05f, 25); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } float numberOfDusts = ExplosionRadius * 0.1f + 10; diff --git a/Projectiles/Rogue/AntumbraShardProjectile.cs b/Projectiles/Rogue/AntumbraShardProjectile.cs index d35823a7da..120b2934d0 100644 --- a/Projectiles/Rogue/AntumbraShardProjectile.cs +++ b/Projectiles/Rogue/AntumbraShardProjectile.cs @@ -109,8 +109,7 @@ namespace CalamityMod.Projectiles.Rogue Particle spark = new AltSparkParticle(Projectile.Center, -Projectile.velocity * randVel, false, lifetime, 1.2f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new SparkParticle(Projectile.Center, -Projectile.velocity * randVel, false, lifetime, 0.9f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); if (Main.rand.NextBool() && !Projectile.Calamity().stealthStrike) { Dust dust = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB); @@ -127,8 +126,7 @@ namespace CalamityMod.Projectiles.Rogue Particle spark = new AltSparkParticle(placement, -Projectile.velocity * speed, false, 11, 0.8f, Color.Black); GeneralParticleHandler.SpawnParticle(spark); Particle spark2 = new SparkParticle(placement, -Projectile.velocity * speed, false, 11, 0.5f, Color.LightGreen); - GeneralParticleHandler.SpawnParticle(spark2); - spark2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(spark2, false, GeneralDrawLayer.AfterEverything); } if (closestTarget != null && Projectile.numHits < 1 && closestTarget.CanBeChasedBy(Projectile)) { @@ -221,8 +219,7 @@ namespace CalamityMod.Projectiles.Rogue } Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen * 0.85f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1f, 18); - GeneralParticleHandler.SpawnParticle(bolt2); - bolt2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt2, false, GeneralDrawLayer.AfterEverything); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f * (storedVelocity.X > 0 ? 1 : -1)); } diff --git a/Projectiles/Rogue/DestructionBolt.cs b/Projectiles/Rogue/DestructionBolt.cs index d7f5e1c37c..9b6affec5e 100644 --- a/Projectiles/Rogue/DestructionBolt.cs +++ b/Projectiles/Rogue/DestructionBolt.cs @@ -106,8 +106,7 @@ namespace CalamityMod.Projectiles.Rogue for (int i = 0; i < 2; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen with { A = 0 }, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), Projectile.ai[1] * 0.5f, Projectile.ai[1] * 0.3f, 15, false); - GeneralParticleHandler.SpawnParticle(blastRing); - blastRing.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(blastRing, false, GeneralDrawLayer.AfterEverything); } } else diff --git a/Projectiles/Rogue/DestructionStar.cs b/Projectiles/Rogue/DestructionStar.cs index f8aff95cac..7a12927668 100644 --- a/Projectiles/Rogue/DestructionStar.cs +++ b/Projectiles/Rogue/DestructionStar.cs @@ -157,11 +157,9 @@ namespace CalamityMod.Projectiles.Rogue float bigExplosionDamage = 3f; Player Owner = Main.player[Projectile.owner]; Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen with { A = 0 }, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.82f * sizeBonus, 11); - GeneralParticleHandler.SpawnParticle(orb); - orb.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb, false, GeneralDrawLayer.AfterEverything); Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.74f * sizeBonus, 11); - GeneralParticleHandler.SpawnParticle(orb2); - orb2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb2, false, GeneralDrawLayer.AfterEverything); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * (big ? bigExplosionDamage : Projectile.Calamity().stealthStrike ? 0.25f : 1f)), Projectile.knockBack * 1.5f, Projectile.owner); @@ -187,16 +185,13 @@ namespace CalamityMod.Projectiles.Rogue } Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f * 1.3f * sizeBonus, 18); - GeneralParticleHandler.SpawnParticle(bolt2); - bolt2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt2, false, GeneralDrawLayer.AfterEverything); Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f * sizeBonus, 30); - GeneralParticleHandler.SpawnParticle(bolt3); - bolt3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt3, false, GeneralDrawLayer.AfterEverything); Particle bolt4 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.LightGreen * 0.55f, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f * 1.35f * sizeBonus, 30); - GeneralParticleHandler.SpawnParticle(bolt4); - bolt4.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(bolt4, false, GeneralDrawLayer.AfterEverything); for (int i = 0; i < 2; i++) { diff --git a/Projectiles/Rogue/RadiationRain.cs b/Projectiles/Rogue/RadiationRain.cs index 5938658b73..7a7740025e 100644 --- a/Projectiles/Rogue/RadiationRain.cs +++ b/Projectiles/Rogue/RadiationRain.cs @@ -45,18 +45,15 @@ namespace CalamityMod.Projectiles.Rogue Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, smokeColor * 0.7f, "CalamityMod/ExtraTextures/GreyscaleVortex", new Vector2(1, 1), Projectile.ai[2] * 0.45f, orbScale, orbScale * 1.1f, 12, false); GeneralParticleHandler.SpawnParticle(orb); Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Chartreuse, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.8f, 0.4f, 18); - GeneralParticleHandler.SpawnParticle(orb3); - orb3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb3, false, GeneralDrawLayer.AfterEverything); Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.4f, 0.2f, 18); - GeneralParticleHandler.SpawnParticle(orb2); - orb2.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(orb2, false, GeneralDrawLayer.AfterEverything); for (int i = 0; i < 2; i++) { int dir = (i == 0 ? 1 : -1); Particle pulse3 = new GlowSparkParticle(Projectile.Center + new Vector2(20 * dir, 0), new Vector2(10 * dir, 0), false, 12, 0.087f, Color.Chartreuse, new Vector2(1.7f, 0.8f), true, true, 0.8f); - GeneralParticleHandler.SpawnParticle(pulse3); - pulse3.DrawLayer = GeneralDrawLayer.AfterEverything; + GeneralParticleHandler.SpawnParticle(pulse3, false, GeneralDrawLayer.AfterEverything); } for (int i = 0; i < 3; i++) From 9b61912513a4ace6c3e9a072d048bf96e50e7162 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Sat, 18 Apr 2026 22:53:17 -0400 Subject: [PATCH 341/346] May as well remove Meteor Staff's shot speed boost too --- Items/CalamityGlobalItemTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 926751fd9f..6c3f6d090c 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -156,7 +156,6 @@ namespace CalamityMod.Items { ItemID.Marrow, Do(DamageExact(60)) }, // VANILLA: 53 DMG { ItemID.MedusaHead, Do(DamageExact(75)) }, // VANILLA: 40 DMG { ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) }, // VANILLA: 200 DMG - { ItemID.MeteorStaff, Do(ShootSpeedExact(13f)) }, // VANILLA: 10 VEL { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG From 3963ea99ddcf6a93349c1a20b8544fc6e3ca8adb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 17:32:30 -0400 Subject: [PATCH 342/346] Rev FTW Brain inherits flipped gravity in phase 2 Also fixed blood scythes not drawing in reverse gravity --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 2 ++ Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index a41c9c6511..f011ff78bd 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -352,6 +352,8 @@ public class BrainOfCthulhuAI : VanillaAIOverride NPC.defense = NPC.defDefense; NPC.chaseable = (AIState != BrainAIState.IllusionDash && AIState != BrainAIState.IllusionTrick); + if (Main.getGoodWorld && AIState >= BrainAIState.Phase2TransitionOpen) + NPC.brainOfGravity = NPC.whoAmI; } else NPC.defense = (int)(NPC.defDefense * Phase1DefenseMultiplier); diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs index 93eef1ad99..083822adac 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs @@ -91,12 +91,9 @@ public class BloodScythe : ModProjectile, ILocalizedModType public override bool PreDraw(ref Color lightColor) { - Main.spriteBatch.SetBlendState(BlendState.Additive); Texture2D tex = TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition; - Color drawColor = Color.Red; - if (!ChildSafety.Disabled) - drawColor = Main.DiscoColor; + Color drawColor = (ChildSafety.Disabled ? Color.Red : Main.DiscoColor) with { A = 0 }; for (int i = 0; i < (CalamityClientConfig.Instance.Afterimages ? Projectile.oldPos.Length : 1); ++i) { @@ -107,11 +104,9 @@ public class BloodScythe : ModProjectile, ILocalizedModType // DO NOT REMOVE THESE "UNNECESSARY" FLOAT CASTS. THIS WILL BREAK THE AFTERIMAGES. float interpolant = ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(tex, drawPos, null, drawColor, afterimageRot, tex.Size() * 0.5f, Projectile.scale * interpolant, SpriteEffects.None, 0f); + Main.EntitySpriteDraw(tex, drawPos, null, drawColor, afterimageRot, tex.Size() * 0.5f, Projectile.scale * interpolant, SpriteEffects.None); } - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - return false; } } From 24f1a4830362ca06d209a23d649e7f5ac4f98d1c Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 20 Apr 2026 11:33:01 -0500 Subject: [PATCH 343/346] Requested Fixes --- .../en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 7 ------- Projectiles/Rogue/ProfanedPartisanProj.cs | 3 +-- Projectiles/Rogue/ProfanedPartisanSpear.cs | 1 - 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 3896c3f79d..12aebc932d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -360,7 +360,7 @@ EclipsesFall: { ''' Throws a javelin that shatters into fragments of primordial light upon enemy hits If more than 20 fragments exist, the oldest fragments will seek out enemies to attack - Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments + Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration], gaining power based on the number of fragments [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall [ceffect/darksun:'When the sun goes dark, all will know terror'] ''' diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 0d30035773..67c7ae2fd4 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -37,17 +37,10 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 3; - Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; - Projectile.scale = 1f; - } - - public override bool? CanHitNPC(NPC target) - { - return true; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index cdf91a2dd2..9566169f98 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -162,11 +162,10 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = ExplodeTime; } bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); - int splitType = strongSplit ? ModContent.ProjectileType() : ModContent.ProjectileType(); if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 76b9fae7af..ae6f980748 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 5; - Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; From 3dc4ec6f69b24e448d478cdb8705d40f931fd12e Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 20 Apr 2026 14:55:46 -0500 Subject: [PATCH 344/346] Profaned Partisan fix oops --- Projectiles/Rogue/ProfanedPartisanProj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 9566169f98..c223a5504f 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Rogue if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); From 54279b77e0cd8736fee14b669e846e08ee54cf8f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 21 Apr 2026 15:02:58 -0400 Subject: [PATCH 345/346] Dao of Pow and Flower Pow stuff --- ILEditing/BalancingILChanges.cs | 26 ++++++++++++++++++++ ILEditing/ILChangesLoading.cs | 3 ++- ILEditing/VanillaStupidityFixingILChanges.cs | 9 ------- Items/CalamityGlobalItemTweaks.cs | 3 ++- Projectiles/CalamityGlobalProjectile.cs | 21 ++++------------ 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 2e0e15714d..79d59de031 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -401,6 +401,32 @@ namespace CalamityMod.ILEditing } #endregion + #region Flail Balance Changes + // Make flails be unaffected by player velocity + private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self) + { + orig(self); + if (self.ai[0] == 1f && self.ai[1] == 0f) + self.velocity -= Main.player[self.owner].velocity; + } + + // Increase Flower Pow's return speed + private static void IncreaseFlowerPowRetSpeed(ILContext il) + { + var cursor = new ILCursor(il); + // Move to where Flower Pow receives its specific flail stat changes. This moves it after num2 = 23f + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcR4(23f), i => i.MatchStloc(6))) + { + LogFailure("Flower Pow Buff", "Could not move to Flower Pow's specific flail stat changes."); + return; + } + + // Emit an instruction setting num5 (the return speed) to 21. Vanilla is 16 + cursor.Emit(OpCodes.Ldc_R4, 21f); + cursor.Emit(OpCodes.Stloc, 9); + } + #endregion + #region Terrarian Projectile Limitation for Extra Updates private static void LimitTerrarianProjectiles(ILContext il) { diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index d5fb8e25e0..91b569a05b 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -106,6 +106,8 @@ namespace CalamityMod.ILEditing IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling; IL_Projectile.Damage += VanillaBossResistChanges; IL_Projectile.AI_099_2 += LimitTerrarianProjectiles; + On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity; + IL_Projectile.AI_015_Flails += IncreaseFlowerPowRetSpeed; IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs; On_Player.ConsumeSolarFlare += SolarWingsDashChange; On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable; @@ -150,7 +152,6 @@ namespace CalamityMod.ILEditing IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements; On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; On_ShimmerTransforms.IsItemTransformLocked += AdjustShimmerRequirements; - On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity; IL_Projectile.AI_061_FishingBobber += WhitelistVictideBobber; On_Player.ItemCheck_CheckFishingBobbers += PreventVictideBobberFromJamming; diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 8b11dcb9e3..3c04413d31 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -318,15 +318,6 @@ namespace CalamityMod.ILEditing } #endregion - #region Remove Flail Throw Velocity Being Affected By Player Velocity - private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self) - { - orig(self); - if (self.ai[0] == 1f && self.ai[1] == 0f) - self.velocity -= Main.player[self.owner].velocity; - } - #endregion - #region Allow Victide Bobber to Exist private static void WhitelistVictideBobber(ILContext il) { diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6c3f6d090c..a9f8fbccc5 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Items { 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.DD2BetsyBow, Do(DamageExact(42)) }, // Aerial Bane. 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 @@ -116,6 +116,7 @@ namespace CalamityMod.Items { ItemID.Flamelash, Do(DamageExact(36)) }, // VANILLA: 32 DMG { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL { ItemID.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed + { ItemID.FlowerPow, Do(DamageExact(80)) }, // Displays as 160 damage. VANILLA: 65 DMG (displays as 130) { 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 diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 27cf467b25..ae36681da7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -3876,20 +3876,14 @@ namespace CalamityMod.Projectiles } #region Flail Extendo Hacks - // Very hacky solution for making Dao of Pow's flail throw travel farther and faster + // Very hacky solution for making Dao of Pow's flail throw travel faster if (projectile.type == ProjectileID.TheDaoofPow) { // Guide to ai[0]: // 0: Spinning. 1: Being thrown. 2: Return after throw. 6: Dropped on ground. 4: Return after being dropped. if (projectile.ai[0] == 1f) { - if (projectile.ai[1] > 0f) - { - projectile.ai[2]++; - if (projectile.ai[2] <= 11f) // When ai[1] reaches 14, it starts returning, so this makes it take an extra 11 frames to return - projectile.ai[1]--; - } - else + if (projectile.ai[1] == 0f) projectile.velocity *= 1.33f; } } @@ -3911,15 +3905,10 @@ namespace CalamityMod.Projectiles { if (projectile.ai[0] == 1f) { - if (projectile.ai[1] > 0f) - { - projectile.ai[2]++; - if (projectile.ai[2] <= 5f) // When ai[1] reaches 12, it starts returning, so this makes it take an extra 5 frames to return - projectile.ai[1]--; - } - else - projectile.velocity *= 1.33f; + if (projectile.ai[1] == 0f) + projectile.velocity *= 1.25f; } + // Return speed is also increased using an IL edit, because why does it have a slower return speed than Dao of Pow??? } #endregion From 03c85b47c293b3aba6009f956edb6d6c4bebf4e8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 21 Apr 2026 18:48:35 -0400 Subject: [PATCH 346/346] A very Critiqual operation --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index 7c80aef75f..99b52e7168 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -61,6 +61,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Cooper", "CosmaticMango", "CrabBar", + "Critaquil", "Dandy", "Dia", "Done",