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/107] 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{^B~l?v_EK+u?C_#*|{`*m3?Dxt*!WsK>_ZCH}i+ z&p)ixd35hO|8ahQ!Jll;crRB#y%<4_*Es`n$>5Q3zO8hU4(Q4R$hLWh9`&HgF; zq~Xbs7e*bg!JSxBE+Z+sK(#E3n#$-WAH44Qc}cb75(JnmPRR}^vz4RT!B2=&bX<_^ zEZo_%)qXbDSHj#_q7%PeC(rkY{|f2HKF=Au0CRLx)}xz(PZ+X6x9oHy!OG_mXsjo; zKzxkdPDwni*=J>Okqa3f8Y&&yqHXF6%}~g{fw}~2ZN^E$ZryUR5S`Pu@+O;1@6@3i z38PLlLTf6QtNyR(>q2E(nO|?@GyK>r>2wBNk}%8xdY%c)D@Gq|#qaz%_duO_w||5* z%rO98?0LI&a3E`gy&?;Qd4)ku=PIWJGa~81AgGQo(;hk-jYLMRdAbhaTOoQM$d`3v zwgcvAGeHeg7pv`4zi=WDwC6)K=21g^QrZ+zc2x4)f!$R2O{L1XVy z<(R!3KEj4bIKM*Wl+T-r#l5cZ4p;TzbN`RZN4ohYQkNs3SU_{`8q~Q;llXfSTY%Xg zI^C9zukb!GXO`E-)b60Jqoa6$h{yQWeBfz%#6(abVI!@iUCN?ta;MrBOuqHwTUTk* zEdKzz&z5Z=YY(gkVP?s*(NY47Koc&h2+f@`43g{|2EGG)5FVCr2i$IRHKYmljF~ES z+DUwR?E|uHw|CstHC2ZmzpQ}y4hLdI4NulOvsd*b@^_%)Mdt*r(GXUs>Ct3)J=KcKjs>ivm46~4s&E&5h=2RniemlpTJ^; zQ^3MUr69DWKT6xrkiz%>rRi^hDn&)L=a4BthJ>l{e)kA<;J3H!g?eHs8c*5?#AJMV(Hl4g178 zI4PjKn%-y7M38b+JF{GEtmf7(E`(L3-0Qy?wBh;R+VPLQyCmu zm-v$ZOG~A5T^e;W!Stm;NEcfie=ZwDUUEEGkKzDsigxH?<-Obf3-|mMngVW%$drTc zCpf4Y0E2}E)3uaWR*F2BODCrrC<4p{%Y-gm<&U7gY2BRB@f?Q?~8W_3Lvp%qY@XAyTL;C zUmF`PzAHutS(cBy{63y@10`6#tK&YumpqcTRhr@8&u=Z14n{qHlbUxGR%qKCJ%R(d zyD1b4fc$U2l@$kvn!O5NW~acOo?9jOoIj`+wYZ!9r=nx~dqNkqSN`&4{qt0LPYEQ? z1hRC$z*;Ya3xm8i*1&ZoTloc1Oi<*-LgU2gdDEg45fAKV@&#qIGMhMRe?%otiC3?j z?CWOI`k}bxhQNs2JM(%9=KMTiC}ylN^;;z4W^G}8~0 z@$#?b!+PFSurWz|*4z6j!yBNcvQdf)*JrM$a50kh(vyqnjiHEKIY;uSOn(`lu3ms& zC+t;G3Vvg2J<z-MO>-X^S;KS^Hjm+aYNrbompcoGtQsrcrQjIs7j7e5H)7rs5RtYKT?Wj-%X^#v9d=^goZAGqyZE&DkoWbg%7`dD)1~tj+oB zo}LwvDnDbP%`yt_>3Rm>uHxxVwg~-C71Os3Hz~cFh9R%TPE#k&6mt7g6)Vl=i4W^1 zCu`PB&wCh1g(?^Ti&&$=gtrEmf=vw1-`79cu@qGN3lKN|YEa7=tO1jGM&2xOy8P@N4s63Tv^ez4h3W(4Okz7<-KJ%W<{#DG+-u z>oe@j0U*n~0%a(9$$l^mV&$QXFJEoH%mtB6TDjR=I&%7l27gJ3Od5coF_5l5bC1Z! zY#!7BC|WZ#S1l7Pz&(;-<^!(UsJ9o-zvU@~a+>(>qss=IGvhnd@U9h!E{jh7JZ5&6&m z^yNVEROO2W1R0z*~KotCrG1``w~icsPKq#6N3s|a#2GrZi+g1~dxM;RYcipH66U(!omIRzQBufMq zzkD^cxk)w?A$21w#;DobY?d}Mkj~u(#MUDgt#Y?kKU0aB3-3R zcfgT>521|_kKCz@^EB6Z-)!Xld=@Kyzbfv{7DH0ON3rdp+g?T563mJ$F2f372O2@{ z$4w{-zjDi2iU%)iSN|Fm8DsdX>Av3MwYi1Y>ksUA`I)a}~Xbro_ZfBP*K9t@X7o&#h*&ne+FzLdpj2(BHAhIA+u%Y*aQH#+qYrF*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 a7dab91b2c53c0bb11f93c393f8a9b3508c11a72 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 28 Mar 2026 12:47:02 -0400 Subject: [PATCH 002/107] 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 003/107] 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 004/107] 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 7be4976b744aa6070be30ae70dd0a2044e056612 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 29 Mar 2026 17:03:38 -0400 Subject: [PATCH 005/107] 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 9f16e5ec107f5a1090d60ed46de844b61adb90bb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 31 Mar 2026 21:54:00 -0400 Subject: [PATCH 006/107] 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 007/107] 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 491394c4c942203b05bd79b71f6b8635834b7256 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 1 Apr 2026 12:28:28 -0400 Subject: [PATCH 008/107] 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 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 009/107] 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 010/107] 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 011/107] 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 012/107] 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 013/107] 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 014/107] 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 015/107] 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 016/107] 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 017/107] 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 018/107] 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 019/107] 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 020/107] 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 021/107] 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 022/107] 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 023/107] 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 f7ab902fcbe2ab6be0140c2edc00faaa7544ffa2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Apr 2026 20:50:03 -0400 Subject: [PATCH 024/107] 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 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 025/107] 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 026/107] 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 027/107] 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 028/107] 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 029/107] 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 030/107] 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 031/107] 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 032/107] 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 033/107] 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 034/107] 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 035/107] Fixed natural Draconic Swarmer localization --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index da3390cf62..ac7691f508 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -190,7 +190,7 @@ Stormlion.DisplayName: Stormlion StormlionSentry.DisplayName: Stormlion Sentry Sunskater.DisplayName: Sunskater SuperDummyNPC.DisplayName: Super Dummy -WildBumblefuck.DisplayName: Draconic Swarmer +WildBumblebirb.DisplayName: Draconic Swarmer WulfrumAmplifier.DisplayName: Wulfrum Amplifier WulfrumDrone.DisplayName: Wulfrum Drone WulfrumGyrator.DisplayName: Wulfrum Gyrator @@ -561,7 +561,6 @@ SeaKing: { } } -WildBumblebirb.DisplayName: Wild Bumblebirb DraconicSwarmer.DisplayName: Draconic Swarmer Dragonfolly.DisplayName: Dragonfolly Shoreskipper.DisplayName: Shoreskipper From 22137fd14f97f3d99a7ef0852cae8f8675e5297d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 5 Apr 2026 00:47:51 -0400 Subject: [PATCH 036/107] 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 037/107] 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 038/107] 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 039/107] 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 040/107] 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 041/107] 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 042/107] 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 043/107] 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 044/107] 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 045/107] 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 046/107] 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 3b3a3c3d68eb71722199dfc88cddd098cc67e1fb Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Tue, 7 Apr 2026 17:37:20 -0500 Subject: [PATCH 047/107] 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 5c3082ac5c0bd278e5c6d7920a4bdadde798ee61 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Tue, 7 Apr 2026 23:14:21 -0700 Subject: [PATCH 048/107] 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 049/107] 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 050/107] 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 051/107] 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 052/107] 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 053/107] 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 bfe8a355a8db115a3aa916e4fdbf1cdbb19fa03d Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 14:54:09 -0500 Subject: [PATCH 054/107] 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 055/107] 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 4d2243de1f4698c3b93f7aedbd72ce6099bd398d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 Apr 2026 19:34:41 -0400 Subject: [PATCH 056/107] 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 057/107] 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 058/107] 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 059/107] 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 060/107] 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 061/107] 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 062/107] 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 063/107] 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 064/107] 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 065/107] 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 066/107] 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 067/107] 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 068/107] 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 069/107] 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 070/107] 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 071/107] 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 072/107] 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 073/107] 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 074/107] 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 075/107] 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 076/107] 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 077/107] 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 078/107] 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 079/107] 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 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 080/107] 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.png b/Projectiles/Pets/StarSwallowerPet.png index 275fa4ac5d77d8025b299bb51653fccab09533df..d3812caa71294808eb77d645b9fbb853d9edf1e3 100644 GIT binary patch literal 2798 zcmZuz3pA8l8=f&nuG7pAbuf&+k!z8=90sGA&n-rE*JW?XWq zh$Ip^&X7nhDbo=rq6i(LT#iov*XdvXTL1e0z1H6E-ru|SyPo~L-@Bj9a&sliN&h4b zgTdrL3W*9?V;D^Ap(FyD<^3M+02z2Jm23yAd8RT8EyROuU2I{nx*VC!qey6N<>q|Q zVV9a3R#rCR=uwh2*%|<{4(!k8vWI$wO4L11K9FfhbM=8|=V=_ZY}86-7A`3xlD4``+P?BP#=8Fll9wWP9*5 zZK05L@~t_VG`*9x5WY8i_1m|2caK~6cu)LIDcO2|#FcKv>o;6j^GZEmR%$WNKd}n7 zyIp{nuld$P-+&+Cb-MXO#^;j7 z+<#e&QuaM*KNDu$!P||?K#gpfZ0OFT-RN40dQf4b{}#RPs=Q*0c+S$yNNv`Wy|8mi zt$f};OhAK;8!n_5e?ME2Q9>ui^7>ot*U%0`PQJ_y;4-piD+w%n5CKkh1%}!d((eMa z+E{RkG=`u)HU&$NAeME=sRUUkm0$)27?I-tS~CC!>0bzSN-IUcvpVx(fTbv`adVX8 zgxGRPCR34J9$?$`DV*Kha+*+NG4L)#hB!CE+eqG;ak|2^kTNs1#LDmWYP8#?3y?2D}ES zWL>~e+ypvOoi4z#ye+L-v$bqOz!gnfiDz#1I_;6ncMW|hlm;94|BW$)x+$x5fH_wc zt!mAcxe5fU#o=?$8B5TShy0s?l~l*p{ZEnJ1qNhaN}?Pl*Wdo^a=q#cvtu}JP|8K& zkr$_biW56Ndll_~w#(8?S_-G^aCkc1mnN#SY8}?;(UK3WcUq6f2Pi0q)dm_LOHxP^ zO&`G!O6QN$9~73bGg30}_wI0o<(eDlUpFi4v{^Gh(dsX*hz*<)@Z2j265Ie}bXalx zqVcz#R?^X8a5~Fq>q*+dY1;sFMbCXR1;qI9M0zRm3Ju*`pm<#2k@0$-yysSC`9g9# ztE}{1msb zMx+K+9Y3X#qw_kNA`{}ZJ#g2FYw6d1N2hsOX>Wgx)nHQx5LCfC^*wk(5BwEEgDF8F z`0+mg&cTVMC`0guJI&P5yYu#zGL-h^_?6VK0HU@jKM9LzV)V2!w+r#lN{V*rC5QW; zsou$Ud{3=3kKZl7f_H5@A(*`GKPO(wW_*Y_b3QnjQlT?^8^dv%IPf>M(lmaU9v3!Z zckiZ!;)-)+g305I#&l_4@g||hfRSL5P)@jlV`E7doCE>l0$I~Q+ajB{_EdOr z+bxUN6<^n{N^-CBrk-YwSp}fQT%u#(x&3=~qV)Y1@6Nzq{3wk6G=n44WN!pPy3X)| zQ&nl9DCXuL`WO2Wm@=!x`t0h(@DG(z?$MQ{KF8k(!FX@Y8GDW}#vSdMo9%^;SD5q` zlqw44M{kuX2F_I?O`!f_CPa;?vFt;>8m2b0blNIvF4CL)YFkGDn)dPSk`K98TT=pW zviocJtXBD{x?4f^qn6dTW0*pIuw`|pT}QZTDiin#ueR{nG~16c08 zj|}g5h`hQt(l!%et?*oH*_6R82pp%2Fso;;JiUf?NSup+bJnfVoo0SzPT}L*+$BXu zSIL2T67D00>D;~jU9q`2w$27ljYD|8_6;RK+~rem*Rp7LW`JzRN&Ix*#^&aSDc-(o z>JkScUj?eR^3TBrw^Xy>)75^cjC)bX-aDb9zBLv76pB6@D(2jhv`2yck&}`dK|8of@{8f69na^RAqAeY0<1 zVuM(y7(W~M;&@_VSEB7BQT`PkDwW)#w%n**?wOE=n@)(Xw1#S(sGTe=Of~ppT~EW! zBI5RzvAr4tRBUtEXT4Ch-#H}B^(?^4jVF9K(5%aXB#Tl7V)Z2>rJH;T+6(G;a4t!E zRQ%~!B6W0i{gT2>!eEAa>7xNk*5GCp;KdF+sJ33k5yHfGbb`0IB$-L1ZbUVYBolBU z1M=dbdp^`X&-EVQg*I@)>Ql6NV|;S6uS#{!KXhIfi>COWut2}Wq?&)Fie9Fj+<{@5 z1sM+BOu|mF|J>3?xNJ$BSBAs^)R>k_m-p?UKG23@YP)lo4LXpftR;9PkjsIBfr+U0 zWnI~7!XRUjBUs%0z}JE9WWBacyM7(e7~dLF9hnPcsMGXvA;}qb7ndMHo7e_rzd+H- zY(-iu#e+Qx$%h?FkeCK2EH~hlTq1Y0Q?T(P=i2B@@kSovs49l}yjF;4&y(w2#PfnF zt`-vr2&WV{mJc|Y6#N1P$TPZ55`rqYB`0>>BugDLf{ z6MhhpY<-9T?z^!&CbFgf7R5~kroEWA3ij^di%g;({0P=?k>?V-hQ3$IB~A8IvxrV0 zX@|qIF9hd8Er1~?ch`IuH*EC2COfQtHLL%*kP zT!AltM4x5K=yI;2LRr+vSN>%7mIZliO&_<1LHoS1`b_P2}+J=)(W8l>?MmT+F}Y3o$cpw-zPwLZYhr{29Aju z)gMlELDRDI2mctQh}Y1!ADL|O-0ou5s888GbQAjbhSbA-k{kHc8;f@#luSMW%B@20 g$$`?>&lrCrp0w2LOVO^Ggx-!Y(7}~dW9Lu*7aJ(-X8-^I delta 4511 zcmV;Q5n%4_6{aJQ77GE82nGNE0O5i|r;#Bae-SoGL_t(|UhSQIh#l1##y83C-u=pE z*L61^y5>VMuF*z}V$oXBf>f|Av?`RAmbO@me+ae+tx};awtq-#X+dmD3oS^&Siuiy z5mZ#Pl^QYF7$Y%>N!(;N8*_KFyV=d%Xz#pdp4*vc=e;v?_wLPh=KaCty|X)a?%eat ze|zT4InSJFG7Q5o48t%CW06?q$9ZgCzh2_h^t8k?XU<5RJ$+gt=lav0t zXwK>C^50b_Zad5Um>K3N1Z7qa3`iUq9sR_M$BrMDWw3f+jeK_1%1&86Q7lHT*V5c9 z>y_r_WSQx1Ym?a4+$?c)a#FU#40LtLe|FwIdQ_G*va67$%*{95B+Fp;`@<3seekYC z!0SEt!V3~vv9c2KoilTDAtf$bv&Mht_|le55}(?&PvZE@jC^kA;lr}5k$r{Agp}E` zZL7pbrK&Re^cVqkGhin#??+iRtP|m4Sp>Nwys&_f4_5> zLVj%8;FnmTPzWh>=Uv~C2%yle9Xll=ryhJlLetg#_eos)mAfVO>?lfvQaEpY_lnID z!Oo-O5}^>5pWU@fV!1YyeLXNXCd(SxS7^dN51=FgEB1#+{wNU&O&!=Rao<(F5-%Tf z+q>aG(8Ce|D+E}X0J5+7e{Csn4sq=S#klqZsP&)-;9Pt2%~vI&mc#i5pjP|O z|5^lUC_e8k^@}tn;`b%U1pkyE0zFi_p66vUbhin0QLe_IUr93KGz zD*Nb>-&$_%Ip;{6J$+gf;_DN%iZ^z5M71vP|FmR3hg$spv69~_!`J?t6DalH z-FbsV@TX_?NQ|rPv|PpZSNd0~CuiJIk>6SlXtf>AGZ9ykLNGsqM4V3|i8~TH+S_Gc z4<9=w%NqGnh;s=*32u`?!K69EpGOWsAy8>EmP)d(dxooDZ)IO0f55qf76D2OCCn`a zt%bljhR@&sxoaijb5~xzQR10nA4xnNs+sjf?*hjVHk$- z|4YMK+i|VrdXb-ApPnAq2T&{?kGx{->go=Cc5-qea=kc5V^WeToLz-53ckF#AaP`5 zSV|n@I80#NM&R|df04M()>iq>zK#xAKInT@8LT&z(p{W=g~~{Y4U+#L&d~@GjFk$S zqmldbfc5$$buh)F0r!!Y zk$ru6?_OEZ$i6~7tK2a>eDrAK`QdA~-!8FHj>ZdmdSoAQe~(0d6-w%8L~X@NnWJ%$ zs3@fQ0?s)Ah2k8I4?h2zM9U!!uJszt&_JK;6i+*5*BpqgG|Jf3J|{J=OZv0RJCE^liuHZ4|lf zQ>c^{lxgo+De=_wNl|8y{0D$Xt2Os9uh&s1$ahZ9&L-{W3n`l4ez~NsV0JQM6kD6; z6x(5?csvMbqZT&fMN(I=HqYtSpPrQX&<($k$gW@p<4Bsn0l-rIy~< zA$Kk%wJLy8*KZt@eSPX}*Q(dZu0jAx;hwjNnHfG7Q5o z48t%C!!QiPsD*jGKK1V9N!nXeFS6S&2W2#$Hh{CR(B@{6J#iv>F5z0|2wte7*;6Q~ zPaE*K&Y4IB+*EO1)3`Po zz;@$2u4vO~zPU^*1VTyylpx?*e+#fPF|DH!)aq=^o6-^nCIfaa+j+#SppijJe)wvQ|S}LO!5@%+n zB_26)NTPP^2j+2zB<{{)Ci}G~Bf}btP{du6ze^DD@$h|z;ygm`< zA&}1;swf1`ztKHUwba`x3Vr?VPFY4tqxQr32esWB&p$5_GcN%ie`^KW`A4hWfGMOY zbjPKx1pyzzJ@?)t5oj|n@u<0WJ_5Do4#>Vj>xM3nxN>@#C{*0mBg?E5JUwV-!*Qaa zjmYuy@OWIv+H!uZ^uzV`y7L5_ia2k8zx>e~@MZONss&M^eBO%i$%Vd) zpPkGK1LP{^(2DC(&5uG%TrJ40?!Yk)LM4gqVZ5l-4cIjmr>7&20M0eckUrsW&lCbl zYrz1a??6d1f24C6bkN6G{B?erVyx73r3mQ7dUR0BL78>kuCIJ}Vk-2x@tGO<+@WIl znJY7Y4pV0!p_EWp|Nkr>nldPP9#h3Q4*nnK#_IHy`qbLhvfS6zE!*claVS+*CZrIEQ!4ukl?f?>(Sdro zvG`sGhI6S*Wgk6Ep)!#Q#ksNI>pAkb-$=aqhM!9WP)Zw5Vz^faAehxLtjb&b+goJ**N2A#cY<5z`B8|ES%71geQ=xuOciCY5AwZ0+n%-^^w4Hsp*SA`D+5^3 ze=0ds`OYZVVN!+2?POOW5XdD^wWJbwd_d^Ca6N5)u|iA5b7~4TY6d{$B9!44M}+4zQ7&a)p|$=@<#3X)=LU{Ouvnf` zD8@Ngrm9leS18b5CJJ5r)z8ZUXnpZ57yaktEtcoBN^K`_?+}#ApF*0m@x8zPL!x$l zQ!mdc(0Yf;$ZyE6Lg)iP&fL-~e}A4gZ%@5Fr|iFjLO2rmiq;eY_4b_d=XgELi3MzK zELI4hHjAib1U}~DJg4j}2#=~Jg9LK%>K zg+PQ-ATqaben{&%t@1sQup&%;6k^immU&L=L}GGWG{`RMo?Q5glab#B^ zI2vbXXC+QdPD;sPd}h%16970o;{HF-@9vS98h5@0R)l@r3!Qg6`wEo_l^{x<9gKYM z1N-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-$CeG>evwx_PpEyx*71kErYiaVQ<6H5 z!MG#AFBpsUv{y({N4JMBfi)v6LYhM`_n`f`1EatfVb}d)hrBdAODF-}6Pq)IAIW<9}WOa2Da&2}i$EPt(8eJvpb_eqbjdK=~4i9*AJA z5V%3)NA_lrL*yWaN&X8^)RgI-s7s@usAq?#YKCp({b08n!l>QgEEyX}0>4H*t@46` zv-SL+*bUe_I`!BtiUTMSd~w+1Y(x~lc=t>maS{hIVShWpd58Iq;jxH_5(CaU3t$s1{6kxvyDj+LdKUGKkYLIMNOu5kn^o%f5!HE%jkQw zz4Z7`g5z9x8qM&2d9qhdoWS1Kd(?nLmV2GQCtv_D*Ic60fPFrUy~C>=0MbtUR;~|F zBNwzS-0|O>l#Y361P+$@hEtUuR$u>f$xDOA3(B^$Jw~KdjYN%n{`|}_GS=2eS2e9% zUzeFZ&bpETP49Of3j-Yx35EIO0-}0YjN&_=9IbSJ-&Y3|DKhqw+`Lzv3vI?kPm`E& z`C&_d=$+;woH6#PQeSNB*xCBKcL+R;dJl!32Lwj5mF=t-p%GLijiL{hkBaCX@1b*n zb0vz*3n5cZ7SBLf<@!kdh1AmlT5>jQNs2qN#T6V{ ze-he&HMn~mCG+qX#0~HltPBmf82I@JnANmMa;D;hsHH%Y-yoF+6jiri5wW@a`_Y4r zY3t^Yp4^WHu!B`olp{n)BHc7jR?4UIC6{R2)qsJ&<&bOS;6(0&GOtZxg&q4PLX)qsV?wn0r`G3FUBK6iKCG_fk@E|QX{%qKk`IeGU=(K0oVf8En4=#xjcJ#O ztFat;Z;1j$>3y3%#CsV8RcB%m&q7gcU&aiZQx>ja3RReYh<-d z;v5POluC`2TpxQ}{8%~GE@Ve{0x4L-h$+8k6562*L3=O*7pfop2>5|06mSgbv zrMPzvqs*S{e(Uu4l@DbORmuWwt=khDtiJv07l;F@^8@yiPrmAO%(x48J1Hur7f7X( zpS~p?HLY&kt)-)@vb|-oAWGYGaw7M%22Z!@!66+?Ra(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* 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 081/107] 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 082/107] 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 083/107] 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 084/107] 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 085/107] 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 086/107] 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 087/107] 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 088/107] 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<3M+0#S^0BhQs7nqdKg-$CeG>evwx_PpEyx*71kErYiaVQ<6H5 z!MG#AFBpsUv{y({N4JMBfi)v6LYhM`_n`f`1EatfVb}d)hrBdAODF-}6Pq)IAIW<9}WOa2Da&2}i$EPt(8eJvpb_eqbjdK=~4i9*AJA z5V%3)NA_lrL*yWaN&X8^)RgI-s7s@usAq?#YKCp({b08n!l>QgEEyX}0>4H*t@46` zv-SL+*bUe_I`!BtiUTMSd~w+1Y(x~lc=t>maS{hIVShWpd58Iq;jxH_5(CaU3t$s1{6kxvyDj+LdKUGKkYLIMNOu5kn^o%f5!HE%jkQw zz4Z7`g5z9x8qM&2d9qhdoWS1Kd(?nLmV2GQCtv_D*Ic60fPFrUy~C>=0MbtUR;~|F zBNwzS-0|O>l#Y361P+$@hEtUuR$u>f$xDOA3(B^$Jw~KdjYN%n{`|}_GS=2eS2e9% zUzeFZ&bpETP49Of3j-Yx35EIO0-}0YjN&_=9IbSJ-&Y3|DKhqw+`Lzv3vI?kPm`E& z`C&_d=$+;woH6#PQeSNB*xCBKcL+R;dJl!32Lwj5mF=t-p%GLijiL{hkBaCX@1b*n zb0vz*3n5cZ7SBLf<@!kdh1AmlT5>jQNs2qN#T6V{ ze-he&HMn~mCG+qX#0~HltPBmf82I@JnANmMa;D;hsHH%Y-yoF+6jiri5wW@a`_Y4r zY3t^Yp4^WHu!B`olp{n)BHc7jR?4UIC6{R2)qsJ&<&bOS;6(0&GOtZxg&q4PLX)qsV?wn0r`G3FUBK6iKCG_fk@E|QX{%qKk`IeGU=(K0oVf8En4=#xjcJ#O ztFat;Z;1j$>3y3%#CsV8RcB%m&q7gcU&aiZQx>ja3RReYh<-d z;v5POluC`2TpxQ}{8%~GE@Ve{0x4L-h$+8k6562*L3=O*7pfop2>5|06mSgbv zrMPzvqs*S{e(Uu4l@DbORmuWwt=khDtiJv07l;F@^8@yiPrmAO%(x48J1Hur7f7X( zpS~p?HLY&kt)-)@vb|-oAWGYGaw7M%22Z!@!66+?Ra(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 089/107] 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 090/107] 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 091/107] 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 092/107] 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 093/107] 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 094/107] 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 095/107] 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 096/107] 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 097/107] 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 098/107] 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 099/107] 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 100/107] 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 101/107] 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 102/107] 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 be094e331d86e0517ac50d93766af0227e8d8cb3 Mon Sep 17 00:00:00 2001 From: Karina Date: Thu, 16 Apr 2026 04:46:51 -0500 Subject: [PATCH 103/107] 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 104/107] 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 4ac32b8c771748fa224000f295a15a37493bd116 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 18 Apr 2026 11:31:00 -0400 Subject: [PATCH 105/107] 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 106/107] 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 107/107] 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++)