From 47f2013365aca2593ceede1a40dbfbf33df5a5d2 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 19 Feb 2026 21:46:37 -0500 Subject: [PATCH 01/16] they would never make step stool 2 --- CalPlayer/CalamityPlayer.cs | 51 +++++++++++++++ CalPlayer/CalamityPlayerHitHurt.cs | 19 ++++++ CalPlayer/DrawLayers/SpringStoolLayer.cs | 75 +++++++++++++++++++++++ Cooldowns/Stooldown.cs | 19 ++++++ Cooldowns/Stooldown.png | Bin 0 -> 270 bytes Cooldowns/StooldownOutline.png | Bin 0 -> 185 bytes Cooldowns/StooldownOverlay.png | Bin 0 -> 166 bytes ExtraJumps/SpringStoolBottom.png | Bin 0 -> 376 bytes ExtraJumps/SpringStoolJump.cs | 51 +++++++++++++++ ExtraJumps/SpringStoolJump.png | Bin 0 -> 2853 bytes ExtraJumps/SpringStoolSpring.png | Bin 0 -> 255 bytes ExtraJumps/SpringStoolTop.png | Bin 0 -> 232 bytes Items/Accessories/SpringStool.cs | 36 +++++++++++ Items/Accessories/SpringStool.png | Bin 0 -> 719 bytes 14 files changed, 251 insertions(+) create mode 100644 CalPlayer/DrawLayers/SpringStoolLayer.cs create mode 100644 Cooldowns/Stooldown.cs create mode 100644 Cooldowns/Stooldown.png create mode 100644 Cooldowns/StooldownOutline.png create mode 100644 Cooldowns/StooldownOverlay.png create mode 100644 ExtraJumps/SpringStoolBottom.png create mode 100644 ExtraJumps/SpringStoolJump.cs create mode 100644 ExtraJumps/SpringStoolJump.png create mode 100644 ExtraJumps/SpringStoolSpring.png create mode 100644 ExtraJumps/SpringStoolTop.png create mode 100644 Items/Accessories/SpringStool.cs create mode 100644 Items/Accessories/SpringStool.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3003008d01..eb2fb927bf 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8,6 +8,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; +using CalamityMod.CalPlayer.DrawLayers; using CalamityMod.Cooldowns; using CalamityMod.DataStructures; using CalamityMod.Dusts; @@ -72,6 +73,7 @@ using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -863,6 +865,7 @@ namespace CalamityMod.CalPlayer public bool tesla = false; public bool teslaVisuals = true; public bool cryogenSoul = false; + public bool springStool = false; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2411,6 +2414,7 @@ namespace CalamityMod.CalPlayer tesla = false; teslaVisuals = true; cryogenSoul = false; + springStool = false; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -4966,6 +4970,37 @@ namespace CalamityMod.CalPlayer Lighting.AddLight(Player.Center, Light * (0.55f + (oceanCrestTimer * 0.0035f))); } + if (springStool) + { + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Player.velocity.X == 0; + + if (holdingUp && standingStill && !Player.mount.Active) + { + // Vertical displacement when using Spring Stool + int boost = 61; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + Player.UpdatePortableStoolUsage(); + + } + else + { + // Stool still exists even if not being used + Player.portableStoolInfo.HasAStool = true; + } + + } + } + if (rampartOfDeities) { // Ice Barrier buff inherited from Frozen Turtle Shell @@ -5022,6 +5057,8 @@ namespace CalamityMod.CalPlayer public override void PostUpdate() { + Main.NewText(Main.LocalPlayer.Top.Y); + if (ZoneAbyss && Main.netMode != NetmodeID.Server) { //Main aura @@ -6244,6 +6281,20 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square1); GeneralParticleHandler.SpawnParticle(square2); } + + public override void Load() + { + // Hook into the vanilla stool drawing method to remove it + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HideStepStool; + } + + private void HideStepStool(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + if (drawInfo.drawPlayer.GetModPlayer().springStool) + return; + + orig(ref drawInfo); + } #endregion #region Mana Consumption Effects diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index df6c24e6df..e4b66643bd 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -461,6 +461,25 @@ namespace CalamityMod.CalPlayer #endregion #region Modify Hit NPC + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool) + { + if (Main.LocalPlayer.Top.Y < target.Top.Y) + { + // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + + if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) + modifiers.SetCrit(); + + else + modifiers.DisableCrit(); + } + } + } + public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers) { modifiers.CritDamage += critDamage; diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs new file mode 100644 index 0000000000..395674947a --- /dev/null +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.ExtraJumps; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using static Terraria.ModLoader.PlayerDrawLayer; + +namespace CalamityMod.CalPlayer.DrawLayers +{ + public class SpringStoolLayer : PlayerDrawLayer + { + private Asset stoolTexture; + private Asset springTexture; + private Asset topTexture; + + public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.Leggings); + + public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) + { + // Only draw if the player is holding Up and still + return drawInfo.drawPlayer.GetModPlayer().springStool && + drawInfo.drawPlayer.portableStoolInfo.IsInUse; + } + + protected override void Draw(ref PlayerDrawSet drawInfo) + { + Player drawPlayer = drawInfo.drawPlayer; + + // Load textures if null + stoolTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolBottom"); + springTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolSpring"); + topTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolTop"); + + Texture2D stoolTex = stoolTexture.Value; + Texture2D springTex = springTexture.Value; + Texture2D topTex = topTexture.Value; + + // Bottom Position + Vector2 bottomPosition = new Vector2( + (int)(drawInfo.Position.X - Main.screenPosition.X + drawPlayer.width / 2f), + (int)(drawInfo.Position.Y - Main.screenPosition.Y + drawPlayer.height + drawPlayer.portableStoolInfo.HeightBoost) + ); + Rectangle bottomSource = stoolTex.Frame(); + Vector2 bottomOrigin = new Vector2(bottomSource.Width / 2f, bottomSource.Height - 2); + + // Spring + Vector2 springPosition = bottomPosition - new Vector2(0, bottomSource.Height); + Rectangle springSource = springTex.Frame(); + Vector2 springOrigin = new Vector2(springSource.Width / 2f, springSource.Height - 2); + + // Top + Vector2 topPosition = springPosition - new Vector2(0, springSource.Height - 5); + Rectangle topSource = topTex.Frame(); + Vector2 topOrigin = new Vector2(topSource.Width / 2f, topSource.Height); + + // Add all to cache + DrawPart(ref drawInfo, stoolTex, bottomPosition, bottomSource, bottomOrigin); + DrawPart(ref drawInfo, springTex, springPosition, springSource, springOrigin); + DrawPart(ref drawInfo, topTex, topPosition, topSource, topOrigin); + } + + private void DrawPart(ref PlayerDrawSet drawInfo, Texture2D tex, Vector2 pos, Rectangle src, Vector2 origin) + { + drawInfo.DrawDataCache.Add(new DrawData(tex, pos, src, drawInfo.colorArmorLegs, drawInfo.drawPlayer.bodyRotation, origin, 1f, drawInfo.playerEffect, 0) + { shader = drawInfo.cPortableStool }); + } + } +} diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs new file mode 100644 index 0000000000..3482f788ac --- /dev/null +++ b/Cooldowns/Stooldown.cs @@ -0,0 +1,19 @@ +using Microsoft.Xna.Framework; +using Terraria.Audio; +using Terraria.Localization; + +namespace CalamityMod.Cooldowns +{ + public class Stooldown : CooldownHandler + { + public static new string ID => "Stooldown"; + public override bool ShouldDisplay => true; + public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); + public override string Texture => "CalamityMod/Cooldowns/AscendEffect"; + public override Color OutlineColor => new Color(197, 165, 108); + public override Color CooldownStartColor => new Color(144, 84, 29); + public override Color CooldownEndColor => Color.Khaki; + + public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff"); + } +} diff --git a/Cooldowns/Stooldown.png b/Cooldowns/Stooldown.png new file mode 100644 index 0000000000000000000000000000000000000000..60913ece6932c4dc47cb5ce9889ea27a10c7a954 GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%Lf=o-U3d7XHa84NW23i~k3xMJ9afEKb-w z^e16f#D?VWyav9t;#nU)H^oXkSimo)Af97UAn0@XT65u$X-JtOGc!YUfpZue+na4b PKQMT@`njxgN@xNA#3EeV literal 0 HcmV?d00001 diff --git a/Cooldowns/StooldownOutline.png b/Cooldowns/StooldownOutline.png new file mode 100644 index 0000000000000000000000000000000000000000..93ce7852e028b04103acbbb33a549234bf12215e GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjjKx9jP7LeL$-D$|ialK%Lp(a) zP7UNbpupoi{o&vBcmC=mv$(BZXO;NgUspF%`=Hv4nJ;5`84B#*+n!vtVeca>8AiuD$oEb9C6q~zj` jk6a#C7Vq6r!piP^BKi&I#^)J8>lr*<{an^LB{Ts5ZMRCO literal 0 HcmV?d00001 diff --git a/Cooldowns/StooldownOverlay.png b/Cooldowns/StooldownOverlay.png new file mode 100644 index 0000000000000000000000000000000000000000..e9226d6904366a4d515bbb32cc51d9ff3ff6ba1c GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%LfjPZ!4!3;*PlhNk}x45^b?B^nuAj2kOMSbC=H;*kxw+q#%7h>v5LbHuME zMyFRV-a92Ro{h1PIz6TNV7>wyL#rT%!%hpv5Xm+xt=$tE85w@>)#2N>Ksp3yHiM_D KpUXO@geCxKOE2yK literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolBottom.png b/ExtraJumps/SpringStoolBottom.png new file mode 100644 index 0000000000000000000000000000000000000000..9c11a5cf0d3bb93770ee5e869edf5fbb4af45c4d GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^Qa~)j!3HGjh1XvOQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1eDS5g$hIn`G)XBPB-!Rg}QPyi&~V zzoW#dqYN)Tz4(>bkY|_Fc&UKl^hE=P)9j-E%o4)Ob8MLSiY4U5rW-V@lV@X#U*+r{ z+VX_mf7M}Dhg3z5<{G9$26h`0KK$UA=I^kQzs0c-Bv55{h?T9s|3WR3=&=uyiUtLC zOj{)<+~$2@=g1DWD&av5OV-y3w?8p5#{6PG=WbngpCP%3QSWcbCqZUrhFPa)yE7zx R;|7KvgQu&X%Q~loCIEJWjYa?f literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolJump.cs b/ExtraJumps/SpringStoolJump.cs new file mode 100644 index 0000000000..efdc34dcb9 --- /dev/null +++ b/ExtraJumps/SpringStoolJump.cs @@ -0,0 +1,51 @@ +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.ExtraJumps +{ + public class SpringStoolJump : ExtraJump + { + public override Position GetDefaultPosition() => BeforeBottleJumps; + public override float GetDurationMultiplier(Player player) => 1f; + public override void UpdateHorizontalSpeeds(Player player) + { + player.runAcceleration *= 2f; + player.maxRunSpeed *= 1.35f; + } + + public override void OnStarted(Player player, ref bool playSound) + { + playSound = true; + if (player.wingsLogic <= 0) + { + player.velocity.Y *= player.slowFall ? 2.0f : 2.75f; + } + else + { + player.velocity.Y *= 1.7f; + } + player.StopExtraJumpInProgress(); + for (int i = 0; i < 3; i++) + { + Vector2 position = player.Center; + Vector2 velocity = (Vector2.UnitY * -(2.5f + 2f * i)) * player.gravDir; + int lifetime = 120; + float scale = MathHelper.Lerp(0.05f, 0.1f, i / 3f); + Color color = new Color(94, 229, 163); + Vector2 stretch = new Vector2(0.5f, 1.5f); + float shrink = -0.3f; + Particle boostRing = new CustomSpark(position, velocity, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, lifetime, scale, color, stretch, shrinkSpeed: shrink); + GeneralParticleHandler.SpawnParticle(boostRing); + } + } + public override void ShowVisuals(Player player) + { + player.StopExtraJumpInProgress(); + } + } +} diff --git a/ExtraJumps/SpringStoolJump.png b/ExtraJumps/SpringStoolJump.png new file mode 100644 index 0000000000000000000000000000000000000000..cbe569b76bf50bb521b58b30136d2bf0f758e8f6 GIT binary patch literal 2853 zcmV+=3)=LFP)Px#1ZP1_K>z@;j|==^1pojF&q+idK@0^+3dC>#A*!k)mAM19+?@s->TR;5!KXvOlx#{h1?$%h!a`@=+#V$4w$of5d zu3cR5x>sKC##Mkpp8MNB7r#FJWViqL*%x+o;)F!zIP;22`Yk`Z|NXCi>p~FKZ*EyG z$Hp~RudI`tc2oP1_mOxY{2DoK(GLj*ke%$Y9sru`3n@cL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JV^xCP3g^!w9$!koq0$=wU>4oK|=ZRo`scNo|OK<-HYQ2;iYTLkW-; z!k|iA8l=v#whnwEt<6TWay{1Vmgx-*5AYM<*jXPNLt@c|Gv_k=I1 z#4Q_2T6To01KDPUxhDT6-!k<J5! zlqfQVO2`ok^Q4H%BLu789uDQY$WlXXhp6&7EQ2sCWrblOYbB-GYjJf5g;!HivY3}@aab*l z1q+E@YmR?vUZR#NacV+6OCpW3i?tRYFnq|rZ0dZdxl5@Q$MAp%H7&hXk#|s?rmQGGi(IgAa83pxR-uLh;E`e;j5ygB<6n!YOGnGlrep}An3;6CE(C10 zx|T^km+KUo!k8_-cI3$7;y*so3Debyg4eZ)V3_p5p-zz#ra<+r8~eJHrsrR|6@N%R zNK+&1eV3l=L`WDjfqV^t%IeeztolakiMmW8rEcd>+YuzNMqF`xPQqwLMBV%Shq4p9 z-LK7mRRs?@8OY+PVs!NW(7cdsvl=k$C3&tVaWBmr!F z%x()_)6%~*3D>vaWLS@8*3aZ?FD!FZ`JAvK=#?#nflD0VLmJC=Bs4EQk^di2>Q~Ef zTMk+_Tg$82LGs_D%00000NkvXXu0mjf DE^l^B literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolSpring.png b/ExtraJumps/SpringStoolSpring.png new file mode 100644 index 0000000000000000000000000000000000000000..ae305c7263e498e5f50150144f8b0985ec4aff7d GIT binary patch literal 255 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9T!3HFAj=Wa~QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`S9-cQhIn`?(ORuRWlcu9A(JU+SU6)LEE0+XSSqt z^UIbU6$ZS;l3!z3iaB@n8Wg;G6KPL=9+}uV2evHR#y6vFXT`%s ztqE2C=hY_6`j=Sp_mwD6DmdKI;Vst02oJI AOaK4? literal 0 HcmV?d00001 diff --git a/ExtraJumps/SpringStoolTop.png b/ExtraJumps/SpringStoolTop.png new file mode 100644 index 0000000000000000000000000000000000000000..0cdc45e3eff43d47b281002c6bfa6107e787baf2 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0vp^YCz1z!3HF61nWEoQjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`CwaO!hFJI~rz{Xy5+(7s-Do9Ko_#&*vY7{-D6sSx$a8lWH?n%LE~_dE z5KDb "Items.Accessories"; + + public override void SetDefaults() + { + Item.width = 30; + Item.height = 46; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.rare = ItemRarityID.Green; + Item.accessory = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + CalamityPlayer modPlayer = player.Calamity(); + modPlayer.springStool = true; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.PortableStool). + AddIngredient(ItemID.CopperBar, 3). + AddTile(TileID.Anvils). + Register(); + } + } +} diff --git a/Items/Accessories/SpringStool.png b/Items/Accessories/SpringStool.png new file mode 100644 index 0000000000000000000000000000000000000000..1b7c3fd9182085737762d64e1331917911386f45 GIT binary patch literal 719 zcmV;=0xPx#1ZP1_K>z@;j|==^1poj7c}YY;R9HvVn7d0{K@`SUn}GNTKGtj$ABd@12~%<4K(%=ZQ&L>Tx5^%1wcjjImCI`5AD|P;FHK{9|wlZXR)OeGQ1?k*fDe zs?)dGO}IJ4Y86w=6^YhECvY99`gxL`o?G{KF0KqC9_VVs4V}&+vDdRo%6MkMB34N$ z=ZMQQ(m?#`rS*%|bxaa>=Hr~|#C5C7E#>?=rZ@u>XTq-Hky7Rmt12ii!3^XT7a@L~ zlMSz^d;_oZdg1;31MokWm+(mVcY+f80|5}fA09!xe{cX_3x(jpsW0%_x_9vIu5Nfw z)OF3RF>_s3U4{5~ z-y&8Cxvp8&O|8xF@ahVjJ6qxq_YDmq4*30W=6X6f4gazB6V90+Y5iMk=Ud&dK5s5D z-&P$yt0!B$dI4vSDemPhJ|BE}@-v*IYM*UB@#tVX;<@=9xK6sxh0lH8-h(Gjj_vkf zDj}a|_h~+HLq#cKo`<;u4Ru=mI8PcRRAmgY?Jt&Ul_7mMdvB4P9C&(oDCtfgcBoPt ztPhd7#Pa@>A$zQh8m|X~L~>r1!TXfd0P7%@%+IloK&m)aC3B`YCcZAYWH5G&*!KIF z;(40?X>gr$JqwjcsBoc?W5oYVLQZ-+a){XFx(CR9FfAD7{^9@t002ovPDHLkV1gF; BPv`&u literal 0 HcmV?d00001 From 6eba677ed96ce0f648b0317759a604c6bd635def Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 22 Feb 2026 20:42:03 -0500 Subject: [PATCH 02/16] updates --- CalPlayer/CalamityPlayer.cs | 130 ++++++++++++------ CalamityKeybinds.cs | 3 + Cooldowns/Stooldown.cs | 7 +- ExtraJumps/SpringStoolJump.cs | 51 ------- Items/Accessories/SpringStool.cs | 6 +- .../Mods.CalamityMod.Items.Accessories.hjson | 8 ++ .../en-US/Mods.CalamityMod.Keybinds.hjson | 1 + Localization/en-US/Mods.CalamityMod.UI.hjson | 1 + 8 files changed, 112 insertions(+), 95 deletions(-) delete mode 100644 ExtraJumps/SpringStoolJump.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index eb2fb927bf..173aa77e71 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -866,6 +866,7 @@ namespace CalamityMod.CalPlayer public bool teslaVisuals = true; public bool cryogenSoul = false; public bool springStool = false; + public int springStoolTimer = 0; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2415,6 +2416,7 @@ namespace CalamityMod.CalPlayer teslaVisuals = true; cryogenSoul = false; springStool = false; + springStoolTimer = 0; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -3660,6 +3662,7 @@ namespace CalamityMod.CalPlayer } } } + if (CalamityKeybinds.BoosterDashHotKey.JustPressed && hasJetpack && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(RogueBooster.ID) && !Player.mount.Active) { @@ -4571,6 +4574,27 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { + if (springStoolTimer > 0) + { + springStoolTimer--; + + if (Player.whoAmI == Main.myPlayer) + { + float launchPower = 18f * Utils.GetLerpValue(0, 10, springStoolTimer, true); + Player.velocity.Y = -launchPower; + + // Prevent vanilla jump logic from interfering + Player.jump = 0; + Player.fallStart = (int)(Player.position.Y / 16f); + + if (Main.rand.NextBool(2)) + { + Dust d = Dust.NewDustDirect(Player.BottomLeft, Player.width, 4, DustID.Cloud, 0, 2f); + d.velocity.X *= 0.5f; + d.noGravity = true; + } + } + } // Rain armor set effects if (rainSet) @@ -4970,37 +4994,6 @@ namespace CalamityMod.CalPlayer Lighting.AddLight(Player.Center, Light * (0.55f + (oceanCrestTimer * 0.0035f))); } - if (springStool) - { - - if (springStool) - { - bool holdingUp = Player.controlUp; - bool standingStill = Player.velocity.Y == 0 && Player.velocity.X == 0; - - if (holdingUp && standingStill && !Player.mount.Active) - { - // Vertical displacement when using Spring Stool - int boost = 61; - - Player.portableStoolInfo.HasAStool = true; - Player.portableStoolInfo.IsInUse = true; - Player.portableStoolInfo.HeightBoost = boost; - Player.portableStoolInfo.VisualYOffset = boost; - Player.portableStoolInfo.MapYOffset = boost; - - Player.UpdatePortableStoolUsage(); - - } - else - { - // Stool still exists even if not being used - Player.portableStoolInfo.HasAStool = true; - } - - } - } - if (rampartOfDeities) { // Ice Barrier buff inherited from Frozen Turtle Shell @@ -5041,6 +5034,68 @@ namespace CalamityMod.CalPlayer if (gSabaton && Player.whoAmI == Main.myPlayer) Player.jumpSpeedBoost += 2f; } + + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + { + springStoolTimer = 12; + + Player.AddCooldown(Stooldown.ID, SpringStool.JumpCooldown, true); + + SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); + } + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; + + if (holdingUp && standingStill && !Player.mount.Active) + { + int boost = 61; + if (IsVanillaStoolEquipped(Player)) + boost += 24; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + // Forces the player into the stool-standing frame + Player.UpdatePortableStoolUsage(); + } + else + { + // Ensures the player can use the stool if they stop moving/hold up + Player.portableStoolInfo.HasAStool = true; + } + } + } + + + private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + if (springStool) + { + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + return; + } + + orig(ref drawInfo); + } + + private bool IsVanillaStoolEquipped(Player player) + { + for (int k = 2; k < 12; k++) + { + if (player.armor[k].type == ItemID.PortableStool) + return true; + } + return false; } #endregion @@ -5057,8 +5112,6 @@ namespace CalamityMod.CalPlayer public override void PostUpdate() { - Main.NewText(Main.LocalPlayer.Top.Y); - if (ZoneAbyss && Main.netMode != NetmodeID.Server) { //Main aura @@ -6284,17 +6337,10 @@ namespace CalamityMod.CalPlayer public override void Load() { - // Hook into the vanilla stool drawing method to remove it - On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HideStepStool; + // Hook directly into vanilla's stool drawing + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; } - private void HideStepStool(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) - { - if (drawInfo.drawPlayer.GetModPlayer().springStool) - return; - - orig(ref drawInfo); - } #endregion #region Mana Consumption Effects diff --git a/CalamityKeybinds.cs b/CalamityKeybinds.cs index 235da907f4..99b1ba8dd1 100644 --- a/CalamityKeybinds.cs +++ b/CalamityKeybinds.cs @@ -18,6 +18,7 @@ namespace CalamityMod public static ModKeybind NormalityRelocatorHotKey { get; private set; } public static ModKeybind RageHotKey { get; private set; } public static ModKeybind SpectralVeilHotKey { get; private set; } + public static ModKeybind SpringStoolJumpHotKey { get; private set; } public static ModKeybind TransformerHotKey { get; private set; } public static ModKeybind SwitchGravityHotkey {get; private set;} public static ModKeybind ExpandDebuffInfo { get; private set; } @@ -40,6 +41,7 @@ namespace CalamityMod NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z"); RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V"); SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z"); + SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "Q"); TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K"); SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T"); ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl"); @@ -62,6 +64,7 @@ namespace CalamityMod NormalityRelocatorHotKey = null; RageHotKey = null; SpectralVeilHotKey = null; + SpringStoolJumpHotKey = null; TransformerHotKey = null; ExpandDebuffInfo = null; } diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs index 3482f788ac..3d20c80fc5 100644 --- a/Cooldowns/Stooldown.cs +++ b/Cooldowns/Stooldown.cs @@ -8,8 +8,13 @@ namespace CalamityMod.Cooldowns { public static new string ID => "Stooldown"; public override bool ShouldDisplay => true; + public override bool CanTickDown => true; + public override void Tick() + { + base.Tick(); + } public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); - public override string Texture => "CalamityMod/Cooldowns/AscendEffect"; + public override string Texture => "CalamityMod/Cooldowns/Stooldown"; public override Color OutlineColor => new Color(197, 165, 108); public override Color CooldownStartColor => new Color(144, 84, 29); public override Color CooldownEndColor => Color.Khaki; diff --git a/ExtraJumps/SpringStoolJump.cs b/ExtraJumps/SpringStoolJump.cs deleted file mode 100644 index efdc34dcb9..0000000000 --- a/ExtraJumps/SpringStoolJump.cs +++ /dev/null @@ -1,51 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.DataStructures; -using Terraria.ModLoader; - -namespace CalamityMod.ExtraJumps -{ - public class SpringStoolJump : ExtraJump - { - public override Position GetDefaultPosition() => BeforeBottleJumps; - public override float GetDurationMultiplier(Player player) => 1f; - public override void UpdateHorizontalSpeeds(Player player) - { - player.runAcceleration *= 2f; - player.maxRunSpeed *= 1.35f; - } - - public override void OnStarted(Player player, ref bool playSound) - { - playSound = true; - if (player.wingsLogic <= 0) - { - player.velocity.Y *= player.slowFall ? 2.0f : 2.75f; - } - else - { - player.velocity.Y *= 1.7f; - } - player.StopExtraJumpInProgress(); - for (int i = 0; i < 3; i++) - { - Vector2 position = player.Center; - Vector2 velocity = (Vector2.UnitY * -(2.5f + 2f * i)) * player.gravDir; - int lifetime = 120; - float scale = MathHelper.Lerp(0.05f, 0.1f, i / 3f); - Color color = new Color(94, 229, 163); - Vector2 stretch = new Vector2(0.5f, 1.5f); - float shrink = -0.3f; - Particle boostRing = new CustomSpark(position, velocity, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, lifetime, scale, color, stretch, shrinkSpeed: shrink); - GeneralParticleHandler.SpawnParticle(boostRing); - } - } - public override void ShowVisuals(Player player) - { - player.StopExtraJumpInProgress(); - } - } -} diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index d9aad7eaed..5e0be2ecb2 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -1,4 +1,5 @@ -using CalamityMod.CalPlayer; +using System.Collections.Generic; +using CalamityMod.CalPlayer; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,6 +9,9 @@ namespace CalamityMod.Items.Accessories public class SpringStool : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; + public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); + + public static int JumpCooldown = CalamityUtils.SecondsToFrames(5); public override void SetDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 3f2c0e5765..1b0f5f58f3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2214,3 +2214,11 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } + +SpringStool: { + DisplayName: Spring Stool + Tooltip: + ''' + sfdoredsfjuertj9irtjire + ''' +} diff --git a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson index 8c950f3fd4..e172a3d1ed 100644 --- a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson +++ b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson @@ -16,3 +16,4 @@ TransformerHotKey.DisplayName: Transformer Hot Key GravitySwapOverride.DisplayName: Gravity Swap Override ExpandDebuffInfo.DisplayName: See Debuff Information ThePointerLock.DisplayName: The Pointer Lock On +SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hot Key diff --git a/Localization/en-US/Mods.CalamityMod.UI.hjson b/Localization/en-US/Mods.CalamityMod.UI.hjson index c912701a81..a4019f203f 100644 --- a/Localization/en-US/Mods.CalamityMod.UI.hjson +++ b/Localization/en-US/Mods.CalamityMod.UI.hjson @@ -151,6 +151,7 @@ Cooldowns: { SpongeDurability: Sponge Barrier Durability SpongeRecharge: Sponge Barrier Recharge Starburst: Stratus Starbursts + Stooldown: Stooldown SuperradiantSawBoost: Superradiant Saw Boost TarragonCloak: Tarragon Cloak Cooldown TarragonImmunity: Tarragon Immunity Cooldown From 2085d7d3c1af6ca973767c95790809692778458f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 02:23:49 -0500 Subject: [PATCH 03/16] most fearsome tool of war --- CalPlayer/CalamityPlayer.cs | 42 ++++++----- .../DrawLayers}/SpringStoolBottom.png | Bin CalPlayer/DrawLayers/SpringStoolLayer.cs | 6 +- .../DrawLayers}/SpringStoolSpring.png | Bin .../DrawLayers}/SpringStoolTop.png | Bin ExtraJumps/SpringStoolJump.png | Bin 2853 -> 0 bytes .../Mods.CalamityMod.Items.Accessories.hjson | 5 +- Projectiles/Typeless/SpringStoolJumpFX.cs | 68 ++++++++++++++++++ Projectiles/Typeless/SpringStoolJumpFX.png | Bin 0 -> 4324 bytes 9 files changed, 101 insertions(+), 20 deletions(-) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolBottom.png (100%) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolSpring.png (100%) rename {ExtraJumps => CalPlayer/DrawLayers}/SpringStoolTop.png (100%) delete mode 100644 ExtraJumps/SpringStoolJump.png create mode 100644 Projectiles/Typeless/SpringStoolJumpFX.cs create mode 100644 Projectiles/Typeless/SpringStoolJumpFX.png diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 173aa77e71..eab05f8d8d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -4586,13 +4586,6 @@ namespace CalamityMod.CalPlayer // Prevent vanilla jump logic from interfering Player.jump = 0; Player.fallStart = (int)(Player.position.Y / 16f); - - if (Main.rand.NextBool(2)) - { - Dust d = Dust.NewDustDirect(Player.BottomLeft, Player.width, 4, DustID.Cloud, 0, 2f); - d.velocity.X *= 0.5f; - d.noGravity = true; - } } } @@ -5039,7 +5032,11 @@ namespace CalamityMod.CalPlayer { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, SpringStool.JumpCooldown, true); + Player.AddCooldown(Stooldown.ID, (int) SpringStool.JumpCooldown / 10, true); + + Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); + + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); } @@ -5075,24 +5072,37 @@ namespace CalamityMod.CalPlayer private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) { - if (springStool) + bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; + var modPlayer = drawInfo.drawPlayer.GetModPlayer(); + bool hasSpring = modPlayer.springStool; + + if (!isUsingStool) { - if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) - { - orig(ref drawInfo); - return; - } + orig(ref drawInfo); return; } - orig(ref drawInfo); + if (!hasSpring) + { + orig(ref drawInfo); + return; + } + + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + + return; } private bool IsVanillaStoolEquipped(Player player) { - for (int k = 2; k < 12; k++) + for (int k = 3; k <= 12; k++) { if (player.armor[k].type == ItemID.PortableStool) + return true; } return false; diff --git a/ExtraJumps/SpringStoolBottom.png b/CalPlayer/DrawLayers/SpringStoolBottom.png similarity index 100% rename from ExtraJumps/SpringStoolBottom.png rename to CalPlayer/DrawLayers/SpringStoolBottom.png diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs index 395674947a..00a2891c11 100644 --- a/CalPlayer/DrawLayers/SpringStoolLayer.cs +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -34,9 +34,9 @@ namespace CalamityMod.CalPlayer.DrawLayers Player drawPlayer = drawInfo.drawPlayer; // Load textures if null - stoolTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolBottom"); - springTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolSpring"); - topTexture ??= ModContent.Request("CalamityMod/ExtraJumps/SpringStoolTop"); + stoolTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolBottom"); + springTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolSpring"); + topTexture ??= ModContent.Request("CalamityMod/CalPlayer/DrawLayers/SpringStoolTop"); Texture2D stoolTex = stoolTexture.Value; Texture2D springTex = springTexture.Value; diff --git a/ExtraJumps/SpringStoolSpring.png b/CalPlayer/DrawLayers/SpringStoolSpring.png similarity index 100% rename from ExtraJumps/SpringStoolSpring.png rename to CalPlayer/DrawLayers/SpringStoolSpring.png diff --git a/ExtraJumps/SpringStoolTop.png b/CalPlayer/DrawLayers/SpringStoolTop.png similarity index 100% rename from ExtraJumps/SpringStoolTop.png rename to CalPlayer/DrawLayers/SpringStoolTop.png diff --git a/ExtraJumps/SpringStoolJump.png b/ExtraJumps/SpringStoolJump.png deleted file mode 100644 index cbe569b76bf50bb521b58b30136d2bf0f758e8f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2853 zcmV+=3)=LFP)Px#1ZP1_K>z@;j|==^1pojF&q+idK@0^+3dC>#A*!k)mAM19+?@s->TR;5!KXvOlx#{h1?$%h!a`@=+#V$4w$of5d zu3cR5x>sKC##Mkpp8MNB7r#FJWViqL*%x+o;)F!zIP;22`Yk`Z|NXCi>p~FKZ*EyG z$Hp~RudI`tc2oP1_mOxY{2DoK(GLj*ke%$Y9sru`3n@cL|%Po+A8V=acLr=C8$ zIQN$8x`lngm#C#moK7eUA&8jqEgKu%!afl13x? z6OW$iEb67YS(W8cl>J?w`QqZYCr@_5uG_b_i?(|+K-J<1Oe?O7#o*ib9_@s|S}iB1 zKX!U68-vy03wPbst>5_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lqfQVO2`ok^Q4H%BLu789uDQY$WlXXhp6&7EQ2sCWrblOYbB-GYjJf5g;!HivY3}@aab*l z1q+E@YmR?vUZR#NacV+6OCpW3i?tRYFnq|rZ0dZdxl5@Q$MAp%H7&hXk#|s?rmQGGi(IgAa83pxR-uLh;E`e;j5ygB<6n!YOGnGlrep}An3;6CE(C10 zx|T^km+KUo!k8_-cI3$7;y*so3Debyg4eZ)V3_p5p-zz#ra<+r8~eJHrsrR|6@N%R zNK+&1eV3l=L`WDjfqV^t%IeeztolakiMmW8rEcd>+YuzNMqF`xPQqwLMBV%Shq4p9 z-LK7mRRs?@8OY+PVs!NW(7cdsvl=k$C3&tVaWBmr!F z%x()_)6%~*3D>vaWLS@8*3aZ?FD!FZ`JAvK=#?#nflD0VLmJC=Bs4EQk^di2>Q~Ef zTMk+_Tg$82LGs_D%00000NkvXXu0mjf DE^l^B diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 1b0f5f58f3..8549a1bc8a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2219,6 +2219,9 @@ SpringStool: { DisplayName: Spring Stool Tooltip: ''' - sfdoredsfjuertj9irtjire + Hold Up to reach higher + Press [KEY] to jump super high + This jump has a cooldown and can only be used once per time airborne + +10% critical strike chance when striking enemies below you ''' } diff --git a/Projectiles/Typeless/SpringStoolJumpFX.cs b/Projectiles/Typeless/SpringStoolJumpFX.cs new file mode 100644 index 0000000000..f60434dfb2 --- /dev/null +++ b/Projectiles/Typeless/SpringStoolJumpFX.cs @@ -0,0 +1,68 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class SpringStoolJumpFX : ModProjectile, ILocalizedModType + { + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } + + public override void SetDefaults() + { + Projectile.width = 78; + Projectile.height = 142; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = false; + Projectile.penetrate = -1; + Projectile.alpha = 0; + Projectile.timeLeft = 120; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + + + Projectile.rotation -= 0.005f; + + if (Projectile.frame < 4) + { + Projectile.frameCounter++; + + if (Projectile.frameCounter >= 5) + { + Projectile.frameCounter = 0; + Projectile.frame++; + + if (Projectile.frame > 4) + Projectile.frame = 4; // clamp to last frame + } + } + + + Projectile.ai[0]++; + + /* if (Projectile.ai[0] < 10f) // Stick to bottom of player initially + { + Projectile.Center = player.Bottom + new Vector2(0f, -50f); + Projectile.velocity = Vector2.Zero; + } */ + + if (Projectile.ai[0] >= 20f) // Begin fading + { + Projectile.alpha += 8; + Projectile.scale *= 0.985f; + } + + if (Projectile.alpha >= 255 || !player.active || player.dead) + Projectile.Kill(); + } + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Typeless/SpringStoolJumpFX.png b/Projectiles/Typeless/SpringStoolJumpFX.png new file mode 100644 index 0000000000000000000000000000000000000000..4d21337bde04e020922e2668feaa995adb09b7e2 GIT binary patch literal 4324 zcmb7Hd03KZyLXytnzFHS$uV2zluNnfjONm!ewCAM` z_t%?tY|_)y`x3xnc~K8A*2r()bo>&|8L-73JK3Dkr+(ozShhKD^`R3oj^qQ(icQT%zeT$f0XltP<5(kC6 zr)rKee}QntN-O%YelTu~i)pDf0}B1Wf13pltamph{)n3ER@F}LUq;^fSGz3AhnQ6? z{%t+(-K{H4+KD0*>PAwG^mTWvdNDOO!D;81vxmnKgvG%Lt7XaiwoBkMVe-?Ho((J? zM{=3f5swq%TQ??t_Ef(OaY>WJ)h=C_n)y^NSX@R?>~?y(sm~$Lb!vK7UfyqQ8{J>I zBwECK8&D`iiWb&mrkhdt?UiRMi&Aa@WvI&*1Ffx&wZ*nurS`>{(dS%*Z58G~sN^Svz9gEJ$0;rBei z+r|6S>4>v3uB;+#ZZ169da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DX(|~gAug?Ma+#ma zYcJi&TM;Djqz(0v^xNgK(GKW8_1LdwN6oJ5q~XG0$A|M%8EP4%X! zr6&DIWyR4;WdqK;@fRN1K4DRobjb9Jx_#(6e6ZLmOIJ=CNsKdYh8^4hjT`$3J!Wl9QWWof!8X2`L?1dqnyUho+3B?18m}; zpL~6h4~#AiL`%nv4NZ+1aPn9DTPj7!D!;!H@G3Dy>j1iS^(PaVSo0Ae@MUyejKjne zp{~O1507#lXI%2`vFdbNecX!uzJMB{mOH5J@>7g`26wUWFT1-L3{N5&hg(W=$B8x3 zJuSX30H$4v8XF)`M?L{+zcfp6LK!jZE6ZY5;QP37Eva~h`xRZ|c!Yh!OA_N#D9x$h zFgl+>W$E~s7%);iAWWm`&778*)0TeV6sDaiKRzF5qV|IijxK3&%k;7Z3}h)|pd1~d zo6CmsSsUKC#1Ph_<=>Qy9wc79(p-U3d;ks_<7LN5tLET+D|qP!l+ngd5S45tBO7!X zNM3#?($+LBsy~WchPeY(l~#q?(~cR2yci3yn}uNL&IOCqD#y6@^T(H+x>h29D~5Ma zeEyyNF;(vkvxn!9sVsf`c3W@k-buW!+9RvscuJYA1NZ9qMG`g!)7DgN9?&-VT+#7ZY{lt~fuWUQAiAW84mJgJ`|RUDH)G*$!Zp6 z>spNYsYN6CQ%Xm*377&Zmi}TsRR#_O59*+UEZiT+5;b9>Ce)RGXc@ i#r*?^|K(+()l*L~SdzW6FLqvc4Dy4&7vseFTmJ!voWv~v literal 0 HcmV?d00001 From 5e7c162e90df3f6e5fa3042a55c19dbe10688d03 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 20:30:56 -0500 Subject: [PATCH 04/16] Core functionality done --- CalPlayer/CalamityPlayer.cs | 104 ----------- CalPlayer/CalamityPlayerHitHurt.cs | 19 --- CalPlayer/DrawLayers/SpringStoolLayer.cs | 3 +- Cooldowns/Stooldown.cs | 12 +- Items/Accessories/SpringStool.cs | 161 +++++++++++++++++- Projectiles/Typeless/SpringStoolFX.cs | 137 +++++++++++++++ ...pringStoolJumpFX.png => SpringStoolFX.png} | Bin Projectiles/Typeless/SpringStoolJumpFX.cs | 68 -------- Projectiles/Typeless/StepStoolBonusFX.cs | 51 ++++++ Sounds/Item/Springy.ogg | Bin 0 -> 29702 bytes 10 files changed, 355 insertions(+), 200 deletions(-) create mode 100644 Projectiles/Typeless/SpringStoolFX.cs rename Projectiles/Typeless/{SpringStoolJumpFX.png => SpringStoolFX.png} (100%) delete mode 100644 Projectiles/Typeless/SpringStoolJumpFX.cs create mode 100644 Projectiles/Typeless/StepStoolBonusFX.cs create mode 100644 Sounds/Item/Springy.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index eab05f8d8d..04901ed854 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -865,8 +865,6 @@ namespace CalamityMod.CalPlayer public bool tesla = false; public bool teslaVisuals = true; public bool cryogenSoul = false; - public bool springStool = false; - public int springStoolTimer = 0; public bool ascendantInsignia = false; public int ascendantInsigniaBuffTime = 0; public int ascendantInsigniaCooldown = 0; @@ -2415,8 +2413,6 @@ namespace CalamityMod.CalPlayer tesla = false; teslaVisuals = true; cryogenSoul = false; - springStool = false; - springStoolTimer = 0; ascendantInsignia = false; magmaStoneVisuals = true; eGauntlet = false; @@ -4574,21 +4570,6 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { - if (springStoolTimer > 0) - { - springStoolTimer--; - - if (Player.whoAmI == Main.myPlayer) - { - float launchPower = 18f * Utils.GetLerpValue(0, 10, springStoolTimer, true); - Player.velocity.Y = -launchPower; - - // Prevent vanilla jump logic from interfering - Player.jump = 0; - Player.fallStart = (int)(Player.position.Y / 16f); - } - } - // Rain armor set effects if (rainSet) { @@ -5027,85 +5008,6 @@ namespace CalamityMod.CalPlayer if (gSabaton && Player.whoAmI == Main.myPlayer) Player.jumpSpeedBoost += 2f; } - - if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) - { - springStoolTimer = 12; - - Player.AddCooldown(Stooldown.ID, (int) SpringStool.JumpCooldown / 10, true); - - Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); - - Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); - - SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.8f }, Player.Center); - } - - if (springStool) - { - bool holdingUp = Player.controlUp; - bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; - - if (holdingUp && standingStill && !Player.mount.Active) - { - int boost = 61; - if (IsVanillaStoolEquipped(Player)) - boost += 24; - - Player.portableStoolInfo.HasAStool = true; - Player.portableStoolInfo.IsInUse = true; - Player.portableStoolInfo.HeightBoost = boost; - Player.portableStoolInfo.VisualYOffset = boost; - Player.portableStoolInfo.MapYOffset = boost; - - // Forces the player into the stool-standing frame - Player.UpdatePortableStoolUsage(); - } - else - { - // Ensures the player can use the stool if they stop moving/hold up - Player.portableStoolInfo.HasAStool = true; - } - } - } - - - private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) - { - bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; - var modPlayer = drawInfo.drawPlayer.GetModPlayer(); - bool hasSpring = modPlayer.springStool; - - if (!isUsingStool) - { - orig(ref drawInfo); - return; - } - - if (!hasSpring) - { - orig(ref drawInfo); - return; - } - - if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) - { - orig(ref drawInfo); - return; - } - - return; - } - - private bool IsVanillaStoolEquipped(Player player) - { - for (int k = 3; k <= 12; k++) - { - if (player.armor[k].type == ItemID.PortableStool) - - return true; - } - return false; } #endregion @@ -6345,12 +6247,6 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square2); } - public override void Load() - { - // Hook directly into vanilla's stool drawing - On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; - } - #endregion #region Mana Consumption Effects diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index e4b66643bd..df6c24e6df 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -461,25 +461,6 @@ namespace CalamityMod.CalPlayer #endregion #region Modify Hit NPC - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (springStool) - { - if (Main.LocalPlayer.Top.Y < target.Top.Y) - { - // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; - - if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) - modifiers.SetCrit(); - - else - modifiers.DisableCrit(); - } - } - } - public override void ModifyHitNPCWithItem(Item item, NPC target, ref NPC.HitModifiers modifiers) { modifiers.CritDamage += critDamage; diff --git a/CalPlayer/DrawLayers/SpringStoolLayer.cs b/CalPlayer/DrawLayers/SpringStoolLayer.cs index 00a2891c11..5343d50ce5 100644 --- a/CalPlayer/DrawLayers/SpringStoolLayer.cs +++ b/CalPlayer/DrawLayers/SpringStoolLayer.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using CalamityMod.ExtraJumps; +using CalamityMod.Items.Accessories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -25,7 +26,7 @@ namespace CalamityMod.CalPlayer.DrawLayers public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) { // Only draw if the player is holding Up and still - return drawInfo.drawPlayer.GetModPlayer().springStool && + return drawInfo.drawPlayer.GetModPlayer().springStool && drawInfo.drawPlayer.portableStoolInfo.IsInUse; } diff --git a/Cooldowns/Stooldown.cs b/Cooldowns/Stooldown.cs index 3d20c80fc5..888044482c 100644 --- a/Cooldowns/Stooldown.cs +++ b/Cooldowns/Stooldown.cs @@ -1,6 +1,12 @@ -using Microsoft.Xna.Framework; +using System; +using CalamityMod.Items.Accessories; +using Microsoft.Xna.Framework; +using Terraria; using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; using Terraria.Localization; +using Terraria.ModLoader; namespace CalamityMod.Cooldowns { @@ -15,8 +21,8 @@ namespace CalamityMod.Cooldowns } public override LocalizedText DisplayName => CalamityUtils.GetText($"UI.Cooldowns.{ID}"); public override string Texture => "CalamityMod/Cooldowns/Stooldown"; - public override Color OutlineColor => new Color(197, 165, 108); - public override Color CooldownStartColor => new Color(144, 84, 29); + public override Color OutlineColor => Color.SandyBrown; + public override Color CooldownStartColor => Color.Brown; public override Color CooldownEndColor => Color.Khaki; public override SoundStyle? EndSound => new("CalamityMod/Sounds/Item/AscendantOff"); diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 5e0be2ecb2..c34d2befd8 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -1,6 +1,11 @@ -using System.Collections.Generic; -using CalamityMod.CalPlayer; +using System; +using System.Collections.Generic; +using CalamityMod.Cooldowns; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -11,7 +16,7 @@ namespace CalamityMod.Items.Accessories public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); - public static int JumpCooldown = CalamityUtils.SecondsToFrames(5); + public static int JumpCooldown = CalamityUtils.SecondsToFrames(25); public override void SetDefaults() { @@ -24,8 +29,7 @@ namespace CalamityMod.Items.Accessories public override void UpdateAccessory(Player player, bool hideVisual) { - CalamityPlayer modPlayer = player.Calamity(); - modPlayer.springStool = true; + player.GetModPlayer().springStool = true; } public override void AddRecipes() @@ -37,4 +41,151 @@ namespace CalamityMod.Items.Accessories Register(); } } + + + public class SpringStoolPlayer : ModPlayer + { + public bool springStool = false; + public int springStoolTimer = 0; + public bool hasGroundedSinceJump = true; + + public override void Load() + { + // Hook directly into vanilla's stool drawing + On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; + } + + public override void PostUpdateEquips() + { + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + { + springStoolTimer = 12; + + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); + hasGroundedSinceJump = false; + + + Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); + + // Spawn stool with downward and randomly angled force + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextFloat(-1f, 1f), 1.2f), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + SoundEngine.PlaySound(SoundID.Item61 with { Pitch = 0.3f, Volume = 0.7f }, Player.Center); + + if (IsVanillaStoolEquipped(Player)) + { + // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + } + + } + + if (springStool) + { + bool holdingUp = Player.controlUp; + bool standingStill = Player.velocity.Y == 0 && Math.Abs(Player.velocity.X) < 0.1f; + + if (holdingUp && standingStill && !Player.mount.Active) + { + int boost = 61; + if (IsVanillaStoolEquipped(Player)) + boost += 24; + + Player.portableStoolInfo.HasAStool = true; + Player.portableStoolInfo.IsInUse = true; + Player.portableStoolInfo.HeightBoost = boost; + Player.portableStoolInfo.VisualYOffset = boost; + Player.portableStoolInfo.MapYOffset = boost; + + // Forces the player into the stool-standing frame + Player.UpdatePortableStoolUsage(); + } + else + { + // Ensures the player can use the stool if they stop moving/hold up + Player.portableStoolInfo.HasAStool = true; + } + } + } + + private void HandleStoolStacking(On_PlayerDrawLayers.orig_DrawPlayer_03_PortableStool orig, ref PlayerDrawSet drawInfo) + { + bool isUsingStool = drawInfo.drawPlayer.portableStoolInfo.IsInUse; + var modPlayer = drawInfo.drawPlayer.GetModPlayer(); + bool hasSpring = modPlayer.springStool; + + if (!isUsingStool) + { + orig(ref drawInfo); + return; + } + + if (!hasSpring) + { + orig(ref drawInfo); + return; + } + + if (IsVanillaStoolEquipped(drawInfo.drawPlayer)) + { + orig(ref drawInfo); + return; + } + + return; + } + + private bool IsVanillaStoolEquipped(Player player) + { + for (int k = 3; k <= 12; k++) + { + if (player.armor[k].type == ItemID.PortableStool) + + return true; + } + return false; + } + + public override void PreUpdateMovement() + { + if (Player.velocity.Y == 0 || Player.sliding || Player.grappling[0] >= 0) + hasGroundedSinceJump = true; + + if (springStoolTimer > 0) + { + springStoolTimer--; + + if (Player.whoAmI == Main.myPlayer) + { + float launchPower = 20f * Utils.GetLerpValue(0, 10, springStoolTimer, true); + Player.velocity.Y = -launchPower; + + // Prevent vanilla jump logic from interfering + Player.jump = 0; + Player.fallStart = (int)(Player.position.Y / 16f); + } + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool) + { + if (Main.LocalPlayer.Top.Y < target.Top.Y) + { + // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + + if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) + modifiers.SetCrit(); + + else + modifiers.DisableCrit(); + } + } + } + public override void ResetEffects() + { + springStool = false; + springStoolTimer = 0; + } + } } diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs new file mode 100644 index 0000000000..48570ab1e8 --- /dev/null +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -0,0 +1,137 @@ +using System; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class SpringStoolFX : ModProjectile, ILocalizedModType + { + float rotationFactor = 0.015f; + public static float EaseOutElastic(float x, float amplitude = 1f, float period = 0.3f) + { + if (x == 0f) return 0f; + if (x == 1f) return 1f; + + amplitude = Math.Max(1f, amplitude); + + float s = (float)(period / (2 * Math.PI) * Math.Asin(1f / amplitude)); + + return (float)( + amplitude * + Math.Pow(2, -10f * x) * + Math.Sin((x - s) * (2 * Math.PI) / period) + + 1f + ); + } + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 5; + } + + public override void SetDefaults() + { + Projectile.width = 78; + Projectile.height = 142; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.friendly = false; + Projectile.penetrate = -1; + Projectile.alpha = 0; + Projectile.timeLeft = 120; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + + if (Projectile.frame < 4) + { + Projectile.frameCounter++; + + if (Projectile.frameCounter >= 4) + { + Projectile.frameCounter = 0; + Projectile.frame++; + + if (Projectile.frame > 4) + { + { + Projectile.frame = 4; // clamp to last frame + } + } + } + } + + float progress = MathHelper.Clamp(Projectile.ai[0] / 70f, 0f, 1f); + + Projectile.ai[1] = EaseOutElastic(progress); + + + Projectile.ai[0]++; + + if (Projectile.ai[0] < 3f) // Stick to bottom of player initially + { + Projectile.Center = player.Bottom + new Vector2(0f, -25f); + } + + else + { + // Begin rotating after initial launch at an increasingly fast rate + rotationFactor *= 1.033f; + Projectile.rotation -= rotationFactor; + } + + if (Projectile.ai[0] == 4f) + { + { + SoundStyle boing = new("CalamityMod/Sounds/Item/Springy"); + SoundEngine.PlaySound(boing with { Volume = 1f, PitchVariance = 0.1f }); + } + } + + if (Projectile.ai[0] == 16) // About when the spring retracts into itself, spawn dusts and sparks + { + for (int k = 0; k < 6; k++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(3) ? 7 : 8); + dust.scale = Main.rand.NextFloat(0.8f, 1.3f); + dust.velocity = new Vector2(8, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.25f, 1.2f); + dust.noGravity = false; + Particle spark = new AltLineParticle(Projectile.Center, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.9f), true, 15, 0.8f, Color.Lerp(Color.LightGray, Color.Brown, Main.rand.NextFloat(0.3f, 0.7f)) * 0.75f); + GeneralParticleHandler.SpawnParticle(spark); + } + } + + if (Projectile.ai[0] >= 28f) // Begin fading + { + Projectile.alpha += 10; + Projectile.scale *= 0.98f; + + } + + if (Projectile.alpha >= 255 || !player.active || player.dead) + Projectile.Kill(); + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + int frameHeight = texture.Height / Main.projFrames[Type]; + Rectangle sourceRect = new Rectangle(0, frameHeight * Projectile.frame, texture.Width, frameHeight); + Vector2 drawOrigin = new Vector2(texture.Width * 0.5f, frameHeight * 0.5f); + Vector2 drawPos = Projectile.Center - Main.screenPosition; + + Vector2 scale = new Vector2(Projectile.scale, Projectile.scale * Projectile.ai[1]); + + Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation, drawOrigin, scale, SpriteEffects.None, 0); + return false; + } + } +} diff --git a/Projectiles/Typeless/SpringStoolJumpFX.png b/Projectiles/Typeless/SpringStoolFX.png similarity index 100% rename from Projectiles/Typeless/SpringStoolJumpFX.png rename to Projectiles/Typeless/SpringStoolFX.png diff --git a/Projectiles/Typeless/SpringStoolJumpFX.cs b/Projectiles/Typeless/SpringStoolJumpFX.cs deleted file mode 100644 index f60434dfb2..0000000000 --- a/Projectiles/Typeless/SpringStoolJumpFX.cs +++ /dev/null @@ -1,68 +0,0 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class SpringStoolJumpFX : ModProjectile, ILocalizedModType - { - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 5; - } - - public override void SetDefaults() - { - Projectile.width = 78; - Projectile.height = 142; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.friendly = false; - Projectile.penetrate = -1; - Projectile.alpha = 0; - Projectile.timeLeft = 120; - } - - public override void AI() - { - Player player = Main.player[Projectile.owner]; - - - Projectile.rotation -= 0.005f; - - if (Projectile.frame < 4) - { - Projectile.frameCounter++; - - if (Projectile.frameCounter >= 5) - { - Projectile.frameCounter = 0; - Projectile.frame++; - - if (Projectile.frame > 4) - Projectile.frame = 4; // clamp to last frame - } - } - - - Projectile.ai[0]++; - - /* if (Projectile.ai[0] < 10f) // Stick to bottom of player initially - { - Projectile.Center = player.Bottom + new Vector2(0f, -50f); - Projectile.velocity = Vector2.Zero; - } */ - - if (Projectile.ai[0] >= 20f) // Begin fading - { - Projectile.alpha += 8; - Projectile.scale *= 0.985f; - } - - if (Projectile.alpha >= 255 || !player.active || player.dead) - Projectile.Kill(); - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs new file mode 100644 index 0000000000..36f665921a --- /dev/null +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -0,0 +1,51 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class StepStoolBonusFX : ModProjectile + { + public override string Texture => "Calamitymod/Projectiles/InvisibleProj"; + public float OpacityMultiplier = 1f; + public override void SetDefaults() + { + Projectile.width = 28; + Projectile.height = 28; + + Projectile.tileCollide = true; + Projectile.ignoreWater = true; + Projectile.friendly = false; + Projectile.penetrate = -1; + + Projectile.timeLeft = 100; + Projectile.alpha = 0; + } + + public override void AI() + { + // Gravity! + Projectile.velocity.Y += 0.15f; + + Projectile.rotation += 0.1f; + Projectile.scale -= 0.01f; + OpacityMultiplier -= 0.02f; + + } + + public override bool? CanDamage() => false; + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = TextureAssets.Extra[102].Value; + Vector2 origin = texture.Size() / 2f; + + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation, origin, Projectile.scale * 1.25f, SpriteEffects.None); + + return false; + } + } +} diff --git a/Sounds/Item/Springy.ogg b/Sounds/Item/Springy.ogg new file mode 100644 index 0000000000000000000000000000000000000000..09fa4c4f8d8e3c997347e7ffc2fb67124f8c297a GIT binary patch literal 29702 zcmeFZWmud&*C=`q4y9OeDN>3RcW2N7h2j)K~V?#vn5 z=Y7BTd}m*K|M;%+Z)Y-@WMw5QS(2<|?imGha}@v%_$O4O|IN%>eR>9Z4sx@1GO~1j z1i?XC|3Pv5i`)cKcx?Ia@YoUrD@o8N@Z#h{|67QK|JxNO3`4`x!Gc-A$(+K*(n$Re z0SXxkc2;&)RvuPP3OZ#|6IWwPJ97$2J2y)wdplcGI~RI*SUY0a+r`qw##G4J($>Mo zRNv6hSl`Li*xtzmhEDQGTTNM1RYu{h5GyM`EON0k^KtUA{t3@v)uwjF_9muILUM*~ z#@uYo9L#L2tdE2EJ2VjD-%olmadi-Y0>fvMqv(Tt{ip^2SO8!^O^*?8CPQDCkW1&0 zk|6z<>thW|NeJsBG>&BJ|5rl6X@Um;2mpi*H9CJw#%i3;oRBu!DTmMUE$=4^$G{$yCbw$>8$J?^QegPe)8qP z2L_kJ0Vao8f; z52yC!q<&3v9+yE+EBu@Dz)450DES715p8E+^b;Av@GQTjA(t#@z}jklP1`DN#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ur}Jor~A1Kj^no)ZCI{tv#)bTh>rIBP&-YXsPwJ^MG+i&3lmr zvl_%L@s18YO`RjCaS3VNL1i4G| zVvz2K)K0i61R9E-CxpW#E`6hn^dt)OqiGLWi=X?dufRp6)h%QCANU_8*R}Q;>*KR!Yb);zHA12JB+QYA=S2Cgj+u70wBBAJi8ekY@IPm^Omzr6S>E01R zpDD|nrpT&d0kVlJ`YT?hOLTH2M;9>(bjambD>f3C33o__I zD$Cxh9z1Zo;x*E9PS4#rk&4#dL3n3EBI%HJ6LEC%QDCJISn<9KCI>JvmxQA^ghXLx J009BP{{bjmGKByD literal 0 HcmV?d00001 From 2ec5be54d1ba33fa231233ad97888be78446fe8d Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 21:01:43 -0500 Subject: [PATCH 05/16] removed debug settings --- Items/Accessories/SpringStool.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index c34d2befd8..f054e0915f 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown * 2, true); hasGroundedSinceJump = false; @@ -172,7 +172,7 @@ namespace CalamityMod.Items.Accessories if (Main.LocalPlayer.Top.Y < target.Top.Y) { // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 100f; + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 10f; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) modifiers.SetCrit(); From b0b12d6de457a51d6aea9fbad4ec8ecd408edd9f Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 23 Feb 2026 22:08:59 -0500 Subject: [PATCH 06/16] Fix --- Items/Accessories/SpringStool.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index f054e0915f..214e861300 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Items.Accessories { springStoolTimer = 12; - Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown * 2, true); + Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); hasGroundedSinceJump = false; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 8549a1bc8a..c2fdf69d92 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1666,6 +1666,17 @@ SpiritGlyph: { ''' } +SpringStool: { + DisplayName: Spring Stool + Tooltip: + ''' + Hold Up to reach higher + Press [KEY] to jump super high + Super jumps can only be performed once every 25 seconds + +10% critical strike chance when striking enemies below you + ''' +} + StarbusterCore: { DisplayName: Starbuster Core Tooltip: @@ -2214,14 +2225,3 @@ XyksBlessingOrange: { [c/E1B65F:Prove that it was never a waste.'] ''' } - -SpringStool: { - DisplayName: Spring Stool - Tooltip: - ''' - Hold Up to reach higher - Press [KEY] to jump super high - This jump has a cooldown and can only be used once per time airborne - +10% critical strike chance when striking enemies below you - ''' -} From 173535fc23c1fa9258d98f8192e168d886a6d784 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 26 Feb 2026 00:11:57 -0500 Subject: [PATCH 07/16] Updated spring sprite --- CalPlayer/DrawLayers/SpringStoolSpring.png | Bin 255 -> 202 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/CalPlayer/DrawLayers/SpringStoolSpring.png b/CalPlayer/DrawLayers/SpringStoolSpring.png index ae305c7263e498e5f50150144f8b0985ec4aff7d..82271ba49b0eff4f7def2a7b7ff96c54c1b389b4 100644 GIT binary patch delta 145 zcmV;C0B-;P0m=c8L4R~fL_t(YOJfug7X8lv1X=lcAd11v*ceR1z^Sum!Swa3SHSfC zJ^R2k47_{$nh``Zfq7H_VADVV<}!5P=;8#XHMMoXG|a^d7cB(SFc(tKMWbOv5DdXE zf&p|FkA@K@7!9M*Fv0@}hS6wwH0Z*JfdK$m`Hi|qr7QXX015yANkvXXu0mjf+N(Z< delta 198 zcmV;%06G840sjGzL4T=9L_t(YOJigp5(o*4{)aNb;N9ETD0-QoG{pdJD!Ps6AS*u) zOq&@SgXx60crXof8TDKQa|ybQFmUSZSuj0q;v_JQ4yf-UD2+3W99^8iw5GNWn1;D{ z;i83LdjFn%V4D76bp7fTFb#774A4J}U;y34qhW*zM#E?{j6d)IqQeLVU@k{@A@yAZ z12C7tO2&9-ZGo%ord=4J16*MSa{)S_l8YD^0FqRDNWGudF#rGn07*qoM6N<$f{YMT AkN^Mx From 6082804fe59a453c2d486f74fe63032bb09e6b29 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 00:09:12 -0500 Subject: [PATCH 08/16] cleanup --- CalPlayer/CalamityPlayer.cs | 5 +---- Localization/en-US/Mods.CalamityMod.Keybinds.hjson | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 6b401c9c85..3a005c1529 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8,7 +8,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; -using CalamityMod.CalPlayer.DrawLayers; using CalamityMod.Cooldowns; using CalamityMod.DataStructures; using CalamityMod.Dusts; @@ -73,7 +72,6 @@ using CalamityMod.Utilities; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -3659,7 +3657,6 @@ namespace CalamityMod.CalPlayer } } } - if (CalamityKeybinds.BoosterDashHotKey.JustPressed && hasJetpack && Main.myPlayer == Player.whoAmI && rogueStealth >= rogueStealthMax * 0.25f && wearingRogueArmor && rogueStealthMax > 0 && !Player.HasCooldown(RogueBooster.ID) && !Player.mount.Active) { @@ -4571,6 +4568,7 @@ namespace CalamityMod.CalPlayer #region PreUpdateMovement public override void PreUpdateMovement() { + // Rain armor set effects if (rainSet) { @@ -6254,7 +6252,6 @@ namespace CalamityMod.CalPlayer GeneralParticleHandler.SpawnParticle(square1); GeneralParticleHandler.SpawnParticle(square2); } - #endregion #region Mana Consumption Effects diff --git a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson index e172a3d1ed..b139893fdb 100644 --- a/Localization/en-US/Mods.CalamityMod.Keybinds.hjson +++ b/Localization/en-US/Mods.CalamityMod.Keybinds.hjson @@ -16,4 +16,4 @@ TransformerHotKey.DisplayName: Transformer Hot Key GravitySwapOverride.DisplayName: Gravity Swap Override ExpandDebuffInfo.DisplayName: See Debuff Information ThePointerLock.DisplayName: The Pointer Lock On -SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hot Key +SpringStoolJumpHotKey.DisplayName: Spring Stool Jump Hotkey From 1b27ee681a9bc451c7f8bdce58eae87d7bb93c8b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 00:16:03 -0500 Subject: [PATCH 09/16] copper bar -> any copper bar --- Items/Accessories/SpringStool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 214e861300..eeb44a15eb 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories { CreateRecipe(). AddIngredient(ItemID.PortableStool). - AddIngredient(ItemID.CopperBar, 3). + AddRecipeGroup("AnyCopperBar", 3). AddTile(TileID.Anvils). Register(); } From 47550a9c80277b4c82fe1990ddc67c27c4ea97f2 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 03:58:03 -0400 Subject: [PATCH 10/16] how could they nerf him --- Items/Accessories/SpringStool.cs | 37 ++++++++++++++----- .../Mods.CalamityMod.Items.Accessories.hjson | 4 +- Projectiles/Typeless/SpringStoolFX.cs | 3 +- Projectiles/Typeless/StepStoolBonusFX.cs | 2 +- 4 files changed, 32 insertions(+), 14 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index eeb44a15eb..42e53207fa 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -7,6 +7,7 @@ using Terraria; using Terraria.Audio; using Terraria.DataStructures; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Accessories @@ -15,8 +16,10 @@ namespace CalamityMod.Items.Accessories { public new string LocalizationCategory => "Items.Accessories"; public override void ModifyTooltips(List list) => list.IntegrateHotkey(CalamityKeybinds.SpringStoolJumpHotKey); + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((JumpCooldown).FramesToSeconds(), (CritRateBoostAboveTargets)); - public static int JumpCooldown = CalamityUtils.SecondsToFrames(25); + public static int JumpCooldown = CalamityUtils.SecondsToFrames(20); + public static float CritRateBoostAboveTargets = 5f; public override void SetDefaults() { @@ -55,16 +58,23 @@ namespace CalamityMod.Items.Accessories On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; } + public override void PostUpdate() + { + bool theCollisionCheck = Collision.TileCollision(Player.position + Vector2.UnitY, Vector2.Zero, Player.width, Player.height, fallThrough: false, fall2: false).Y == 0f; + + if ((Player.velocity.Y == 0 && theCollisionCheck) || Player.grappling[0] >= 0) + hasGroundedSinceJump = true; + } + public override void PostUpdateEquips() { - if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active) + if (CalamityKeybinds.SpringStoolJumpHotKey.JustPressed && springStool && Main.myPlayer == Player.whoAmI && !Player.HasCooldown(Stooldown.ID) && !Player.mount.Active && hasGroundedSinceJump) { springStoolTimer = 12; Player.AddCooldown(Stooldown.ID, (int)SpringStool.JumpCooldown, true); hasGroundedSinceJump = false; - Vector2 spawnPos = Player.Bottom + new Vector2(0f, -60f); // Spawn stool with downward and randomly angled force @@ -76,7 +86,6 @@ namespace CalamityMod.Items.Accessories // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); } - } if (springStool) @@ -99,6 +108,7 @@ namespace CalamityMod.Items.Accessories // Forces the player into the stool-standing frame Player.UpdatePortableStoolUsage(); } + else { // Ensures the player can use the stool if they stop moving/hold up @@ -147,9 +157,6 @@ namespace CalamityMod.Items.Accessories public override void PreUpdateMovement() { - if (Player.velocity.Y == 0 || Player.sliding || Player.grappling[0] >= 0) - hasGroundedSinceJump = true; - if (springStoolTimer > 0) { springStoolTimer--; @@ -157,7 +164,7 @@ namespace CalamityMod.Items.Accessories if (Player.whoAmI == Main.myPlayer) { float launchPower = 20f * Utils.GetLerpValue(0, 10, springStoolTimer, true); - Player.velocity.Y = -launchPower; + Player.velocity.Y = -launchPower * Player.gravDir; // Prevent vanilla jump logic from interfering Player.jump = 0; @@ -165,14 +172,16 @@ namespace CalamityMod.Items.Accessories } } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (springStool) { + // When hitting a target below you if (Main.LocalPlayer.Top.Y < target.Top.Y) { - // Effective +10% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a better way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + 10f; + // Effective +8% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way + float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) modifiers.SetCrit(); @@ -182,10 +191,18 @@ namespace CalamityMod.Items.Accessories } } } + public override void ResetEffects() { springStool = false; springStoolTimer = 0; } + + public override void UpdateDead() + { + springStool = false; + springStoolTimer = 0; + hasGroundedSinceJump = true; + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 7ea64c36a5..92a010c0c2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1673,8 +1673,8 @@ SpringStool: { ''' Hold Up to reach higher Press [KEY] to jump super high - Super jumps can only be performed once every 25 seconds - +10% critical strike chance when striking enemies below you + Super jumps can only be performed once every {0} seconds and after touching the ground + +{1}% critical strike chance when striking enemies below you ''' } diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs index 48570ab1e8..40d3451bcf 100644 --- a/Projectiles/Typeless/SpringStoolFX.cs +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -2,6 +2,7 @@ using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using rail; using Terraria; using Terraria.Audio; using Terraria.ModLoader; @@ -130,7 +131,7 @@ namespace CalamityMod.Projectiles.Typeless Vector2 scale = new Vector2(Projectile.scale, Projectile.scale * Projectile.ai[1]); - Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation, drawOrigin, scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(texture, drawPos, sourceRect, Projectile.GetAlpha(lightColor), Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), drawOrigin, scale, SpriteEffects.None, 0); return false; } } diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index 36f665921a..42f2c8a900 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Typeless Texture2D texture = TextureAssets.Extra[102].Value; Vector2 origin = texture.Size() / 2f; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation, origin, Projectile.scale * 1.25f, SpriteEffects.None); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); return false; } From 9021c3bd5c1133da3cf702c89a0c424af0b4a8c5 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 8 Mar 2026 03:58:47 -0400 Subject: [PATCH 11/16] updated comment --- Items/Accessories/SpringStool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 42e53207fa..5cbac7f78f 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -180,7 +180,7 @@ namespace CalamityMod.Items.Accessories // When hitting a target below you if (Main.LocalPlayer.Top.Y < target.Top.Y) { - // Effective +8% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way + // Effective +5% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) From 6d53e925dec9148986eb4e1cb7eb405db43091c8 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Thu, 12 Mar 2026 02:41:09 -0400 Subject: [PATCH 12/16] step stool interaction fx tweak --- Items/Accessories/SpringStool.cs | 2 +- Projectiles/Typeless/StepStoolBonusFX.cs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 5cbac7f78f..06a0ff9f5c 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Accessories if (IsVanillaStoolEquipped(Player)) { // Spawn a step stool copy with a random velocity. Only works if step stool is equipped as well as spring stool. - Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos, new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); + Projectile.NewProjectile(Player.GetSource_FromThis(), spawnPos + new Vector2(0f, -4f), new Vector2(Main.rand.NextBool() ? Main.rand.NextFloat(6f, 7f) : Main.rand.NextFloat(-6f, -7f), Main.rand.NextFloat(-8f, -10f)), ModContent.ProjectileType(), 0, 0f, Player.whoAmI); } } diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index 42f2c8a900..a1763cf6c5 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -30,10 +30,14 @@ namespace CalamityMod.Projectiles.Typeless // Gravity! Projectile.velocity.Y += 0.15f; - Projectile.rotation += 0.1f; - Projectile.scale -= 0.01f; - OpacityMultiplier -= 0.02f; + Projectile.rotation += 0.12f; + Projectile.scale -= 0.0125f; + OpacityMultiplier -= 0.025f; + if (Projectile.timeLeft > 99) + Projectile.alpha = 255; + else + Projectile.alpha = 0; } public override bool? CanDamage() => false; @@ -43,7 +47,7 @@ namespace CalamityMod.Projectiles.Typeless Texture2D texture = TextureAssets.Extra[102].Value; Vector2 origin = texture.Size() / 2f; - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * OpacityMultiplier, Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, null, Color.White * ((1f - (Projectile.alpha / 255f)) * OpacityMultiplier), Projectile.rotation + (Main.player[Projectile.owner].gravDir == -1 ? MathHelper.Pi : 0), origin, Projectile.scale * 1.25f, SpriteEffects.None); return false; } From e024ed2daddbd6a10405465a478a659b2205d39a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 14 Mar 2026 22:17:24 -0400 Subject: [PATCH 13/16] tooltip clarification --- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 92a010c0c2..6938d91cb5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1673,7 +1673,7 @@ SpringStool: { ''' Hold Up to reach higher Press [KEY] to jump super high - Super jumps can only be performed once every {0} seconds and after touching the ground + Super jumps can only be performed once every {0} seconds and after landing +{1}% critical strike chance when striking enemies below you ''' } From 938794fd1b19dafafb8776f8b5757d17e130871b Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 23:13:55 -0400 Subject: [PATCH 14/16] U --- CalamityKeybinds.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalamityKeybinds.cs b/CalamityKeybinds.cs index 99b1ba8dd1..62b5f44039 100644 --- a/CalamityKeybinds.cs +++ b/CalamityKeybinds.cs @@ -41,7 +41,7 @@ namespace CalamityMod NormalityRelocatorHotKey = KeybindLoader.RegisterKeybind(Mod, "NormalityRelocator", "Z"); RageHotKey = KeybindLoader.RegisterKeybind(Mod, "RageMode", "V"); SpectralVeilHotKey = KeybindLoader.RegisterKeybind(Mod, "SpectralVeilTeleport", "Z"); - SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "Q"); + SpringStoolJumpHotKey = KeybindLoader.RegisterKeybind(Mod, "SpringStoolJumpHotKey", "U"); TransformerHotKey = KeybindLoader.RegisterKeybind(Mod, "TransformerHotKey", "K"); SwitchGravityHotkey = KeybindLoader.RegisterKeybind(Mod, "GravitySwapOverride", "T"); ExpandDebuffInfo = KeybindLoader.RegisterKeybind(Mod, "ExpandDebuffInfo", "LeftControl"); From a0494b1f5ae23c489e03639426ccdca8922f1e4f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 21 Mar 2026 23:36:02 -0400 Subject: [PATCH 15/16] Fixed en-US localization on FX projectiles --- Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson | 2 ++ Projectiles/Typeless/SpringStoolFX.cs | 2 ++ Projectiles/Typeless/StepStoolBonusFX.cs | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 4521bdd13e..21069bc0a9 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -137,8 +137,10 @@ SkyFlareFriendly.DisplayName: Flare SlimeStream.DisplayName: Slime Stream SlurperBobber.DisplayName: Slurper Bobber SpiritOriginBullseye.DisplayName: Spirit Origin Bullseye +SpringStoolFX.DisplayName: Spring Stool StandingFire.DisplayName: Flame StarStruckWaterBottle.DisplayName: Bottle +StepStoolBonusFX.DisplayName: Step Stool Bonus StickyFeatherAero.DisplayName: Feather StomperSlam.DisplayName: Stomper Slam SuicideBomberDemon.DisplayName: Demon diff --git a/Projectiles/Typeless/SpringStoolFX.cs b/Projectiles/Typeless/SpringStoolFX.cs index 40d3451bcf..43b814b8a1 100644 --- a/Projectiles/Typeless/SpringStoolFX.cs +++ b/Projectiles/Typeless/SpringStoolFX.cs @@ -11,6 +11,8 @@ namespace CalamityMod.Projectiles.Typeless { public class SpringStoolFX : ModProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Typeless"; + float rotationFactor = 0.015f; public static float EaseOutElastic(float x, float amplitude = 1f, float period = 0.3f) { diff --git a/Projectiles/Typeless/StepStoolBonusFX.cs b/Projectiles/Typeless/StepStoolBonusFX.cs index a1763cf6c5..6cd1a56d57 100644 --- a/Projectiles/Typeless/StepStoolBonusFX.cs +++ b/Projectiles/Typeless/StepStoolBonusFX.cs @@ -7,8 +7,9 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Typeless { - public class StepStoolBonusFX : ModProjectile + public class StepStoolBonusFX : ModProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Typeless"; public override string Texture => "Calamitymod/Projectiles/InvisibleProj"; public float OpacityMultiplier = 1f; public override void SetDefaults() From 9f796441f003e5615d576c45eba174c729a0630b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 22 Mar 2026 11:24:01 -0400 Subject: [PATCH 16/16] A scuffed but more accurate implementation of Spring Stool's crit boost --- Items/Accessories/SpringStool.cs | 48 ++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/Items/Accessories/SpringStool.cs b/Items/Accessories/SpringStool.cs index 06a0ff9f5c..e68a6b1687 100644 --- a/Items/Accessories/SpringStool.cs +++ b/Items/Accessories/SpringStool.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Accessories public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs((JumpCooldown).FramesToSeconds(), (CritRateBoostAboveTargets)); public static int JumpCooldown = CalamityUtils.SecondsToFrames(20); - public static float CritRateBoostAboveTargets = 5f; + public static int CritRateBoostAboveTargets = 5; public override void SetDefaults() { @@ -56,6 +56,10 @@ namespace CalamityMod.Items.Accessories { // Hook directly into vanilla's stool drawing On_PlayerDrawLayers.DrawPlayer_03_PortableStool += HandleStoolStacking; + + // Used to apply the conditional crit chance boost + // Projectiles uses standard tML hooks + On_Player.ProcessHitAgainstNPC += HandleExtraMeleeHitboxCrit; } public override void PostUpdate() @@ -173,22 +177,36 @@ namespace CalamityMod.Items.Accessories } } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + // Adds crit to melee hitboxes + private static void HandleExtraMeleeHitboxCrit(On_Player.orig_ProcessHitAgainstNPC orig, Player self, Item sItem, Rectangle itemRectangle, int originalDamage, float knockback, int npcIndex) { - if (springStool) + bool getBoost = self.GetModPlayer().springStool && self.Top.Y < Main.npc[npcIndex].Top.Y; + if (getBoost) + sItem.crit += SpringStool.CritRateBoostAboveTargets; + + orig(self, sItem, itemRectangle, originalDamage, knockback, npcIndex); + + if (getBoost) + sItem.crit -= SpringStool.CritRateBoostAboveTargets; + } + // Scuffed implementation to add crit to projectiles, using one hook to add it and then a later hook to remove it + // There are two return statements in between these hooks that I would normally be nervous of, however neither actually affect this at all: + // * The first is Electrosphere Launcher's rockets dying on hit, which kills the projectile anyways and can just have a manual check against + // * The second is Abigail's Flower hit cooldown logic, which does nothing since it's a minion that doesn't crit + public override void ModifyHitNPCWithProj(Projectile proj, NPC target, ref NPC.HitModifiers modifiers) + { + if (springStool && proj.type != ProjectileID.ElectrosphereMissile) { - // When hitting a target below you - if (Main.LocalPlayer.Top.Y < target.Top.Y) - { - // Effective +5% crit chance. Increasing crit chance additively through manual rolling is scuffed for crossmod compatability, feel free to improve it if you know a cleaner way - float finalCritChance = Player.GetTotalCritChance(modifiers.DamageType) + SpringStool.CritRateBoostAboveTargets; - - if (Main.rand.NextFloat(1f, 101f) <= finalCritChance) - modifiers.SetCrit(); - - else - modifiers.DisableCrit(); - } + if (Player.Top.Y < target.Top.Y) + proj.CritChance += SpringStool.CritRateBoostAboveTargets; + } + } + public override void OnHitNPCWithProj(Projectile proj, NPC target, NPC.HitInfo hit, int damageDone) + { + if (springStool && proj.type != ProjectileID.ElectrosphereMissile) + { + if (Player.Top.Y < target.Top.Y) + proj.CritChance -= SpringStool.CritRateBoostAboveTargets; } }