From 650fb436607c041f6660f3f5ccbe4db11e734095 Mon Sep 17 00:00:00 2001 From: Big E Date: Sun, 4 Jan 2026 18:26:53 -0500 Subject: [PATCH 1/8] + Palette Swapping --- Effects/CalamityShaders.cs | 4 ++++ Effects/PaletteSwap.fx | 35 +++++++++++++++++++++++++++++++++++ Effects/PaletteSwap.xnb | Bin 0 -> 2876 bytes 3 files changed, 39 insertions(+) create mode 100644 Effects/PaletteSwap.fx create mode 100644 Effects/PaletteSwap.xnb diff --git a/Effects/CalamityShaders.cs b/Effects/CalamityShaders.cs index 0e06aeef01..c97027ab00 100644 --- a/Effects/CalamityShaders.cs +++ b/Effects/CalamityShaders.cs @@ -261,6 +261,7 @@ namespace CalamityMod.Effects internal static Asset SeaPrismColorBlendingShader; internal static Asset Dissolve; + internal static Asset PaletteSwap; internal static Asset BrainOfCthulhuForcefield; #endregion @@ -525,6 +526,9 @@ namespace CalamityMod.Effects Dissolve = LoadShader("Dissolve"); RegisterMiscShader(Dissolve, "DissolvePass", "Dissolve"); + PaletteSwap = LoadShader("PaletteSwap"); + RegisterMiscShader(PaletteSwap, "PaletteSwapPass", "PaletteSwap"); + BrainOfCthulhuForcefield = LoadShader("ScreenShaders/BrainOfCthulhuForcefield"); RegisterScreenShader(BrainOfCthulhuForcefield, "BoCShieldPass", "BrainOfCthulhuForcefield"); #endregion diff --git a/Effects/PaletteSwap.fx b/Effects/PaletteSwap.fx new file mode 100644 index 0000000000..2de436b8cd --- /dev/null +++ b/Effects/PaletteSwap.fx @@ -0,0 +1,35 @@ +sampler baseTexture : register(s0); + +float4 sourcePalette[16]; +float4 targetPalette[16]; +float matchThreshold = 0.01; +int paletteSize; + +float4 PixelShaderFunction(float4 sampleColor : COLOR0, float2 coords : TEXCOORD0) : COLOR +{ + float4 color = tex2D(baseTexture, coords) * sampleColor; + + // Check each color in the source palette + for (int i = 0; i < paletteSize; i++) + { + float3 diff = color.rgb - sourcePalette[i].rgb; + float distance = sqrt(dot(diff, diff)); + + // If color is close enough to this palette color, swap it + if (distance <= matchThreshold) + { + color.rgb = targetPalette[i].rgb; + break; // Stop checking once we find a match + } + } + + return color; +} + +technique Technique1 +{ + pass PaletteSwapPass + { + PixelShader = compile ps_3_0 PixelShaderFunction(); + } +} \ No newline at end of file diff --git a/Effects/PaletteSwap.xnb b/Effects/PaletteSwap.xnb new file mode 100644 index 0000000000000000000000000000000000000000..742449fa6d836c4acd755fc77f535116ffbf5e95 GIT binary patch literal 2876 zcmeH|&u`pB6vv;vzucr`!|worx=jSFSXOD8pj2wqkO&%yf z1WwC+4nc4PX?v?S{S$gf??@csz@Y~pIQGB+E;Zjb_BPIr_zTMHe(m=@els4wH)C&o zy1HL5u8k8J-y5Ga>%JFwyJ2;!?N&eX-954I`FE;oUON=+u=?TduBeB%gu5gBiv3^F zH+;9#Xx4*@{kiairq^CxsLt`PVy|^uVb>SSZP5*Vw^gw>y4$U0{bTV>&ATJo%S#LM z_1&dyad}59&MhupA#TQxV?@7>KYlQ&+~i=KiJw$*iH*yYho%$v>G3SAZ8s1#alm&a z4mY56KA`b<+%I(*J+o~BPab$(zb-c1mIy-uf0(ZWGfB(;`8ru1oUhRJzY^i;d~wA6 zG+%7<+G36UHgm0v^PU^l8?}Znf`-@HAsU808XB2CFp1Z2C#lG0^IM_D;&FK0W*gTg zoyq3D+u3k~fUv2lChCoL^Xsm-Op^upJQuDj-;T$af`+XEV}0o0`~`v!xI@|`I^E06 z^BDFY8Gkz6kKDz|*gvHG|3d8JG(Iyd#c0EO+$+M$#qpE)XIiU$u*!S-I`;wN`KNo_ zUIObeh73H7#F^VqkV&?B&ik+*K)*nIKi2QipU~eB56gM8aAArCV1h8a2%A~<{gFpC z4D~|*+DI*rcsAMVT=OI{IcDp~cgn^N<9LqTPVdE|BSVdyS941up6%o5y{G4=6WqRX zdybxdqwI^fF4^lhH*eaT4gP%DYu;X`*@AJkI{$w4>f(HLeraKWJ|iler*a>w>zJqy z9Yc?fnO{(x9%9u%HZ=E;`HbQ#@He0@p^oCSNjzb!>o~07zj6+R$M>p7R6b-IYr2Qp zDjP9}WR?4?YFU@TBluAtF<9nh^odx92KpIPQhs7vy;)55ZMDQB-eNfu@dm}<(Ovd) zsehiLKKuF9zmWQc)SrRRV;0F!V{YL!QKX3;`e2J4_KTSB33H^OSd?J{ye2p<%VL=u zVR#^!*O(&<8XL%>#$s6-VR)BGOJj~aqp^V;(^xFWM;LN0&uYw(&uMHRCo~qza>_W@ zoIm8Lhn#$8Dc^+sk5WnHntcc2yeIZ0l+Z>^nJ4)!sTxe8J|{I`=E&z2OY&`EU6?eG zFK8^5FM^qAT{wHJH+vBVW_lK)$ZASiUjBxCYZ2bL5*E z8_2gb7Rz%f Date: Wed, 18 Mar 2026 23:28:26 -0500 Subject: [PATCH 2/8] doze dev wings --- Items/Accessories/Wings/TiredTail.cs | 432 ++++++++++++++++++ Items/Accessories/Wings/TiredTail.png | Bin 0 -> 557 bytes Items/Accessories/Wings/TiredTailPallette.png | Bin 0 -> 1005 bytes Items/Accessories/Wings/TiredTailSegment.png | Bin 0 -> 520 bytes Items/Accessories/Wings/TiredTailTail.png | Bin 0 -> 564 bytes Items/Accessories/Wings/TiredTail_Wings.png | Bin 0 -> 165 bytes ....CalamityMod.Items.Accessories.Wings.hjson | 10 + 7 files changed, 442 insertions(+) create mode 100644 Items/Accessories/Wings/TiredTail.cs create mode 100644 Items/Accessories/Wings/TiredTail.png create mode 100644 Items/Accessories/Wings/TiredTailPallette.png create mode 100644 Items/Accessories/Wings/TiredTailSegment.png create mode 100644 Items/Accessories/Wings/TiredTailTail.png create mode 100644 Items/Accessories/Wings/TiredTail_Wings.png diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs new file mode 100644 index 0000000000..b0cb5af6c7 --- /dev/null +++ b/Items/Accessories/Wings/TiredTail.cs @@ -0,0 +1,432 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Enums; +using CalamityMod.Items.Armor.Auric; +using CalamityMod.Items.Armor.Bloodflare; +using CalamityMod.Items.Armor.Demonshade; +using CalamityMod.Items.Armor.Empyrean; +using CalamityMod.Items.Armor.Fearmonger; +using CalamityMod.Items.Armor.GemTech; +using CalamityMod.Items.Armor.GodSlayer; +using CalamityMod.Items.Armor.Hydrothermic; +using CalamityMod.Items.Armor.OmegaBlue; +using CalamityMod.Items.Armor.Prismatic; +using CalamityMod.Items.Armor.Silva; +using CalamityMod.Items.Armor.Tarragon; +using CalamityMod.Rarities; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.Items.Accessories.Wings +{ + // The equip sprite is actually blank as a custom draw layer is used to draw the real sprites without any base sprites conflicting + + [AutoloadEquip(EquipType.Wings)] + public class TiredTail : BaseWings + { + //Same stats as Starboard, but with 4 seconds flight instead of 3 + public override float BonusAscentWhileFalling => 0.95f; + public override float BonusAscentWhileRising => 0.15f; + public override float RisingSpeedThreshold => 1f; + public override float MaxAscentSpeed => 4.5f; + public override float BaseAscent => 0.1f; + + float BoostPower => 3f; + + public override void SetStaticDefaults() + { + //Same stats as Starboard, but with 4 seconds flight instead of 3 + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = ArmorIDs.Wing.Sets.Stats[(int)VanillaWingID.LongRainbowTrailWings]; + ArmorIDs.Wing.Sets.Stats[Item.wingSlot].FlyTime = CalamityUtils.SecondsToFrames(4); + } + + public override void SetDefaults() + { + base.SetDefaults(); + Item.width = 22; + Item.height = 20; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); + Item.Calamity().devItem = true; + } + + public override void UpdateAccessory(Player player, bool hideVisual) + { + if (!hideVisual) + player.GetModPlayer().tiredTailDraw = true; + if (player.velocity.Y != 0) + { + + if (player.dashDelay != -1) + player.runSlowdown *= 6; + } + + + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 9f, 3.25f, true, 16, 10f); + } + + public override void UpdateVanity(Player player) + { + player.GetModPlayer().tiredTailDraw = true; + } + + public override bool WingUpdate(Player player, bool inUse) => true; + + public override void AdditionalFlightMovement(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) + { + if (player.TryingToHoverDown && player.controlJump && player.wingTime > 0f && !player.merman) + { + player.wingTime += 0.5f; + player.velocity.Y *= 0.8f; + if (player.velocity.Y > -2f && player.velocity.Y < 1f) + player.velocity.Y = 1E-05f; + + ascentWhenFalling *= 0f; + ascentWhenRising *= 0f; + constantAscend *= 0f; + } + if (player.TryingToHoverUp) + { + ascentWhenFalling *= BoostPower; + ascentWhenRising *= BoostPower; + maxCanAscendMultiplier /= 1.5f; + maxAscentMultiplier /= 1.5f; + constantAscend *= BoostPower; + player.wingTime -= 1; + } + } + } + + public class TiredTailPlayer : ModPlayer + { + public bool tiredTailDraw = false; + public List<(Vector2 pos, float rot)> tailPos; + public override void ResetEffects() + { + tiredTailDraw = false; + } + public override void PostUpdate() + { + if (tiredTailDraw) + { + if (tailPos == null) + { + tailPos = new(); + for (var i = 0; i < 3; i++) + { + + tailPos.Add(new(Player.Center, 0)); + } + } + for (var i = 0; i < tailPos.Count; i++) + { + Vector2 nextCent = Vector2.Zero; + float nextRot = 0; + if (i == 0) + { + nextCent = Player.Center + new Vector2(0, 6); + nextRot = new Vector2(Player.direction, -0.325f).ToRotation(); + } + else + { + nextCent = tailPos[i - 1].Item1; + nextRot = tailPos[i - 1].Item2; + } + + Vector2 destinationOffset = nextCent - tailPos[i].Item1; + if (nextRot != tailPos[i].Item2) + { + float angle = MathHelper.WrapAngle(nextRot - tailPos[i].Item2); + destinationOffset = destinationOffset.RotatedBy(angle * 0.1f); + } + var rotation = destinationOffset.ToRotation(); + + var center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (12 * 1); + if (i == tailPos.Count - 1) + { + center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (22 * 1); + } + tailPos[i] = new(center, rotation); + } + } + else + { + tailPos = null; + } + } + } + public class TailDraw : PlayerDrawLayer + { + List ColorPallettes = new(); + public override void SetStaticDefaults() + { + Main.QueueMainThreadAction(() => + { + //Load palettes automatically + var texture = ModContent.Request("CalamityMod/Items/Accessories/Wings/TiredTailPallette",ReLogic.Content.AssetRequestMode.ImmediateLoad).Value; + var BaseArray = new Color[texture.Width * texture.Height]; + texture.GetData(BaseArray); + List pal = new(); + for (var i = 0; i < BaseArray.Length; i++) + { + if (i % texture.Width == 0) + { + if (pal.Count > 0) + ColorPallettes.Add(pal.ToArray()); + pal = new(); + } + pal.Add(BaseArray[i].ToVector4()); + } + ColorPallettes.Add(pal.ToArray()); + ArmorPallettes = + [ + //silva + ([ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[2]), + //god slayer + ([ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[3]), + //hydro + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[4]), + //auric + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[5]), + //fearmonger + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[6]), + //Bloodlfare + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[7]), + //Tarragon + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[8]), + //Omega Blue + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[9]), + //Gem Tech + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[10]), + //Demonshade + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[11]), + //Prismatic + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[12]), + //Empyrean + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[13]), + //Solar + ([ItemID.SolarFlareHelmet], + [ItemID.SolarFlareBreastplate], + [ItemID.SolarFlareLeggings], + ColorPallettes[14]), + //Vortex + ([ItemID.VortexHelmet], + [ItemID.VortexBreastplate], + [ItemID.VortexLeggings], + ColorPallettes[15]), + //Nebula + ([ItemID.NebulaHelmet], + [ItemID.NebulaBreastplate], + [ItemID.NebulaLeggings], + ColorPallettes[16]), + //Stardust + ([ItemID.StardustHelmet], + [ItemID.StardustBreastplate], + [ItemID.StardustLeggings], + ColorPallettes[17]), + ]; + }); + + } + + List<(List heads, List bodies, List legs, Vector4[] pallette)> ArmorPallettes = []; + public override bool GetDefaultVisibility(PlayerDrawSet drawInfo) => true; + + public override Position GetDefaultPosition() => new BeforeParent(PlayerDrawLayers.Wings); + + protected override void Draw(ref PlayerDrawSet drawInfo) + { + ArmorPallettes = + [ + //silva + ([ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[2]), + //god slayer + ([ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[3]), + //hydro + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[4]), + //auric + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[5]), + //fearmonger + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[6]), + //Bloodlfare + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[7]), + //Tarragon + ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[8]), + //Omega Blue + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[9]), + //Gem Tech + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[10]), + //Demonshade + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[11]), + //Prismatic + ([ItemType()], + [ItemType()], + [ItemType()], + ColorPallettes[12]) + ]; + var player = drawInfo.drawPlayer; + var modplayer = drawInfo.drawPlayer.GetModPlayer(); + var tex1 = Request("CalamityMod/Items/Accessories/Wings/TiredTailSegment").Value; + var tex2 = Request("CalamityMod/Items/Accessories/Wings/TiredTailTail").Value; + if (modplayer.tailPos != null) + { + var TargetPallette = ColorPallettes[1]; + foreach (var item in ArmorPallettes) + { + if ((item.heads.Count == 0 || item.heads.Any(x => ContentSamples.ItemsByType[x].headSlot == player.head)) + && (item.bodies.Count == 0 || item.bodies.Any(x => ContentSamples.ItemsByType[x].bodySlot == player.body)) + && (item.legs.Count == 0 || item.legs.Any(x => ContentSamples.ItemsByType[x].legSlot == player.legs))) + { + TargetPallette = item.pallette; + break; + } + } + using var SegmentLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex1.Width, tex1.Height); + using var TailLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex2.Width, tex2.Height); + using (Main.spriteBatch.Scope()) + { + using (SegmentLease.Scope(clearColor: Color.Transparent)) + { + var shaderSnap = new SpriteBatchSnapshot(); + shaderSnap.SortMode = SpriteSortMode.Immediate; + shaderSnap.SamplerState = SamplerState.PointClamp; + shaderSnap.TransformMatrix = Matrix.identity; + Main.spriteBatch.Begin(shaderSnap); + + MiscShaderData paletteSwap = GameShaders.Misc["CalamityMod:PaletteSwap"]; + paletteSwap.Shader.Parameters["sourcePalette"].SetValue(ColorPallettes[0]); + paletteSwap.Shader.Parameters["paletteSize"].SetValue(ColorPallettes[0].Length); + paletteSwap.Shader.Parameters["targetPalette"].SetValue(TargetPallette); + paletteSwap.Shader.Parameters["matchThreshold"].SetValue(0.0001f); + paletteSwap.Apply(); + Main.spriteBatch.Draw(tex1, Vector2.Zero, Color.White); + Main.spriteBatch.End(); + } + using (TailLease.Scope(clearColor: Color.Transparent)) + { + var shaderSnap = new SpriteBatchSnapshot(); + shaderSnap.SortMode = SpriteSortMode.Immediate; + shaderSnap.SamplerState = SamplerState.PointClamp; + shaderSnap.TransformMatrix = Matrix.identity; + Main.spriteBatch.Begin(shaderSnap); + + MiscShaderData paletteSwap = GameShaders.Misc["CalamityMod:PaletteSwap"]; + paletteSwap.Shader.Parameters["sourcePalette"].SetValue(ColorPallettes[0]); + paletteSwap.Shader.Parameters["paletteSize"].SetValue(ColorPallettes[0].Length); + paletteSwap.Shader.Parameters["targetPalette"].SetValue(TargetPallette); + paletteSwap.Shader.Parameters["matchThreshold"].SetValue(0.01f); + paletteSwap.Apply(); + Main.spriteBatch.Draw(tex2, Vector2.Zero, Color.White); + Main.spriteBatch.End(); + } + } + var calamityPlayer = drawInfo.drawPlayer.Calamity(); + //Copied from the rogue steallth visuals + // TODO -- rogue stealth visuals are an utter catastrophe and should be fully destroyed on next stealth rework + float r = 1; + float g = 1; + float b = 1; + float a = 1; + if (calamityPlayer.rogueStealth > 0f && calamityPlayer.rogueStealthMax > 0f && drawInfo.drawPlayer.townNPCs < 3f && CalamityClientConfig.Instance.StealthInvisibility) + { + // A translucent orchid color, the rogue class color + float colorValue = calamityPlayer.rogueStealth / calamityPlayer.rogueStealthMax * 0.9f; //0 to 0.9 + r = 1f - (colorValue * 0.89f); //255 to 50 + g = 1f - colorValue; //255 to 25 + b = 1f - (colorValue * 0.89f); //255 to 50 + a = 1f - colorValue; //255 to 25 + } + + for (var i = modplayer.tailPos.Count - 1; i >= 0; i--) + { + var color2 = Lighting.GetColor(modplayer.tailPos[i].pos.ToTileCoordinates()); + var color = new Color((int)(color2.R * r), (int)(color2.G * g), (int)(color2.B * b), (int)(color2.A * a)); + if (i == modplayer.tailPos.Count - 1) + { + drawInfo.DrawDataCache.Add(new(TailLease.Target, modplayer.tailPos[i].pos - Main.screenPosition, null, color, modplayer.tailPos[i].rot + (float)Math.PI, tex2.Size() / 2f, 1f, SpriteEffects.None, 0)); + } + else + { + drawInfo.DrawDataCache.Add(new(SegmentLease.Target, modplayer.tailPos[i].pos - Main.screenPosition, null, color, modplayer.tailPos[i].rot + (float)Math.PI, tex1.Size() / 2f, 1f, SpriteEffects.None, 0)); + } + } + } + + } + } +} diff --git a/Items/Accessories/Wings/TiredTail.png b/Items/Accessories/Wings/TiredTail.png new file mode 100644 index 0000000000000000000000000000000000000000..2f0bacd764022998fa394efd25f851832554984c GIT binary patch literal 557 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ez!3-p)wda)qDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheDgizruJSUDn_pf}-hRi`IzF=Vcv;@`)icl77>B)Fw&qUSteD_Zpu&`G zIr2b?rzFTP_&)+L2;Dz-4k*r9;1OBOz`(a3gc&VZgH?cn5+$w?CBgY=CFO}lsSE*$ znRz98ey$-3rh0~YmN|L1?0{;vrABzBd3tIwZ~!^13{s4&42(dQ7Z6KB*&ttOFfxP1 znSg9VMkWRUARPt7ne8lK@hl)41eTRCGQ0qK9!8^C$^ev_z|Oz|RB2#jY{0kxVk*c+ z)&&rgrU2O>zyvgx39K^6(gMhW>M}Gi0LiklO*yqQuqqqKoZ{)?7@`q8by6VT5d{vH zz?IBZ|9|JPWtsmDzU#R{ch3m{En}61HUF>9y~Cii^orMl)_<%~!F!$7uKj#FkKf>? zwetMytQ(#h)pE_4Dfn`3s$i7gZFPrfXYX8A3Rs=hc0%&P?%mb5Qn;`7EI+Ev@F8m2 z3PT}Jg=2S^ikX(C2udh6aMzS=Wc_h);S8q?-B&U<{uSjPV9#DBxOcZtU_HpKp00i_ I>zopr0DNDd%m4rY literal 0 HcmV?d00001 diff --git a/Items/Accessories/Wings/TiredTailPallette.png b/Items/Accessories/Wings/TiredTailPallette.png new file mode 100644 index 0000000000000000000000000000000000000000..9951e8cd5af02487ada4b84538e1b805f6e80fff GIT binary patch literal 1005 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eM!2~4DCV9I7DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5`$3q|f;CtLC@4|l8c`CQpH@ne8c>S(n@eucd&K5+Uf zH6Idh^*TFiiQn|3;PSl_?)`rF`O#zHk535BhrF>?Zzw{QE)1_D`NCwloy2*^^?t{m03G0B5ah zF4MBi3Tb4NlruCWU#2}ns^Gu&Qhefxx@N&T5sseI8DAG5=*?)bWyFLd4( z+d2K}=hLr<-Fc zem`*Yv$=X^XB5M%Q$Lm&{d@Yf>5H+)`IwJYegb=o*6Ezyv}TvdRPEC)>wCTxEo1t2 Zz`o}Cm4%@~zczu=tf#A=%Q~loCIBE~g-`$h literal 0 HcmV?d00001 diff --git a/Items/Accessories/Wings/TiredTailSegment.png b/Items/Accessories/Wings/TiredTailSegment.png new file mode 100644 index 0000000000000000000000000000000000000000..786afd620d79b29b5841a45776ae8dd69428f3bd GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRr!3-q-mAvr-QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`)dPG&T+#Br15j!LI|B<)rGb&L0pkLQsURC!7eGv! z0%U^#6VO~Hu*x7y3m^-s%h138B&#F(+IV6x`$-@(+tbA{L?gKLf+Lr+AqPu?KmJ`)>DrI9YL7+-L@;;-YmLe?d<0 MboFyt=akR{0Kq$mQUCw| literal 0 HcmV?d00001 diff --git a/Items/Accessories/Wings/TiredTailTail.png b/Items/Accessories/Wings/TiredTailTail.png new file mode 100644 index 0000000000000000000000000000000000000000..f1f10c2e9a1c1f6d20e9f8df31b8fd39605eeba3 GIT binary patch literal 564 zcmeAS@N?(olHy`uVBq!ia0vp^3P3Ez!3-p)wda)qDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(ehe>H$6>u4xPm{}~w0FfbS!8_#55m^pLinKNf3B_+YaKmp^lG@ufOOAq8W z11a8;Aiv=MNPxlig;E<(g0sLQvY3H^Z$Ah#TCfJI00kvVTq8kOkFcXkY-6)e(JdJTaL4B#=4X)5S4FBY5hh+k8h9I9xsk zxn2DK|K3@Lw`uXKtU0%~3QIbr?m8m+e*dn?(he$1=WvQ#-|wKgHEvzdwV%1$*=K~L z9{IeBVOz{H|Hf-k%8O2I;?Qk>E8Ot(UbQ)Qx5K%uZXI(NSEZ#TPS(xpt%%yg#IQcK zQ%ZRPL(Lgo1N8|(B8?B3b{t3-k8Y5c>C)VBZPB^LxBB1NY8amU6}r0QN7D(Ab3I-C KT-G@yGywporJctB literal 0 HcmV?d00001 diff --git a/Items/Accessories/Wings/TiredTail_Wings.png b/Items/Accessories/Wings/TiredTail_Wings.png new file mode 100644 index 0000000000000000000000000000000000000000..08ddcaa27ae16f1906d6523bab897357e380ccc2 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0vp^VL<$YgAGWQIS6I~sVq+y$B>FSZx0$W0(plPeD%-e i Date: Tue, 7 Apr 2026 20:59:09 -0500 Subject: [PATCH 3/8] Custom Rarity --- ChatTags/CustomColorEffectHandler.cs | 3 + Items/Accessories/Wings/TiredTail.cs | 105 ++++++++++++++++++++++++++- Rarities/ColorTool.cs | 6 ++ Rarities/HotPink.cs | 71 +++++++++++++++--- 4 files changed, 171 insertions(+), 14 deletions(-) diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs index b99db87773..03cda39a56 100644 --- a/ChatTags/CustomColorEffectHandler.cs +++ b/ChatTags/CustomColorEffectHandler.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.Items.Accessories.Wings; using CalamityMod.NPCs.DevourerofGods; using CalamityMod.Rarities; using CalamityMod.Utilities.Daybreak; @@ -35,6 +36,8 @@ namespace CalamityMod.ChatTags return new CalamityRed.CustomTextSnippet(text); if (options.Equals("exo", StringComparison.OrdinalIgnoreCase)) return new ExoticRainbow.CustomTextSnippet(text); + if (options.Equals("doze", StringComparison.OrdinalIgnoreCase)) + return new TiredTailTextEffects(text); return new TextSnippet(text); } } diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs index b0cb5af6c7..fe31ed2a38 100644 --- a/Items/Accessories/Wings/TiredTail.cs +++ b/Items/Accessories/Wings/TiredTail.cs @@ -19,11 +19,14 @@ 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.DataStructures; +using Terraria.GameContent; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using Terraria.UI.Chat; using static Terraria.ModLoader.ModContent; namespace CalamityMod.Items.Accessories.Wings @@ -55,7 +58,7 @@ namespace CalamityMod.Items.Accessories.Wings Item.width = 22; Item.height = 20; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); Item.Calamity().devItem = true; } @@ -112,6 +115,18 @@ namespace CalamityMod.Items.Accessories.Wings public List<(Vector2 pos, float rot)> tailPos; public override void ResetEffects() { + //Handled here to prevent issues with instancing of chat tags + if (TiredTailTextEffects.displayTimer > 0) + { + TiredTailTextEffects.expansionFactor += 0.033f; + + TiredTailTextEffects.displayTimer -= 1; + } + else + { + TiredTailTextEffects.expansionFactor = 0f; + } + tiredTailDraw = false; } public override void PostUpdate() @@ -172,7 +187,7 @@ namespace CalamityMod.Items.Accessories.Wings Main.QueueMainThreadAction(() => { //Load palettes automatically - var texture = ModContent.Request("CalamityMod/Items/Accessories/Wings/TiredTailPallette",ReLogic.Content.AssetRequestMode.ImmediateLoad).Value; + var texture = ModContent.Request("CalamityMod/Items/Accessories/Wings/TiredTailPallette", ReLogic.Content.AssetRequestMode.ImmediateLoad).Value; var BaseArray = new Color[texture.Width * texture.Height]; texture.GetData(BaseArray); List pal = new(); @@ -271,7 +286,7 @@ namespace CalamityMod.Items.Accessories.Wings ColorPallettes[17]), ]; }); - + } List<(List heads, List bodies, List legs, Vector4[] pallette)> ArmorPallettes = []; @@ -429,4 +444,88 @@ namespace CalamityMod.Items.Accessories.Wings } } + + public sealed class TiredTailTextEffects(string text) : TextSnippet + { + //Handled by TiredTailPlayer as this effect is for TiredTail + public static float expansionFactor = 0; + public static int displayTimer = 0; + 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(HotPink.TextColor); + } + var textarray = text.ToArray(); + for (var i = 0; i < textarray.Length; i++) + { + if (expansionFactor - 10 > i) + { + textarray[i] = (i == 0 ? 'ɔ' : '»'); + } + } + var textToDraw = new string(textarray); + + size = FontAssets.MouseText.Value.MeasureString(textToDraw)*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 = ""; + var matrix = spriteBatch.transformMatrix; + using (spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + var max = FontAssets.MouseText.Value.MeasureString(text) * Math.Min(1f,expansionFactor); + spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); + + foreach (var item in textarray) + {//new(92,83,117) + pos = position; + pos.X += Math.Min(FontAssets.MouseText.Value.MeasureString(txt).X,max.X+9999); + float sin = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f; + float sin2 = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -0.9f) + 1) * 0.5f; + float sin3 = MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f + MathHelper.PiOver2); + var c = new Color(171, 153, 204); + if (txt.Length == 0 || txt.Length == text.Length-1) + c = Color.Cyan; + else if (txt.Length % 4 == 3) + { + c = Color.HotPink; + } + c = Color.Lerp(Colors.AlphaDarken(new Color(0, 255, 200)), c, MathHelper.Clamp(expansionFactor - 2, 0, 1)); + float posMult = Math.Max(MathHelper.Clamp((expansionFactor - 10) * 0.5f, 0, 3), MathHelper.Clamp((expansionFactor - 2) * 0.5f, 0, 1)); + var origin = FontAssets.MouseText.Value.MeasureString(item.ToString()) * 0.5f; + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), origin + pos + new Vector2(0, item == 'ɔ' ? -1 : 0) + new Vector2((-2f + 4*sin2) * posMult, (-2 + sin * 4) * posMult), c, sin3*posMult * 0.1f, origin, 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 + 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(); + } + } + return true; + } + + public override void Update() + { + displayTimer = 10; + } + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } } diff --git a/Rarities/ColorTool.cs b/Rarities/ColorTool.cs index 45eb3a0820..4a5b029452 100644 --- a/Rarities/ColorTool.cs +++ b/Rarities/ColorTool.cs @@ -10,6 +10,7 @@ namespace CalamityMod.Rarities public static int RarityBurnishedAuric => ModContent.GetInstance().Type; public static int RarityCalamityRed => ModContent.GetInstance().Type; public static int RarityExoticRainbow => ModContent.GetInstance().Type; + public static int RarityCustomDev => ModContent.GetInstance().Type; public override bool PreDrawTooltipLine(Item Item, DrawableTooltipLine line, ref int yOffset) @@ -37,6 +38,11 @@ namespace CalamityMod.Rarities ExoticRainbow.Draw(Item, line); return false; } + if (Item.rare == RarityCustomDev) + { + HotPink.Draw(Item, line); + return false; + } } return true; } diff --git a/Rarities/HotPink.cs b/Rarities/HotPink.cs index 38dfd4abf9..3e39b5ac17 100644 --- a/Rarities/HotPink.cs +++ b/Rarities/HotPink.cs @@ -1,21 +1,70 @@ -using Microsoft.Xna.Framework; +using System; +using System.Collections.Generic; +using CalamityMod.Items.Accessories.Wings; +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 HotPink : ModRarity { - // Hot Pink is Rarity 16 - public override Color RarityColor => new Color(255, 0, 255); + // Hot Pink is used for developer items. Has a system built in for custom rarity effects. + public override Color RarityColor => TextColor; + public static Color TextColor => new Color(255, 0, 255); - // Hot Pink cannot turn into other rarities via prefix - /*public override int GetPrefixedRarity(int offset, float valueMult) => offset switch + public static Dictionary> CustomRarities = new() { - -2 => ModContent.RarityType(), - -1 => ModContent.RarityType(), - 1 => ModContent.RarityType(), - 2 => ModContent.RarityType(), - _ => Type, - };*/ + { ModContent.ItemType(), text => new TiredTailTextEffects(text) } + }; + 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) + { + TextSnippet[] snippets = ChatManager.ParseMessage(text, textColor).ToArray(); + + + if (CustomRarities.ContainsKey(Item.type)) //For items in the custom rarity table, give them custom rarity effects. + { + for (int i = 0; i < snippets.Length; i++) + { + TextSnippet textSnippet = snippets[i]; + if (snippets[i].GetType() == typeof(TextSnippet)) + { + snippets[i] = CustomRarities[Item.type].Invoke(textSnippet.Text); + continue; + } + } + } + else + ChatManager.ConvertNormalSnippets(snippets); + + 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) + { + Draw(Item, Main.spriteBatch, text, X, Y, Colors.AlphaDarken(textColor ?? TextColor), lightColor ?? Color.White, 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); + } + + #region Custom Draw Effects + + #region Doze's Effect + + #endregion + + #endregion + } } From 3848aa640049f83fedee87d05f69aa0a6fff174e Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 30 Jun 2026 01:30:05 -0500 Subject: [PATCH 4/8] the zarachard --- Items/Accessories/Wings/TiredTail.cs | 62 +----------------- Items/Accessories/Wings/TiredTail.png | Bin 557 -> 697 bytes Items/Accessories/Wings/TiredTailPallette.png | Bin 1005 -> 1106 bytes Items/Accessories/Wings/TiredTailSegment.png | Bin 520 -> 546 bytes Items/Accessories/Wings/TiredTailTail.png | Bin 564 -> 602 bytes 5 files changed, 2 insertions(+), 60 deletions(-) diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs index fe31ed2a38..a1ffa7f8b8 100644 --- a/Items/Accessories/Wings/TiredTail.cs +++ b/Items/Accessories/Wings/TiredTail.cs @@ -165,10 +165,10 @@ namespace CalamityMod.Items.Accessories.Wings } var rotation = destinationOffset.ToRotation(); - var center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (12 * 1); + var center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (14 * 1); if (i == tailPos.Count - 1) { - center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (22 * 1); + center = nextCent - destinationOffset.SafeNormalize(Vector2.Zero) * (21 * 1); } tailPos[i] = new(center, rotation); } @@ -296,64 +296,6 @@ namespace CalamityMod.Items.Accessories.Wings protected override void Draw(ref PlayerDrawSet drawInfo) { - ArmorPallettes = - [ - //silva - ([ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[2]), - //god slayer - ([ItemType(),ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[3]), - //hydro - ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[4]), - //auric - ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[5]), - //fearmonger - ([ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[6]), - //Bloodlfare - ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[7]), - //Tarragon - ([ItemType(),ItemType(),ItemType(),ItemType(),ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[8]), - //Omega Blue - ([ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[9]), - //Gem Tech - ([ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[10]), - //Demonshade - ([ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[11]), - //Prismatic - ([ItemType()], - [ItemType()], - [ItemType()], - ColorPallettes[12]) - ]; var player = drawInfo.drawPlayer; var modplayer = drawInfo.drawPlayer.GetModPlayer(); var tex1 = Request("CalamityMod/Items/Accessories/Wings/TiredTailSegment").Value; diff --git a/Items/Accessories/Wings/TiredTail.png b/Items/Accessories/Wings/TiredTail.png index 2f0bacd764022998fa394efd25f851832554984c..5f61600e97fc0e6f8939841ee812350517391139 100644 GIT binary patch delta 456 zcmZ3>vXga!IF}X&GXn#|Q~Q+*CMqh_+XVQ8xW)vRp56UUC%kX<%ro*bjyA?&n_pg! z$X-;IH$8d#otMkjaLFg!Nt@L*^HyZ%aam>Uf{LbHhtIqFg#!(`y0M)NNQsmL`33*S z1PuQE&jo?dgtJ#QiySR3u7`L*=Z z*1y~eE2dntp2(CuMd{Kn3x_qe+&zWoehWA;I8Jg^IUtetKDlS221|BlQj7~zkkrG^ zDn@J%Y{Vxr#1yp6H9q!xj^jPXwVm}vX=!dk&*pSKNe~d38sxQ?+2Frc5W}0jeaTzW zw#dbBrA_>?)Nt|x#tqeM%00{7A~Qr7HW#03Ji)-0YLdmYMB@JW1Y5BK&yDrWC*9F> zQD`wVxVJv>Zjeobr-9M6X-1r%WrZ6ZFBoL6&z@-h;N1+T&DnQ5Wxm9nD%~39wRY`a oCH^n>qSjXb&}F!(ugPHlSJ000X!3p^U|=zLy85}Sb4q9e0RA+>(f|Me delta 289 zcmdnVx|U^vIF}d)GXn#|wD!ERiHZuYDgizruJSUDn_pf}-hRi`IzF=Vcv;@`)icl7 z7>B)Fw&qUSteD_ZpoWxfIr2b?rzFTP_&)+L2;Dz-ZsM|T&Shnc3@?BtFPm(|7+=rI zHs#dLz^ZJZjwzlljv*SsQzr%T9Z}$L30%os_5XJsTbB9n;JcnHboZPP&@xt8So8nt z+&c_PORsn>X#K|;6};DJ?b^?`^Y{&JS}V`L&br~LQ7zYunSw9prV2*+-Bx#)cJ|I? zrGV90Z6_oz?A~2{D~0=N&+?<%3?HJVtuPca^;9@^hpCupX^NnPVgq+g*+$kM2N%w8 j%Ful!bK_r8{sH#vb%J|$`vlel9mwG6>gTe~DWM4f56peE diff --git a/Items/Accessories/Wings/TiredTailPallette.png b/Items/Accessories/Wings/TiredTailPallette.png index 9951e8cd5af02487ada4b84538e1b805f6e80fff..2b56a72cb41bd33067421486dd648ed6e3833b7e 100644 GIT binary patch delta 862 zcmV-k1EKuw2hs>3iBL{Q4GJ0x0000DNk~Le0000G0000W2m$~A0F>)*n~@=?36gdJ z0O$h%0Fsf?Uw;NRn0mT=93lV!0|7}yK~y+T?UP+>Qw0>qf49AM?d|t>@4dZkZ`YM> zySBEaD6+|d%o$)wUkF6;Wi!6{;1`LB8Xt5f7|eV!F~Q)gAw=cL_+%t8lPv_tL(w>d zu7!QTWQ8qkUFSog&-0ys&eQql_dhu&If5+9ilR6i4u3^aWLeH;vxZ^p-u)HyLiBOP z-#{or5k!kQVT@9|%YHOqxc?}uMIhkSszzP0pc zeaRWn=T`5!TX$w0mo?8?_tl%nhppVAP!s{xdh&vFt`HK{(n&Gw(}9-L3uyPf!PVY9 z)$Ylaw|^Gq-v*Q)6u{IHPcI!_{7ae8Byp`V3z&RGptd}_Wvy0R#{Kn$`T8kfK2ilD z&4HooH^#lyNPIv@M>HU*1c9-vRLI+cYvu7V>4rK7of zFbx!VaDG9@X5Z$4=(F4g6wfX|GOgGf_kzoRSLM2E)B)79USL3uPJe!_eqz&{drt^> z<<11j?r?eiVO3uKW5eXk1Cnk4&iy?f-6@{_j&r{a3J!-8I5ct?cs4qi*_S#n`ofo~ z*ME-J4gv9ZV(qL--_ela@g=?xyrF1kLQ)G`Hi_%;?WrsMW)T>Yt-xTZblyL`FYXHa z{t?_R7m$d@+e|Exkk!Q8)STM)F;HH20_8~TNM>Rqz1TgnDTJT00o&e3$2B`WPHWdn z?S@Uu11(8y_xsjb^aLXEsG$0D9Y9aN6!7P;`%eA5 z+LJm4+&cr{HuyAMYn)J1V+gPA)jGf{2Ry^2Su!8w%d>Ouehobv42gv{c0-Q-iK~yMHjgsw46LB2CzrWqq?ryuy+rw?Q+wFGe zrqj*MZJL_QS!RYcl0Z^40t<`4S0V&GyeeM=iuI}o3wv88VGkg^sPG9*B7?#gg-Xqu zq)wM&Q+K_P-uvP6;`0Z55X-VQn=SmGdqqWIfL#%U0e@NnT9w(h2!RtDOZso0GX{Vm z`@vLO=cM0U7ux!Ib(pF&06fJu0c~J-ibgBkV!}C`HIZy)MjG>m!b0K5=v^i_ZLO@v zB%uV;(IOZ*s<2d1_3F)_Pu~%Z$1n}iI;Os(t>DaNj3Uw*+LTUy068h^Hb0KPmGCbv z_CAsQnxvn!yL`xXuTKxdP`xvD{ovFQ)anD!``|`SJVDjWxmp04%J`--{^jL@^fO4$T=9BN5WRA) qEX%U2x-^w5%S5k?_Hw2I_P{@U*VLg^68f?L0000ERLtq(y*OjDs0SexL7SGEq?>(m22;#Fc>|+1}os zf#H8-WF!Ma4+Fyk28I9v)5S4FBe?eBMXm!19IOFrr%j9g_CMY_uh}r7G`>rCk?2?d zj*ery9MjSk2{ZCWdL}DYamCha z2dZ6^r!1EIrd`6WJb&V{8@qS^e*Z4mrQk#Lc}=^U|1R>{BnbGnuG2ctzzuYur>mdK II;Vst0Bojlj{pDw delta 248 zcmZ3)(!rwG8Q|y6%O%Cdz`(%k>ERLtqy>OjjDs0S{wsOoH&Ic+Q$4^Z#5Ik9!PwaN zKLf+enKRD-Nd|^9XMi+F04O6VDVdfARKoCc;q_NQink=lFZe$aV6c6m)HZR}zxr%X z7sn8d;L;0@T+W6ZECK4mrc&?g?S#bt4$8JvoX)@l3&I*7s3)z4*}QvzcX0KTkX+yDRo diff --git a/Items/Accessories/Wings/TiredTailTail.png b/Items/Accessories/Wings/TiredTailTail.png index f1f10c2e9a1c1f6d20e9f8df31b8fd39605eeba3..768b71bc8e815661dc901e7fd508d9e7f32bf982 100644 GIT binary patch delta 330 zcmdnOa*IW=Gr-TCmrII^fq{Y7)59eQNGk!c6bCbqe7d2|V4|Wzs6l{Fh${m_vc0`M z1H*p?h6fA`Jw-)D3=At4ELad38EI^6dxG@7R_o3)3POT`N0rMt%+7jkl-xSYaQE_- zOXA%Vuen6MuD!j%sJPxnEV5ldeQ&?vF(;*WXDmFf&Y78fglE0`BKNIMN})>*ma1`0 z*xc`Sko(Aqjf@&wu0@63HB3^s-KBE>@B`y}x_g|(ep}AyVBq|ta{USG1y{MVdl|Pa P26@rb)z4*}Q$iB}Nd1Rs delta 292 zcmcb`vV}#lGr-TCmrII^fq{Y7)59eQNGkxb7zZB9|G|Nnbu9p0wJud?Rc+A1vRl)CGP===SjwTVNw{jG4r(|gtC+}#f6wz_r9 zVO*7#mN;2AtG6O*4->=s)J`eo2@Ex7bPd!e1nG)2K4jW)AYDAVL0+aybH}ws=NjMY de`l*XIK#CxEVJ@O1TaS?83{1OU*ncHIB~ From 3160cdbd05a1ec05454fdbaa876e0bd17756f3bc Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 30 Jun 2026 02:18:42 -0500 Subject: [PATCH 5/8] done --- Items/Accessories/Wings/TiredTail.cs | 14 +++++++------- Items/Accessories/Wings/TiredTailPallette.png | Bin 1106 -> 1112 bytes 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs index a1ffa7f8b8..e444e4676f 100644 --- a/Items/Accessories/Wings/TiredTail.cs +++ b/Items/Accessories/Wings/TiredTail.cs @@ -36,7 +36,6 @@ namespace CalamityMod.Items.Accessories.Wings [AutoloadEquip(EquipType.Wings)] public class TiredTail : BaseWings { - //Same stats as Starboard, but with 4 seconds flight instead of 3 public override float BonusAscentWhileFalling => 0.95f; public override float BonusAscentWhileRising => 0.15f; public override float RisingSpeedThreshold => 1f; @@ -47,9 +46,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void SetStaticDefaults() { - //Same stats as Starboard, but with 4 seconds flight instead of 3 - ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = ArmorIDs.Wing.Sets.Stats[(int)VanillaWingID.LongRainbowTrailWings]; - ArmorIDs.Wing.Sets.Stats[Item.wingSlot].FlyTime = CalamityUtils.SecondsToFrames(4); + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 9f, 3.25f, true, 16, 10f); } public override void SetDefaults() @@ -68,13 +65,11 @@ namespace CalamityMod.Items.Accessories.Wings player.GetModPlayer().tiredTailDraw = true; if (player.velocity.Y != 0) { - - if (player.dashDelay != -1) + if (player.dashDelay != -1) //This differs from Starboard - Starboard checks for 1 full second passing after a dash begun, while this happens as soon as the dash ends player.runSlowdown *= 6; } - ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 9f, 3.25f, true, 16, 10f); } public override void UpdateVanity(Player player) @@ -313,6 +308,11 @@ namespace CalamityMod.Items.Accessories.Wings break; } } + //manual override for Empyrean's transform to work + if (player.Calamity().meldTransformationPower || player.Calamity().meldTransformationForce) + { + TargetPallette = ArmorPallettes.First(x => x.heads.Contains(ItemType())).pallette; + } using var SegmentLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex1.Width, tex1.Height); using var TailLease = RenderTargetPool.Shared.Rent(Main.instance.GraphicsDevice, tex2.Width, tex2.Height); using (Main.spriteBatch.Scope()) diff --git a/Items/Accessories/Wings/TiredTailPallette.png b/Items/Accessories/Wings/TiredTailPallette.png index 2b56a72cb41bd33067421486dd648ed6e3833b7e..602c4336bd0730a540c6dcbbef5c741441b25121 100644 GIT binary patch delta 833 zcmV-H1HSyy2-paa$q9{i0RZR&0051V(qDfp73(vRQwPZa00Rd}L_t(IPwkUkXj=so zfWMpErOC}t^LulDa+8}hNz?V3l4PCEwp!+9Wm_Q#vZ3>(6W@IBZy>1n;3`xm^+iFL z>{-T8_aL%I1(~kMR)tJ4`$-dB+pVtITGpni58d)y-}iBz&fz9vftr#S7P5)~q_hYyk(Y`ExAffDo@dTI`Pw8P z_l=VZ=T z+d?ML+YyFxN<5>;ru^O1?*q0qz%<=Jk$Y#aVVdqD_r##%A3*c>0+MaX-MkZ7{Hvxm zeB&OVkq-dFYV6|2R~kpx?E`NM;egtiAh|uhKq#uKi zrxC&9@g5jExFtLu8_5l&_l|!*^=bO$BlQD7;>|dKYOe&Imo0zL{6q-IvCf2)5p}GS zNG3KfT)cNI1`Y>?k6hODdiEO=jR8LPJytK#Y2rusS?;o5c z_imv)TYc+mAbt#>0*)O!OZk$5+zaMAowBII=gzfN1*be^zQ{>a~KGDDI00000 LNkvXXu0mjfKfthO delta 827 zcmV-B1H}B;2+|0U$qABn0RZR&005Ga(qDfDHkf+4d>kSG00RL@L_t(IPwkUkY*Pgk z$A7oIcJ1x=ckjKuZEx3=Zo9U&r6{t=g3K9UNnZ#=@nti<`QR6ci5eetCK$|oGBLs6 zt06??$@pX>F_SF>$3xLLgsz2sz+{CjY+dI=q0jT3f6mkS=l4H3Cpm&F%Zj2n91ed) zQDj-pX0wK2?B4wq^g{G;#os_ELJ>rZIb$PeY1+&iA+edXKQx4uq;ag@2n2*!Jn!*e zi#5xIO7DkXJBNILxW2XYXMM>T(C1d~x?6W<9G5lETKCnP$A_)lqEHk8)q3)RbgmE* z)zV2Z?9+jk(+g<#y}{MqJ=N~XmA8Ku=HCXC9~8jU5>GE3Ui?d$&?IrKF$BF%xJ>o>-|)ku6mNJlgvsRV(stW?O`rI$zczIfsJHzxoo z8wARQ&9i48W)5o4MHdCh8sf3^WWOgA33Vqg{&>Z0sw*A4;kcVg|VO5f3t;qfKD5WJyiXF^g7TQ-U7@$IQA z{bmsulC8jCsdU~yy)W(x`~DH!E*Fr9$J_}!}BfZ!? zvMGe0vH{!PN5?fgJx*)aO6`VC%L6S*ZTI`uepmHO?RrIcUDtuh-gfN6{Y4ijl z@~EKta~(iWzZCH2u=`H^yxNmG2HZOX;5PU)U2B|BQ)39P?$tWLD+fHorCBl`j z?|u)&#sMl|d4DGPS@9?48HE4)ai&iE4)p}siJkyE(SLpz)tkK`eRu!>002ovPDHLk FV1k;&n>GLd From 81585f76f7996d61bf494bdfed355dcdff3c06d9 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Tue, 30 Jun 2026 02:31:53 -0500 Subject: [PATCH 6/8] rarity comments/cleanup --- Rarities/BurnishedAuric.cs | 3 ++- Rarities/CalamityRed.cs | 3 ++- Rarities/CosmicPurple.cs | 3 ++- Rarities/DarkOrange.cs | 4 +++- Rarities/ExoticRainbow.cs | 3 ++- Rarities/HotPink.cs | 11 ++--------- Rarities/PureGreen.cs | 2 +- Rarities/Turquoise.cs | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Rarities/BurnishedAuric.cs b/Rarities/BurnishedAuric.cs index dfbc5c0a2c..add6120cf8 100644 --- a/Rarities/BurnishedAuric.cs +++ b/Rarities/BurnishedAuric.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Rarities { public class BurnishedAuric : ModRarity { - // Burnished Auric is Rarity 15 (Once was known as Violet) + // Burnished Auric is the rarity for Post-Yharon gear + // It is a unique rarity and does not have its items rarity change on reforge. public override Color RarityColor => TextClr * 2f; public static float MaxY = 4.5f; diff --git a/Rarities/CalamityRed.cs b/Rarities/CalamityRed.cs index 9ea280216b..8b9d121ac2 100644 --- a/Rarities/CalamityRed.cs +++ b/Rarities/CalamityRed.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Rarities { public class CalamityRed : ModRarity { - // Calamity Red is Rarity 17 + // Calamity Red is the rarity for Post-SCal gear. It is considered the "same tier" as Exotic Rainbow for matters of sell value. + // It is a unique rarity and does not have its items rarity change on reforge. public override Color RarityColor => TextClr * 2f; public static float MaxY = 4.5f; diff --git a/Rarities/CosmicPurple.cs b/Rarities/CosmicPurple.cs index 1c3e382f4a..d52a15a49c 100644 --- a/Rarities/CosmicPurple.cs +++ b/Rarities/CosmicPurple.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Rarities { public class CosmicPurple : ModRarity { - // Cosmic Purple is Rarity 14 (once was known as Dark Blue) + // Cosmic Purple is the rarity for Post-DoG gear. + // It is a unique rarity and does not have its items rarity change on reforge. public override Color RarityColor => TextClr * 2f; public static float MaxY = 4.5f; diff --git a/Rarities/DarkOrange.cs b/Rarities/DarkOrange.cs index 30959e183a..6526cfa05d 100644 --- a/Rarities/DarkOrange.cs +++ b/Rarities/DarkOrange.cs @@ -3,7 +3,9 @@ using Terraria.ModLoader; namespace CalamityMod.Rarities { - // Draedon's Arsenal "Rust" / "Bronze" rarity + // Dark Orange is used for Draedon's Arsenal items. + // It is a unique rarity and does not have its items rarity change on reforge. + public class DarkOrange : ModRarity { public override Color RarityColor => new Color(204, 71, 35); diff --git a/Rarities/ExoticRainbow.cs b/Rarities/ExoticRainbow.cs index cf065cc707..af47d1a2f2 100644 --- a/Rarities/ExoticRainbow.cs +++ b/Rarities/ExoticRainbow.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Rarities { public class ExoticRainbow : ModRarity { - // Exotic Rainbow is Rarity 17 (same as Calamity Red) + // Exotic Rainbow is the rarity for Post-SCal gear. It is considered the "same tier" as Calamity Red for matters of sell value. + // It is a custom rarity and does not have its items rarity change on reforge. public override Color RarityColor => TextClr * 2f; public static float MaxY = 4.5f; diff --git a/Rarities/HotPink.cs b/Rarities/HotPink.cs index 3e39b5ac17..8896ba5ad8 100644 --- a/Rarities/HotPink.cs +++ b/Rarities/HotPink.cs @@ -14,7 +14,8 @@ namespace CalamityMod.Rarities { public class HotPink : ModRarity { - // Hot Pink is used for developer items. Has a system built in for custom rarity effects. + // Hot Pink is used for developer items. It Has a system built in for custom rarity effects. + // It is a unique rarity and does not have its items rarity change on reforge. public override Color RarityColor => TextColor; public static Color TextColor => new Color(255, 0, 255); @@ -58,13 +59,5 @@ namespace CalamityMod.Rarities Draw(Item, line.Text, line.X, line.Y, line.Rotation, line.Origin, line.BaseScale); } - #region Custom Draw Effects - - #region Doze's Effect - - #endregion - - #endregion - } } diff --git a/Rarities/PureGreen.cs b/Rarities/PureGreen.cs index 5752ae8335..b48cf7c502 100644 --- a/Rarities/PureGreen.cs +++ b/Rarities/PureGreen.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Rarities { -2 => ItemRarityID.Purple, -1 => ModContent.RarityType(), - _ => Type, // Cannot reach Cosmic Purple or Burnished Auric + _ => Type, // All higher rarities are unique, and so it cannot go up. }; } } diff --git a/Rarities/Turquoise.cs b/Rarities/Turquoise.cs index 27428d0c1a..a0e5eda2b4 100644 --- a/Rarities/Turquoise.cs +++ b/Rarities/Turquoise.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Rarities -2 => ItemRarityID.Red, -1 => ItemRarityID.Purple, 1 => ModContent.RarityType(), - 2 => ModContent.RarityType(), // Cannot reach Cosmic Purple + 2 => ModContent.RarityType(), // All higher rarities are unique, and so it cannot go up past Pure Green _ => Type, }; } From 9746cf276fd1165c7302bc5b5f568a745193415b Mon Sep 17 00:00:00 2001 From: Critaquil Date: Wed, 1 Jul 2026 16:19:49 -0400 Subject: [PATCH 7/8] horizontal nerfs horizontal speed to 8.5 (starboard 8 lunar 9) accel to 2.88 (starboard 2.75 elysian 3) --- Items/Accessories/Wings/TiredTail.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs index e444e4676f..da6d82653f 100644 --- a/Items/Accessories/Wings/TiredTail.cs +++ b/Items/Accessories/Wings/TiredTail.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories.Wings public override void SetStaticDefaults() { - ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 9f, 3.25f, true, 16, 10f); + ArmorIDs.Wing.Sets.Stats[Item.wingSlot] = new WingStats(210, 8.5f, 2.88f, true, 16, 10f); } public override void SetDefaults() From 8623f66a48dd2385fd25d4d4ac2b63f2587e0f29 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Wed, 1 Jul 2026 17:23:52 -0500 Subject: [PATCH 8/8] added a recipe --- Items/Accessories/Wings/TiredTail.cs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Items/Accessories/Wings/TiredTail.cs b/Items/Accessories/Wings/TiredTail.cs index e444e4676f..5a39279079 100644 --- a/Items/Accessories/Wings/TiredTail.cs +++ b/Items/Accessories/Wings/TiredTail.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using CalamityMod.Enums; using CalamityMod.Items.Armor.Auric; using CalamityMod.Items.Armor.Bloodflare; using CalamityMod.Items.Armor.Demonshade; @@ -14,6 +13,7 @@ using CalamityMod.Items.Armor.OmegaBlue; using CalamityMod.Items.Armor.Prismatic; using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; +using CalamityMod.Items.Materials; using CalamityMod.Rarities; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; @@ -102,6 +102,16 @@ namespace CalamityMod.Items.Accessories.Wings player.wingTime -= 1; } } + + public override void AddRecipes() + { + + CreateRecipe(). + AddIngredient(3). + AddIngredient(ItemID.Sapphire). + AddTile(TileID.DemonAltar). + Register(); + } } public class TiredTailPlayer : ModPlayer @@ -410,7 +420,7 @@ namespace CalamityMod.Items.Accessories.Wings } var textToDraw = new string(textarray); - size = FontAssets.MouseText.Value.MeasureString(textToDraw)*scale; + size = FontAssets.MouseText.Value.MeasureString(textToDraw) * scale; if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) { @@ -422,18 +432,18 @@ namespace CalamityMod.Items.Accessories.Wings { using (lease.Scope(clearColor: Color.Transparent)) { - var max = FontAssets.MouseText.Value.MeasureString(text) * Math.Min(1f,expansionFactor); + var max = FontAssets.MouseText.Value.MeasureString(text) * Math.Min(1f, expansionFactor); spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, matrix); foreach (var item in textarray) {//new(92,83,117) pos = position; - pos.X += Math.Min(FontAssets.MouseText.Value.MeasureString(txt).X,max.X+9999); + pos.X += Math.Min(FontAssets.MouseText.Value.MeasureString(txt).X, max.X + 9999); float sin = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f) + 1) * 0.5f; float sin2 = (MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -0.9f) + 1) * 0.5f; float sin3 = MathF.Sin(pos.X * 0.02f + Main.GlobalTimeWrappedHourly * -1.5f + MathHelper.PiOver2); var c = new Color(171, 153, 204); - if (txt.Length == 0 || txt.Length == text.Length-1) + if (txt.Length == 0 || txt.Length == text.Length - 1) c = Color.Cyan; else if (txt.Length % 4 == 3) { @@ -442,7 +452,7 @@ namespace CalamityMod.Items.Accessories.Wings c = Color.Lerp(Colors.AlphaDarken(new Color(0, 255, 200)), c, MathHelper.Clamp(expansionFactor - 2, 0, 1)); float posMult = Math.Max(MathHelper.Clamp((expansionFactor - 10) * 0.5f, 0, 3), MathHelper.Clamp((expansionFactor - 2) * 0.5f, 0, 1)); var origin = FontAssets.MouseText.Value.MeasureString(item.ToString()) * 0.5f; - ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), origin + pos + new Vector2(0, item == 'ɔ' ? -1 : 0) + new Vector2((-2f + 4*sin2) * posMult, (-2 + sin * 4) * posMult), c, sin3*posMult * 0.1f, origin, new Vector2(scale)); + ChatManager.DrawColorCodedString(spriteBatch, FontAssets.MouseText.Value, item.ToString(), origin + pos + new Vector2(0, item == 'ɔ' ? -1 : 0) + new Vector2((-2f + 4 * sin2) * posMult, (-2 + sin * 4) * posMult), c, sin3 * posMult * 0.1f, origin, new Vector2(scale)); txt += item; } spriteBatch.End();