From f50440c39676021a2657432c1c778423cae857e5 Mon Sep 17 00:00:00 2001 From: Habble53 <87115317+Habble53@users.noreply.github.com> Date: Sat, 7 Feb 2026 14:47:39 +0300 Subject: [PATCH 001/126] Update BrainOfCthulhuSystem.cs --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuSystem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuSystem.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuSystem.cs index e2e80efb76..65d889e6d2 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuSystem.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuSystem.cs @@ -230,6 +230,8 @@ public class BrainOfCthulhuSystem : ModSystem public override void PostUpdateNPCs() { + if (VerletTendrils is null) + return; if (!NPC.AnyNPCs(NPCID.BrainofCthulhu)) BrainOfCthulhuAI.SummonedViaItem = false; From fe4c3beb1892ad1f979fe60d7be09ced4f1a35d2 Mon Sep 17 00:00:00 2001 From: Habble53 <87115317+Habble53@users.noreply.github.com> Date: Tue, 10 Feb 2026 13:01:33 +0300 Subject: [PATCH 002/126] Distance check on Sulph Sea Acid Bubble spawns --- Tiles/Abyss/SulphurousSand.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index 4a5f1aa3da..e8ca086808 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -58,10 +58,24 @@ namespace CalamityMod.Tiles.Abyss { if (!Main.tile[i, tileLocationY].HasTile) { - if (!CalamityPlayer.areThereAnyDamnBosses && Main.tile[i, tileLocationY].LiquidAmount == 255 && Main.tile[i, tileLocationY - 1].LiquidAmount == 255 && - Main.tile[i, tileLocationY - 2].LiquidAmount == 255 && !Main.tile[i, tileLocationY - 2].HasTile && Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !CalamityPlayer.areThereAnyDamnBosses) { - Projectile.NewProjectile(new EntitySource_WorldEvent(), (float)(i * 16 + 16), (float)(tileLocationY * 16 + 16), 0f, -0.1f, ModContent.ProjectileType(), 0, 2f, Main.myPlayer); + bool nearby = false; + Vector2 tileWorldPos = new Vector2(i, tileLocationY).ToWorldCoordinates(); + foreach (Player player in Main.ActivePlayers) + { + + if (!player.dead && !player.ghost && player.DistanceSQ(tileWorldPos) < 4000000f) // Don't spawn Acid Bubbles if no players are nearby + { + nearby = true; + break; + } + } + if (nearby && Main.tile[i, tileLocationY].LiquidAmount == 255 && Main.tile[i, tileLocationY - 1].LiquidAmount == 255 && + Main.tile[i, tileLocationY - 2].LiquidAmount == 255 && !Main.tile[i, tileLocationY - 2].HasTile) + { + Projectile.NewProjectile(new EntitySource_WorldEvent(), (float)(i * 16 + 16), (float)(tileLocationY * 16 + 16), 0f, -0.1f, ModContent.ProjectileType(), 0, 2f, Main.myPlayer); + } } if (i < 250 || i > Main.maxTilesX - 250) From db1659a7a0f0947137b2988cc6f114458527e87b Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 5 Mar 2026 15:51:49 -0600 Subject: [PATCH 003/126] when life gives you lemons... --- Dusts/LemonNadeExplodeDust.cs | 70 +++++++++ Gores/LemonNadePin.png | Bin 0 -> 420 bytes Items/Weapons/Rogue/LemonNade.cs | 56 +++++++ Items/Weapons/Rogue/LemonNade.png | Bin 0 -> 540 bytes ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 12 ++ .../Mods.CalamityMod.Projectiles.Rogue.hjson | 2 + Particles/LemonNadeExplode.png | Bin 0 -> 55761 bytes Projectiles/Rogue/LemonNadeHoldout.cs | 143 ++++++++++++++++++ Projectiles/Rogue/LemonNadeProjectile.cs | 134 ++++++++++++++++ Projectiles/Rogue/LemonNadeProjectile.png | Bin 0 -> 533 bytes Utilities/DustExtensions.cs | 8 + 11 files changed, 425 insertions(+) create mode 100644 Dusts/LemonNadeExplodeDust.cs create mode 100644 Gores/LemonNadePin.png create mode 100644 Items/Weapons/Rogue/LemonNade.cs create mode 100644 Items/Weapons/Rogue/LemonNade.png create mode 100644 Particles/LemonNadeExplode.png create mode 100644 Projectiles/Rogue/LemonNadeHoldout.cs create mode 100644 Projectiles/Rogue/LemonNadeProjectile.cs create mode 100644 Projectiles/Rogue/LemonNadeProjectile.png diff --git a/Dusts/LemonNadeExplodeDust.cs b/Dusts/LemonNadeExplodeDust.cs new file mode 100644 index 0000000000..a55d94e5c0 --- /dev/null +++ b/Dusts/LemonNadeExplodeDust.cs @@ -0,0 +1,70 @@ +using System; +using CalamityMod.Utilities; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Dusts +{ + public class LemonNadeExplodeDust : ModDust + { + public override string Texture => "CalamityMod/Particles/LemonNadeExplode"; + Color RandomColor + { + get + { + switch (Main.rand.Next(4)) + { + case 0: return new Color(54, 54, 54); + case 1: return new Color(76, 36, 36); + case 2: return new Color(132, 106, 56); + case 3: return new Color(50, 45, 37); + } + return Color.White; + } + } + public override void OnSpawn(Dust dust) + { + dust.color = RandomColor; + dust.dataAsFloat = 0.75f; + dust.rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); + } + public override bool MidUpdate(Dust dust) + { + return true; + } + + public override bool Update(Dust dust) + { + dust.dataAsFloat *= 0.96f; + dust.position += dust.velocity; + dust.velocity *= 0.925f; + dust.rotation += MathF.Sin(dust.dustIndex * 0.1f)*0.2f * dust.dataAsFloat; + if (dust.dataAsFloat <= 0.01f) + dust.active = false; + return false; + } + + static Asset tex; + public override bool PreDraw(Dust dust) + { + tex ??= ModContent.Request("CalamityMod/Particles/LemonNadeExplode"); + Main.EntitySpriteDraw( + tex.Value, + dust.position - Main.screenPosition, + null, + dust.color * dust.dataAsFloat, + dust.rotation, + tex.Size() * 0.5f, + dust.scale * 0.1f * (0.75f + 0.25f * dust.dataAsFloat), + SpriteEffects.None, + 0 + ); + return false; + } + + + } +} diff --git a/Gores/LemonNadePin.png b/Gores/LemonNadePin.png new file mode 100644 index 0000000000000000000000000000000000000000..ce1c8c583cebdcd82131fe94d74501ed45960047 GIT binary patch literal 420 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gz!3-pWKJL#4QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`IRkt`T>GXj$jmDT@;>Q>)B-8yk|4j}|Nj}TpW+3oW#BCEh%9Dc;5!V$ zjK}j=qyPmaN?apKg7ec#$`gxH83GbB^GfvmTtgI0^$hhabMkK40o80vjqptK^weVD z0CHFvq!?Kl7=bJ=AeM%*K`z!{WCn{f0ojI(Obh}*Itqw0+gZTkSwJ=jBmgl;Ka57R zlmY1H3G56kKotf?#s-WFAf|$Jur7d@GzG{80Vbe1OkkBkmKH!3RF|QF0Z7*8`~eTu z{_6{XOnpxm#}JL+vd$@?2>|ENQsMvr literal 0 HcmV?d00001 diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs new file mode 100644 index 0000000000..5e7df2793d --- /dev/null +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -0,0 +1,56 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee.Spears; +using CalamityMod.Projectiles.Rogue; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.Rogue +{ + public class LemonNade : RogueWeapon + { + public override void SetDefaults() + { + Item.width = 32; + Item.height = 32; + Item.damage = 75; + Item.DamageType = RogueDamageClass.Instance; + Item.autoReuse = true; + Item.noMelee = true; + Item.noUseGraphic = true; + Item.useTime = 30; + Item.useAnimation = 30; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 3; + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item1; + Item.channel = true; + Item.shootSpeed = 13f; + Item.shoot = ModContent.ProjectileType(); + } + public override float StealthVelocityMultiplier => 1f; + + public override float StealthDamageMultiplier => 1f; + public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; + + public override void HoldItem(Player player) + { + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.Calamity().rogueStealth = 0; + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + return true; + } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddIngredient(ItemID.Lemon). + Register(); + } + } +} diff --git a/Items/Weapons/Rogue/LemonNade.png b/Items/Weapons/Rogue/LemonNade.png new file mode 100644 index 0000000000000000000000000000000000000000..29055daa321d344cf5397e5ad39a4405e1578f36 GIT binary patch literal 540 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8g#!3-o@R>TwmDaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(ehe>H$6>u2L}$VRv#hd%}AYg}8M!Z){V1e#512>Vi+-(zkRanMprAyFYeY$Kep*R+Vo@qX zKw@TIiJqTph=Qq}p`K+<-Yq+znr*2Oo@t(*S_~XO4l9EcBP#$cc0dZzK3s^i0$OeG~AO`7&(P)-30K;YiI|B<)g@KW=0pkLQsURJ! z3m_&<0kT1W31|)zSY?o<1&{^RWoTdklJz-%z(ckF`T`)c-qXb~L?gKO!fh^QLk^aJ z>mO%*`M-brj=W6nwQu&YoNMr0ay-0a-DfsoS$Fa8GiL7Wn#t&}WMX7WlEc+AXYR(f zWF#HXQ92YGdZhN*8IG$RTSG#x3t7tlnEZPe$L2-HI*nJaV4QhiYuo-iGt$4!+qo}z n0oR^_M|)@AvnUjuZ}LI7GfpUV!Y+|Okh45p{an^LB{Ts5qyd`y literal 0 HcmV?d00001 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index a3aaa437db..3a376d29b9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1394,3 +1394,15 @@ Pumpkaboom: { Stealth strikes throw larger pumpkins which pull enemies in before releasing a larger explosion ''' } + +LemonNade: { + DisplayName: Lemon 'nade + Tooltip: + ''' + Disables normal stealth generation + Hold to pull the pin and generate stealth, and release to throw + The longer it is held, the shorter the fuse once the 'nade is thrown + Stealth strikes explode into exploding lemon seeds + 'Burn their house down!' + ''' +} diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 5d761dc64b..2401941993 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -334,3 +334,5 @@ WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals +LemonNadeHoldout.DisplayName: Lemon 'nade +LemonNadeProjectile.DisplayName: Lemon 'nade diff --git a/Particles/LemonNadeExplode.png b/Particles/LemonNadeExplode.png new file mode 100644 index 0000000000000000000000000000000000000000..85a849c338bb46b86fbeb60f5048e6f9702df575 GIT binary patch literal 55761 zcmZ5|30O{D8}+F)ljeF!D$TP*MMNS|(Oeo7nrK!DO`@67EKNiuO&U~6lS-2$Nzyz? zk_J&J{Oj=j*MD9Adp*42dCu8q?|a|(y4PC!2|b~$zJXyA13?fQG>)k05(H&GewEVE z;BS0h95cZGC@$!#s}lLIc&6}&b+!kz4iH3PB;%SDHU3QRa>V2UK`^qAzbO39o{GX> za=RZgcGq*Zald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kzW3?$O@WKURtuK$LcBOoG!Ot}*|_!55KgRF=-c zRLmc{+$+T8=AF{|#AfT=00Vtp)F@WAr0{!EfX!!}Dg|oNn45fAX)dctv*dy_qYu;k zrhH7seD>?wdzbinhdf9c*skF^b!viQ*eoG0q%RSRF4A#Dr!UoB|4?;9?DGhkFzpck z6~34AL+Ia3*zDV7avm(!X*`xLb(GItpyMT9L3~zUzYE2(|F?>dv-n_{@CP?(o3(>a z;<;5Fc(!909%Y|7nQGKO_2P_dT!CzMxjoNOU{Hn!zoV};lF|$}KJ06oOZZHu{hK!0 zQ=9h-X&=PQbeE3C-%*`<|3rP>@iP6a7`mKIp$cRfXn%@;!nGLE%BgrC>ORBhNodmG z2@URid)phB=)(P{+ literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs new file mode 100644 index 0000000000..52de86f4f1 --- /dev/null +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -0,0 +1,143 @@ +using System; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class LemonNadeHoldout : BaseSwordHoldoutProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/Rogue/LemonNadeProjectile"; + public override bool useMeleeSpeed => false; + public override bool useMeleeSize => false; + public override int swingWidth => 180; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + public override int AfterImageLength => 0; + + public override int StartupTime { get; set; } + public override int CooldownTime { get; set; } + + bool isChannelable = false; + + int explodeTimer = 0; + + public override void Defaults() + { + Projectile.width = 22; Projectile.height = 28; + Projectile.MaxUpdates = 4; + Projectile.noEnchantmentVisuals = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void Spawn() + { + //This sets variables for the spear in general, as well as the secondary attack + //The secondary attack is the "default" because it was coded first + var player = Main.player[Projectile.owner]; + var modplayer = player.GetModPlayer(); + StartupTime = 10; + CooldownTime = 10; + swingTime -= StartupTime + CooldownTime; + OffsetDistance = 24; + modplayer.swingNum = 0; + } + + public override void AdditionalAI() + { + var player = Main.player[Projectile.owner]; + var cplayer = player.Calamity(); + if (Projectile.Opacity > 0) + { + cplayer.temporaryStealthMax = 10; + cplayer.temporaryStealthTimer = 2; + } + + //MOVE SECONDS TO LemonNade.cs ITEM + var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; + var explodeTimeGoal = CalamityUtils.SecondsToFrames(2) / avgStealth; + var stealthTime = explodeTimeGoal * 0.9f; + + if (Projectile.FinalExtraUpdate() && inStartup) + if (explodeTimer < explodeTimeGoal) + explodeTimer++; + else + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal).hostile = true; + Projectile.Opacity = 0; + return; + } + + cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); + + if (timer == 1) + { + + + if (!Main.dedServ) + { + SoundEngine.PlaySound(SoundID.DD2_JavelinThrowersAttack with { pitch = 1f }); + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, Vector2.UnitY * -8 + angle, Mod.Find("LemonNadePin").Type, 1); + } + } + + //When channeling, the internal timer will not progress + if (player.channel && inStartup) + { + if (timer >= StartupTime - 1) + { + timer--; + Projectile.timeLeft++; + } + } + if (explodeTimer >= explodeTimeGoal && inCooldown && !Projectile.FinalExtraUpdate()) + { + timer--; + Projectile.timeLeft++; + } + + if (inSwing) + { + if (swingTimer == (int)(swingTime * 0.75f)) + { + if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer-30, explodeTimeGoal); + if (player.Calamity().StealthStrikeAvailable()) + { + p.Calamity().stealthStrike = true; + } + } + Projectile.Opacity = 0; + } + } + } + + public override float SwingFunction() + { + if (inStartup) + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.33f, swingWidth * -0.7f, MathF.Pow(StartupCompletion, 4f))); + if (inCooldown) + return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.7f, swingWidth * 0.2f, SwingCompletion)); + } + + public override bool? CanHitNPC(NPC target) + { + return false; + } + + public override bool CanHitPlayer(Player target) + { + return false; + } + } +} diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs new file mode 100644 index 0000000000..4d9b808ba4 --- /dev/null +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -0,0 +1,134 @@ +using System; +using System.Reflection.Metadata; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Packets.Entities; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.Typeless; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class LemonNadeProjectile : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 16; + Projectile.height = 16; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.penetrate = -1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = 300; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + if (Projectile.ai[2] == 1) + { + Projectile.idStaticNPCHitCooldown = 2; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.damage = 0; + } + + Projectile.rotation += 0.175f * Projectile.direction; + + if (Projectile.timeLeft < 280 && Projectile.ai[2] != 1) + Projectile.velocity.Y += 0.22f; + + Projectile.ai[0]++; + if (Projectile.ai[0] > Projectile.ai[1] || Projectile.timeLeft == 2) + { + if (Projectile.ai[2] == 1) + Projectile.damage = Projectile.originalDamage; + if (Projectile.Calamity().stealthStrike) + { + var frags = 6f; + for (var i = 0; i < frags; i++) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitY.RotatedBy(i/frags * MathHelper.TwoPi) * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 20,1); + } + Projectile.Resize(360, 360); + Projectile.ResetLocalNPCHitImmunity(); + Projectile.damage *= 10; + Projectile.Damage(); + + for (var i = 0; i < 40; i++) + { + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(),Main.rand.NextVector2CircularEdge(15,15) * Main.rand.NextFloat(0.25f,1f),Scale:Main.rand.NextFloat(0.75f,1.25f)); + } + SoundEngine.PlaySound(SoundID.Item62 with {pitch = 1f },Projectile.Center); + SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); + Projectile.Kill(); + + } + } + + public override bool PreDraw(ref Color lightColor) + { + if (Projectile.ai[2] == 1) + { + Main.instance.LoadItem(ItemID.PumpkinSeed); + var tex = TextureAssets.Item[ItemID.PumpkinSeed]; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.velocity.ToRotation() - MathHelper.PiOver2, tex.Size() * 0.5f, Projectile.scale,0); + return false; + } + return true; + } + + public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) + { + modifiers.SourceDamage *= 0.002f; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Projectile.velocity.X *= -0.65f; + Projectile.velocity.Y = -3f; + if (Projectile.ai[1] - Projectile.ai[0] < 30) + Projectile.ai[0] += 15; + } + + + // Make it bounce on tiles. + public override bool OnTileCollide(Vector2 oldVelocity) + { + // Impacts the terrain even though it bounces off. + if (Projectile.width < 100) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); + Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height); + } + + if (Projectile.velocity.X != oldVelocity.X) + { + Projectile.velocity.X = -oldVelocity.X; + } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = -oldVelocity.Y; + } + Projectile.velocity *= 0.75f; + return false; + } + } + +} diff --git a/Projectiles/Rogue/LemonNadeProjectile.png b/Projectiles/Rogue/LemonNadeProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..7a95d74f7930f4d67973b7f4d85fdfda1b4883c9 GIT binary patch literal 533 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gz!3-pWKJL#4QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`6$5-iT%}?h!tUg1_JsE)3UTXd-q@!2{D#Y?Z|Pe)C6moTX7l*oeg>qt zOM?7@|HA=;mp|htpfG2FM`SSr1K(i~W;~w1A_XWYQQ{g=5}cn_Ql40p$`Fv4nOCCc z=Nh75s%NNYnUi7PJ2av3CK2N zWMU8i(osO1+0FtM&jPYRAOVO$`e8Jhr3}C@nZVA#0#spOWNg5=0Aeag2kQceNmGDq z5MTnD!vt0tWN86pL3J4#7=UDb&L8kl?Z3VN$ZYU*aSYK2?!Dm6*KEMU67cw={@(wM zs}C*+N{s6Yzjk{S+^^`6W{Z6-RYhJ_EjCio4a1bvC7>4aH4l>`r4U4Wth1A=Txj+ gChvFVs6Fo=*3#vIj%&`@yMf&0>FVdQ&MBb@07~tVbN~PV literal 0 HcmV?d00001 diff --git a/Utilities/DustExtensions.cs b/Utilities/DustExtensions.cs index 93df499dfb..3688285a1f 100644 --- a/Utilities/DustExtensions.cs +++ b/Utilities/DustExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using Terraria; namespace CalamityMod.Utilities @@ -7,6 +8,13 @@ namespace CalamityMod.Utilities { extension(Dust dust) { + public float dataAsFloat + { + get => (float)dust.customData; + set => dust.customData = value; + } + + [Obsolete("DO NOT USE. It is an unsafe fix to an even more unsafe vanilla method.")] public static Dust BetterCloneDust(Dust rf) { From 8702a8da5f2ef1e63ff1351857f8b273c9ad20cd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 5 Mar 2026 16:39:51 -0600 Subject: [PATCH 004/126] juice --- Dusts/LemonNadeExplodeDust.cs | 2 +- Projectiles/Rogue/LemonNadeHoldout.cs | 19 +++++++++++++- Projectiles/Rogue/LemonNadeProjectile.cs | 33 ++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/Dusts/LemonNadeExplodeDust.cs b/Dusts/LemonNadeExplodeDust.cs index a55d94e5c0..6f93352faa 100644 --- a/Dusts/LemonNadeExplodeDust.cs +++ b/Dusts/LemonNadeExplodeDust.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Dusts { case 0: return new Color(54, 54, 54); case 1: return new Color(76, 36, 36); - case 2: return new Color(132, 106, 56); + case 2: return new Color(132, 72, 56); case 3: return new Color(50, 45, 37); } return Color.White; diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 52de86f4f1..8dd8dc1c8e 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -49,6 +49,7 @@ namespace CalamityMod.Projectiles.Rogue swingTime -= StartupTime + CooldownTime; OffsetDistance = 24; modplayer.swingNum = 0; + RotateInStartup = 1; } public override void AdditionalAI() @@ -98,6 +99,20 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft++; } } + // Code copied from Violence / Chalice. + float bloodVelMult = 1; + if (Main.rand.NextFloat() < explodeTimer/explodeTimeGoal && Projectile.Opacity > 0 && Projectile.FinalExtraUpdate()) + { + int bloodLifetime = Main.rand.Next(5, 15); + float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); + Color bloodColor = Color.Lerp(Color.Yellow, Color.Goldenrod, Main.rand.NextFloat()); + bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)); + float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * bloodVelMult * randomSpeedMultiplier; + bloodVelocity.Y -= 5f; + BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity.RotatedBy(Projectile.rotation + MathHelper.PiOver4 * Projectile.spriteDirection), bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } if (explodeTimer >= explodeTimeGoal && inCooldown && !Projectile.FinalExtraUpdate()) { timer--; @@ -124,7 +139,9 @@ namespace CalamityMod.Projectiles.Rogue public override float SwingFunction() { if (inStartup) - return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.33f, swingWidth * -0.7f, MathF.Pow(StartupCompletion, 4f))); + { + return swingWidth * -0.5f + (MathF.Sin(Main.GlobalTimeWrappedHourly * 30) * 0.2f); + } if (inCooldown) return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.7f, swingWidth * 0.2f, SwingCompletion)); diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs index 4d9b808ba4..a753038c96 100644 --- a/Projectiles/Rogue/LemonNadeProjectile.cs +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -1,6 +1,7 @@ using System; using System.Reflection.Metadata; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.CalPlayer; using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Rogue; @@ -57,6 +58,21 @@ namespace CalamityMod.Projectiles.Rogue Projectile.velocity.Y += 0.22f; Projectile.ai[0]++; + //Copied from violence/chalice + if (Main.rand.NextFloat() < Projectile.ai[0] / Projectile.ai[1] && Projectile.FinalExtraUpdate()) + { + int bloodLifetime = Main.rand.Next(5, 15); + float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); + Color bloodColor = Color.Lerp(Color.Yellow, Color.Goldenrod, Main.rand.NextFloat()); + bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)); + + float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * randomSpeedMultiplier; + bloodVelocity.Y -= 5f; + BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity.RotatedBy(Projectile.rotation + MathHelper.PiOver4 * Projectile.spriteDirection), bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + if (Projectile.ai[0] > Projectile.ai[1] || Projectile.timeLeft == 2) { if (Projectile.ai[2] == 1) @@ -76,6 +92,23 @@ namespace CalamityMod.Projectiles.Rogue { var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(),Main.rand.NextVector2CircularEdge(15,15) * Main.rand.NextFloat(0.25f,1f),Scale:Main.rand.NextFloat(0.75f,1.25f)); } + var exactBloodCount = 10; + // Code copied from Violence/chalice. + float bloodVelMult = 6; + for (int i = 0; i < exactBloodCount; ++i) + { + int bloodLifetime = Main.rand.Next(22, 36); + float bloodScale = Main.rand.NextFloat(0.6f, 1.2f); + Color bloodColor = Color.Lerp(Color.Yellow, Color.Goldenrod, Main.rand.NextFloat()); + bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)); + + float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f); + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * bloodVelMult * randomSpeedMultiplier; + bloodVelocity.Y -= 5f; + BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity, bloodLifetime, bloodScale, bloodColor); + GeneralParticleHandler.SpawnParticle(blood); + } + SoundEngine.PlaySound(SoundID.Item62 with {pitch = 1f },Projectile.Center); SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); Projectile.Kill(); From 4e3367f02818572216ef0fde685f7d5ace255099 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 5 Mar 2026 21:59:29 -0600 Subject: [PATCH 005/126] sealing my singularity --- Items/Weapons/Rogue/LemonNade.cs | 12 +- Items/Weapons/Rogue/SealedSingularity.cs | 46 ++-- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 7 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 3 +- Projectiles/Rogue/LemonNadeHoldout.cs | 2 +- Projectiles/Rogue/LemonNadeProjectile.cs | 46 ++-- Projectiles/Rogue/SealedSingularityHoldout.cs | 128 ++++++++++ Projectiles/Rogue/SealedSingularityProj.cs | 233 ++++++++++++++++-- 8 files changed, 386 insertions(+), 91 deletions(-) create mode 100644 Projectiles/Rogue/SealedSingularityHoldout.cs diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs index 5e7df2793d..60a92c1294 100644 --- a/Items/Weapons/Rogue/LemonNade.cs +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 32; Item.height = 32; - Item.damage = 75; + Item.damage = 10; Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; Item.noMelee = true; @@ -31,24 +31,16 @@ namespace CalamityMod.Items.Weapons.Rogue Item.shootSpeed = 13f; Item.shoot = ModContent.ProjectileType(); } - public override float StealthVelocityMultiplier => 1f; - - public override float StealthDamageMultiplier => 1f; - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 4; public override void HoldItem(Player player) { if (player.ownedProjectileCounts[Item.shoot] <= 0) player.Calamity().rogueStealth = 0; } - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - return true; - } public override void AddRecipes() { CreateRecipe(). - AddIngredient(). + AddIngredient(ItemID.Grenade). AddIngredient(ItemID.Lemon). Register(); } diff --git a/Items/Weapons/Rogue/SealedSingularity.cs b/Items/Weapons/Rogue/SealedSingularity.cs index 1aa1b4dd1f..5e0cacc97f 100644 --- a/Items/Weapons/Rogue/SealedSingularity.cs +++ b/Items/Weapons/Rogue/SealedSingularity.cs @@ -1,6 +1,6 @@ using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.Melee.Spears; using CalamityMod.Projectiles.Rogue; -using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -13,38 +13,30 @@ namespace CalamityMod.Items.Weapons.Rogue { public override void SetDefaults() { - Item.width = Item.height = 34; - Item.damage = 260; - Item.knockBack = 5f; - Item.useAnimation = Item.useTime = 25; - Item.useStyle = ItemUseStyleID.Swing; + Item.width = 32; + Item.height = 32; + Item.damage = 600; Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 14f; - - Item.noMelee = Item.noUseGraphic = true; - Item.UseSound = SoundID.Item106; - - Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; - Item.rare = ModContent.RarityType(); - Item.Calamity().donorItem = true; + Item.noMelee = true; + Item.noUseGraphic = true; + Item.useTime = 30; + Item.useAnimation = 30; + Item.useStyle = ItemUseStyleID.Swing; + Item.knockBack = 3; + Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; + Item.rare = ItemRarityID.LightRed; + Item.UseSound = SoundID.Item1; + Item.channel = true; + Item.shootSpeed = 13f; + Item.shoot = ModContent.ProjectileType(); } - public override float StealthDamageMultiplier => 0.75f; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + public override void HoldItem(Player player) { - if (player.Calamity().StealthStrikeAvailable()) - { - int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - Main.projectile[stealth].Calamity().stealthStrike = true; - return false; - } - return true; + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.Calamity().rogueStealth = 0; } - public override void AddRecipes() { CreateRecipe(). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 3a376d29b9..28014b917f 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -995,8 +995,11 @@ SealedSingularity: { DisplayName: Sealed Singularity Tooltip: ''' - Shatters on impact, summoning a black hole that sucks in nearby enemies - Stealth strikes summon a black hole that lasts longer and sucks enemies with stronger force + Disables normal stealth generation + Throws a contained singularity bomb that slows down and creates a damaging field after a short fuse + Hold to generate stealth, but burn through the bomb's fuse + After the field collapses, the singularity seeks out the strongest target that it hit and explodes + Stealth strikes increase the size and duration of the damaging field ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 2401941993..aac84e8a11 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -246,7 +246,8 @@ SeafoamBombProj.DisplayName: Seafoam Bomb SeafoamBubble.DisplayName: Seafoam Bubble SealedSingularityBlackhole.DisplayName: Sealed Blackhole SealedSingularityGore.DisplayName: Sealed Singularity Fragment -SealedSingularityProj.DisplayName: Sealed Singularity +SealedSingularityHoldout.DisplayName: Sealed Singularity +SealedSingularityProjectile.DisplayName: Sealed Singularity SeraphimAngelicLight.DisplayName: Light Orb SeraphimAngelicLight2.DisplayName: Light Orb SeraphimBeamLarge.DisplayName: Holy Beam diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 8dd8dc1c8e..21bbc932d7 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -58,7 +58,7 @@ namespace CalamityMod.Projectiles.Rogue var cplayer = player.Calamity(); if (Projectile.Opacity > 0) { - cplayer.temporaryStealthMax = 10; + cplayer.temporaryStealthMax = 0.1f; cplayer.temporaryStealthTimer = 2; } diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs index a753038c96..e022a23f2f 100644 --- a/Projectiles/Rogue/LemonNadeProjectile.cs +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -1,18 +1,8 @@ -using System; -using System.Reflection.Metadata; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Packets.Entities; +using CalamityMod.Dusts; using CalamityMod.Particles; -using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; -using Terraria.DataStructures; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -43,9 +33,13 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 10; } + ref float ExplodeTimer => ref Projectile.ai[0]; + ref float ExplodeTimeMax => ref Projectile.ai[1]; + ref float AIState => ref Projectile.ai[2]; + public override void AI() { - if (Projectile.ai[2] == 1) + if (AIState == 1) { Projectile.idStaticNPCHitCooldown = 2; Projectile.usesIDStaticNPCImmunity = true; @@ -54,12 +48,12 @@ namespace CalamityMod.Projectiles.Rogue Projectile.rotation += 0.175f * Projectile.direction; - if (Projectile.timeLeft < 280 && Projectile.ai[2] != 1) + if (Projectile.timeLeft < 280 && AIState != 1) Projectile.velocity.Y += 0.22f; - Projectile.ai[0]++; + ExplodeTimer++; //Copied from violence/chalice - if (Main.rand.NextFloat() < Projectile.ai[0] / Projectile.ai[1] && Projectile.FinalExtraUpdate()) + if (Main.rand.NextFloat() < ExplodeTimer / ExplodeTimeMax && Projectile.FinalExtraUpdate()) { int bloodLifetime = Main.rand.Next(5, 15); float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); @@ -67,30 +61,30 @@ namespace CalamityMod.Projectiles.Rogue bloodColor = Color.Lerp(bloodColor, new Color(51, 22, 94), Main.rand.NextFloat(0.65f)); float randomSpeedMultiplier = Main.rand.NextFloat(1.25f, 2.25f); - Vector2 bloodVelocity = Main.rand.NextVector2Unit() * randomSpeedMultiplier; + Vector2 bloodVelocity = Main.rand.NextVector2Unit() * randomSpeedMultiplier; bloodVelocity.Y -= 5f; BloodParticle blood = new BloodParticle(Projectile.Center, bloodVelocity.RotatedBy(Projectile.rotation + MathHelper.PiOver4 * Projectile.spriteDirection), bloodLifetime, bloodScale, bloodColor); GeneralParticleHandler.SpawnParticle(blood); } - if (Projectile.ai[0] > Projectile.ai[1] || Projectile.timeLeft == 2) + if (ExplodeTimer > ExplodeTimeMax || Projectile.timeLeft == 2) { - if (Projectile.ai[2] == 1) + if (AIState == 1) Projectile.damage = Projectile.originalDamage; if (Projectile.Calamity().stealthStrike) { var frags = 6f; for (var i = 0; i < frags; i++) - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitY.RotatedBy(i/frags * MathHelper.TwoPi) * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 20,1); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitY.RotatedBy(i / frags * MathHelper.TwoPi) * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 20, 1); } Projectile.Resize(360, 360); Projectile.ResetLocalNPCHitImmunity(); - Projectile.damage *= 10; + Projectile.damage *= 5; Projectile.Damage(); for (var i = 0; i < 40; i++) { - var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(),Main.rand.NextVector2CircularEdge(15,15) * Main.rand.NextFloat(0.25f,1f),Scale:Main.rand.NextFloat(0.75f,1.25f)); + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, 1f), Scale: Main.rand.NextFloat(0.75f, 1.25f)); } var exactBloodCount = 10; // Code copied from Violence/chalice. @@ -109,7 +103,7 @@ namespace CalamityMod.Projectiles.Rogue GeneralParticleHandler.SpawnParticle(blood); } - SoundEngine.PlaySound(SoundID.Item62 with {pitch = 1f },Projectile.Center); + SoundEngine.PlaySound(SoundID.Item62 with { pitch = 1f }, Projectile.Center); SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); Projectile.Kill(); @@ -118,11 +112,11 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - if (Projectile.ai[2] == 1) + if (AIState == 1) { Main.instance.LoadItem(ItemID.PumpkinSeed); var tex = TextureAssets.Item[ItemID.PumpkinSeed]; - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.velocity.ToRotation() - MathHelper.PiOver2, tex.Size() * 0.5f, Projectile.scale,0); + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.velocity.ToRotation() - MathHelper.PiOver2, tex.Size() * 0.5f, Projectile.scale, 0); return false; } return true; @@ -136,8 +130,8 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.velocity.X *= -0.65f; Projectile.velocity.Y = -3f; - if (Projectile.ai[1] - Projectile.ai[0] < 30) - Projectile.ai[0] += 15; + if (ExplodeTimeMax - ExplodeTimer < 30) + ExplodeTimer += 15; } diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs new file mode 100644 index 0000000000..7c4f105ef4 --- /dev/null +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -0,0 +1,128 @@ +using System; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class SealedSingularityHoldout : BaseSwordHoldoutProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/SealedSingularity"; + public override bool useMeleeSpeed => false; + public override bool useMeleeSize => false; + public override int swingWidth => 180; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + public override int AfterImageLength => 0; + + public override int StartupTime { get; set; } + public override int CooldownTime { get; set; } + + bool isChannelable = false; + + int explodeTimer = 0; + + public override void Defaults() + { + Projectile.width = 22; Projectile.height = 28; + Projectile.MaxUpdates = 4; + Projectile.noEnchantmentVisuals = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void Spawn() + { + var player = Main.player[Projectile.owner]; + var modplayer = player.GetModPlayer(); + StartupTime = 10; + CooldownTime = 10; + swingTime -= StartupTime + CooldownTime; + OffsetDistance = 24; + modplayer.swingNum = 0; + RotateInStartup = 1; + } + + public override void AdditionalAI() + { + Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + var player = Main.player[Projectile.owner]; + var cplayer = player.Calamity(); + if (Projectile.Opacity > 0) + { + cplayer.temporaryStealthMax = 0.1f; + cplayer.temporaryStealthTimer = 2; + } + + //MOVE SECONDS TO LemonNade.cs ITEM + var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; + var explodeTimeGoal = CalamityUtils.SecondsToFrames(2) / avgStealth + 30; + var stealthTime = explodeTimeGoal - 30; + + if (Projectile.FinalExtraUpdate() && inStartup) + if (explodeTimer < explodeTimeGoal) + explodeTimer++; + else + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, 1).hostile = true; + Projectile.Opacity = 0; + return; + } + + cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); + + //When channeling, the internal timer will not progress + if (player.channel && inStartup) + { + if (timer >= StartupTime - 1) + { + timer--; + Projectile.timeLeft++; + } + } + if (explodeTimer >= explodeTimeGoal && inCooldown && !Projectile.FinalExtraUpdate()) + { + timer--; + Projectile.timeLeft++; + } + + if (inSwing) + { + if (swingTimer == (int)(swingTime * 0.75f)) + { + if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -15, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer - 30, explodeTimeGoal); + if (player.Calamity().StealthStrikeAvailable()) + { + p.Calamity().stealthStrike = true; + } + } + Projectile.Opacity = 0; + } + } + } + + public override float SwingFunction() + { + if (inStartup) + { + return swingWidth * -0.5f + (MathF.Sin(Main.GlobalTimeWrappedHourly * 30) * 0.2f); + } + if (inCooldown) + return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.7f, swingWidth * 0.2f, SwingCompletion)); + } + + public override bool? CanHitNPC(NPC target) + { + return false; + } + + public override bool CanHitPlayer(Player target) + { + return false; + } + } +} diff --git a/Projectiles/Rogue/SealedSingularityProj.cs b/Projectiles/Rogue/SealedSingularityProj.cs index 559f9d3a3f..f09a8a91c0 100644 --- a/Projectiles/Rogue/SealedSingularityProj.cs +++ b/Projectiles/Rogue/SealedSingularityProj.cs @@ -1,61 +1,246 @@ -using Microsoft.Xna.Framework; +using System; +using CalamityMod.Dusts; +using CalamityMod.Systems.Graphic.PixelationSystem; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { - public class SealedSingularityProj : ModProjectile, ILocalizedModType + public class SealedSingularityProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/SealedSingularity"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + public override void SetDefaults() { - Projectile.width = 34; - Projectile.height = 34; + Projectile.width = 32; + Projectile.height = 32; Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.penetrate = -1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = 300; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = 1; - Projectile.timeLeft = 180; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; } + int targetID = -1; + + NPC target => Main.npc[targetID]; + ref float Timer => ref Projectile.ai[0]; + ref float TimerMax => ref Projectile.ai[1]; + ref float AIState => ref Projectile.ai[2]; + + bool Stealth => Projectile.Calamity().stealthStrike; + + int bounceCooldown = 0; public override void AI() { - Projectile.ai[0] += 1f; + Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + Timer++; + bounceCooldown--; - if (Projectile.ai[0] >= 70f) + if (AIState == 0) { - Projectile.velocity *= 0.96f; + Projectile.rotation += 0.175f * Projectile.direction; + if (Projectile.timeLeft < 280) + Projectile.velocity.Y += 0.22f; + + if (TimerMax - Timer < 30) + Projectile.velocity *= 0.925f; } - else + if (AIState == 1) { - Projectile.rotation += 0.3f * (float)Projectile.direction; + Projectile.timeLeft++; + Projectile.velocity = new Vector2( + MathF.Sin(Timer), + MathF.Sin(Timer * 0.7f) + ); + if (Stealth) + { + Projectile.velocity *= 1 + Math.Clamp(Timer / TimerMax, 0f, 1f) * 2f; + } + } + + if (AIState == 2) + { + if (targetID == -1 || !target.active || !target.CanBeChasedBy()) + { + Timer = TimerMax; + } + else + { + Projectile.velocity = Projectile.DirectionTo(target.Center) * MathHelper.Clamp(Timer / 4f, 0f, 16f); + } + } + + if (Timer > TimerMax && AIState == 0) + { + var sizee = Stealth ? 900 : 600; + Projectile.localNPCHitCooldown = 60; + Projectile.ResetLocalNPCHitImmunity(); + Projectile.tileCollide = false; + Timer = 0; + TimerMax = Stealth ? 600 : 300; + Projectile.timeLeft += 180; + AIState = 1; + } + if (Timer > TimerMax && AIState == 1) + { + AIState = 2; + Timer = 0; + TimerMax = 300; + Projectile.ResetLocalNPCHitImmunity(); + } + + if (Timer >= TimerMax && AIState == 2) + { + Projectile.ResetLocalNPCHitImmunity(); + Projectile.Damage(); + + for (var i = 0; i < 20; i++) + { + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, 1f), Scale: Main.rand.NextFloat(0.5f, 1f)); + } + + SoundEngine.PlaySound(SoundID.Item62 with { pitch = 1f }, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); + for (int index = 0; index < 3; ++index) + { + float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); + } + Projectile.Kill(); } } - public override void OnKill(int timeLeft) + public override bool PreDraw(ref Color lightColor) + { + if (AIState == 1) + PixelationManager.AddPixelatedDrawer((matrix) => DrawAuraOutside(this, matrix), Enums.GeneralDrawLayer.AfterEverything); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + return false; + } + private static void DrawAuraOutside(SealedSingularityProjectile mproj, Matrix matrix) { - if (Projectile.owner != Main.myPlayer) - return; - //glass-pot break sound - SoundEngine.PlaySound(SoundID.Shatter, Projectile.position); + Vector2 drawPosition = mproj.Projectile.Center - Main.screenPosition; - int blackhole = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, Projectile.Calamity().stealthStrike ? -180f : 0f, 0f); - if (blackhole.WithinBounds(Main.maxProjectiles)) + //Draw the outer particles + Main.spriteBatch.EnterShaderRegion(matrix: matrix); + GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].UseOpacity((mproj.Stealth ? 4 : 2) * (mproj.Timer / mproj.TimerMax)); + GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].UseSaturation(0.1f); + GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/Neurons"), 1); + GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].Apply(); + Texture2D telegraphBase = ModContent.Request("CalamityMod/Particles/BloomRing").Value; + Main.EntitySpriteDraw(telegraphBase, drawPosition, null, Color.White * mproj.Projectile.Opacity * 0.75f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); + Main.EntitySpriteDraw(telegraphBase, drawPosition, null, new Color(36, 0, 66) * mproj.Projectile.Opacity * 0.75f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); + Main.spriteBatch.ExitShaderRegion(matrix: matrix); + } + + public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) + { + modifiers.SourceDamage *= 0.002f; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + + switch (AIState) { - Main.projectile[blackhole].Center = Projectile.Center; - Main.projectile[blackhole].Calamity().stealthStrike = Projectile.Calamity().stealthStrike; + case 0: + { + if (bounceCooldown <= 0) + { + Projectile.velocity *= -1f; + bounceCooldown = 5; + } + if (TimerMax - Timer > 30) + Timer = TimerMax - 30; + goto case 1; + } + case 1: + { + if (target.Calamity().IsArmored()) + return; + if (targetID == -1 || !this.target.active || !this.target.CanBeChasedBy()) + { + targetID = target.whoAmI; + } + else + { + if (this.target.life < target.life) + { + targetID = target.whoAmI; + } + } + return; + } + case 2: + { + if (targetID == target.whoAmI) + Timer = TimerMax; + return; + } + } + return; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + switch (AIState) + { + case 1: + modifiers.SourceDamage /= 6; + return; + case 2: + modifiers.SourceDamage *= 2; + return; + } + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (AIState == 1) + { + return CalamityUtils.CircularHitboxCollision(projHitbox.Center(), (Stealth ? 900 : 600) * 0.4f, targetHitbox); + } + return base.Colliding(projHitbox, targetHitbox); + } + + // Make it bounce on tiles. + public override bool OnTileCollide(Vector2 oldVelocity) + { + if (Projectile.width < 100) + { + SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); + Collision.HitTiles(Projectile.position, Projectile.velocity, Projectile.width, Projectile.height); } - for (int index = 0; index < 3; ++index) + if (Projectile.velocity.X != oldVelocity.X) { - float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(Projectile.damage * 0.25), 0f, Projectile.owner, index, 0f); + Projectile.velocity.X = -oldVelocity.X; } + if (Projectile.velocity.Y != oldVelocity.Y) + { + Projectile.velocity.Y = -oldVelocity.Y; + } + Projectile.velocity *= 0.75f; + return false; } } + } From fc9eb5f7b779b1d007e1d6eefc172e3b2bb0fbbe Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 6 Mar 2026 17:48:50 -0600 Subject: [PATCH 006/126] Finish Sealed Singularity --- Items/Weapons/Rogue/SealedSingularity.cs | 3 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 2 +- .../Rogue/SealedSingularityBlackhole.cs | 100 ----------------- ...Proj.cs => SealedSingularityProjectile.cs} | 87 +++++++++++++-- Projectiles/Rogue/SealedSingularityRock.cs | 105 ++++++++++++++++++ 5 files changed, 183 insertions(+), 114 deletions(-) delete mode 100644 Projectiles/Rogue/SealedSingularityBlackhole.cs rename Projectiles/Rogue/{SealedSingularityProj.cs => SealedSingularityProjectile.cs} (68%) create mode 100644 Projectiles/Rogue/SealedSingularityRock.cs diff --git a/Items/Weapons/Rogue/SealedSingularity.cs b/Items/Weapons/Rogue/SealedSingularity.cs index 5e0cacc97f..7bf4dd94dd 100644 --- a/Items/Weapons/Rogue/SealedSingularity.cs +++ b/Items/Weapons/Rogue/SealedSingularity.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 32; Item.height = 32; - Item.damage = 600; + Item.damage = 425; Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; Item.noMelee = true; @@ -30,6 +30,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.channel = true; Item.shootSpeed = 13f; Item.shoot = ModContent.ProjectileType(); + Item.Calamity().donorItem = true; } public override void HoldItem(Player player) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index aac84e8a11..b850bdf19c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -244,7 +244,7 @@ ScourgeoftheSeasProjectile.DisplayName: Moist Scourge ScourgeVenomCloud.DisplayName: Venom Cloud SeafoamBombProj.DisplayName: Seafoam Bomb SeafoamBubble.DisplayName: Seafoam Bubble -SealedSingularityBlackhole.DisplayName: Sealed Blackhole +SealedSingularityRock.DisplayName: Sealed Singularity Rock SealedSingularityGore.DisplayName: Sealed Singularity Fragment SealedSingularityHoldout.DisplayName: Sealed Singularity SealedSingularityProjectile.DisplayName: Sealed Singularity diff --git a/Projectiles/Rogue/SealedSingularityBlackhole.cs b/Projectiles/Rogue/SealedSingularityBlackhole.cs deleted file mode 100644 index 2ca31c17bd..0000000000 --- a/Projectiles/Rogue/SealedSingularityBlackhole.cs +++ /dev/null @@ -1,100 +0,0 @@ -using CalamityMod.NPCs; -using CalamityMod.NPCs.NormalNPCs; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class SealedSingularityBlackhole : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 7; - } - - public override void SetDefaults() - { - Projectile.width = 40; - Projectile.height = 40; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.tileCollide = false; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor); - return false; - } - - public override void AI() - { - // Update animation - if (Projectile.timeLeft % 5 == 0) - { - Projectile.frame++; - } - if (Projectile.frame >= Main.projFrames[Type]) - { - Projectile.frame = 0; - } - - //Succcc - float projCenX = Projectile.Center.X; - float projCenY = Projectile.Center.Y; - float maxDistance = Projectile.Calamity().stealthStrike ? 1000f : 500f; - float succPower = Projectile.Calamity().stealthStrike ? 0.25f : 0.1f; - for (int index = 0; index < Main.maxNPCs; index++) - { - NPC npc = Main.npc[index]; - if (npc.CanBeChasedBy(Projectile, false) && Collision.CanHit(Projectile.Center, 1, 1, npc.Center, 1, 1)) - { - if (CalamityGlobalNPC.ShouldAffectNPC(npc) || npc.type == ModContent.NPCType()) - { - float extraDistance = (npc.width / 2) + (npc.height / 2); - if (Vector2.Distance(npc.Center, Projectile.Center) < (maxDistance + extraDistance)) - { - if (npc.position.X < projCenX) - { - npc.velocity.X += succPower; - } - else - { - npc.velocity.X -= succPower; - } - if (npc.position.Y < projCenY) - { - npc.velocity.Y += succPower; - } - else - { - npc.velocity.Y -= succPower; - } - } - } - } - } - - Projectile.ai[0]++; - if (Projectile.ai[0] > 300f) - { - Projectile.scale *= 0.95f; - Projectile.Opacity *= 0.95f; - Projectile.height = (int)(Projectile.height * Projectile.scale); - Projectile.width = (int)(Projectile.width * Projectile.scale); - } - if (Projectile.scale <= 0.05f) - { - Projectile.Kill(); - } - } - - public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(BuffID.Blackout, 300); - } -} diff --git a/Projectiles/Rogue/SealedSingularityProj.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs similarity index 68% rename from Projectiles/Rogue/SealedSingularityProj.cs rename to Projectiles/Rogue/SealedSingularityProjectile.cs index f09a8a91c0..5963983034 100644 --- a/Projectiles/Rogue/SealedSingularityProj.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -1,8 +1,12 @@ using System; using CalamityMod.Dusts; +using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.Systems.Graphic.PixelationSystem; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -17,6 +21,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/SealedSingularity"; + //Trans flag colors with name containing "girlswag" or having a gender change pot in inventory at donor request + public static Color BorderColor => Main.LocalPlayer.name.Contains("girlswag") || Main.LocalPlayer.HasItemInAnyInventory(ItemID.GenderChangePotion) ? Color.Lerp(Color.Pink, Color.LightBlue, (MathF.Sin(Main.GlobalTimeWrappedHourly * 3) + 1) * 0.5f) : new Color(59, 2, 120); public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 3; @@ -73,6 +79,17 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.velocity *= 1 + Math.Clamp(Timer / TimerMax, 0f, 1f) * 2f; } + if (Timer % 10 == 0 && Main.myPlayer == Projectile.owner && Timer < TimerMax - (Stealth ? 120 : 90)) + { + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + new Vector2(Stealth ? 380 : 255, 0).RotatedByRandom(MathHelper.TwoPi), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner, Projectile.whoAmI); + var v = new Vector2(Stealth ? 380 : 255, 0).RotatedByRandom(MathHelper.TwoPi); + Dust.NewDustPerfect(Projectile.Center + v, DustID.Clentaminator_Purple, -v / 100f); + } + if (TimerMax - Timer == 330) + { + SoundEngine.PlaySound(CeaselessVoid.BuildupSound with { pitch = 0.75f, MaxInstances = 10, Volume = 0.2f }, Projectile.Center); + } + } if (AIState == 2) @@ -90,7 +107,7 @@ namespace CalamityMod.Projectiles.Rogue if (Timer > TimerMax && AIState == 0) { var sizee = Stealth ? 900 : 600; - Projectile.localNPCHitCooldown = 60; + Projectile.localNPCHitCooldown = 30; Projectile.ResetLocalNPCHitImmunity(); Projectile.tileCollide = false; Timer = 0; @@ -104,10 +121,18 @@ namespace CalamityMod.Projectiles.Rogue Timer = 0; TimerMax = 300; Projectile.ResetLocalNPCHitImmunity(); + for (int index = 0; index < 3; ++index) + { + float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); + } + SoundEngine.PlaySound(CeaselessVoid.DeathSound with { pitch = 1f, Volume = Stealth ? 0.5f : 0.2f }, Projectile.Center); } if (Timer >= TimerMax && AIState == 2) { + Projectile.Resize(300, 300); Projectile.ResetLocalNPCHitImmunity(); Projectile.Damage(); @@ -115,23 +140,57 @@ namespace CalamityMod.Projectiles.Rogue { var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, 1f), Scale: Main.rand.NextFloat(0.5f, 1f)); } - SoundEngine.PlaySound(SoundID.Item62 with { pitch = 1f }, Projectile.Center); SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); - for (int index = 0; index < 3; ++index) - { - float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); - } + Projectile.Kill(); } } + private static Texture2D OutlineTex + { + get + { + if (field == null) + { + var texture = TextureAssets.Projectile[ModContent.ProjectileType()].Value; + field = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); + + var BaseArray = new Color[field.Width * field.Height]; + var ColorArray = new Color[field.Width * field.Height]; + texture.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + field.SetData(ColorArray); + } + return field; + } + set; + } + private static Asset VoidTex => field ??= ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole"); public override bool PreDraw(ref Color lightColor) { if (AIState == 1) - PixelationManager.AddPixelatedDrawer((matrix) => DrawAuraOutside(this, matrix), Enums.GeneralDrawLayer.AfterEverything); + { + for (float i = 0; i < MathHelper.TwoPi; i += MathHelper.PiOver2) + { + var pos = Projectile.Center - Main.screenPosition; + float rot = Projectile.rotation; + var frame = TextureAssets.Projectile[Type].Frame(1, 1, 0, 0); + float scale = 1f; + float borderOp = MathF.Pow(Projectile.Opacity, 2); + Main.spriteBatch.Draw(OutlineTex, pos + new Vector2(6 * Timer / TimerMax, 0).RotatedBy(i), frame, BorderColor * borderOp, rot, frame.Size() * 0.5f, scale, SpriteEffects.None, 0); + } + PixelationManager.AddPixelatedDrawer((matrix) => DrawAuraOutside(this, matrix), Enums.GeneralDrawLayer.AfterNPCs); + } + if (AIState == 2) + { + var frame = VoidTex.Frame(1, 7, 0, (int)(Timer * 0.2f % 7)); + Main.EntitySpriteDraw(VoidTex.Value, Projectile.Center - Main.screenPosition, frame, Color.White, 0, frame.Size() * 0.5f, Projectile.scale, 0); + return false; + } Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); return false; } @@ -147,8 +206,8 @@ namespace CalamityMod.Projectiles.Rogue GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/GreyscaleGradients/Neurons"), 1); GameShaders.Misc["CalamityMod:OtherworldBarrierDistortion"].Apply(); Texture2D telegraphBase = ModContent.Request("CalamityMod/Particles/BloomRing").Value; - Main.EntitySpriteDraw(telegraphBase, drawPosition, null, Color.White * mproj.Projectile.Opacity * 0.75f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); - Main.EntitySpriteDraw(telegraphBase, drawPosition, null, new Color(36, 0, 66) * mproj.Projectile.Opacity * 0.75f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); + Main.EntitySpriteDraw(telegraphBase, drawPosition, null, Color.White * mproj.Projectile.Opacity * 0.25f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); + Main.EntitySpriteDraw(telegraphBase, drawPosition, null, BorderColor * mproj.Projectile.Opacity * 0.5f * Math.Clamp(mproj.Timer / 15f, 0f, 1f), mproj.Projectile.whoAmI, telegraphBase.Size() / 2f, (mproj.Stealth ? 900f : 600f) * mproj.Projectile.Opacity / telegraphBase.Width * Math.Clamp(1 - (mproj.Timer - mproj.TimerMax + 15) / 15f, 0f, 1f), 0, 0); Main.spriteBatch.ExitShaderRegion(matrix: matrix); } @@ -187,6 +246,10 @@ namespace CalamityMod.Projectiles.Rogue targetID = target.whoAmI; } } + if (AIState == 1) + { + target.MoveNPC(target.DirectionTo(Projectile.Center), Stealth ? 18 : 4, true); + } return; } case 2: @@ -204,7 +267,7 @@ namespace CalamityMod.Projectiles.Rogue switch (AIState) { case 1: - modifiers.SourceDamage /= 6; + modifiers.SourceDamage /= 20; return; case 2: modifiers.SourceDamage *= 2; diff --git a/Projectiles/Rogue/SealedSingularityRock.cs b/Projectiles/Rogue/SealedSingularityRock.cs new file mode 100644 index 0000000000..5d3acd74db --- /dev/null +++ b/Projectiles/Rogue/SealedSingularityRock.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using CalamityMod.NPCs; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class SealedSingularityRock : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.tileCollide = false; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.Opacity = 0; + Projectile.hide = true; + Projectile.scale = 0.75f; + } + private static Texture2D OutlineTex + { + get + { + if (field == null) + { + var texture = TextureAssets.Projectile[ProjectileID.DeerclopsRangedProjectile].Value; + field = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); + + var BaseArray = new Color[field.Width * field.Height]; + var ColorArray = new Color[field.Width * field.Height]; + texture.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + field.SetData(ColorArray); + } + return field; + } + set; + } = null; + + public override bool PreDraw(ref Color lightColor) + { + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + + var tex = TextureAssets.Projectile[ProjectileID.DeerclopsRangedProjectile]; + var pos = Projectile.Center - Main.screenPosition; + float rot = Projectile.rotation; + var frame = tex.Frame(3, 4, 0, 1); + float scale = Projectile.scale; + float borderOp = MathF.Pow(Projectile.Opacity, 2); + for (float i = 0; i < MathHelper.TwoPi; i += MathHelper.PiOver2) + { + Main.spriteBatch.Draw(OutlineTex, pos + new Vector2(2, 0).RotatedBy(i), frame, SealedSingularityProjectile.BorderColor * borderOp, rot, frame.Size() * 0.5f, scale, SpriteEffects.None, 0); + + } + Main.spriteBatch.Draw(tex.Value, pos, frame, Lighting.GetColor(Projectile.Center.ToTileCoordinates()) * Projectile.Opacity, rot, frame.Size() * 0.5f, scale, SpriteEffects.None, 0); + Main.spriteBatch.End(); + } + return false; + } + + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + behindProjectiles.Add(index); + } + + Vector2? goaloffset; + public override void AI() + { + var goal = Main.projectile[(int)Projectile.ai[0]]; + goaloffset ??= Projectile.Center - goal.Center; + + Projectile.Opacity += 0.1f; + if (Projectile.Opacity >= 1f) + { + Projectile.velocity += Projectile.DirectionTo(goal.Center) * 0.4f; + } + Projectile.rotation += 0.1f; + + if (Projectile.Distance(goal.Center) < 16) + { + SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/NPCHit/OtherworldlyHit") with { PitchVariance = 0.4f, Volume = 0.2f, MaxInstances = 1 }, Projectile.Center); + Projectile.Kill(); + } + } + } +} From 3e777f12686b76834b5619cdb0a2bf8b9b595823 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 6 Mar 2026 22:23:40 -0600 Subject: [PATCH 007/126] duststorm in a bottle --- Dusts/LemonNadeExplodeDust.cs | 7 +- Items/Weapons/Rogue/DuststormInABottle.cs | 29 +--- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 6 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 5 +- Projectiles/Rogue/DuststormCloud.cs | 83 +++++----- Projectiles/Rogue/DuststormCloud.png | Bin 669 -> 55761 bytes Projectiles/Rogue/DuststormCloudExplosion.cs | 54 +++++++ Projectiles/Rogue/DuststormCloudHitbox.cs | 39 ----- .../Rogue/DuststormInABottleHoldout.cs | 127 ++++++++++++++++ Projectiles/Rogue/DuststormInABottleProj.cs | 143 ++++++++++++------ Projectiles/Rogue/LemonNadeHoldout.cs | 5 +- .../Rogue/SealedSingularityProjectile.cs | 21 ++- 12 files changed, 360 insertions(+), 159 deletions(-) create mode 100644 Projectiles/Rogue/DuststormCloudExplosion.cs delete mode 100644 Projectiles/Rogue/DuststormCloudHitbox.cs create mode 100644 Projectiles/Rogue/DuststormInABottleHoldout.cs diff --git a/Dusts/LemonNadeExplodeDust.cs b/Dusts/LemonNadeExplodeDust.cs index 6f93352faa..691f4de2ff 100644 --- a/Dusts/LemonNadeExplodeDust.cs +++ b/Dusts/LemonNadeExplodeDust.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Dusts public class LemonNadeExplodeDust : ModDust { public override string Texture => "CalamityMod/Particles/LemonNadeExplode"; - Color RandomColor + Color RandomColor { get { @@ -27,7 +27,8 @@ namespace CalamityMod.Dusts } public override void OnSpawn(Dust dust) { - dust.color = RandomColor; + if (dust.color == Color.Transparent) + dust.color = RandomColor; dust.dataAsFloat = 0.75f; dust.rotation = Main.rand.NextFloat(0, MathHelper.TwoPi); } @@ -41,7 +42,7 @@ namespace CalamityMod.Dusts dust.dataAsFloat *= 0.96f; dust.position += dust.velocity; dust.velocity *= 0.925f; - dust.rotation += MathF.Sin(dust.dustIndex * 0.1f)*0.2f * dust.dataAsFloat; + dust.rotation += MathF.Sin(dust.dustIndex * 0.1f) * 0.2f * dust.dataAsFloat; if (dust.dataAsFloat <= 0.01f) dust.active = false; return false; diff --git a/Items/Weapons/Rogue/DuststormInABottle.cs b/Items/Weapons/Rogue/DuststormInABottle.cs index 612a1f66f7..fe189b9845 100644 --- a/Items/Weapons/Rogue/DuststormInABottle.cs +++ b/Items/Weapons/Rogue/DuststormInABottle.cs @@ -25,38 +25,21 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityLimeBuyPrice; Item.rare = ItemRarityID.Lime; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 14f; Item.DamageType = RogueDamageClass.Instance; + Item.channel = true; } - - public override float StealthDamageMultiplier => 0.6f; - - public static int CloudLifetime = 200; - public static float DustRadius = 11f; - - //Cloud hitbox size manipulation - public static float MaxSize = 3.2f; - public static float MaxSizeStealth = 3.6f; - public static float GrowthRate = 0.025f; - public static float StealthGrowthRate = 0.035f; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + public override void HoldItem(Player player) { - if (player.Calamity().StealthStrikeAvailable()) - { - int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - Main.projectile[stealth].Calamity().stealthStrike = true; - return false; - } - return true; + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.Calamity().rogueStealth = 0; } public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.SandstorminaBottle). + AddIngredient(). AddIngredient(ItemID.AncientCloth,5). AddIngredient(). AddTile(TileID.MythrilAnvil). diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 28014b917f..16c707b5c7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -339,8 +339,10 @@ DuststormInABottle: { DisplayName: Duststorm in a Bottle Tooltip: ''' - Explodes into a dust cloud - Stealth strikes form a more intense and longer lasting dust cloud + Disables normal stealth generation + Throws a bottle filled with high-pressure dust that shatters on impact with a target or after a short fuse + Hold to generate stealth, but burn through the bottle's fuse + Stealth strikes cause the bottle to leak dust clouds instead of shattering ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index b850bdf19c..9b1c3ad652 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -78,9 +78,10 @@ DragonScalesInfernado.DisplayName: Infernado DragonShit.DisplayName: Fire DukesDecapitatorBubble.DisplayName: Duke Bubble DukesDecapitatorProj.DisplayName: Duke's Decapitator -DuststormCloud.DisplayName: Dust Cloud -DuststormCloudHitbox.DisplayName: Duststorm Cloud +DuststormCloud.DisplayName: Dust Storm DuststormInABottleProj.DisplayName: Duststorm Bottle +DuststormCloudExplosion.DisplayName: Dust Explosion +DuststormInABottleHoldout.DisplayName: Duststorm Bottle DynamicPursuerElectricity.DisplayName: Dynamic Electricity DynamicPursuerLaser.DisplayName: Dynamic Laser DynamicPursuerProjectile.DisplayName: Dynamic Pursuer diff --git a/Projectiles/Rogue/DuststormCloud.cs b/Projectiles/Rogue/DuststormCloud.cs index 40e64aea72..b6f694ece4 100644 --- a/Projectiles/Rogue/DuststormCloud.cs +++ b/Projectiles/Rogue/DuststormCloud.cs @@ -1,62 +1,67 @@ -using Terraria; +using System; +using System.Net.Http.Headers; +using CalamityMod.Dusts; +using CalamityMod.NPCs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { + [PierceResistExceptionAttribute] public class DuststormCloud : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() => Main.projFrames[Type] = 4; public override void SetDefaults() { - Projectile.width = 38; - Projectile.height = 14; + Projectile.width = 128; + Projectile.height = 128; Projectile.friendly = true; Projectile.alpha = 255; Projectile.tileCollide = false; Projectile.ignoreWater = true; - Projectile.timeLeft = 600; - Projectile.DamageType = DamageClass.Generic; + Projectile.timeLeft = 180; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.penetrate = -1; } + Color color = Color.White; + + public static Color RandomColor + { + get + { + switch (Main.rand.Next(4)) + { + case 0: return Color.SandyBrown; + case 1: return new Color(164, 118, 78); + case 2: return new Color(210, 183, 126); + case 3: return new Color(151, 130, 103); + } + return Color.White; + } + } public override void AI() { - Projectile.frameCounter++; - if (Projectile.frameCounter > 6) + if (color == Color.White) { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame >= Main.projFrames[Type]) - { - Projectile.frame = 0; - } - Projectile.velocity *= 0.995f; - Projectile.ai[1] += 1f; - if (Projectile.ai[1] >= 120f) - { - if (Projectile.alpha < 255) - { - Projectile.alpha += 5; - if (Projectile.alpha > 255) - { - Projectile.alpha = 255; - } - } - else if (Projectile.owner == Main.myPlayer) - { - Projectile.Kill(); - } - } - else if (Projectile.alpha > 80) - { - Projectile.alpha -= 30; - if (Projectile.alpha < 80) - { - Projectile.alpha = 80; - } + color = RandomColor; } + Projectile.velocity *= 0.97f; + Projectile.rotation += 0.05f; + Projectile.Opacity = (1- MathF.Pow(1-Projectile.timeLeft / 180f,2)) * 0.5f; + if (Projectile.timeLeft % 5 == 0) + Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2CircularEdge(32,32), ModContent.DustType(),newColor: RandomColor, Scale: 0.75f).customData = Projectile.Opacity; + } + public override bool PreDraw(ref Color lightColor) + { + lightColor = color; + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center-Main.screenPosition, null, lightColor * Projectile.Opacity, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, 0.08f * Projectile.scale, 0); + return false; } } } diff --git a/Projectiles/Rogue/DuststormCloud.png b/Projectiles/Rogue/DuststormCloud.png index b3ef97ca5a8edcb1be08ee09e6143ceed262ab37..f2385226796e2723a8d77b2c6650a2f5d2dc04b0 100644 GIT binary patch literal 55761 zcmZ5|d0bB2`}L_bljeFzDb2G)MMNS|(Oeo7nrK!DO`@67EKNiuO&U~6lS-2$Nzyz? zk_J&JyzB7&{qy?V9`W4wIs5E=?dw|CT5I2-C$!Z!Fl=HV2x5cA5j9|K@>(Zu31sz@ANK5OfC=vQ$6{cqRIK;S^Oin z`ypd@J!c#Di&k#d#0e{VCwFP>L;72HN^h4|a&Y>v5AP|pHrBAw&=4o+@E2-g69qLv zfuD}z_vZiojL{IH6jXozof1E9r=TR5@#jhWwhvzS_utRqXY!XNev_a7zd!%Kn-Ww6 zaf_B%hj+-z?U1Fo`|qmcC#diKyHYHECVx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g$OosvZxqjA>Gxsxg*ykB?i z9003vNmvhVNho5MqyDz-LcE2I;f}U4JTcCFRAQ=f;cCZ84t!GdU`n+wZD7}6x(0V& z7z?U}lKJ?RIjT)CTiR%*Z?U+>omPpJ zb3^>hG^H3PXCo@5ECV#~gPQf~z5n+MX^Sf!{2tgx<>OpC26DI`n+Km<sBz`ow1I-2el9UDPO6wxsZTQh?28ohk)t(wLikS!ph-NwegFG@}pG{HA5C=t*eO;0X=x ze0$p^lO^=Vk`((L>((_FI?}YWtfUoC!DdWEvDpC^`{cGj!LEH!)-S0+@{54Az;$bn z_4ho5d%|0X*#BB|8T6QbRT+|-IOY>HM0aCHeCC Uyu9bMh{Au&O*gRb8t*#wf8eL{;Q#;t literal 669 zcmV;O0%HA%P)QF(0007HNklA#cLTWcL{S%uuNgR0>Jz6 z3xKcn?>@kV)ncp!JGBM?i_3Wh;N+$Oxcd0b(ECosivAy%ikcuwIl1YMQo)Kvi70xM z^@DhkPYKej*xx-BD0Tkg91veInZLJv6pBa0{!XuAPBxY3?5T?b zpITxSGw!k7SNDDBuiXENC?bfEU~Auua4x)Tfdnfy)vUV;p!(rU=$G$p zANc^yeOKnj`bQ%Qamb6MS)l97pMM> diff --git a/Projectiles/Rogue/DuststormCloudExplosion.cs b/Projectiles/Rogue/DuststormCloudExplosion.cs new file mode 100644 index 0000000000..b560153a04 --- /dev/null +++ b/Projectiles/Rogue/DuststormCloudExplosion.cs @@ -0,0 +1,54 @@ +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class DuststormCloudExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + public override string Texture => "CalamityMod/Projectiles/Rogue/DuststormCloud"; + public override void SetDefaults() + { + Projectile.width = 150; + Projectile.height = 150; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.timeLeft = 1; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 12; + } + + Color color = Color.White; + public override void AI() + { + if (color == Color.White) + { + color = DuststormCloud.RandomColor; + } + SoundEngine.PlaySound(SoundID.DD2_CrystalCartImpact); + for (var i = 0; i < 80; i++) { + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(8, 8) * Main.rand.NextFloat(0.2f,1.2f), newColor: DuststormCloud.RandomColor, Scale: 0.75f); + d.customData = 0.75f; + } + } + + public override bool PreDraw(ref Color lightColor) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, color * Projectile.Opacity, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, 0.08f * Projectile.scale, 0); + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width, targetHitbox); + } +} diff --git a/Projectiles/Rogue/DuststormCloudHitbox.cs b/Projectiles/Rogue/DuststormCloudHitbox.cs deleted file mode 100644 index a8e02d7678..0000000000 --- a/Projectiles/Rogue/DuststormCloudHitbox.cs +++ /dev/null @@ -1,39 +0,0 @@ -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs; -using Microsoft.Xna.Framework; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - [PierceResistExceptionAttribute(true)] - public class DuststormCloudHitbox : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public override void SetDefaults() - { - Projectile.width = 50; - Projectile.height = 50; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.timeLeft = DuststormInABottle.CloudLifetime; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 12; - } - - public override void AI() - { - if (Projectile.scale < (Projectile.ai[1] == 1 ? DuststormInABottle.MaxSizeStealth : DuststormInABottle.MaxSize)) - { - Projectile.scale += Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowthRate : DuststormInABottle.GrowthRate; - Projectile.ExpandHitboxBy(1 + (Projectile.ai[1] == 1 ? DuststormInABottle.StealthGrowthRate : DuststormInABottle.GrowthRate)); - } - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width, targetHitbox); - } -} diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs new file mode 100644 index 0000000000..9fa22c55b3 --- /dev/null +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -0,0 +1,127 @@ +using System; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class DuststormInABottleHoldout : BaseSwordHoldoutProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/DuststormInABottle"; + public override bool useMeleeSpeed => false; + public override bool useMeleeSize => false; + public override int swingWidth => 180; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + public override int AfterImageLength => 0; + + public override int StartupTime { get; set; } + public override int CooldownTime { get; set; } + + bool isChannelable = false; + + int explodeTimer = 0; + + public override void Defaults() + { + Projectile.width = 22; Projectile.height = 28; + Projectile.MaxUpdates = 4; + Projectile.noEnchantmentVisuals = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void Spawn() + { + var player = Main.player[Projectile.owner]; + var modplayer = player.GetModPlayer(); + StartupTime = 10; + CooldownTime = 10; + swingTime -= StartupTime + CooldownTime; + OffsetDistance = 24; + modplayer.swingNum = 0; + RotateInStartup = 1; + } + + public override void AdditionalAI() + { + Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + var player = Main.player[Projectile.owner]; + var cplayer = player.Calamity(); + if (Projectile.Opacity > 0) + { + cplayer.temporaryStealthMax = 0.1f; + cplayer.temporaryStealthTimer = 2; + } + + var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; + var explodeTimeGoal = CalamityUtils.SecondsToFrames(2) / avgStealth + 30; + var stealthTime = explodeTimeGoal - 30; + + if (Projectile.FinalExtraUpdate() && inStartup) + if (explodeTimer < explodeTimeGoal) + explodeTimer++; + else + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, -1).hostile = true; + Projectile.Opacity = 0; + return; + } + + cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); + + //When channeling, the internal timer will not progress + if (player.channel && inStartup) + { + if (timer >= StartupTime - 1) + { + timer--; + Projectile.timeLeft++; + } + } + if (explodeTimer >= explodeTimeGoal && inCooldown && !Projectile.FinalExtraUpdate()) + { + timer--; + Projectile.timeLeft++; + } + + if (inSwing) + { + if (swingTimer == (int)(swingTime * 0.75f)) + { + if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -12.5f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal); + if (player.Calamity().StealthStrikeAvailable()) + { + p.Calamity().stealthStrike = true; + } + } + Projectile.Opacity = 0; + } + } + } + + public override float SwingFunction() + { + if (inStartup) + { + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.2f, swingWidth * -0.5f, StartupCompletion)); + } + if (inCooldown) + return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.7f, swingWidth * 0.2f, SwingCompletion)); + } + + public override bool? CanHitNPC(NPC target) + { + return false; + } + + public override bool CanHitPlayer(Player target) + { + return false; + } + } +} diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 61d51c1462..91f085219f 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -1,9 +1,11 @@ using System; +using CalamityMod.Dusts; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -13,64 +15,115 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/DuststormInABottle"; - public override void SetDefaults() + int lifetime => AIState == 1 ? 300 : 150; + public override void SetStaticDefaults() { - Projectile.width = 20; - Projectile.height = 20; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.ThrownProjectile; - Projectile.timeLeft = 180; - AIType = ProjectileID.ThrowingKnife; - Projectile.DamageType = RogueDamageClass.Instance; + ProjectileID.Sets.TrailCacheLength[Type] = 3; + ProjectileID.Sets.TrailingMode[Type] = 0; } - public override void OnKill(int timeLeft) + public override void SetDefaults() { - bool stealth = Projectile.Calamity().stealthStrike; - SoundEngine.PlaySound(SoundID.Item107, Projectile.Center); - double cloudAmt = Main.rand.Next(40, 50); - if (stealth) + Projectile.width = 24; + Projectile.height = 24; + Projectile.friendly = true; + Projectile.tileCollide = true; + Projectile.penetrate = -1; + Projectile.MaxUpdates = 2; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + int targetID = -1; + + NPC target => Main.npc[targetID]; + ref float Timer => ref Projectile.ai[0]; + ref float TimerMax => ref Projectile.ai[1]; + ref float AIState => ref Projectile.ai[2]; + + int gravTimer = 0; + + bool Stealth => Projectile.Calamity().stealthStrike; + + public override void AI() + { + Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + Timer++; + gravTimer++; + bounceCooldown--; + + Projectile.rotation += 0.175f * Projectile.direction * Projectile.velocity.Length(); + if (gravTimer > 20) { - //DUST STORM - for (int dustexplode = 0; dustexplode < 180; dustexplode++) - { - Vector2 dustd = new Vector2(DuststormInABottle.DustRadius, DuststormInABottle.DustRadius).RotatedBy(MathHelper.ToRadians(dustexplode * 2)); - - Particle dust = new SandyDustParticle(Projectile.Center, dustd * Main.rand.NextFloat(0.25f, 1f), Color.Beige, Main.rand.NextFloat(0.7f, 1.2f), Main.rand.Next(30, 50)); - GeneralParticleHandler.SpawnParticle(dust); - - int d = Dust.NewDust(Projectile.Center, Projectile.width, Projectile.height, Main.rand.NextBool(5) ? 32 : 85, dustd.X, dustd.Y, 50, default, 2f); - Main.dust[d].noGravity = true; - Main.dust[d].velocity *= Main.rand.NextFloat(0.25f, 1f); - Main.dust[d].scale *= Main.rand.NextFloat(0.5f, 0.8f); - } - cloudAmt *= 2.75; - cloudAmt = Math.Round(cloudAmt); + Projectile.velocity.Y += 0.22f; } - else - { - //DUST STORM but smaller - for (int dustexplode = 0; dustexplode < 120; dustexplode++) - { - Vector2 dustd = new Vector2(DuststormInABottle.DustRadius, DuststormInABottle.DustRadius - 2).RotatedBy(MathHelper.ToRadians(dustexplode * 3)); - Particle dust = new SandyDustParticle(Projectile.Center, dustd * Main.rand.NextFloat(0.25f, 1f), Color.Beige, Main.rand.NextFloat(0.7f, 1.2f), Main.rand.Next(30, 50)); - GeneralParticleHandler.SpawnParticle(dust); + if (AIState == 1) + { + if (Timer % 10 == 0) + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } } - if (Projectile.owner == Main.myPlayer) + if (Timer > TimerMax && AIState == 0) { - for (int index = 0; index < cloudAmt; index++) + if (!Stealth) { - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 10f, 200f, 0.01f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, stealth ? velocity * 1.2f : velocity, ModContent.ProjectileType(), 0, 0, Projectile.owner, stealth ? 1f : 0f, (float)Main.rand.Next(-45, 1)); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.Kill(); + return; } - int hitbox = Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 0.5f, Projectile.owner); - if (hitbox.WithinBounds(Main.maxProjectiles) && Projectile.Calamity().stealthStrike) //Inherit stealth flag - Main.projectile[hitbox].ai[1] = 1; + AIState = 1; + Timer = 0; + Projectile.timeLeft = lifetime; } } + public override bool PreDraw(ref Color lightColor) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + return false; + } + + public override bool? CanHitNPC(NPC target) + { + return Projectile.velocity.Length() > 1f; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (!Stealth) + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.Kill(); + return; + } + if (Projectile.numHits == 0) + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + } + return; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + return base.Colliding(projHitbox, targetHitbox); + } + + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) + { + if (AIState != 0 || Projectile.timeLeft < lifetime - 20) + fallThrough = false; + return base.TileCollideStyle(ref width, ref height, ref fallThrough, ref hitboxCenterFrac); + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + Projectile.velocity *= 0.95f; + return false; + } } } diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 21bbc932d7..daee97c3e1 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -62,10 +62,9 @@ namespace CalamityMod.Projectiles.Rogue cplayer.temporaryStealthTimer = 2; } - //MOVE SECONDS TO LemonNade.cs ITEM var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; - var explodeTimeGoal = CalamityUtils.SecondsToFrames(2) / avgStealth; - var stealthTime = explodeTimeGoal * 0.9f; + var stealthTime = CalamityUtils.SecondsToFrames(2) / avgStealth; + var explodeTimeGoal = stealthTime + 30; if (Projectile.FinalExtraUpdate() && inStartup) if (explodeTimer < explodeTimeGoal) diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 5963983034..3193dbb6cb 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -23,6 +23,21 @@ namespace CalamityMod.Projectiles.Rogue //Trans flag colors with name containing "girlswag" or having a gender change pot in inventory at donor request public static Color BorderColor => Main.LocalPlayer.name.Contains("girlswag") || Main.LocalPlayer.HasItemInAnyInventory(ItemID.GenderChangePotion) ? Color.Lerp(Color.Pink, Color.LightBlue, (MathF.Sin(Main.GlobalTimeWrappedHourly * 3) + 1) * 0.5f) : new Color(59, 2, 120); + + public static Color RandomColor + { + get + { + switch (Main.rand.Next(4)) + { + case 0: return new Color(91, 47, 113); + case 1: return new Color(119, 74, 165); + case 2: return new Color(58, 58, 58); + case 3: return new Color(123, 115, 142); + } + return Color.White; + } + } public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 3; @@ -49,7 +64,6 @@ namespace CalamityMod.Projectiles.Rogue ref float Timer => ref Projectile.ai[0]; ref float TimerMax => ref Projectile.ai[1]; ref float AIState => ref Projectile.ai[2]; - bool Stealth => Projectile.Calamity().stealthStrike; int bounceCooldown = 0; @@ -71,6 +85,7 @@ namespace CalamityMod.Projectiles.Rogue if (AIState == 1) { Projectile.timeLeft++; + Projectile.rotation += 0.175f * Projectile.direction; Projectile.velocity = new Vector2( MathF.Sin(Timer), MathF.Sin(Timer * 0.7f) @@ -136,9 +151,9 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ResetLocalNPCHitImmunity(); Projectile.Damage(); - for (var i = 0; i < 20; i++) + for (var i = 0; i < (Stealth? 80 : 40); i++) { - var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, 1f), Scale: Main.rand.NextFloat(0.5f, 1f)); + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, Stealth? 1.5f : 1f), Scale: Main.rand.NextFloat(0.5f, 1.5f), newColor: RandomColor); } SoundEngine.PlaySound(SoundID.Item62 with { pitch = 1f }, Projectile.Center); SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); From 57eab573ffeab3af6a5f846435833cf6c48909fa Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 7 Mar 2026 19:43:36 -0600 Subject: [PATCH 008/126] fix compile error --- Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson | 2 +- Projectiles/Rogue/DuststormInABottleProj.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 9b1c3ad652..e8d01b227f 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -78,7 +78,7 @@ DragonScalesInfernado.DisplayName: Infernado DragonShit.DisplayName: Fire DukesDecapitatorBubble.DisplayName: Duke Bubble DukesDecapitatorProj.DisplayName: Duke's Decapitator -DuststormCloud.DisplayName: Dust Storm +DuststormCloud.DisplayName: Dust Storm DuststormInABottleProj.DisplayName: Duststorm Bottle DuststormCloudExplosion.DisplayName: Dust Explosion DuststormInABottleHoldout.DisplayName: Duststorm Bottle diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 91f085219f..c97f557733 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -52,7 +52,6 @@ namespace CalamityMod.Projectiles.Rogue Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); Timer++; gravTimer++; - bounceCooldown--; Projectile.rotation += 0.175f * Projectile.direction * Projectile.velocity.Length(); if (gravTimer > 20) From 8998047ba6c44eeac3009c7ad571cf5f4a5adc95 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 17:19:33 -0500 Subject: [PATCH 009/126] balancings --- Items/Weapons/Rogue/DuststormInABottle.cs | 2 +- Items/Weapons/Rogue/LemonNade.cs | 2 +- Projectiles/Rogue/DuststormCloud.cs | 2 +- Projectiles/Rogue/DuststormInABottleHoldout.cs | 2 +- Projectiles/Rogue/DuststormInABottleProj.cs | 4 ++-- Projectiles/Rogue/LemonNadeHoldout.cs | 2 +- Projectiles/Rogue/LemonNadeProjectile.cs | 12 +++++++++--- Projectiles/Rogue/SealedSingularityHoldout.cs | 2 +- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Items/Weapons/Rogue/DuststormInABottle.cs b/Items/Weapons/Rogue/DuststormInABottle.cs index fe189b9845..9ed040335a 100644 --- a/Items/Weapons/Rogue/DuststormInABottle.cs +++ b/Items/Weapons/Rogue/DuststormInABottle.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 20; Item.height = 24; - Item.damage = 65; + Item.damage = 100; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 28; diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs index 60a92c1294..a0ffdd8245 100644 --- a/Items/Weapons/Rogue/LemonNade.cs +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 32; Item.height = 32; - Item.damage = 10; + Item.damage = 30; Item.DamageType = RogueDamageClass.Instance; Item.autoReuse = true; Item.noMelee = true; diff --git a/Projectiles/Rogue/DuststormCloud.cs b/Projectiles/Rogue/DuststormCloud.cs index b6f694ece4..bf00a4951a 100644 --- a/Projectiles/Rogue/DuststormCloud.cs +++ b/Projectiles/Rogue/DuststormCloud.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = 180; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.idStaticNPCHitCooldown = 15; Projectile.penetrate = -1; } diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index 9fa22c55b3..78277e6d31 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -12.5f, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -12.5f * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal); if (player.Calamity().StealthStrikeAvailable()) { p.Calamity().stealthStrike = true; diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index c97f557733..6376d1a4a4 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -63,7 +63,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Timer % 10 == 0) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), (int)(Projectile.damage*0.5f), Projectile.knockBack, Projectile.owner); } } if (Timer > TimerMax && AIState == 0) @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { - if (AIState != 0 || Projectile.timeLeft < lifetime - 20) + if (Projectile.timeLeft < lifetime - 25) fallThrough = false; return base.TileCollideStyle(ref width, ref height, ref fallThrough, ref hitboxCenterFrac); } diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index daee97c3e1..3d34f85b40 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -124,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer-30, explodeTimeGoal); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10 * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer-30, explodeTimeGoal); if (player.Calamity().StealthStrikeAvailable()) { p.Calamity().stealthStrike = true; diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs index e022a23f2f..8b3368484c 100644 --- a/Projectiles/Rogue/LemonNadeProjectile.cs +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -79,7 +79,6 @@ namespace CalamityMod.Projectiles.Rogue } Projectile.Resize(360, 360); Projectile.ResetLocalNPCHitImmunity(); - Projectile.damage *= 5; Projectile.Damage(); for (var i = 0; i < 40; i++) @@ -124,8 +123,16 @@ namespace CalamityMod.Projectiles.Rogue public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) { - modifiers.SourceDamage *= 0.002f; + modifiers.SourceDamage /= Main.masterMode ? 2f : Main.expertMode ? 1.5f : 1; + modifiers.SourceDamage *= 0.33f; } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Projectile.width < 100) + modifiers.SetMaxDamage(1); + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Projectile.velocity.X *= -0.65f; @@ -134,7 +141,6 @@ namespace CalamityMod.Projectiles.Rogue ExplodeTimer += 15; } - // Make it bounce on tiles. public override bool OnTileCollide(Vector2 oldVelocity) { diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index 7c4f105ef4..0d0ca2e557 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -93,7 +93,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -15, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer - 30, explodeTimeGoal); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -15 * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer - 30, explodeTimeGoal); if (player.Calamity().StealthStrikeAvailable()) { p.Calamity().stealthStrike = true; From 0a715bff40184811da1d771e8308d706fcb205d6 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 17:27:20 -0500 Subject: [PATCH 010/126] duststorm plat fall fix --- Projectiles/Rogue/DuststormInABottleProj.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 6376d1a4a4..0e00e4a424 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Projectiles.Rogue ref float AIState => ref Projectile.ai[2]; int gravTimer = 0; - bool Stealth => Projectile.Calamity().stealthStrike; public override void AI() @@ -115,7 +114,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { - if (Projectile.timeLeft < lifetime - 25) + if (gravTimer > 25) fallThrough = false; return base.TileCollideStyle(ref width, ref height, ref fallThrough, ref hitboxCenterFrac); } From f84b58a9c7803879cabf2c1464da1c667ed80a0b Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 17:44:25 -0500 Subject: [PATCH 011/126] Cleanups --- .../Rogue/DuststormInABottleHoldout.cs | 1 - Projectiles/Rogue/DuststormInABottleProj.cs | 20 ++----------------- Projectiles/Rogue/LemonNadeHoldout.cs | 3 --- Projectiles/Rogue/LemonNadeProjectile.cs | 3 +-- Projectiles/Rogue/SealedSingularityHoldout.cs | 4 ---- .../Rogue/SealedSingularityProjectile.cs | 13 +++++++++++- 6 files changed, 15 insertions(+), 29 deletions(-) diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index 78277e6d31..ddaa36ee9d 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -71,7 +71,6 @@ namespace CalamityMod.Projectiles.Rogue cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); - //When channeling, the internal timer will not progress if (player.channel && inStartup) { if (timer >= StartupTime - 1) diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 0e00e4a424..952295e1cc 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -1,10 +1,5 @@ -using System; -using CalamityMod.Dusts; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -37,8 +32,6 @@ namespace CalamityMod.Projectiles.Rogue } int targetID = -1; - - NPC target => Main.npc[targetID]; ref float Timer => ref Projectile.ai[0]; ref float TimerMax => ref Projectile.ai[1]; ref float AIState => ref Projectile.ai[2]; @@ -62,7 +55,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Timer % 10 == 0) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), (int)(Projectile.damage*0.5f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner); } } if (Timer > TimerMax && AIState == 0) @@ -103,15 +96,6 @@ namespace CalamityMod.Projectiles.Rogue return; } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - return base.Colliding(projHitbox, targetHitbox); - } - public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { if (gravTimer > 25) diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 3d34f85b40..781300bc39 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -40,8 +40,6 @@ namespace CalamityMod.Projectiles.Rogue } public override void Spawn() { - //This sets variables for the spear in general, as well as the secondary attack - //The secondary attack is the "default" because it was coded first var player = Main.player[Projectile.owner]; var modplayer = player.GetModPlayer(); StartupTime = 10; @@ -89,7 +87,6 @@ namespace CalamityMod.Projectiles.Rogue } } - //When channeling, the internal timer will not progress if (player.channel && inStartup) { if (timer >= StartupTime - 1) diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs index 8b3368484c..a6e8c07c41 100644 --- a/Projectiles/Rogue/LemonNadeProjectile.cs +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -141,10 +141,9 @@ namespace CalamityMod.Projectiles.Rogue ExplodeTimer += 15; } - // Make it bounce on tiles. public override bool OnTileCollide(Vector2 oldVelocity) { - // Impacts the terrain even though it bounces off. + //Only make noises and particles if not an explosion if (Projectile.width < 100) { SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index 0d0ca2e557..d1bde0f987 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -20,8 +20,6 @@ namespace CalamityMod.Projectiles.Rogue public override int StartupTime { get; set; } public override int CooldownTime { get; set; } - bool isChannelable = false; - int explodeTimer = 0; public override void Defaults() @@ -55,7 +53,6 @@ namespace CalamityMod.Projectiles.Rogue cplayer.temporaryStealthTimer = 2; } - //MOVE SECONDS TO LemonNade.cs ITEM var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; var explodeTimeGoal = CalamityUtils.SecondsToFrames(2) / avgStealth + 30; var stealthTime = explodeTimeGoal - 30; @@ -72,7 +69,6 @@ namespace CalamityMod.Projectiles.Rogue cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); - //When channeling, the internal timer will not progress if (player.channel && inStartup) { if (timer >= StartupTime - 1) diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 3193dbb6cb..9fe4878bd8 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -22,12 +22,23 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Items/Weapons/Rogue/SealedSingularity"; //Trans flag colors with name containing "girlswag" or having a gender change pot in inventory at donor request - public static Color BorderColor => Main.LocalPlayer.name.Contains("girlswag") || Main.LocalPlayer.HasItemInAnyInventory(ItemID.GenderChangePotion) ? Color.Lerp(Color.Pink, Color.LightBlue, (MathF.Sin(Main.GlobalTimeWrappedHourly * 3) + 1) * 0.5f) : new Color(59, 2, 120); + public static bool DonorColor => Main.LocalPlayer.name.Contains("girlswag") || Main.LocalPlayer.HasItemInAnyInventory(ItemID.GenderChangePotion); + public static Color BorderColor => DonorColor ? Color.Lerp(Color.Pink, Color.LightBlue, (MathF.Sin(Main.GlobalTimeWrappedHourly * 3) + 1) * 0.5f) : new Color(59, 2, 120); public static Color RandomColor { get { + if (DonorColor) + { + switch (Main.rand.Next(3)) + { + case 0: return Color.Pink; + case 1: return Color.LightBlue; + case 2: return Color.White; + } + } + switch (Main.rand.Next(4)) { case 0: return new Color(91, 47, 113); From 3187ef76273bb5d0fcc03056c08d3e2438df2913 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 20:14:56 -0500 Subject: [PATCH 012/126] sealed singularity visual tweaks --- Projectiles/Rogue/SealedSingularityHoldout.cs | 2 +- .../Rogue/SealedSingularityProjectile.cs | 45 ++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index d1bde0f987..f6b85b2499 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -104,7 +104,7 @@ namespace CalamityMod.Projectiles.Rogue { if (inStartup) { - return swingWidth * -0.5f + (MathF.Sin(Main.GlobalTimeWrappedHourly * 30) * 0.2f); + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.2f, swingWidth * -0.5f, StartupCompletion)); } if (inCooldown) return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 9fe4878bd8..9d5d727db4 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -1,9 +1,8 @@ using System; using CalamityMod.Dusts; using CalamityMod.NPCs.CeaselessVoid; +using CalamityMod.Particles; using CalamityMod.Systems.Graphic.PixelationSystem; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -126,7 +125,7 @@ namespace CalamityMod.Projectiles.Rogue } else { - Projectile.velocity = Projectile.DirectionTo(target.Center) * MathHelper.Clamp(Timer / 4f, 0f, 16f); + Projectile.velocity = Projectile.DirectionTo(target.Center) * MathHelper.Clamp(MathF.Pow((Timer - 30) / 8f, 2), 0f, 32f) * (Timer - 30).DirectionalSign(); } } @@ -153,6 +152,7 @@ namespace CalamityMod.Projectiles.Rogue float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); } + Projectile.velocity = Vector2.Zero; SoundEngine.PlaySound(CeaselessVoid.DeathSound with { pitch = 1f, Volume = Stealth ? 0.5f : 0.2f }, Projectile.Center); } @@ -162,10 +162,18 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ResetLocalNPCHitImmunity(); Projectile.Damage(); - for (var i = 0; i < (Stealth? 80 : 40); i++) + for (var i = 0; i < (Stealth ? 80 : 40); i++) { - var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, Stealth? 1.5f : 1f), Scale: Main.rand.NextFloat(0.5f, 1.5f), newColor: RandomColor); + var d = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), Main.rand.NextVector2CircularEdge(15, 15) * Main.rand.NextFloat(0.25f, Stealth ? 1.5f : 1f), Scale: Main.rand.NextFloat(0.5f, 1.5f), newColor: RandomColor); } + var ringTimer = Stealth ? 50 : 35; + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, RandomColor, "CalamityMod/Particles/BloomRing", new Vector2(0.1f, 0.85f), MathHelper.PiOver2, -4f, 4f, ringTimer)); + if (Stealth) + { + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, RandomColor, "CalamityMod/Particles/BloomRing", new Vector2(0.2f, 0.7f), MathHelper.PiOver4, -4f, 4f, ringTimer - 15)); + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, RandomColor, "CalamityMod/Particles/BloomRing", new Vector2(0.2f, 0.7f), -MathHelper.PiOver4, -4f, 4f, ringTimer - 15)); + } + SoundEngine.PlaySound(SoundID.Item62 with { pitch = 1f }, Projectile.Center); SoundEngine.PlaySound(SoundID.Item111 with { pitch = 0.5f }, Projectile.Center); @@ -195,6 +203,29 @@ namespace CalamityMod.Projectiles.Rogue } set; } + + private static Texture2D OutlineTexVoid + { + get + { + if (field == null) + { + var texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole").Value; + field = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); + + var BaseArray = new Color[field.Width * field.Height]; + var ColorArray = new Color[field.Width * field.Height]; + texture.GetData(BaseArray); + for (var i = 0; i < BaseArray.Length; i++) + { + ColorArray[i] = new Color(255, 255, 255) * (((float)BaseArray[i].A) / 255f); + } + field.SetData(ColorArray); + } + return field; + } + set; + } private static Asset VoidTex => field ??= ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole"); public override bool PreDraw(ref Color lightColor) { @@ -214,6 +245,10 @@ namespace CalamityMod.Projectiles.Rogue if (AIState == 2) { var frame = VoidTex.Frame(1, 7, 0, (int)(Timer * 0.2f % 7)); + for (float i = 0; i < MathHelper.TwoPi; i += MathHelper.PiOver2) + { + Main.EntitySpriteDraw(OutlineTexVoid, Projectile.Center - Main.screenPosition + new Vector2(2, 0).RotatedBy(i), frame, BorderColor, 0, frame.Size() * 0.5f, Projectile.scale, 0); + } Main.EntitySpriteDraw(VoidTex.Value, Projectile.Center - Main.screenPosition, frame, Color.White, 0, frame.Size() * 0.5f, Projectile.scale, 0); return false; } From 7d973575c7d9690e9f052834d370d430cd68c627 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 20:52:23 -0500 Subject: [PATCH 013/126] max stealth balancing they now give the same stealth as their respective tier armors --- Projectiles/Rogue/DuststormInABottleHoldout.cs | 2 +- Projectiles/Rogue/LemonNadeHoldout.cs | 2 +- Projectiles/Rogue/SealedSingularityHoldout.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index ddaa36ee9d..a8a8af36de 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -51,7 +51,7 @@ namespace CalamityMod.Projectiles.Rogue var cplayer = player.Calamity(); if (Projectile.Opacity > 0) { - cplayer.temporaryStealthMax = 0.1f; + cplayer.temporaryStealthMax = 1.1f; cplayer.temporaryStealthTimer = 2; } diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 781300bc39..25385d1b39 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Projectiles.Rogue var cplayer = player.Calamity(); if (Projectile.Opacity > 0) { - cplayer.temporaryStealthMax = 0.1f; + cplayer.temporaryStealthMax = 0.5f; cplayer.temporaryStealthTimer = 2; } diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index f6b85b2499..faa0d9f844 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Rogue var cplayer = player.Calamity(); if (Projectile.Opacity > 0) { - cplayer.temporaryStealthMax = 0.1f; + cplayer.temporaryStealthMax = 1.2f; cplayer.temporaryStealthTimer = 2; } From ae4afc46c9a2b479dfffc24dda462ad6b5e6646c Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 21:12:44 -0500 Subject: [PATCH 014/126] supernova cookable test --- Items/Weapons/Rogue/Supernova.cs | 18 +-- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 1 + Projectiles/Rogue/SupernovaHoldout.cs | 120 ++++++++++++++++++ 3 files changed, 127 insertions(+), 12 deletions(-) create mode 100644 Projectiles/Rogue/SupernovaHoldout.cs diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index abcaa7fee0..911bd3ab8d 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -14,6 +14,7 @@ namespace CalamityMod.Items.Weapons.Rogue { public class Supernova : RogueWeapon { + public static float StealthTimeInSeconds => 2f; public static readonly SoundStyle ExplosionSound = new("CalamityMod/Sounds/Item/SupernovaBoom") { Volume = 0.9f }; public static readonly SoundStyle StealthExplosionSound = new("CalamityMod/Sounds/Item/SupernovaStealthExplode") { Volume = 1f }; public static readonly SoundStyle StealthChargeSound = new("CalamityMod/Sounds/Item/SupernovaStealthCharge") { Volume = 1f }; @@ -31,26 +32,19 @@ namespace CalamityMod.Items.Weapons.Rogue Item.UseSound = SoundID.Item1; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityVioletBuyPrice; - Item.shoot = ModContent.ProjectileType(); + Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 16f; Item.DamageType = RogueDamageClass.Instance; Item.rare = ModContent.RarityType(); + Item.channel = true; } public override float StealthDamageMultiplier => 0.7f; - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + public override void HoldItem(Player player) { - if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike - { - int stealth = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - if (stealth.WithinBounds(Main.maxProjectiles)) - Main.projectile[stealth].Calamity().stealthStrike = true; - return false; - } - else - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); - return false; + if (player.ownedProjectileCounts[Item.shoot] <= 0) + player.Calamity().rogueStealth = 0; } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index e8d01b227f..069e84ecc4 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -290,6 +290,7 @@ Stormfrontspark.DisplayName: Stormfront Spark SubductionFlameburst.DisplayName: Flame Pillar SubductionSlicerProj.DisplayName: Subduction Slicer SulphuricNukesplosion.DisplayName: Nuke +SupernovaHoldout.DisplayName: Supernova SupernovaBomb.DisplayName: Supernova Bomb SupernovaBoom.DisplayName: Micro Supernova SupernovaStealthBoom.DisplayName: Exo Supernova diff --git a/Projectiles/Rogue/SupernovaHoldout.cs b/Projectiles/Rogue/SupernovaHoldout.cs new file mode 100644 index 0000000000..1e621f53c8 --- /dev/null +++ b/Projectiles/Rogue/SupernovaHoldout.cs @@ -0,0 +1,120 @@ +using System; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class SupernovaHoldout : BaseSwordHoldoutProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/Supernova"; + public override bool useMeleeSpeed => false; + public override bool useMeleeSize => false; + public override int swingWidth => 180; + public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; + public override int AfterImageLength => 0; + + public override int StartupTime { get; set; } + public override int CooldownTime { get; set; } + + int explodeTimer = 0; + + public override void Defaults() + { + Projectile.width = 106; + Projectile.height = 112; + Projectile.MaxUpdates = 4; + Projectile.noEnchantmentVisuals = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void Spawn() + { + var player = Main.player[Projectile.owner]; + var modplayer = player.GetModPlayer(); + StartupTime = 50; + CooldownTime = 10; + swingTime -= StartupTime + CooldownTime; + OffsetDistance = 48; + modplayer.swingNum = 0; + RotateInStartup = 1; + Projectile.scale = 0.4f; + } + + public override void AdditionalAI() + { + Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + var player = Main.player[Projectile.owner]; + var cplayer = player.Calamity(); + if (Projectile.Opacity > 0) + { + cplayer.temporaryStealthMax = 1.3f; + cplayer.temporaryStealthTimer = 2; + } + + var avgStealth = 0.8f * cplayer.stealthGenMoving + 0.2f * cplayer.stealthGenStandstill; + var explodeTimeGoal = CalamityUtils.SecondsToFrames(Supernova.StealthTimeInSeconds) / avgStealth + 30; + var stealthTime = explodeTimeGoal - 30; + + + cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); + + if (player.channel && inStartup) + { + + if (timer >= StartupTime - 1) + { + if (Projectile.FinalExtraUpdate() && explodeTimer < explodeTimeGoal) + explodeTimer++; + timer--; + Projectile.timeLeft++; + } + } + if (explodeTimer >= explodeTimeGoal && inCooldown && !Projectile.FinalExtraUpdate()) + { + timer--; + Projectile.timeLeft++; + } + + if (inSwing) + { + if (swingTimer == (int)(swingTime * 0.75f)) + { + if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -16 * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + if (player.Calamity().StealthStrikeAvailable()) + { + p.Calamity().stealthStrike = true; + } + } + Projectile.Opacity = 0; + } + } + } + + public override float SwingFunction() + { + if (inStartup) + { + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.2f, swingWidth * -0.5f, StartupCompletion)); + } + if (inCooldown) + return MathHelper.ToRadians(MathHelper.Lerp(swingWidth * 0.2f, swingWidth * 0.33f, 1 - MathF.Pow(1 - CooldownCompletion, 3f))); + return MathHelper.ToRadians(MathHelper.SmoothStep(swingWidth * -0.7f, swingWidth * 0.2f, SwingCompletion)); + } + + public override bool? CanHitNPC(NPC target) + { + return false; + } + + public override bool CanHitPlayer(Player target) + { + return false; + } + } +} From 11e750d86e0563f375e1e76711ccf9fa9f442082 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 22:42:27 -0500 Subject: [PATCH 015/126] right-click spam, balancing --- Items/Weapons/Rogue/Supernova.cs | 7 +++++-- .../en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 ++ Projectiles/Rogue/SupernovaHoldout.cs | 12 +++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index 911bd3ab8d..de6131f848 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 106; Item.height = 112; - Item.damage = 5036; + Item.damage = 5200; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 70; @@ -37,9 +37,12 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.rare = ModContent.RarityType(); Item.channel = true; + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } - public override float StealthDamageMultiplier => 0.7f; + public override bool AltFunctionUse(Player player) => true; + + public override float StealthDamageMultiplier => 0.8f; public override void HoldItem(Player player) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 16c707b5c7..ea7c30fbdf 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -1161,6 +1161,8 @@ Supernova: { DisplayName: Supernova Tooltip: ''' + Disables normal stealth generation + Hold to generate stealth, or hold to toss the bomb without generating stealth Tosses a smart bomb that locks onto and tracks targets If no target is found it will return to you Each bomb creates a miniature supernova that drags in weak enemies and chases strong enemies diff --git a/Projectiles/Rogue/SupernovaHoldout.cs b/Projectiles/Rogue/SupernovaHoldout.cs index 1e621f53c8..8236645ea8 100644 --- a/Projectiles/Rogue/SupernovaHoldout.cs +++ b/Projectiles/Rogue/SupernovaHoldout.cs @@ -1,8 +1,10 @@ using System; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -31,7 +33,15 @@ namespace CalamityMod.Projectiles.Rogue Projectile.DamageType = RogueDamageClass.Instance; Projectile.ContinuouslyUpdateDamageStats = true; } - public override void Spawn() + + public Color randomColor => Main.rand.Next(4) switch + { + 0 => Color.Red, + 1 => Color.MediumTurquoise, + 2 => Color.Orange, + _ => Color.LawnGreen, + }; + public override void Spawn() { var player = Main.player[Projectile.owner]; var modplayer = player.GetModPlayer(); From 82f65d2241f162cc39e790b97ca0ef4692937aac Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 23:22:00 -0500 Subject: [PATCH 016/126] fixed self dmg on duststorm and singularity --- Projectiles/Rogue/DuststormCloudExplosion.cs | 5 +++++ Projectiles/Rogue/SealedSingularityProjectile.cs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Projectiles/Rogue/DuststormCloudExplosion.cs b/Projectiles/Rogue/DuststormCloudExplosion.cs index b560153a04..bf6fa64f98 100644 --- a/Projectiles/Rogue/DuststormCloudExplosion.cs +++ b/Projectiles/Rogue/DuststormCloudExplosion.cs @@ -43,6 +43,11 @@ namespace CalamityMod.Projectiles.Rogue } } + public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) + { + modifiers.SourceDamage /= Main.masterMode ? 2f : Main.expertMode ? 1.5f : 1; + modifiers.SourceDamage *= 0.1f; + } public override bool PreDraw(ref Color lightColor) { Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, color * Projectile.Opacity, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, 0.08f * Projectile.scale, 0); diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 9d5d727db4..83a15940d6 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -274,7 +274,8 @@ namespace CalamityMod.Projectiles.Rogue public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) { - modifiers.SourceDamage *= 0.002f; + modifiers.SourceDamage /= Main.masterMode ? 2f : Main.expertMode ? 1.5f : 1; + modifiers.SourceDamage *= 0.044f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { From a42e2c6dc676fba811e3740e001484436c1fe201 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 11 Mar 2026 23:27:36 -0500 Subject: [PATCH 017/126] fix to void outline --- Projectiles/Rogue/SealedSingularityProjectile.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 83a15940d6..6d83531907 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -52,6 +52,7 @@ namespace CalamityMod.Projectiles.Rogue { ProjectileID.Sets.TrailCacheLength[Type] = 3; ProjectileID.Sets.TrailingMode[Type] = 0; + OutlineTexVoid = null; //this ensures the outline tex is gotten properly } public override void SetDefaults() From be12cdb2ab626e40a1c01c14bc62d2d504ed1f10 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 11 Mar 2026 22:21:23 -0700 Subject: [PATCH 018/126] The Sandwich Also alcohol buffs are designated with an alcohol poison level now --- Buffs/Alcohol/BloodyMaryBuff.cs | 8 +++- Buffs/Alcohol/CaribbeanRumBuff.cs | 8 +++- Buffs/Alcohol/CinnamonRollBuff.cs | 8 +++- Buffs/Alcohol/EverclearBuff.cs | 8 +++- Buffs/Alcohol/EvergreenGinBuff.cs | 8 +++- Buffs/Alcohol/FireballBuff.cs | 8 +++- Buffs/Alcohol/GrapeBeerBuff.cs | 8 +++- Buffs/Alcohol/ManhattanBuff.cs | 8 +++- Buffs/Alcohol/MargaritaBuff.cs | 8 +++- Buffs/Alcohol/MoonshineBuff.cs | 8 +++- Buffs/Alcohol/MoscowMuleBuff.cs | 8 +++- Buffs/Alcohol/OldFashionedBuff.cs | 8 +++- Buffs/Alcohol/PurpleHazeBuff.cs | 8 +++- Buffs/Alcohol/RedWineBuff.cs | 8 +++- Buffs/Alcohol/RumBuff.cs | 8 +++- Buffs/Alcohol/ScrewdriverBuff.cs | 8 +++- Buffs/Alcohol/StarBeamRyeBuff.cs | 8 +++- Buffs/Alcohol/TequilaBuff.cs | 8 +++- Buffs/Alcohol/TequilaSunriseBuff.cs | 8 +++- Buffs/Alcohol/VodkaBuff.cs | 8 +++- Buffs/Alcohol/WhiskeyBuff.cs | 8 +++- Buffs/Alcohol/WhiteWineBuff.cs | 8 +++- Buffs/StatDebuffs/Malnourished.cs | 22 +++++++++ Buffs/StatDebuffs/Malnourished.png | Bin 0 -> 4071 bytes CalPlayer/CalamityPlayer.cs | 41 ++++++++++++++++- CalPlayer/CalamityPlayerLifeRegen.cs | 2 +- DataStructures/DebuffData.cs | 1 - Items/Potions/Food/TheSandwich.cs | 42 ++++++++++++++++++ Items/Potions/Food/TheSandwich.png | Bin 0 -> 3300 bytes .../en-US/Mods.CalamityMod.Buffs.hjson | 9 ++++ .../en-US/Mods.CalamityMod.Condition.hjson | 1 + .../Mods.CalamityMod.Items.Potions.hjson | 13 ++++++ 32 files changed, 281 insertions(+), 26 deletions(-) create mode 100644 Buffs/StatDebuffs/Malnourished.cs create mode 100644 Buffs/StatDebuffs/Malnourished.png create mode 100644 Items/Potions/Food/TheSandwich.cs create mode 100644 Items/Potions/Food/TheSandwich.png diff --git a/Buffs/Alcohol/BloodyMaryBuff.cs b/Buffs/Alcohol/BloodyMaryBuff.cs index af35461b47..347a6aa5ce 100644 --- a/Buffs/Alcohol/BloodyMaryBuff.cs +++ b/Buffs/Alcohol/BloodyMaryBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class BloodyMaryBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/CaribbeanRumBuff.cs b/Buffs/Alcohol/CaribbeanRumBuff.cs index fcdb6422b6..871711cca6 100644 --- a/Buffs/Alcohol/CaribbeanRumBuff.cs +++ b/Buffs/Alcohol/CaribbeanRumBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class CaribbeanRumBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/CinnamonRollBuff.cs b/Buffs/Alcohol/CinnamonRollBuff.cs index bb724a3a52..c5899c6b5a 100644 --- a/Buffs/Alcohol/CinnamonRollBuff.cs +++ b/Buffs/Alcohol/CinnamonRollBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class CinnamonRollBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/EverclearBuff.cs b/Buffs/Alcohol/EverclearBuff.cs index 1629143a7f..966516c135 100644 --- a/Buffs/Alcohol/EverclearBuff.cs +++ b/Buffs/Alcohol/EverclearBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class EverclearBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 2 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/EvergreenGinBuff.cs b/Buffs/Alcohol/EvergreenGinBuff.cs index 1821638bad..e4a75a53a5 100644 --- a/Buffs/Alcohol/EvergreenGinBuff.cs +++ b/Buffs/Alcohol/EvergreenGinBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class EvergreenGinBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/FireballBuff.cs b/Buffs/Alcohol/FireballBuff.cs index 99c877dc50..c243e57c75 100644 --- a/Buffs/Alcohol/FireballBuff.cs +++ b/Buffs/Alcohol/FireballBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class FireballBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/GrapeBeerBuff.cs b/Buffs/Alcohol/GrapeBeerBuff.cs index 83504af851..2feb3bdee7 100644 --- a/Buffs/Alcohol/GrapeBeerBuff.cs +++ b/Buffs/Alcohol/GrapeBeerBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class GrapeBeerBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/ManhattanBuff.cs b/Buffs/Alcohol/ManhattanBuff.cs index e724375c25..18f36239a1 100644 --- a/Buffs/Alcohol/ManhattanBuff.cs +++ b/Buffs/Alcohol/ManhattanBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class ManhattanBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MargaritaBuff.cs b/Buffs/Alcohol/MargaritaBuff.cs index 37299b4fb8..9f1d38f0e7 100644 --- a/Buffs/Alcohol/MargaritaBuff.cs +++ b/Buffs/Alcohol/MargaritaBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class MargaritaBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MoonshineBuff.cs b/Buffs/Alcohol/MoonshineBuff.cs index 03faabe66d..8b5b4655a1 100644 --- a/Buffs/Alcohol/MoonshineBuff.cs +++ b/Buffs/Alcohol/MoonshineBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class MoonshineBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/MoscowMuleBuff.cs b/Buffs/Alcohol/MoscowMuleBuff.cs index 21f7569480..e0b066de6b 100644 --- a/Buffs/Alcohol/MoscowMuleBuff.cs +++ b/Buffs/Alcohol/MoscowMuleBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class MoscowMuleBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/OldFashionedBuff.cs b/Buffs/Alcohol/OldFashionedBuff.cs index 68820059d4..8f05b02374 100644 --- a/Buffs/Alcohol/OldFashionedBuff.cs +++ b/Buffs/Alcohol/OldFashionedBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class OldFashionedBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/PurpleHazeBuff.cs b/Buffs/Alcohol/PurpleHazeBuff.cs index 16aa30d53f..3da90b0216 100644 --- a/Buffs/Alcohol/PurpleHazeBuff.cs +++ b/Buffs/Alcohol/PurpleHazeBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class PurpleHazeBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/RedWineBuff.cs b/Buffs/Alcohol/RedWineBuff.cs index 087086ca68..dbbebf6589 100644 --- a/Buffs/Alcohol/RedWineBuff.cs +++ b/Buffs/Alcohol/RedWineBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class RedWineBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/RumBuff.cs b/Buffs/Alcohol/RumBuff.cs index ab842e0649..9cc09e28cc 100644 --- a/Buffs/Alcohol/RumBuff.cs +++ b/Buffs/Alcohol/RumBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class RumBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/ScrewdriverBuff.cs b/Buffs/Alcohol/ScrewdriverBuff.cs index f8f97cd0fe..567c44f589 100644 --- a/Buffs/Alcohol/ScrewdriverBuff.cs +++ b/Buffs/Alcohol/ScrewdriverBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class ScrewdriverBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/StarBeamRyeBuff.cs b/Buffs/Alcohol/StarBeamRyeBuff.cs index 50d6ac0bc8..04c5df4742 100644 --- a/Buffs/Alcohol/StarBeamRyeBuff.cs +++ b/Buffs/Alcohol/StarBeamRyeBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class StarBeamRyeBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/TequilaBuff.cs b/Buffs/Alcohol/TequilaBuff.cs index a2b307c605..525c0d982d 100644 --- a/Buffs/Alcohol/TequilaBuff.cs +++ b/Buffs/Alcohol/TequilaBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class TequilaBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/TequilaSunriseBuff.cs b/Buffs/Alcohol/TequilaSunriseBuff.cs index af5a5f174a..b72850ad4d 100644 --- a/Buffs/Alcohol/TequilaSunriseBuff.cs +++ b/Buffs/Alcohol/TequilaSunriseBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class TequilaSunriseBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/VodkaBuff.cs b/Buffs/Alcohol/VodkaBuff.cs index 46eaee8329..305607a764 100644 --- a/Buffs/Alcohol/VodkaBuff.cs +++ b/Buffs/Alcohol/VodkaBuff.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.DataStructures; +using CalamityMod.Items.Potions.Alcohol; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -7,6 +8,10 @@ namespace CalamityMod.Buffs.Alcohol { public class VodkaBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -14,6 +19,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/WhiskeyBuff.cs b/Buffs/Alcohol/WhiskeyBuff.cs index 66be5a8a0c..3d43861e0d 100644 --- a/Buffs/Alcohol/WhiskeyBuff.cs +++ b/Buffs/Alcohol/WhiskeyBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class WhiskeyBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/Alcohol/WhiteWineBuff.cs b/Buffs/Alcohol/WhiteWineBuff.cs index eb47a1056f..e0fe8312c6 100644 --- a/Buffs/Alcohol/WhiteWineBuff.cs +++ b/Buffs/Alcohol/WhiteWineBuff.cs @@ -1,4 +1,5 @@ -using Terraria; +using CalamityMod.DataStructures; +using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -6,6 +7,10 @@ namespace CalamityMod.Buffs.Alcohol { public class WhiteWineBuff : ModBuff { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 1 + }; public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -13,6 +18,7 @@ namespace CalamityMod.Buffs.Alcohol Main.buffNoSave[Type] = false; Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; } public override void Update(Player player, ref int buffIndex) diff --git a/Buffs/StatDebuffs/Malnourished.cs b/Buffs/StatDebuffs/Malnourished.cs new file mode 100644 index 0000000000..03b0f4e08c --- /dev/null +++ b/Buffs/StatDebuffs/Malnourished.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.StatDebuffs +{ + public class Malnourished : ModBuff + { + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = true; + BuffID.Sets.LongerExpertDebuff[Type] = true; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().malnourished = true; + } + } +} diff --git a/Buffs/StatDebuffs/Malnourished.png b/Buffs/StatDebuffs/Malnourished.png new file mode 100644 index 0000000000000000000000000000000000000000..c5a713da5a392ac5fb60906effc94aeb7fef166b GIT binary patch literal 4071 zcmVf6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv`U^zjmmKqDIK93(F5q|^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6b zsWa4l)YH_rsduU0(?DsMX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#f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QuG_VBJ#JN#L0>zrz zB;0+T!Jppo12LYnWmC_I1cP17#RK~d!iGNSNmm<*I z6whpx;vz~h-ipSNxgLpWw!NGa?#T^*M?ZT4>I&f1h9!x7a;Z8%v6Uk6hS9q#wpv_}7VBnXJY7uZFTQR&0z>HF}=ZWNWOpn^)+%R5F zAWC0!3aD=73YssEbCKk@b>?6O0ffs*;o&S#j6NO7lUMhSK6?g$sb)ny+~mBRKm%@` zJ)A|rQVd;RZz^Sbg0cw3O58iZg-lIPC`iuBi5tHj$tGaq<;zbTd%`1uV5K&RUO5Lq zgFar#iG)O)6E}W4I+{RY0&8u#c;(+zEfUp@%Xy+l+$_)_OEXDCqFg`cddI{6bNa9a Z{0HbteHY}*vjzYF002ovPDHLkV1lnXn3(_o literal 0 HcmV?d00001 diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2a86309ad8..e94b71a80f 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -43,6 +43,7 @@ using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Placeables.Furniture; using CalamityMod.Items.Potions; using CalamityMod.Items.Potions.Alcohol; +using CalamityMod.Items.Potions.Food; using CalamityMod.Items.Tools; using CalamityMod.Items.Tools.ClimateChange; using CalamityMod.Items.TreasureBags.MiscGrabBags; @@ -374,9 +375,12 @@ namespace CalamityMod.CalPlayer public int hideOfDeusMeleeBoostTimer = 0; /// /// The player's alcohol level. Increased by 1 for each alcohol the player has drank, 2 for Everclear.
- /// If this value is greater than 3, the player is inflicted with Alcohol Poisoning. + /// If this value is greater than the max (normally 3), the player is inflicted with Alcohol Poisoning. ///
public int alcoholPoisonLevel = 0; + public static int alcoholPoisonMaxBase = 3; + /// The maximum alcohol level the player can reach before getting Alcohol Poisoning. + public int alcoholPoisonMax = alcoholPoisonMaxBase; public int dashTimeMod; /// /// Timer variable which tracks how long the player has spent outside of Providence's border radius, in frames.
@@ -1377,6 +1381,7 @@ namespace CalamityMod.CalPlayer public bool riptide = false; public bool hadopelagicPressure = false; public bool fishAlert = false; + public bool malnourished = false; public bool clamity = false; public bool NOU = false; public bool absorberAffliction = false; @@ -2146,6 +2151,7 @@ namespace CalamityMod.CalPlayer externalAuricRejectionImmunity = false; alcoholPoisonLevel = 0; + alcoholPoisonMax = alcoholPoisonMaxBase; noLifeRegen = false; //Stratus Starburst amount management @@ -2672,6 +2678,7 @@ namespace CalamityMod.CalPlayer riptide = false; hadopelagicPressure = false; fishAlert = false; + malnourished = false; clamity = false; NOU = false; enraged = false; @@ -3157,6 +3164,7 @@ namespace CalamityMod.CalPlayer riptide = false; hadopelagicPressure = false; fishAlert = false; + malnourished = false; clamity = false; NOU = false; snowmanNoseless = false; @@ -4828,6 +4836,32 @@ namespace CalamityMod.CalPlayer } } } + + if (malnourished) // Has to be here because alcoholPoisonLevel isn't updated until now + { + alcoholPoisonMax += TheSandwich.alcoholCapBoost; + // Gives inverted buffs from well fed + Player.statDefense -= 2; + Player.GetCritChance() -= 2; + Player.GetDamage() -= 0.05f; + Player.minionKB -= 0.5f; + // Move speed reduction/boost happens in PostUpdate + Player.pickSpeed += 0.05f; + + + for (int l = 0; l < Player.MaxBuffs; ++l) + { + int buffID = Player.buffType[l]; + if ((BuffDatasets.DebuffDataset[buffID] != null && BuffDatasets.DebuffDataset[buffID].AlcoholLevel > 0) || buffID == BuffID.Tipsy) + { + Player.buffTime[l]++; + } + } + + if (Player.wellFed) + Player.ClearBuff(ModContent.BuffType()); + } + if (moonshine) Player.statLifeMax2 = (int)(Player.statLifeMax2 * (1 + Moonshine.MaxLifePercentBoost)); ForceVariousEffects(); @@ -5084,6 +5118,9 @@ namespace CalamityMod.CalPlayer } } + if (malnourished) // Has to be here because alcoholPoisonLevel isn't updated until now + Player.moveSpeed += -0.05f + TheSandwich.statBoost * alcoholPoisonLevel; + // Relic of Convergence defense cut if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 && Player.HeldItem.type == ModContent.ItemType()) Player.statDefense *= RelicOfConvergence.DefenseMultiplier; @@ -5877,7 +5914,7 @@ namespace CalamityMod.CalPlayer public override void PostNurseHeal(NPC nurse, int health, bool removeDebuffs, int price) { // Remove excess alcohol - if (removeDebuffs && alcoholPoisonLevel > 3) + if (removeDebuffs && alcoholPoisonLevel > alcoholPoisonMax) { List Alcohol = new List(); for (int i = 0; i < Player.MaxBuffs; i++) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index b181b14c72..6995a598db 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -213,7 +213,7 @@ namespace CalamityMod.CalPlayer Player.fishingSkill += 5; } - if (alcoholPoisonLevel > 3) + if (alcoholPoisonLevel > alcoholPoisonMax) { // Independently of Calamity's nerfs to Nebula life regen, it is disabled entirely by alcohol poisoning. Player.nebulaLevelLife = 0; diff --git a/DataStructures/DebuffData.cs b/DataStructures/DebuffData.cs index ae5320365e..acec5f8f4a 100644 --- a/DataStructures/DebuffData.cs +++ b/DataStructures/DebuffData.cs @@ -113,7 +113,6 @@ namespace CalamityMod.DataStructures public bool GearCanModifyDebuff = true; /// - /// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR /// How much alcohol this counts as. /// Default is 0, most alcohol is 1, and Everclear is 2 /// diff --git a/Items/Potions/Food/TheSandwich.cs b/Items/Potions/Food/TheSandwich.cs new file mode 100644 index 0000000000..f2357676f5 --- /dev/null +++ b/Items/Potions/Food/TheSandwich.cs @@ -0,0 +1,42 @@ +using CalamityMod.Buffs.StatDebuffs; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Potions.Food +{ + public class TheSandwich : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Potions"; + public static int alcoholCapBoost = 2; + public static float statBoost = 0.05f; // The player starts with negative stat boosts, so it is a bit less than you'd expect + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(statBoost.ToPercent()); + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 5; + Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3)); + ItemID.Sets.FoodParticleColors[Type] = new Color[3] { + new Color(179, 170, 39), + new Color(81, 124, 139), + new Color(139, 102, 81) + }; + ItemID.Sets.IsFood[Type] = true; + } + + public override void SetDefaults() + { + Item.DefaultToFood(28, 26, ModContent.BuffType(), CalamityUtils.MinutesToFrames(10)); + Item.value = Item.sellPrice(silver: 20); + Item.rare = ItemRarityID.Blue; + } + public override void UseAnimation(Player player) + { + player.ClearBuff(BuffID.WellFed); + player.ClearBuff(BuffID.WellFed2); + player.ClearBuff(BuffID.WellFed3); + } + } +} diff --git a/Items/Potions/Food/TheSandwich.png b/Items/Potions/Food/TheSandwich.png new file mode 100644 index 0000000000000000000000000000000000000000..807a78d39f8ff7031d5734bbf13e8e2362b34fd7 GIT binary patch literal 3300 zcmV))_P)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4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file changed, 5 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index de6131f848..0f67b61514 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -18,6 +18,11 @@ namespace CalamityMod.Items.Weapons.Rogue public static readonly SoundStyle ExplosionSound = new("CalamityMod/Sounds/Item/SupernovaBoom") { Volume = 0.9f }; public static readonly SoundStyle StealthExplosionSound = new("CalamityMod/Sounds/Item/SupernovaStealthExplode") { Volume = 1f }; public static readonly SoundStyle StealthChargeSound = new("CalamityMod/Sounds/Item/SupernovaStealthCharge") { Volume = 1f }; + + public override void SetStaticDefaults() + { + ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; + } public override void SetDefaults() { Item.width = 106; @@ -37,7 +42,6 @@ namespace CalamityMod.Items.Weapons.Rogue Item.DamageType = RogueDamageClass.Instance; Item.rare = ModContent.RarityType(); Item.channel = true; - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; } public override bool AltFunctionUse(Player player) => true; From 315232de604339d29b9f06220735d13b73ff81e0 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 12 Mar 2026 14:48:27 -0500 Subject: [PATCH 020/126] lemon-nade recipe update --- Items/Weapons/Rogue/LemonNade.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs index a0ffdd8245..4cf399578c 100644 --- a/Items/Weapons/Rogue/LemonNade.cs +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -40,8 +40,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(ItemID.Grenade). AddIngredient(ItemID.Lemon). + AddIngredient(ItemID.BouncyGrenade,99). + AddTile(TileID.TinkerersWorkbench) Register(); } } From b3d1768f372905d901f08b5a8649587d0bdd7b3a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 12 Mar 2026 16:16:33 -0500 Subject: [PATCH 021/126] compile fix --- Items/Weapons/Rogue/LemonNade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs index 4cf399578c..e516833a72 100644 --- a/Items/Weapons/Rogue/LemonNade.cs +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue CreateRecipe(). AddIngredient(ItemID.Lemon). AddIngredient(ItemID.BouncyGrenade,99). - AddTile(TileID.TinkerersWorkbench) + AddTile(TileID.TinkerersWorkbench). Register(); } } From 6a96713dae087aa4bfd0af6464e2088f3b58f0b5 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 12 Mar 2026 23:36:21 -0500 Subject: [PATCH 022/126] Fixed singularity outline for real, duststorm tooltip & no longer glows, adjusted singularity glow --- .../en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 6 +++--- Projectiles/Rogue/DuststormInABottleHoldout.cs | 1 - Projectiles/Rogue/DuststormInABottleProj.cs | 3 +-- Projectiles/Rogue/SealedSingularityHoldout.cs | 1 - Projectiles/Rogue/SealedSingularityProjectile.cs | 9 ++++++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 16c707b5c7..c975fffb81 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -340,9 +340,9 @@ DuststormInABottle: { Tooltip: ''' Disables normal stealth generation - Throws a bottle filled with high-pressure dust that shatters on impact with a target or after a short fuse - Hold to generate stealth, but burn through the bottle's fuse - Stealth strikes cause the bottle to leak dust clouds instead of shattering + Throws a bottle filled with high-pressure dust that shatters on impact with a target or after a short delay + Hold to generate stealth, but cause the bottle to shatter sooner + Stealth strikes cause the bottle to leak dust clouds around it for a few seconds instead of shattering ''' } diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index a8a8af36de..29abfd2e10 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -46,7 +46,6 @@ namespace CalamityMod.Projectiles.Rogue public override void AdditionalAI() { - Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); var player = Main.player[Projectile.owner]; var cplayer = player.Calamity(); if (Projectile.Opacity > 0) diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index 952295e1cc..f75cba91c7 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -41,7 +41,6 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { - Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); Timer++; gravTimer++; @@ -73,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); return false; } diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index faa0d9f844..f46343d2a1 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Projectiles.Rogue public override void AdditionalAI() { - Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); var player = Main.player[Projectile.owner]; var cplayer = player.Calamity(); if (Projectile.Opacity > 0) diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 6d83531907..553e7c166d 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -80,7 +80,10 @@ namespace CalamityMod.Projectiles.Rogue int bounceCooldown = 0; public override void AI() { - Lighting.AddLight(Projectile.Center, new Vector3(1, 1, 1)); + if (AIState == 1) + Lighting.AddLight(Projectile.Center, BorderColor.ToVector3() * (Stealth ? 4 : 2) * Timer / TimerMax); + else if (AIState == 2) + Lighting.AddLight(Projectile.Center, BorderColor.ToVector3() * (Stealth ? 4 : 2)); Timer++; bounceCooldown--; @@ -211,7 +214,7 @@ namespace CalamityMod.Projectiles.Rogue { if (field == null) { - var texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole").Value; + var texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole",AssetRequestMode.ImmediateLoad).Value; field = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); var BaseArray = new Color[field.Width * field.Height]; @@ -253,7 +256,7 @@ namespace CalamityMod.Projectiles.Rogue Main.EntitySpriteDraw(VoidTex.Value, Projectile.Center - Main.screenPosition, frame, Color.White, 0, frame.Size() * 0.5f, Projectile.scale, 0); return false; } - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); return false; } private static void DrawAuraOutside(SealedSingularityProjectile mproj, Matrix matrix) From 87fdf1b85077716a72d8b438f76ef2c6e7ba086a Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Mar 2026 18:24:04 -0700 Subject: [PATCH 023/126] The Sandwich sprite --- Buffs/StatDebuffs/Malnourished.png | Bin 4071 -> 798 bytes Items/Potions/Food/TheSandwich.cs | 8 ++++---- Items/Potions/Food/TheSandwich.png | Bin 3300 -> 2054 bytes 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Buffs/StatDebuffs/Malnourished.png b/Buffs/StatDebuffs/Malnourished.png index c5a713da5a392ac5fb60906effc94aeb7fef166b..8f25176a8a2800ebb8bb4698673dbb4beb3ab457 100644 GIT binary patch delta 774 zcmV+h1Nr>tAD#w~B!2;OQb$4nuFf3k00004XF*Lt006O%3;baP0008WNkl(+G$^Gx%8>rjSgy>LrdDH{l@&bidA#^SyolKO-TcnJoqx0OKIi@3vn6OcMOk^j z^+S+j`l=uOAG+Uu#&;*;RUAoR%vrJ3UE zez{J?x>!D!=XpO#vRy-vffC?7Kkiro4~&K3ci|ZPC?xM!6xc9_IQM_}irTX42nKA%0o zgyNpSeBGKQB?;y(Ag8)LaQ)t$@YS9^xT>ZcZfI_XV{Zn;dgUX}U%*7&4TeeJuO1*w z;&i!my~=|x;tGrS$OjpuOvvx|!-*%HFwf`iFXmhVIi+l zDl5*cgMZVVJ75*|1b2gX<9<0%D81bVtIrPO&4I=>saRk|BzyHLxM*qSg^;2Z7+c*wgJCQM}bM+7G98RD9L1si7)vVU@7%E*Q*ERq0wp`|2O4&0)yq;B|5 z^+~wh1!=ZqF%u!SWSNMrut5@->4B0$>CW0R+4qFM?U(@JOn(_P!NFpw#eCozeCE(a zSf#OU9h}y26pnuax-}*-7yYrBOa6%`9|K1CcdTiD068ulE!qa{umAu607*qoM6N<$ Eg3f(&`~Uy| literal 4071 zcmVf6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wU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{6bNa9a Z{0HbteHY}*vjzYF002ovPDHLkV1lnXn3(_o diff --git a/Items/Potions/Food/TheSandwich.cs b/Items/Potions/Food/TheSandwich.cs index f2357676f5..f99710a8c7 100644 --- a/Items/Potions/Food/TheSandwich.cs +++ b/Items/Potions/Food/TheSandwich.cs @@ -19,16 +19,16 @@ namespace CalamityMod.Items.Potions.Food Item.ResearchUnlockCount = 5; Main.RegisterItemAnimation(Type, new DrawAnimationVertical(int.MaxValue, 3)); ItemID.Sets.FoodParticleColors[Type] = new Color[3] { - new Color(179, 170, 39), - new Color(81, 124, 139), - new Color(139, 102, 81) + new Color(132, 171, 87), + new Color(174, 91, 107), + new Color(218, 176, 133) }; ItemID.Sets.IsFood[Type] = true; } public override void SetDefaults() { - Item.DefaultToFood(28, 26, ModContent.BuffType(), CalamityUtils.MinutesToFrames(10)); + Item.DefaultToFood(70, 48, ModContent.BuffType(), CalamityUtils.MinutesToFrames(10)); Item.value = Item.sellPrice(silver: 20); Item.rare = ItemRarityID.Blue; } diff --git a/Items/Potions/Food/TheSandwich.png b/Items/Potions/Food/TheSandwich.png index 807a78d39f8ff7031d5734bbf13e8e2362b34fd7..a20e32b7bd6c4c4de6192bf1095029c083fd0966 100644 GIT binary patch literal 2054 zcmV+h2>JJkP)Px#1ZP1_K>z@;j|==^1pojCut`KgRCr$PoPA8yWfaG?1e3y-kSj074HQekM4c~) zlFnF4;zUx|Ojnz&>C(R(m1)lDAJ$r1=5#AJn@%UbQBsy8g-}Fv3K{qUQv`Xji;AJr zgqrQ1bH8r)!Na`}T)B2W8~fhhy}x^Z_x_&m@0{m(e&?Y_SMzqt{0H_w$EMftltUGR zo(}CYk|#|gw`88kY1gsVY@A8&Tf6)xr}w$~JiOj7IFPo#-M^bB=%8?F(RIlSXnS?$PEwPi>lO5! zu>aV(>=KK6zpXG0o7E((ADQ2KWO_ry=LKM2jS@UP;@x@^VQlFV~PFc9@O;ety1= zN6s`gHIu?QpyCQUr?TFM)K-0!)H3)*QlF+vq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*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R1600HnxL_t(&f$i8oNW(xB2JkPS zo3lEIP^;1kb`cz;gF_Jq5iN@1BDm-xI20#E#nBFeg9>iqAWDbgAW~2l2XXKZ*kY{( z>7byCPNEQ}hu%xtv?MlHyl=aNyWerWCikN0x{gv3oeUT35ZR1rh3;$8fdsU+G@IVP zOW&Jb&%M3@09N-C!UWt0!UaTAkfn<323$5d1zDc zJo3l9Yq3x@n&<=j2T>=N^R)m3L%MlF#4)%OH0A#Y&LPxLX z69C}%)dK*MsV4wHD$xc2@P%&iyI=OaPU!DG$U{FiWpUtG7?38w+cW{5@`D{?Qv%r7 zI+AVVA1)VB# Date: Sun, 15 Mar 2026 01:04:54 -0700 Subject: [PATCH 024/126] Bacon Oil --- Buffs/Alcohol/BaconOilBuff.cs | 29 ++++++ Buffs/Alcohol/BaconOilBuff.png | Bin 0 -> 5376 bytes CalPlayer/CalamityPlayer.cs | 94 +++++++++++++++++- CalPlayer/CalamityPlayerLifeRegen.cs | 2 - Items/Potions/Alcohol/BaconOil.cs | 32 ++++++ Items/Potions/Alcohol/BaconOil.png | Bin 0 -> 4356 bytes .../en-US/Mods.CalamityMod.Buffs.hjson | 5 + .../Mods.CalamityMod.Items.Potions.hjson | 12 ++- Sounds/Item/BaconOilBounce.ogg | Bin 0 -> 13046 bytes Systems/Collections/CalamityBuffSets.cs | 5 +- 10 files changed, 171 insertions(+), 8 deletions(-) create mode 100644 Buffs/Alcohol/BaconOilBuff.cs create mode 100644 Buffs/Alcohol/BaconOilBuff.png create mode 100644 Items/Potions/Alcohol/BaconOil.cs create mode 100644 Items/Potions/Alcohol/BaconOil.png create mode 100644 Sounds/Item/BaconOilBounce.ogg diff --git a/Buffs/Alcohol/BaconOilBuff.cs b/Buffs/Alcohol/BaconOilBuff.cs new file mode 100644 index 0000000000..964aa03e37 --- /dev/null +++ b/Buffs/Alcohol/BaconOilBuff.cs @@ -0,0 +1,29 @@ +using CalamityMod.DataStructures; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Alcohol +{ + public class BaconOilBuff : ModBuff + { + public static DebuffData debuffData = new DebuffData() + { + AlcoholLevel = 3 + }; + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + Main.persistentBuff[Type] = true; + BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; + BuffDatasets.DebuffDataset[Type] = debuffData; + } + + public override void Update(Player player, ref int buffIndex) + { + player.Calamity().baconOil = true; + } + } +} diff --git a/Buffs/Alcohol/BaconOilBuff.png b/Buffs/Alcohol/BaconOilBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..72c4ddb6070d8737df5c887a2c4165860448b3b1 GIT binary patch literal 5376 zcmV+b760mqP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PW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yJAZ)NL zK}WZS<*RZiayLiT+|N%wc#fyfeUE@wrQ08&drO4)h5&MX;>k?RPtA)-6u|G_w+L@XpTV2l&5Ii?G4A1%af4mZQv(!~<*!?BYjb zKj8JblY~4jx*|aaZdpgqwggKj&Xf7q6#buXp=>I1^^}I!3G>r3C!f%e+7f|;O|58> z%`{d5cK?bWNs&=Cbp-$kLTeouQj4Q&zd}Hb@YiRbWTH4m%D`ia}~_RU^9Z(H)eowOGn5Qpjd73{VvC zM>>cN`*BHLj;{R*`C69mp8YFwW{TcGlwiU~^576|mrCix2bg7x4PQ;;=rsAk@3@(G zMIq25kQJ6QnSe&MP5Sz(8+a-8b-J?Kust3Yt67$2=SfXZGj;hb3f2|+U85Y0J>o{Q}znNtO_npk8f} zNv+C+Po24+K4mwN#0V~b7k)xS33BYz*ZJYGN7=gnMt0q>kLmN*c>R|@qgFHVYY`6J z9_Bahj59Hojb0J|f8x0!p0kKJ$B=`OlZxe%B8A_H|L7na4;K$Q9Z&>u}SaD7!`@yzx)hdE@Uh z41Bu5&>aO{eNN`--;(GEIEW3a*oK5GOBhXyM!o&fQ2M7Y9wgqqk+?lX#L-LF&`un9 z_~XC4g&(18!q~A+ z3b_oGQl9ionMS#Z=1`GT`J=J?!Eblr2n2{Eh6uRh1bj(cW{8)5{1k;!mTIj)z0xF? zwva3d)uR&$>FnPYCfVoa%2iXT372KoOgL8QwGEO$P$X<;;N8f}5BL3fXjzO@Mweckk}>0x;L zHa6b4mp)HFE() -= 2; - Player.GetDamage() -= 0.05f; Player.minionKB -= 0.5f; - // Move speed reduction/boost happens in PostUpdate + Player.moveSpeed -= 0.05f; + // damage nerf/boost happens in PostUpdate Player.pickSpeed += 0.05f; @@ -5119,7 +5123,7 @@ namespace CalamityMod.CalPlayer } if (malnourished) // Has to be here because alcoholPoisonLevel isn't updated until now - Player.moveSpeed += -0.05f + TheSandwich.statBoost * alcoholPoisonLevel; + Player.GetDamage() += -0.05f + TheSandwich.statBoost * alcoholPoisonLevel; // Relic of Convergence defense cut if (Player.ownedProjectileCounts[ModContent.ProjectileType()] > 0 && Player.HeldItem.type == ModContent.ItemType()) @@ -5252,6 +5256,90 @@ namespace CalamityMod.CalPlayer } #endregion + if (Player.Calamity().baconOil && !Player.mount.Active) + { + Player.noFallDmg = true; + + float velX = Math.Abs(Player.velocity.X); + float velY = Math.Abs(Player.velocity.Y); + + float speedMult = Player.GetBestClassDamage().ApplyTo(1); + float maxMoveSpeed = 10.5f * speedMult; + float minMoveSpeed = 3; // Minimum move speed to be at if the player can bounce + float hitboxSizeMult = 0.45f; + + bool onPlatform = false; + if (Player.velocity.Y > 0 && !Player.controlDown) + { + for (int i = 4; i < 8; i++) + { + Point bottom = (Player.Bottom + Vector2.UnitY * i).ToTileCoordinates(); + if (TileID.Sets.Platforms[CalamityUtils.ParanoidTileRetrieval(bottom.X, bottom.Y).TileType]) + { + onPlatform = true; + } + } + } + + bool hitDown = velY > minMoveSpeed && (Collision.SolidCollision(Player.Bottom + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1) || onPlatform); + bool hitUp = velY > minMoveSpeed && Collision.SolidCollision(Player.Top + Vector2.UnitY * Player.velocity.Y, (int)(Player.width * hitboxSizeMult), 1); + bool hitSide = velX > minMoveSpeed && Collision.SolidCollision(Vector2.Lerp(Player.TopLeft, Player.Left, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult)) || Collision.SolidCollision(Vector2.Lerp(Player.TopRight, Player.Right, 0.15f) + Vector2.UnitX * Player.velocity.X, 1, (int)(Player.height * hitboxSizeMult)); + float acceleration = 0.05f; + float decceleration = -0.025f / speedMult; + float riseSpeed = 0.8f; // The speed the player rises when in water or rain + float slipPower = 0.85f; //How strong the slippery effect is + + float bounceReduction = 0.9f; + bool makeSound = false; + if (hitSide) + { + Player.velocity.X = -Player.velocity.X * bounceReduction; + Player.oldVelocity.X = -Player.oldVelocity.X * bounceReduction; + makeSound = true; + } + if ((hitDown || hitUp)) + { + if (Player.controlUp) + bounceReduction = 1.3f; + Player.velocity.Y = -Player.velocity.Y * bounceReduction; + Player.oldVelocity.Y = -Player.oldVelocity.Y * bounceReduction; + if (hitDown) + { + Player.RefreshMovementAbilities(true); + } + makeSound = true; + } + int soundCDMax = 150; + if (makeSound && baconOilSoundCooldown < soundCDMax) + { + if (baconOilSoundCooldown < soundCDMax) + baconOilSoundCooldown += 30; + float pitch = 0.55f * Utils.GetLerpValue(0, soundCDMax, baconOilSoundCooldown, true); + SoundStyle boyoyoing = new("CalamityMod/Sounds/Item/BaconOilBounce"); + SoundEngine.PlaySound(boyoyoing with { Volume = 0.45f, Pitch = hitSide ? pitch - 0.3f : pitch, MaxInstances = 5 }, Player.Center); + } + + bool playerMoving = Player.controlLeft || Player.controlRight; + bool playerMovingInDirection = (Player.controlLeft && Player.oldVelocity.X < 0) || (Player.controlRight && Player.oldVelocity.X > 0); + if (((Player.oldVelocity.X > 0 && Player.velocity.X > 0) || (Player.oldVelocity.X < 0 && Player.velocity.X < 0))) + Player.velocity.X = MathHelper.Clamp(Player.velocity.X + maxMoveSpeed * MathF.Sign(Player.oldVelocity.X) * + ((playerMovingInDirection || !playerMoving) ? Player.dashDelay == -1 ? decceleration : // If dashing, deccelerate to prevent infinite dash + // If not moving or holding in move direction, accelerate to max speed, otherwise deccelerate + acceleration : decceleration), -maxMoveSpeed, maxMoveSpeed); + + bool raining = Player.Center.Y < Main.worldSurface * 16.0 && Main.raining; + if ((Player.wet || raining) && Player.velocity.Y > -maxMoveSpeed) + { + Player.velocity.Y -= riseSpeed; // Cover yourself in oil (go up in liquid) + } + + + Vector2 lerpedVel = Vector2.Lerp(Player.velocity, Player.oldVelocity, slipPower); + Player.velocity = new Vector2(lerpedVel.X, Player.velocity.Y); + } + if (baconOilSoundCooldown > 0) + baconOilSoundCooldown = (int)MathHelper.Lerp(baconOilSoundCooldown, 0, 0.027f); + Player.oldVelocity = Player.velocity; // Apparently this value is not updated on its own, so we do it } #endregion diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 6995a598db..8281fad972 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -12,9 +12,7 @@ using CalamityMod.Items.Armor.Silva; using CalamityMod.Items.Armor.Tarragon; using CalamityMod.Items.Fishing.BrimstoneCragCatches; using CalamityMod.Items.Placeables.Furniture; -using CalamityMod.Items.Potions; using CalamityMod.Items.Potions.Alcohol; -using CalamityMod.Items.Potions.Food; using CalamityMod.NPCs; using CalamityMod.Projectiles.Typeless; using CalamityMod.Systems; diff --git a/Items/Potions/Alcohol/BaconOil.cs b/Items/Potions/Alcohol/BaconOil.cs new file mode 100644 index 0000000000..29dd0948ff --- /dev/null +++ b/Items/Potions/Alcohol/BaconOil.cs @@ -0,0 +1,32 @@ +using CalamityMod.Buffs.Alcohol; +using CalamityMod.Items.Materials; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Potions.Alcohol +{ + public class BaconOil : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Potions"; + + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 20; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(204, 90, 73), + new Color(168, 37, 37), + new Color(120, 28, 28) + }; + } + + public override void SetDefaults() + { + Item.DefaultToFood(20, 32, ModContent.BuffType(), CalamityUtils.MinutesToFrames(6), true); + Item.value = Item.sellPrice(silver: 2); + Item.rare = ItemRarityID.Blue; + } + } +} diff --git a/Items/Potions/Alcohol/BaconOil.png b/Items/Potions/Alcohol/BaconOil.png new file mode 100644 index 0000000000000000000000000000000000000000..98afd8bb8b19a7006b65beefe4d5cb0afba79a62 GIT binary patch literal 4356 zcmV+f5&Q0mP)<00004XF*Lt006O% z3;baP000U%X+uL$b5ch_AW20-HZeIiHZ3wPF#rHaiJg{r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V(}fQ5a}eswCw^)8hnH_uvi>G?bz=_u+vdit-<(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); @@ -47,7 +47,7 @@ namespace CalamityMod.Systems.Collections ///
public static bool[] IsPersistentBuff = Factory.CreateBoolSet(BuffID.WeaponImbueVenom, BuffID.WeaponImbueCursedFlames, BuffID.WeaponImbueFire, BuffID.WeaponImbueGold, BuffID.WeaponImbueIchor, BuffID.WeaponImbueNanites, BuffID.WeaponImbueConfetti, BuffID.WeaponImbuePoison, BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); @@ -101,6 +101,7 @@ namespace CalamityMod.Systems.Collections public static Dictionary AlcoholStrength = new Dictionary { { BuffID.Tipsy, 1 }, + { BuffType(), 3 }, { BuffType(), 1 }, { BuffType(), 1 }, { BuffType(), 1 }, From e47f4c684af8fcc4e10ed37a2b2aa4127b3b3812 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Mar 2026 12:53:48 -0400 Subject: [PATCH 025/126] The Gift barebones implementation I will defer the sprite and visual effects to Triangle and Xyk --- Items/Tools/TheGift.cs | 83 +++++++++++++++++++ .../en-US/Mods.CalamityMod.Items.Tools.hjson | 10 +++ NPCs/CalamityGlobalTownNPC.cs | 6 ++ 3 files changed, 99 insertions(+) create mode 100644 Items/Tools/TheGift.cs diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs new file mode 100644 index 0000000000..7762a59070 --- /dev/null +++ b/Items/Tools/TheGift.cs @@ -0,0 +1,83 @@ +using CalamityMod.NPCs; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Tools +{ + public class TheGift : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + public override string Texture => "Terraria/Images/Item_601"; //Placeholder + + public override void SetDefaults() + { + Item.width = Item.height = 20; + Item.maxStack = Item.CommonMaxStack; + Item.useTime = Item.useAnimation = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.useTurn = true; + Item.noMelee = true; + Item.UseSound = SoundID.Item1; + Item.autoReuse = true; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.rare = ItemRarityID.Green; + } + + public override void Load() + { + On_ShopHelper.ProcessMood += TheGiftHappiness; + } + + public override void Update(ref float gravity, ref float maxFallSpeed) + { + // Controls actually applying the effect to an NPC + // None of this should work in Remix because Remix disables happiness + if (Item.noGrabDelay <= 0 && !Main.remixWorld) + { + foreach (NPC n in Main.ActiveNPCs) + { + // Don't run this code for the Traveling Merchant and Skeleton Merchant because they aren't affected by happiness + // Also don't run this if The Gift has already been used on this NPC; they all will hold grudges against you :) + if (!n.isLikeATownNPC || n.type == NPCID.TravellingMerchant || n.type == NPCID.SkeletonMerchant || + n.GetGlobalNPC().TheGiftStatus.HasValue) + continue; + + if (Item.Hitbox.Intersects(n.Hitbox)) + { + Item.active = false; + Item.type = ItemID.None; + Item.stack = 0; + if (Main.dedServ) + NetMessage.SendData(MessageID.SyncItem, -1, -1, null, Item.whoAmI); + + bool positive = Main.rand.NextBool(); + Color c = positive ? Color.Green : Color.Red; + n.GetGlobalNPC().TheGiftStatus = positive; + + // Placeholder visual effect + HealingPlus s = new(n.Center, 2f, Vector2.Zero, c, c, 40); + GeneralParticleHandler.SpawnParticle(s); + } + } + } + } + + private static void TheGiftHappiness(On_ShopHelper.orig_ProcessMood orig, ShopHelper self, Player player, NPC npc) + { + orig(self, player, npc); + + bool? gift = npc.GetGlobalNPC().TheGiftStatus; + if (gift.HasValue) + { + if (gift.Value) + self._currentPriceAdjustment = 0.5f; + else + self._currentPriceAdjustment = 1.75f; + } + } + } +} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 75bc1378a2..ffab1c0245 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -358,6 +358,16 @@ TectonicTruncator: { Tooltip: "" } +TheGift: { + DisplayName: The Gift + Tooltip: + ''' + Drop this fine gift on one of your Town NPCs as a token of appreciation + May make them either love you or hate you, you'll never know until they open it! + [c/F54278:'There's no return policy, better be responsible'] + ''' +} + TorrentialTear: { DisplayName: Torrential Tear Tooltip: diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 0d477e9611..0321e81d36 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -70,6 +70,11 @@ namespace CalamityMod.NPCs public int shopAlertAnimTimer = 0; /// public int shopAlertAnimFrame = 0; + /// + /// Controls how this Town NPC is being affected by The Gift.
+ /// If true, happiness is overriden with an extremely high value. If false, happiness is overriden with an extremely low value. If null, uses vanilla happiness. + ///
+ public bool? TheGiftStatus = null; public override bool InstancePerEntity => true; @@ -85,6 +90,7 @@ namespace CalamityMod.NPCs myClone.setNewName = setNewName; myClone.shopAlertAnimTimer = shopAlertAnimTimer; myClone.shopAlertAnimFrame = shopAlertAnimFrame; + myClone.TheGiftStatus = TheGiftStatus; return myClone; } From 3c6cd20df44f2429a0f8e6379a764ec331ab9bb2 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 15 Mar 2026 23:51:22 -0700 Subject: [PATCH 026/126] Friendly and Horrible Reforges --- CalPlayer/CalamityPlayer.cs | 2 + CalPlayer/CalamityPlayerMiscEffects.cs | 11 +- Items/Weapons/Melee/Orderbringer.cs | 2 +- .../en-US/Mods.CalamityMod.Prefixes.hjson | 3 + ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 + Prefixes/AccessoryPrefix.cs | 29 ++ Prefixes/HorribleWeaponPrefix.cs | 40 +++ Projectiles/Typeless/Pigion.cs | 320 ++++++++++++++++++ Projectiles/Typeless/Pigion.png | Bin 0 -> 3484 bytes Sounds/Item/PigionSqueal.ogg | Bin 0 -> 21746 bytes 10 files changed, 406 insertions(+), 2 deletions(-) create mode 100644 Prefixes/HorribleWeaponPrefix.cs create mode 100644 Projectiles/Typeless/Pigion.cs create mode 100644 Projectiles/Typeless/Pigion.png create mode 100644 Sounds/Item/PigionSqueal.ogg diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 2140e448d6..a8bb99ba4d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -802,6 +802,7 @@ namespace CalamityMod.CalPlayer #endregion #region Accessory + public int friendlyMinions = 0; public bool shieldOfTheHighRulerDashVelocityBoosted = false; public bool yharimsGift = false; public bool luxorsGift = false; @@ -2243,6 +2244,7 @@ namespace CalamityMod.CalPlayer if (!pSoulArtifact) pSoulShieldDurability = 0; } + friendlyMinions = 0; pSoulShieldVisible = false; roverDrive = false; roverDriveShieldVisible = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 085ae24558..f01a70a522 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1685,6 +1685,16 @@ namespace CalamityMod.CalPlayer if (rOfResilienceCooldown > 0) rOfResilienceCooldown--; + if (Player.Calamity().friendlyMinions > 0) + { + int numOfPigs = Player.ownedProjectileCounts[ModContent.ProjectileType()]; + if (numOfPigs < Player.Calamity().friendlyMinions) + { + int pigDamage = 12; + Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(0, 16).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), pigDamage, 0f, Player.whoAmI, 0, numOfPigs + 1); + } + } + if (transformer && Player.Calamity().transformerCooldown == 0 && transformerDelay == 0) // The code for this acursed thing took much... MUCH, too long to make { float zoneSize = 150; @@ -3279,7 +3289,6 @@ namespace CalamityMod.CalPlayer #region Other Buff Effects private void OtherBuffEffects() { - if (gravityNormalizer) { Player.buffImmune[BuffID.VortexDebuff] = true; diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 3fc0e1639a..30886f64d4 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Items.Weapons.Melee } } - Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false); + Particle swipe = new CustomSpark(player.Center - shootDir * 5 * Item.scale, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f * Item.scale, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false); GeneralParticleHandler.SpawnParticle(swipe); SoundEngine.PlaySound(SoundID.Item60, player.Center); diff --git a/Localization/en-US/Mods.CalamityMod.Prefixes.hjson b/Localization/en-US/Mods.CalamityMod.Prefixes.hjson index e8127c2e3e..cefd97c27c 100644 --- a/Localization/en-US/Mods.CalamityMod.Prefixes.hjson +++ b/Localization/en-US/Mods.CalamityMod.Prefixes.hjson @@ -2,13 +2,16 @@ Accessory: { Silent.DisplayName: Silent Invigorating.DisplayName: Invigorating Dauntless.DisplayName: Dauntless + Friendly.DisplayName: Friendly // New modifier effects (this is only positive) StealthGenTooltip: +{0}% stealth generation LifeRegenTooltip: +{0} HP/s life regen MaxLifeBoostTooltip: +{0} max life + FriendlyTooltip: +{0} Minion } Weapon: { + Horrible.DisplayName: Horrible Atrocious.DisplayName: Atrocious Blunt.DisplayName: Blunt Feathered.DisplayName: Feathered diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index cda4323410..9a89768bea 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -171,3 +171,4 @@ XykDeathAnim.DisplayName: Xyk Death Animation XykWings.DisplayName: Xyk Wings StratusBlackHole.DisplayName: Stratus Singularity DebuffSpreadEffect.DisplayName: Debuff Spread Effect +Pigion.DisplayName: Pigion diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs index 389f304da9..db22f8f780 100644 --- a/Prefixes/AccessoryPrefix.cs +++ b/Prefixes/AccessoryPrefix.cs @@ -66,4 +66,33 @@ namespace CalamityMod.Prefixes return 15; } } + + public class Friendly : ModPrefix, ILocalizedModType + { + public new string LocalizationCategory => "Prefixes.Accessory"; + public override PrefixCategory Category => PrefixCategory.Accessory; + + public override void ApplyAccessoryEffects(Player player) + { + // give Minion + player.Calamity().friendlyMinions++; + } + public override void ModifyValue(ref float valueMult) + { + valueMult = 2.5f; + } + public override float RollChance(Item item) => 10; // Is manually applied by an item, can't be rerolled normally + public override bool CanRoll(Item item) + { + return true; + } + public LocalizedText FriendlyTooltip => CalamityUtils.GetText($"{LocalizationCategory}.FriendlyTooltip"); + public override IEnumerable GetTooltipLines(Item item) + { + yield return new TooltipLine(Mod, "CalamityMod:PrefixFriendly", FriendlyTooltip.Format(1)) + { + IsModifier = true + }; + } + } } diff --git a/Prefixes/HorribleWeaponPrefix.cs b/Prefixes/HorribleWeaponPrefix.cs new file mode 100644 index 0000000000..a4cb2c4fab --- /dev/null +++ b/Prefixes/HorribleWeaponPrefix.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using CalamityMod.Items; +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Prefixes +{ + + public class Horrible : HorribleWeaponPrefix + { + public override float damageMult => 0.50f; + public override float sizeMult => 3f; + } + public abstract class HorribleWeaponPrefix : ModPrefix, ILocalizedModType + { + public new string LocalizationCategory => "Prefixes.Weapon"; + + // Stats + public virtual float damageMult => 1f; + public virtual float sizeMult => 1f; + + public override PrefixCategory Category => PrefixCategory.AnyWeapon; + public override float RollChance(Item item) => 10; // Is manually applied by an item, can't be rerolled normally + public override bool CanRoll(Item item) + { + return item.DamageType != null && item.DamageType != DamageClass.Default; + } + // Applying normal weapon stats + public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus) + { + damageMult = this.damageMult; + scaleMult = this.sizeMult; + } + public override void ModifyValue(ref float valueMult) + { + valueMult = 2.5f; + } + } +} diff --git a/Projectiles/Typeless/Pigion.cs b/Projectiles/Typeless/Pigion.cs new file mode 100644 index 0000000000..9d9c21f1d7 --- /dev/null +++ b/Projectiles/Typeless/Pigion.cs @@ -0,0 +1,320 @@ +using System; +using System.IO; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.CalPlayer; +using CalamityMod.Dusts; +using CalamityMod.NPCs; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Typeless +{ + public class Pigion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Typeless"; + public Player Owner => Main.player[Projectile.owner]; + public CalamityPlayer moddedOwner => Owner.Calamity(); + public bool canDamage = false; + public Color cl1 = Color.Gold; + public Color cl2 = Color.Goldenrod; + public bool clicked = false; + public int hopTimer = 0; + public int hopMax = 100; + public bool hitGround = false; + public bool hitWall = false; + public Vector2 lastUnmodVel; + public Vector2 mousePos; + public int thrownTimer = 0; + public int thrownTimerMax = 300; + public bool deadPig = false; + public ref float time => ref Projectile.ai[0]; + public ref float minionNumber => ref Projectile.ai[1]; + public bool pigGrabbed => Projectile.ai[2] == 5; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 21; + Projectile.height = 28; + Projectile.friendly = true; + Projectile.DamageType = AverageDamageClass.Instance; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 600; + Projectile.extraUpdates = 1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 60 * Projectile.MaxUpdates; + Projectile.ArmorPenetration = 25; + } + public void Frames() + { + Projectile.frameCounter++; + if (Projectile.frameCounter > 6 * Projectile.MaxUpdates) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= 2) + Projectile.frame = 0; + } + public override void AI() + { + mousePos = Owner.ClampedMouseWorld(); + if (time == 0) + { + time = Main.rand.Next(1, 800 + 1); + Projectile.spriteDirection = Main.rand.NextBool() ? -1 : 1; + lastUnmodVel = Projectile.velocity; + } + + Frames(); + + // Make an idle sound + if (Main.rand.NextBool(280) && Projectile.soundDelay == 0) + { + SoundStyle oink = new("CalamityMod/Sounds/Item/Swine", 2); + SoundEngine.PlaySound(oink with { Volume = 0.35f, Pitch = Main.rand.NextFloat(0.3f, 0.5f), MaxInstances = 5 }, Projectile.Center); + Projectile.soundDelay = 180; + } + + // Teleport back to player if too far away + if (Projectile.Center.Distance(Owner.Center) > 1500) + { + Projectile.velocity = (Vector2.UnitX * 16).RotatedByRandom(MathHelper.TwoPi); + Projectile.Center = Owner.Center; + } + + // Check if being clicked and no other Pigions are being clicked + if (Owner.controlUseItem && Projectile.Center.Distance(mousePos) <= 60 && !pigGrabbed && Projectile.ai[2] == 0) + SetGrab(true); + + float hitboxSizeMult = 0.45f; + bool touchingWall = Collision.SolidCollision(Vector2.Lerp(Projectile.TopLeft, Projectile.Left, 0.15f) + Vector2.UnitX * Projectile.velocity.X, 1, (int)(Projectile.height * hitboxSizeMult)) || Collision.SolidCollision(Vector2.Lerp(Projectile.TopRight, Projectile.Right, 0.15f) + Vector2.UnitX * Projectile.velocity.X, 1, (int)(Projectile.height * hitboxSizeMult)); + if (touchingWall) + { + FlipDirection(-Projectile.spriteDirection); + Projectile.velocity.X += Projectile.spriteDirection; + } + if (!pigGrabbed) + Slam(touchingWall, hitboxSizeMult); + else + thrownTimer = thrownTimerMax; + lastUnmodVel = Projectile.velocity; + + Movement(); + + // Push away enemies it touches + NPC npc = Projectile.Center.ClosestNPCAt(40, false); + if (npc != null && !pigGrabbed) + npc.MoveNPC(Utils.DirectionTo(Projectile.Center, npc.Center), 6, true); + + if (thrownTimer > 0) + thrownTimer--; + hopTimer--; + time++; + Projectile.timeLeft++; + if (moddedOwner.friendlyMinions < minionNumber || Owner.dead || deadPig) + { + Projectile.Kill(); + return; + } + } + public void Slam(bool touchingWall, float hitboxSizeMult) + { + bool onPlatform = false; + float thrownMult = Utils.Remap(thrownTimer, 0, thrownTimerMax, 0.6f, 1f); + if (Projectile.velocity.Y > 0) + { + for (int i = 4; i < 8; i++) + { + Point bottom = (Projectile.Bottom + Vector2.UnitY * i).ToTileCoordinates(); + if (TileID.Sets.Platforms[CalamityUtils.ParanoidTileRetrieval(bottom.X, bottom.Y).TileType]) + { + onPlatform = true; + } + } + } + float velX = MathF.Abs(lastUnmodVel.X); + float velY = MathF.Abs(lastUnmodVel.Y); + float minMoveSpeed = 5; + bool hitDown = velY > minMoveSpeed && (Collision.SolidCollision(Projectile.Bottom + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1) || onPlatform); + bool hitUp = velY > minMoveSpeed && Collision.SolidCollision(Projectile.Top + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1); + bool hitSide = velX > minMoveSpeed && touchingWall; + bool hardHit = Projectile.velocity.Length() > 25; + float volumeMult = Utils.GetLerpValue(minMoveSpeed - 2, minMoveSpeed * 5, Projectile.velocity.Length(), true); + + if (hitDown || hitUp) + { + if (!hitGround && MathF.Abs(lastUnmodVel.Y) > 1) + { + if (hardHit) + { + deadPig = true; + return; + } + Projectile.velocity.Y = -lastUnmodVel.Y * thrownMult; + MakeDustAndSound(false, volumeMult); + hitGround = true; + } + } + else + hitGround = false; + + if (hitSide) + { + if (!hitWall && MathF.Abs(lastUnmodVel.X) > 1) + { + if (hardHit) + { + deadPig = true; + return; + } + Projectile.velocity.X = -lastUnmodVel.X * thrownMult; + MakeDustAndSound(true, volumeMult); + hitWall = true; + } + } + else + hitWall = false; + } + public void MakeDustAndSound(bool wall, float volumeMult) + { + SoundStyle splat = new("CalamityMod/Sounds/NPCHit/PerfSmallHit", 3); + SoundEngine.PlaySound(splat with { Volume = 0.8f * volumeMult, Pitch = Main.rand.NextFloat(0.3f, 0.4f) - volumeMult * 0.3f }, Projectile.Center); + + Vector2 vel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float power = 0.2f + Utils.GetLerpValue(0, 40, Projectile.velocity.Length()); + for (int i = 0; i < (int)(12 * power); i++) + { + float variance = Main.rand.NextFloat(-0.8f, 0.8f); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), + vel.RotatedBy(variance).RotatedByRandom(MathF.Abs(variance) / 3) * Main.rand.NextFloat(15.0f, 18.0f) * MathF.Pow((1 - MathF.Abs(variance)), 2), 0, default, power * Main.rand.NextFloat(2.3f, 3.2f) - MathF.Abs(variance)); + dust.noGravity = Main.rand.NextBool(2, 3); + dust.color = Main.rand.NextBool() ? cl1 : cl2; + dust.customData = new Vector2(0.8f, 1.1f); + dust.fadeIn = 3.5f * power; + } + } + public void FlipDirection(int newDirection) + { + Projectile.spriteDirection = newDirection; + time = 1; + } + public void SetGrab(bool isGrabbed) => Projectile.ai[2] = (isGrabbed ? 5 : 0); + public void Movement() + { + // Flip movement direction every once in a while + if (time % 900 == 0) + FlipDirection(-Projectile.spriteDirection); + + Projectile.velocity.X *= 0.97f; + if (pigGrabbed) + { + FlipDirection(MathF.Sign(Projectile.Center.DirectionTo(mousePos).X)); + Vector2 goalVel = (mousePos - Projectile.Center) / (18); + Projectile.velocity = goalVel; + } + if (!Owner.controlUseItem) + SetGrab(false); + + if (Projectile.velocity.Y < 14) + Projectile.velocity.Y += 0.3f * Utils.GetLerpValue(100, 0, hopTimer, true); + + int walkRate = 90; // Walk along slowly + if (!pigGrabbed && time % walkRate == 0) + { + Projectile.velocity.X += 1 * Projectile.spriteDirection; + } + + // lil hops when near other Pigions + for (int x = 0; x < Main.maxProjectiles; x++) + { + Projectile projectile = Main.projectile[x]; + bool validPig = projectile.active && projectile.type == Projectile.type && projectile != Projectile; + float distance = Vector2.Distance(Projectile.Center, projectile.Center); + if (validPig) + { + if (pigGrabbed) + projectile.ai[2] = 1; // set all other Pigions to be counted as not grabable + if (distance <= 80 && distance != 0 && hopTimer <= 0 && thrownTimer == 0) + { + int directionOfJump = -MathF.Sign(Projectile.Center.DirectionTo(projectile.Center).X); + Projectile.velocity += new Vector2(Main.rand.NextFloat(-2.5f, -4) * directionOfJump, -2); + FlipDirection(-directionOfJump); + hopTimer = 100; + } + } + } + + float minSpeed = 4; + float maxSpeed = 14; + float goalRot = Utils.AngleLerp(0, Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0), Utils.GetLerpValue(minSpeed, maxSpeed, Projectile.velocity.Length(), true)); + Projectile.rotation = goalRot; + + } + public override void OnKill(int timeLeft) + { + int damage = (int)(Projectile.damage * MathF.Pow(Owner.GetBestClassDamage().ApplyTo(1), 0.3f + Owner.ownedProjectileCounts[Projectile.type] * 0.7f)); // Damage scales with number of pigions at 0.7 power + float blastSize = 100; + float minMultiplier = 0.1f; + int hitsToMinMult = 6; + Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(damage), -15, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); + blast.timeLeft = 5; + blast.DamageType = AverageDamageClass.Instance; + blast.CritChance = 100; + + Owner.SetScreenshake(3); + SoundStyle die = new("CalamityMod/Sounds/Item/PigionSqueal"); + SoundEngine.PlaySound(die with { Volume = 0.55f, Pitch = Main.rand.NextFloat(-0.2f, 0.4f), MaxInstances = 7 }, Projectile.Center); + SoundStyle die2 = new("CalamityMod/Sounds/NPCKilled/PerfMediumDeath"); + SoundEngine.PlaySound(die2 with { Volume = 0.6f, Pitch = Main.rand.NextFloat(0.2f, 0.3f) }, Projectile.Center); + for (int i = 0; i < 24; i++) + { + Vector2 dustVel = (Vector2.One * 6).RotatedByRandom(100); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel * Main.rand.NextFloat(0.1f, 0.8f)); + dust.noGravity = Main.rand.NextBool(2, 3); + dust.scale = Main.rand.NextFloat(0.5f, 0.8f); + dust.color = Color.Red; + dust.noLightEmittence = true; + dust.fadeIn = -0.4f; + + if (i % 2 == 0) + { + Particle pulse1 = new CustomSpark(Projectile.Center, Vector2.One.RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(1, 6), "CalamityMod/Particles/BloomCircle", false, Main.rand.Next(20, 35 + 1), Main.rand.NextFloat(0.2f, 0.35f), Color.Red * 0.55f, new Vector2(1f, 1f), noShrink: true); + GeneralParticleHandler.SpawnParticle(pulse1); + pulse1.Pixelate = true; + } + } + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + return false; + } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) + { + fallThrough = (pigGrabbed && mousePos.Y > Projectile.Center.Y); + return true; + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Rectangle frame = texture.Frame(1, 2, 0, Projectile.frame); + Vector2 origin = frame.Size() * 0.5f; + float minSpeed = 4; + float maxSpeed = 20; + Vector2 squash = new Vector2(Utils.Remap(Projectile.velocity.Length(), minSpeed, maxSpeed, 1, 2), Utils.Remap(Projectile.velocity.Length(), minSpeed, maxSpeed, 1, 0.5f)); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, origin, squash * Projectile.scale, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + return false; + } + public override bool? CanDamage() => canDamage ? null : false; + public override bool? CanCutTiles() => false; + } +} diff --git a/Projectiles/Typeless/Pigion.png b/Projectiles/Typeless/Pigion.png new file mode 100644 index 0000000000000000000000000000000000000000..36858f908c650e0a5f30f04355f351f99e186552 GIT binary patch literal 3484 zcmV;N4P)|&P)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgV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ef0e93dd1f169c32fb2069b80246964b97 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Mar 2026 11:15:23 -0700 Subject: [PATCH 027/126] Pigion Polish Cleaner and better commented Pigion code Also it can bounce off enemies now --- CalPlayer/CalamityPlayerMiscEffects.cs | 4 +- ...ods.CalamityMod.Projectiles.Typeless.hjson | 2 +- Projectiles/Typeless/Pigion.cs | 137 +++++++++++------- Utilities/ProjectileUtils.cs | 1 - 4 files changed, 86 insertions(+), 58 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f01a70a522..f5699e6394 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -1690,8 +1690,8 @@ namespace CalamityMod.CalPlayer int numOfPigs = Player.ownedProjectileCounts[ModContent.ProjectileType()]; if (numOfPigs < Player.Calamity().friendlyMinions) { - int pigDamage = 12; - Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(0, 16).RotatedByRandom(MathHelper.TwoPi), ModContent.ProjectileType(), pigDamage, 0f, Player.whoAmI, 0, numOfPigs + 1); + int pigDamage = 7; + Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, new Vector2(0, -16).RotatedByRandom(MathHelper.Pi), ModContent.ProjectileType(), pigDamage, 0f, Player.whoAmI, 0, numOfPigs + 1); } } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 9a89768bea..efa545fee8 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -107,6 +107,7 @@ PauldronDash.DisplayName: Pauldron Dash PauldronExplosion.DisplayName: Pauldron Explosion PearlAuraShard.DisplayName: Prism Shard PlaguePulse.DisplayName: Plague Pulse +Pigion.DisplayName: Pigion PinkPearlFalling.DisplayName: Pink Pearl PoisonousSeawater.DisplayName: Seawater PolypSandBallFalling.DisplayName: Polyp Sand Ball @@ -171,4 +172,3 @@ XykDeathAnim.DisplayName: Xyk Death Animation XykWings.DisplayName: Xyk Wings StratusBlackHole.DisplayName: Stratus Singularity DebuffSpreadEffect.DisplayName: Debuff Spread Effect -Pigion.DisplayName: Pigion diff --git a/Projectiles/Typeless/Pigion.cs b/Projectiles/Typeless/Pigion.cs index 9d9c21f1d7..fb6b6dc040 100644 --- a/Projectiles/Typeless/Pigion.cs +++ b/Projectiles/Typeless/Pigion.cs @@ -1,9 +1,6 @@ using System; -using System.IO; -using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer; using CalamityMod.Dusts; -using CalamityMod.NPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -19,19 +16,19 @@ namespace CalamityMod.Projectiles.Typeless public new string LocalizationCategory => "Projectiles.Typeless"; public Player Owner => Main.player[Projectile.owner]; public CalamityPlayer moddedOwner => Owner.Calamity(); - public bool canDamage = false; public Color cl1 = Color.Gold; public Color cl2 = Color.Goldenrod; - public bool clicked = false; public int hopTimer = 0; - public int hopMax = 100; + public static int hopMax = 100; public bool hitGround = false; public bool hitWall = false; public Vector2 lastUnmodVel; public Vector2 mousePos; - public int thrownTimer = 0; - public int thrownTimerMax = 300; - public bool deadPig = false; + public int thrownTimer = 0; // Timer set when grabbed, fades out faster at low velocity, allowing gravity to take effect sooner + public static int thrownTimerMax = 300; + public static int lowestSpeed = 4; + public static int highestSpeed = 20; + public bool deadPig = false; // if Pigion hit a wall at high enough speed to explode public ref float time => ref Projectile.ai[0]; public ref float minionNumber => ref Projectile.ai[1]; public bool pigGrabbed => Projectile.ai[2] == 5; @@ -41,7 +38,7 @@ namespace CalamityMod.Projectiles.Typeless } public override void SetDefaults() { - Projectile.width = 21; + Projectile.width = 42; Projectile.height = 28; Projectile.friendly = true; Projectile.DamageType = AverageDamageClass.Instance; @@ -51,8 +48,6 @@ namespace CalamityMod.Projectiles.Typeless Projectile.timeLeft = 600; Projectile.extraUpdates = 1; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 60 * Projectile.MaxUpdates; - Projectile.ArmorPenetration = 25; } public void Frames() { @@ -88,7 +83,7 @@ namespace CalamityMod.Projectiles.Typeless // Teleport back to player if too far away if (Projectile.Center.Distance(Owner.Center) > 1500) { - Projectile.velocity = (Vector2.UnitX * 16).RotatedByRandom(MathHelper.TwoPi); + Projectile.velocity = new Vector2(0, -16).RotatedByRandom(MathHelper.Pi / 2); Projectile.Center = Owner.Center; } @@ -96,6 +91,15 @@ namespace CalamityMod.Projectiles.Typeless if (Owner.controlUseItem && Projectile.Center.Distance(mousePos) <= 60 && !pigGrabbed && Projectile.ai[2] == 0) SetGrab(true); + // Push away enemies it touches based on the Pigions velocity + Vector2 toNPC = Vector2.Zero; + NPC npc = Projectile.Center.ClosestNPCAt(300, false); + if (npc != null && !pigGrabbed && Projectile.Hitbox.Intersects(npc.Hitbox)) + { + toNPC = Projectile.Center.DirectionTo(npc.Center); + npc.MoveNPC(Utils.DirectionTo(Projectile.Center, npc.Center), Utils.Remap(Projectile.velocity.Length(), lowestSpeed, highestSpeed * 1.5f, 4, 30), true); + } + float hitboxSizeMult = 0.45f; bool touchingWall = Collision.SolidCollision(Vector2.Lerp(Projectile.TopLeft, Projectile.Left, 0.15f) + Vector2.UnitX * Projectile.velocity.X, 1, (int)(Projectile.height * hitboxSizeMult)) || Collision.SolidCollision(Vector2.Lerp(Projectile.TopRight, Projectile.Right, 0.15f) + Vector2.UnitX * Projectile.velocity.X, 1, (int)(Projectile.height * hitboxSizeMult)); if (touchingWall) @@ -103,21 +107,17 @@ namespace CalamityMod.Projectiles.Typeless FlipDirection(-Projectile.spriteDirection); Projectile.velocity.X += Projectile.spriteDirection; } - if (!pigGrabbed) - Slam(touchingWall, hitboxSizeMult); + if (!pigGrabbed) // Check if hitting tiles or enemies, and if so rebound the Pigion or kill them + Slam(touchingWall, hitboxSizeMult, toNPC); else thrownTimer = thrownTimerMax; lastUnmodVel = Projectile.velocity; Movement(); - // Push away enemies it touches - NPC npc = Projectile.Center.ClosestNPCAt(40, false); - if (npc != null && !pigGrabbed) - npc.MoveNPC(Utils.DirectionTo(Projectile.Center, npc.Center), 6, true); - - if (thrownTimer > 0) - thrownTimer--; + thrownTimer -= 1 + (int)(20 * (Utils.GetLerpValue(highestSpeed, lowestSpeed * 2, Projectile.velocity.Length(), true))); + if (thrownTimer < 0) + thrownTimer = 0; hopTimer--; time++; Projectile.timeLeft++; @@ -127,11 +127,11 @@ namespace CalamityMod.Projectiles.Typeless return; } } - public void Slam(bool touchingWall, float hitboxSizeMult) + public void Slam(bool touchingWall, float hitboxSizeMult, Vector2 touchNPCVel) { bool onPlatform = false; float thrownMult = Utils.Remap(thrownTimer, 0, thrownTimerMax, 0.6f, 1f); - if (Projectile.velocity.Y > 0) + if (Projectile.velocity.Y > 0) // If moving down, check for platforms { for (int i = 4; i < 8; i++) { @@ -144,24 +144,28 @@ namespace CalamityMod.Projectiles.Typeless } float velX = MathF.Abs(lastUnmodVel.X); float velY = MathF.Abs(lastUnmodVel.Y); - float minMoveSpeed = 5; - bool hitDown = velY > minMoveSpeed && (Collision.SolidCollision(Projectile.Bottom + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1) || onPlatform); - bool hitUp = velY > minMoveSpeed && Collision.SolidCollision(Projectile.Top + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1); - bool hitSide = velX > minMoveSpeed && touchingWall; - bool hardHit = Projectile.velocity.Length() > 25; - float volumeMult = Utils.GetLerpValue(minMoveSpeed - 2, minMoveSpeed * 5, Projectile.velocity.Length(), true); + bool hitNPC = touchNPCVel != Vector2.Zero; + bool hitDownWall = (Collision.SolidCollision(Projectile.Bottom + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1) || onPlatform); + bool hitUpWall = Collision.SolidCollision(Projectile.Top + Vector2.UnitY * Projectile.velocity.Y, (int)(Projectile.width * hitboxSizeMult), 1); + bool hitDown = velY > lowestSpeed && hitDownWall; + bool hitUp = velY > lowestSpeed && hitUpWall; + bool hitSide = velX > lowestSpeed && touchingWall; + bool hardHit = Projectile.velocity.Length() >= highestSpeed * 1.5f; // The velocity a Pigion must be going to explode on impact + float volumeMult = Utils.GetLerpValue(lowestSpeed - 2, highestSpeed, Projectile.velocity.Length(), true); // Sounds are quieter at low velocity + bool hitAnything = false; if (hitDown || hitUp) { - if (!hitGround && MathF.Abs(lastUnmodVel.Y) > 1) + if (!hitGround) { + hitAnything = true; if (hardHit) { deadPig = true; return; } Projectile.velocity.Y = -lastUnmodVel.Y * thrownMult; - MakeDustAndSound(false, volumeMult); + MakeDustAndSound(volumeMult); hitGround = true; } } @@ -170,7 +174,8 @@ namespace CalamityMod.Projectiles.Typeless if (hitSide) { - if (!hitWall && MathF.Abs(lastUnmodVel.X) > 1) + hitAnything = true; + if (!hitWall) { if (hardHit) { @@ -178,14 +183,33 @@ namespace CalamityMod.Projectiles.Typeless return; } Projectile.velocity.X = -lastUnmodVel.X * thrownMult; - MakeDustAndSound(true, volumeMult); + MakeDustAndSound(volumeMult); hitWall = true; } } else hitWall = false; + + if (hitNPC && Projectile.velocity.Length() >= lowestSpeed) + { + hitAnything = true; + if (hardHit) + { + deadPig = true; + return; + } + Vector2 npcBounceVel = -lastUnmodVel * thrownMult; + Projectile.Center += npcBounceVel; + Projectile.velocity = npcBounceVel; + MakeDustAndSound(volumeMult); + } + + if (hitAnything) + { + FlipDirection(MathF.Sign(Projectile.velocity.X)); + } } - public void MakeDustAndSound(bool wall, float volumeMult) + public void MakeDustAndSound(float volumeMult) { SoundStyle splat = new("CalamityMod/Sounds/NPCHit/PerfSmallHit", 3); SoundEngine.PlaySound(splat with { Volume = 0.8f * volumeMult, Pitch = Main.rand.NextFloat(0.3f, 0.4f) - volumeMult * 0.3f }, Projectile.Center); @@ -215,7 +239,11 @@ namespace CalamityMod.Projectiles.Typeless if (time % 900 == 0) FlipDirection(-Projectile.spriteDirection); - Projectile.velocity.X *= 0.97f; + // Slowing down over time + if (thrownTimer <= thrownTimerMax / 2) + Projectile.velocity.X *= 0.97f; + + // Move Pigion to mouse if grabbed, otherwise ungrab them if player isn't holding M1 anymore if (pigGrabbed) { FlipDirection(MathF.Sign(Projectile.Center.DirectionTo(mousePos).X)); @@ -225,7 +253,8 @@ namespace CalamityMod.Projectiles.Typeless if (!Owner.controlUseItem) SetGrab(false); - if (Projectile.velocity.Y < 14) + // Falling + if (Projectile.velocity.Y < 14 && thrownTimer <= thrownTimerMax / 2) Projectile.velocity.Y += 0.3f * Utils.GetLerpValue(100, 0, hopTimer, true); int walkRate = 90; // Walk along slowly @@ -254,22 +283,24 @@ namespace CalamityMod.Projectiles.Typeless } } - float minSpeed = 4; - float maxSpeed = 14; - float goalRot = Utils.AngleLerp(0, Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0), Utils.GetLerpValue(minSpeed, maxSpeed, Projectile.velocity.Length(), true)); + // Rotate based on velocity and direction + float goalRot = Utils.AngleLerp(0, Projectile.velocity.ToRotation() + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0), Utils.GetLerpValue(lowestSpeed, highestSpeed, Projectile.velocity.Length(), true)); Projectile.rotation = goalRot; - } public override void OnKill(int timeLeft) { - int damage = (int)(Projectile.damage * MathF.Pow(Owner.GetBestClassDamage().ApplyTo(1), 0.3f + Owner.ownedProjectileCounts[Projectile.type] * 0.7f)); // Damage scales with number of pigions at 0.7 power - float blastSize = 100; - float minMultiplier = 0.1f; - int hitsToMinMult = 6; - Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(damage), -15, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); - blast.timeLeft = 5; - blast.DamageType = AverageDamageClass.Instance; - blast.CritChance = 100; + if (deadPig) // Only spawn explosion if death is from collision + { + int pigNum = Owner.ownedProjectileCounts[Projectile.type]; + int damage = (int)((pigNum * 2 + Projectile.damage) * MathF.Pow(Owner.GetBestClassDamage().ApplyTo(1), 0.4f + pigNum * 0.6f)); // Damage scales with number of pigions at 0.7 power + float blastSize = 100; + float minMultiplier = 0.1f; + int hitsToMinMult = 4; + Projectile blast = Projectile.NewProjectileDirect(Owner.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(damage), -15, Owner.whoAmI, blastSize, minMultiplier, hitsToMinMult); + blast.timeLeft = 5; + blast.DamageType = AverageDamageClass.Instance; + blast.CritChance = 100; + } Owner.SetScreenshake(3); SoundStyle die = new("CalamityMod/Sounds/Item/PigionSqueal"); @@ -300,7 +331,7 @@ namespace CalamityMod.Projectiles.Typeless } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { - fallThrough = (pigGrabbed && mousePos.Y > Projectile.Center.Y); + fallThrough = pigGrabbed; return true; } public override bool PreDraw(ref Color lightColor) @@ -308,13 +339,11 @@ namespace CalamityMod.Projectiles.Typeless Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; Rectangle frame = texture.Frame(1, 2, 0, Projectile.frame); Vector2 origin = frame.Size() * 0.5f; - float minSpeed = 4; - float maxSpeed = 20; - Vector2 squash = new Vector2(Utils.Remap(Projectile.velocity.Length(), minSpeed, maxSpeed, 1, 2), Utils.Remap(Projectile.velocity.Length(), minSpeed, maxSpeed, 1, 0.5f)); + Vector2 squash = new Vector2(Utils.Remap(Projectile.velocity.Length(), lowestSpeed, highestSpeed, 1, 2), Utils.Remap(Projectile.velocity.Length(), lowestSpeed, highestSpeed, 1, 0.5f)); Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, lightColor, Projectile.rotation, origin, squash * Projectile.scale, Projectile.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); return false; } - public override bool? CanDamage() => canDamage ? null : false; + public override bool? CanDamage() => false; public override bool? CanCutTiles() => false; } } diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index 7ced2c3c3b..c44848f481 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -161,7 +161,6 @@ namespace CalamityMod projectile.tileCollide = true; } } - public static void HomeInOnNPC(Projectile projectile, bool ignoreTiles, float distanceRequired, float homingVelocity, float inertia, bool respectIFrames = false) { if (!projectile.friendly) From acf3781750ab95855ce45341515432e16c13e821 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 18 Mar 2026 16:09:08 -0400 Subject: [PATCH 028/126] The Gift's effects only last 24 hours --- Items/Tools/TheGift.cs | 1 + .../en-US/Mods.CalamityMod.Items.Tools.hjson | 1 + NPCs/CalamityGlobalTownNPC.cs | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 7762a59070..293727b9bd 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -57,6 +57,7 @@ namespace CalamityMod.Items.Tools bool positive = Main.rand.NextBool(); Color c = positive ? Color.Green : Color.Red; n.GetGlobalNPC().TheGiftStatus = positive; + n.GetGlobalNPC().TheGiftReset = 0.0; // Placeholder visual effect HealingPlus s = new(n.Center, 2f, Vector2.Zero, c, c, 40); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index ffab1c0245..1789ad3dac 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -364,6 +364,7 @@ TheGift: { ''' Drop this fine gift on one of your Town NPCs as a token of appreciation May make them either love you or hate you, you'll never know until they open it! + Effect will last for 24 hours [c/F54278:'There's no return policy, better be responsible'] ''' } diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 0321e81d36..4784f8b305 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -75,6 +75,11 @@ namespace CalamityMod.NPCs /// If true, happiness is overriden with an extremely high value. If false, happiness is overriden with an extremely low value. If null, uses vanilla happiness. /// public bool? TheGiftStatus = null; + /// + /// Timer to track when to reset the effects of The Gift, which occurs after 24 hours.
+ /// When The Gift is applied, this is set to 0 then starts counting up. + ///
+ public double TheGiftReset = -1.0; public override bool InstancePerEntity => true; @@ -811,6 +816,18 @@ namespace CalamityMod.NPCs public override bool PreAI(NPC npc) { SetPatreonTownNPCName(npc, Mod); + + // Reset The Gift after 24 hours + if (TheGiftReset >= 0.0) + { + TheGiftReset += Main.dayRate; + if (TheGiftReset >= Main.dayLength + Main.nightLength) + { + TheGiftReset = -1.0; + TheGiftStatus = null; + } + } + return true; } #endregion From aa6a8a7956befbae348a70ba5e3c8217ca121822 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 20 Mar 2026 18:11:06 -0400 Subject: [PATCH 029/126] The Monument Uses placeholder sprites --- Items/Placeables/Furniture/TheMonument.cs | 42 +++++++++++++++++++ Items/Tools/TheGift.cs | 15 ++++++- .../Mods.CalamityMod.Items.Placeables.hjson | 9 ++++ NPCs/CalamityGlobalTownNPC.cs | 38 +++++++++++++++++ Tiles/Furniture/TheMonumentTile.cs | 29 +++++++++++++ 5 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 Items/Placeables/Furniture/TheMonument.cs create mode 100644 Tiles/Furniture/TheMonumentTile.cs diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs new file mode 100644 index 0000000000..226cd424a9 --- /dev/null +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -0,0 +1,42 @@ +using CalamityMod.NPCs; +using CalamityMod.Tiles.Furniture; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.Furniture +{ + public class TheMonument : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override string Texture => "Terraria/Images/Item_1177"; //Placeholder + + public const float MonumentTaxIncrease = 0.25f; + public const float MonumentHappinessReduction = 0.2f; + + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.rare = ItemRarityID.Pink; + Item.value = Item.buyPrice(gold: 5); + } + + public override void Load() + { + On_Player.CollectTaxes += AddMonumentTaxes; + } + + private static void AddMonumentTaxes(On_Player.orig_CollectTaxes orig, Player self) + { + orig(self); + + foreach (NPC n in Main.ActiveNPCs) + { + if (!n.homeless && !NPCID.Sets.IsTownPet[n.type] && NPC.TypeToDefaultHeadIndex(n.type) > 0 && n.GetGlobalNPC().AffectedByTheMonument) + self.taxMoney += (int)(CalamityGlobalTownNPC.TotalTaxesPerNPC * MonumentTaxIncrease); + } + if (self.taxMoney > CalamityGlobalTownNPC.TaxesToCollectLimit) + self.taxMoney = CalamityGlobalTownNPC.TaxesToCollectLimit; + } + } +} diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 293727b9bd..f65ac856a7 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -1,4 +1,5 @@ -using CalamityMod.NPCs; +using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.NPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; @@ -67,11 +68,21 @@ namespace CalamityMod.Items.Tools } } + // Also contains logic for The Monument, so I can make sure these apply in the correct order private static void TheGiftHappiness(On_ShopHelper.orig_ProcessMood orig, ShopHelper self, Player player, NPC npc) { orig(self, player, npc); - bool? gift = npc.GetGlobalNPC().TheGiftStatus; + var gtnpc = npc.GetGlobalNPC(); + // The Monument lowers happiness by a fixed amount. This is not applied to the Tax Collector. + if (npc.type != NPCID.TaxCollector && gtnpc.SearchForTheMonument(npc)) + { + self._currentPriceAdjustment += TheMonument.MonumentHappinessReduction; + self.LimitAndRoundMultiplier(self._currentPriceAdjustment); + } + + // The Gift sets happiness to a fixed either extremely high or extremely low value, depending on its random state. + bool? gift = gtnpc.TheGiftStatus; if (gift.HasValue) { if (gift.Value) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 4a8f1cc711..9ae145a490 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -990,6 +990,15 @@ ThaumaticChair: { Tooltip: One of Chloe's finest creations } +TheMonument: { + DisplayName: The Monument + Tooltip: + ''' + A monument celebrating the accomplishments of capitalism + Funded by the taxes of nearby Town NPCs, though they may not be too happy about that + ''' +} + ThermalTorch: { DisplayName: Thermal Torch Tooltip: diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 4784f8b305..86ec12c772 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -22,6 +22,7 @@ using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Projectiles.Rogue; using CalamityMod.Systems.Collections; +using CalamityMod.Tiles.Furniture; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -31,6 +32,7 @@ using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using Terraria.WorldBuilding; using static Terraria.ModLoader.ModContent; namespace CalamityMod.NPCs @@ -81,6 +83,8 @@ namespace CalamityMod.NPCs /// public double TheGiftReset = -1.0; + public bool AffectedByTheMonument = false; + public override bool InstancePerEntity => true; public override bool AppliesToEntity(NPC entity, bool lateInstantiation) @@ -96,6 +100,8 @@ namespace CalamityMod.NPCs myClone.shopAlertAnimTimer = shopAlertAnimTimer; myClone.shopAlertAnimFrame = shopAlertAnimFrame; myClone.TheGiftStatus = TheGiftStatus; + myClone.TheGiftReset = TheGiftReset; + myClone.AffectedByTheMonument = AffectedByTheMonument; return myClone; } @@ -828,8 +834,40 @@ namespace CalamityMod.NPCs } } + // Search for The Monument, for the purposes of assigning higher taxes + AffectedByTheMonument = false; + SearchForTheMonument(npc); + return true; } + + public bool SearchForTheMonument(NPC npc) + { + Point tileCenter = npc.Center.ToTileCoordinates(); + Rectangle searchArea = new((int)(tileCenter.X - Main.buffScanAreaWidth / 2), (int)(tileCenter.Y - Main.buffScanAreaHeight / 2), Main.buffScanAreaWidth, Main.buffScanAreaHeight); + searchArea = WorldUtils.ClampToWorld(searchArea); + for (int i = searchArea.Left; i < searchArea.Right; i++) + { + for (int j = searchArea.Top; j < searchArea.Bottom; j++) + { + if (!searchArea.Contains(i, j)) + continue; + + Tile tile = Main.tile[i, j]; + if (tile == null) + continue; + if (!tile.HasTile) + continue; + + if (tile.TileType == TileType()) + { + AffectedByTheMonument = true; + return true; + } + } + } + return false; + } #endregion #region PreDraw diff --git a/Tiles/Furniture/TheMonumentTile.cs b/Tiles/Furniture/TheMonumentTile.cs new file mode 100644 index 0000000000..a5510f44ff --- /dev/null +++ b/Tiles/Furniture/TheMonumentTile.cs @@ -0,0 +1,29 @@ +using CalamityMod.Items.Placeables.Furniture; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Furniture +{ + public class TheMonumentTile : ModTile + { + public override string Texture => "CalamityMod/Tiles/Furniture/Monoliths/BlueDistortedMonolithTile"; //Placeholder + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.Width = 5; + TileObjectData.newTile.Height = 5; + TileObjectData.newTile.Origin = new Point16(2, 4); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16, 16, 18 }; + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 5, 0); + + AnimationFrameHeight = TileObjectData.newTile.CoordinateFullHeight; + TileObjectData.addTile(Type); + } + } +} From ead44b3a0a8b7a89903acfa8b100e7d2b858807d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 20 Mar 2026 22:05:14 -0400 Subject: [PATCH 030/126] Adjusted The Monument values --- Items/Placeables/Furniture/TheMonument.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs index 226cd424a9..4643b7b48d 100644 --- a/Items/Placeables/Furniture/TheMonument.cs +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -11,8 +11,8 @@ namespace CalamityMod.Items.Placeables.Furniture public new string LocalizationCategory => "Items.Placeables"; public override string Texture => "Terraria/Images/Item_1177"; //Placeholder - public const float MonumentTaxIncrease = 0.25f; - public const float MonumentHappinessReduction = 0.2f; + public const float MonumentTaxIncrease = 0.5f; + public const float MonumentHappinessReduction = 0.15f; public override void SetDefaults() { From 21a6f77582123cf68e03b4c923dc6555d5e2dbbd Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 21 Mar 2026 08:24:43 -0700 Subject: [PATCH 031/126] All preHM and HM custom swings + more Projectiles that scale with size modifiers now: Comet Quasher meteors Stellar Striker meteors Grand Guardian explosion All Bladecrest Oathsword line thrown blades Lucrecia Projectiles Auger pull aura Also fixed some melee holdouts breaking if you had negative attack speed --- .../BaseCustomUseStyleProjectile.cs | 28 ++++++++--- Projectiles/DraedonsArsenal/AugerHoldout.cs | 12 +++-- Projectiles/DraedonsArsenal/AugerPull.cs | 15 +++--- Projectiles/DraedonsArsenal/AugerSlash.cs | 13 ++--- Projectiles/Melee/BalefulHarvesterHoldout.cs | 20 ++++---- .../Melee/BladecrestOathswordThrownBlade.cs | 22 +++++---- Projectiles/Melee/CometQuasherHoldout.cs | 23 +++++---- Projectiles/Melee/CometQuasherMeteor.cs | 20 ++++---- Projectiles/Melee/DevilsDevastationHoldout.cs | 43 ++++++++--------- .../Melee/DevilsDevastationThrownBlade.cs | 31 ++++++------ Projectiles/Melee/ExaltedOathbladeHoldout.cs | 20 ++++---- .../Melee/ExaltedOathbladeThrownBlade.cs | 20 ++++---- .../Melee/ForbiddenOathbladeHoldout.cs | 18 +++---- .../Melee/ForbiddenOathbladeThrownBlade.cs | 17 ++++--- Projectiles/Melee/GrandGuardianBoom.cs | 11 +++-- Projectiles/Melee/GrandGuardianHoldout.cs | 19 ++++---- Projectiles/Melee/HellkiteHoldout.cs | 20 ++++---- Projectiles/Melee/LightspeedDashHitbox.cs | 6 ++- Projectiles/Melee/LightspeedHoldout.cs | 29 +++++++----- Projectiles/Melee/LightspeedM1Hitbox.cs | 14 ++++-- Projectiles/Melee/LucreciaBolt.cs | 14 ++++-- Projectiles/Melee/LucreciaDNATrailCreator.cs | 20 ++++---- Projectiles/Melee/LucreciaHoldout.cs | 21 +++++---- Projectiles/Melee/MajesticGuardHoldout.cs | 16 +++---- Projectiles/Melee/MantisClawHoldout.cs | 4 ++ Projectiles/Melee/MantisClawSlash.cs | 20 ++++++-- Projectiles/Melee/OldLordClaymoreHoldout.cs | 20 ++++---- Projectiles/Melee/StellarStrikerHoldout.cs | 23 +++++---- Projectiles/Melee/StellarStrikerMeteor.cs | 47 ++++++++++--------- Utilities/PlayerUtils.cs | 3 +- 30 files changed, 330 insertions(+), 259 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs index aea1ac75f1..520ae1e5c4 100644 --- a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs @@ -1,6 +1,7 @@ using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using rail; using ReLogic.Content; using Terraria; using Terraria.DataStructures; @@ -26,7 +27,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles public override void OnSpawn(IEntitySource source) { - Projectile.timeLeft = Owner.HeldItem.useAnimation + 1; + Projectile.timeLeft = (int)(Owner.HeldItem.useAnimation * (Owner.HeldItem.CountsAsClass() ? Owner.inverseMeleeSpeed : 1)) + 1; } #region Fields @@ -47,12 +48,20 @@ namespace CalamityMod.Projectiles.BaseProjectiles public virtual Player Owner => Main.player[Projectile.owner]; /// - /// The amount of pixels out the center of the projectile's hitbox is. + /// The amount of extra size added to the projectile's scale. + /// + public virtual float AdditionalScale => 0; + /// + /// If the projectile should auto scale to it's Projectile.scale to 1 (or greater if it is a melee item) + /// + public virtual bool IgnoreAutoScale => false; + /// + /// The amount of pixels out the center of the projectile's hitbox is. Scales with Projectile.scale. /// public virtual float HitboxOutset => 30; /// - /// The projectile's hitbox size in pixels. + /// The projectile's hitbox size in pixels. Scales with Projectile.scale. /// public virtual Vector2 HitboxSize => new Vector2(30, 30); @@ -177,7 +186,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles { WhenSpawned(); whenSpawned = false; - Projectile.timeLeft = Owner.HeldItem.useAnimation + 1; + Projectile.timeLeft = (int)(Owner.HeldItem.useAnimation * (Owner.HeldItem.CountsAsClass() ? Owner.inverseMeleeSpeed : 1)) + 1; Projectile.netUpdate = true; } @@ -191,6 +200,10 @@ namespace CalamityMod.Projectiles.BaseProjectiles Owner.Calamity().mouseWorldListener = true; Owner.Calamity().rightClickListener = true; + float finalScale = (Owner.HeldItem.CountsAsClass() ? Owner.GetMeleeScale() : Owner.HeldItem.scale) + AdditionalScale; + if (!IgnoreAutoScale) + Projectile.scale = MathHelper.Lerp(Projectile.scale, finalScale, 0.3f / Projectile.MaxUpdates); + if (ItemAnimationActive || IgnoreActiveAnimation) { Animation++; @@ -235,7 +248,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles if (Owner.itemAnimation == Owner.itemAnimationMax - 1) { - Projectile.timeLeft = Owner.HeldItem.useAnimation + 1; + Projectile.timeLeft = (int)(Owner.HeldItem.useAnimation * (Owner.HeldItem.CountsAsClass() ? Owner.inverseMeleeSpeed : 1)) + 1; OnBeginUse(); } @@ -263,8 +276,9 @@ namespace CalamityMod.Projectiles.BaseProjectiles public override void ModifyDamageHitbox(ref Rectangle hitbox) { - Vector2 cen = Projectile.Center + new Vector2(HitboxOutset, 0).RotatedBy(FinalRotation + HitboxRotationOffset); - hitbox = new Rectangle((int)cen.X - (int)(HitboxSize.X / 2), (int)cen.Y - (int)(HitboxSize.Y / 2), (int)HitboxSize.X, (int)HitboxSize.Y); + Vector2 hitboxScale = HitboxSize * Projectile.scale; + Vector2 cen = Projectile.Center + new Vector2(HitboxOutset * Projectile.scale, 0).RotatedBy(FinalRotation + HitboxRotationOffset); + hitbox = new Rectangle((int)cen.X - (int)(hitboxScale.X / 2), (int)cen.Y - (int)(hitboxScale.Y / 2), (int)hitboxScale.X, (int)hitboxScale.Y); // Turn this on to show the hitbox, useful for testing if it's working how you want /*Particle blastRing = new CustomPulse(hitbox.TopLeft(), Vector2.Zero, Color.Red, "CalamityMod/Particles/LargeBloom", Vector2.One, Main.rand.NextFloat(-10, 10), 0.2f, 0.2f, 4); diff --git a/Projectiles/DraedonsArsenal/AugerHoldout.cs b/Projectiles/DraedonsArsenal/AugerHoldout.cs index 0322389e2f..17165f3aa6 100644 --- a/Projectiles/DraedonsArsenal/AugerHoldout.cs +++ b/Projectiles/DraedonsArsenal/AugerHoldout.cs @@ -78,6 +78,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (!Owner.CantUseHoldout(false)) Projectile.timeLeft = 5; + Projectile.scale = MathHelper.Lerp(Projectile.scale, Owner.GetMeleeScale(), 0.3f / Projectile.MaxUpdates); + Vector2 toMouse = Utils.DirectionTo(Owner.Center, Owner.ClampedMouseWorld()); Positioning(toMouse); @@ -104,7 +106,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal if (attackTimer > fireRate && makeHitbox) { - Projectile magnetZone = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.ClampedMouseWorld(), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner, 0, 0, 0); + Projectile magnetZone = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.ClampedMouseWorld(), Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner, Projectile.scale, 0, 0); SoundStyle pull = new("CalamityMod/Sounds/Item/AugerPull"); SoundEngine.PlaySound(pull with { Volume = 0.9f, Pitch = 0 }, Owner.ClampedMouseWorld()); @@ -213,7 +215,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Owner.SetScreenshake(5f); damage = (int)(damage * 2.5f); } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center + toMouse * 20 * (float)Math.Pow(scaleFx, 4), toMouse * 25, ModContent.ProjectileType(), damage, 0, Projectile.owner, 0, swingCount, Owner.Calamity().buffedAuger ? 5 : 0); + Projectile slash = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + toMouse * 20 * (float)Math.Pow(scaleFx, 4), toMouse * 25, ModContent.ProjectileType(), damage, 0, Projectile.owner, 0, swingCount, Owner.Calamity().buffedAuger ? 5 : 0); + slash.localAI[0] = Projectile.scale; makeHitbox = false; } } @@ -261,9 +264,10 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } Vector2 placeAdjust = (drawRotation + MathHelper.PiOver2).ToRotationVector2() * 2.5f; - Main.EntitySpriteDraw(texture, drawPosition + placeAdjust, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); // The holdout + // Spesifically doesn't scale with melee size, but the actual energy blade does + Main.EntitySpriteDraw(texture, drawPosition + placeAdjust, null, drawColor, drawRotation, rotationPoint, 1, flipSprite); // The holdout - Main.EntitySpriteDraw(glow, drawPosition + placeAdjust, null, Color.White, drawRotation, rotationPoint, Projectile.scale, flipSprite); // The glow + Main.EntitySpriteDraw(glow, drawPosition + placeAdjust, null, Color.White, drawRotation, rotationPoint, 1, flipSprite); // The glow return false; } diff --git a/Projectiles/DraedonsArsenal/AugerPull.cs b/Projectiles/DraedonsArsenal/AugerPull.cs index 4abb72e134..a4d042d200 100644 --- a/Projectiles/DraedonsArsenal/AugerPull.cs +++ b/Projectiles/DraedonsArsenal/AugerPull.cs @@ -32,13 +32,14 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void AI() { + Projectile.scale = Projectile.ai[0]; if (strongTimer == 0) { - Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalGaussColor, "CalamityMod/Particles/GlowSquareParticleBig", Vector2.One, 0, 1.1f, 0.7f, 30); + Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalGaussColor, "CalamityMod/Particles/GlowSquareParticleBig", Vector2.One, 0, 1.1f * Projectile.scale, 0.7f * Projectile.scale, 30); GeneralParticleHandler.SpawnParticle(bolt2); for (int i = 0; i < 20; i++) { - Vector2 dustVel2 = (Vector2.UnitX).RotatedByRandom(100) * Main.rand.NextFloat(10f, 15.5f); + Vector2 dustVel2 = (Vector2.UnitX).RotatedByRandom(100) * Main.rand.NextFloat(10f, 15.5f) * Projectile.scale; Dust dust2 = Dust.NewDustPerfect(Projectile.Center + dustVel2.SafeNormalize(Vector2.UnitX) * 360, ModContent.DustType(), -dustVel2 * 1.5f, 0, default, Main.rand.NextFloat(1.2f, 1.8f)); dust2.noGravity = true; dust2.fadeIn = 0.3f; @@ -47,7 +48,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal for (int i = 0; i < Main.maxNPCs; i++) { NPC target = Main.npc[i]; - if (target != null && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < 650) + if (target != null && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1) && Vector2.Distance(target.Center, Projectile.Center) < 650 * Projectile.scale) { Vector2 moveDir = target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX); target.velocity = moveDir; @@ -56,7 +57,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal } } - Vector2 dustVel = (Vector2.UnitX).RotatedByRandom(100) * Main.rand.NextFloat(3f, 8.5f); + Vector2 dustVel = (Vector2.UnitX).RotatedByRandom(100) * Main.rand.NextFloat(3f, 8.5f) * Projectile.scale; Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel.SafeNormalize(Vector2.UnitX) * 120, Effects.ArsenalEffects.ArsenalGaussDust, -dustVel, 0, default, Main.rand.NextFloat(0.5f, 1f)); dust.noGravity = true; dust.fadeIn = 0.05f; @@ -69,7 +70,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal NPC target = Main.npc[i]; if (target != null && target.CanBeMoved() && Collision.CanHit(Projectile.Center, 1, 1, target.Center, 1, 1)) { - if (Vector2.Distance(target.Center, Projectile.Center) > 15 && Vector2.Distance(target.Center, Projectile.Center) < 300) + if (Vector2.Distance(target.Center, Projectile.Center) > 15 * Projectile.scale && Vector2.Distance(target.Center, Projectile.Center) < 300 * Projectile.scale) { Vector2 moveDir = target.Center.DirectionTo(Projectile.Center).SafeNormalize(Vector2.UnitX); target.velocity = Vector2.Lerp(target.velocity, moveDir * 5, 0.12f); @@ -100,8 +101,8 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Texture2D tex2 = ModContent.Request("CalamityMod/Particles/GlowSquareParticleBig").Value; Color drawColor = Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 } * (strong ? 0.5f : 0.3f) * shrinkFade; - Main.EntitySpriteDraw(tex2, Projectile.Center - Main.screenPosition, null, drawColor, MathHelper.PiOver4 - MathHelper.PiOver2 * sine * 3, tex2.Size() / 2f, (areaScale + sine * 0.5f) * shrink, SpriteEffects.None, 0); - Main.EntitySpriteDraw(tex2, Projectile.Center - Main.screenPosition, null, drawColor, MathHelper.PiOver2 * sine2 * 3, tex2.Size() / 2f, (areaScale - sine2 * 0.5f) * (float)Math.Pow(shrink, 2), SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex2, Projectile.Center - Main.screenPosition, null, drawColor, MathHelper.PiOver4 - MathHelper.PiOver2 * sine * 3, tex2.Size() / 2f, (areaScale + sine * 0.5f) * shrink * Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex2, Projectile.Center - Main.screenPosition, null, drawColor, MathHelper.PiOver2 * sine2 * 3, tex2.Size() / 2f, (areaScale - sine2 * 0.5f) * (float)Math.Pow(shrink, 2) * Projectile.scale, SpriteEffects.None, 0); return false; } diff --git a/Projectiles/DraedonsArsenal/AugerSlash.cs b/Projectiles/DraedonsArsenal/AugerSlash.cs index dfe7bc00b1..eb044fe423 100644 --- a/Projectiles/DraedonsArsenal/AugerSlash.cs +++ b/Projectiles/DraedonsArsenal/AugerSlash.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal public override void AI() { Player Owner = Main.player[Projectile.owner]; + Projectile.scale = Projectile.localAI[0]; float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); fade = (float)Math.Pow(Utils.GetLerpValue(lifetime * 0.1f, lifetime * 0.5f, Projectile.timeLeft, true), 4); if (Projectile.velocity.Length() > 0.1f) @@ -47,15 +48,15 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float rotScaling = 1 - Math.Abs(rot); Vector2 vel = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(rot) * (70 / scaleFx + 80 * (float)Math.Pow(rotScaling, 1.5f) * Main.rand.NextFloat(0.85f, 1f)) * scaleFx; Vector2 finalDustVel = (vel * (float)Math.Pow(rotScaling, 1.5f) + (vel.RotatedBy(-MathHelper.PiOver2 * rot) * 1.5f)) * 0.03f; - Dust s = Dust.NewDustPerfect(Projectile.Center + vel - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 45 * scaleFx, ModContent.DustType(), finalDustVel / scaleFx); - s.scale = scale * scaleFx; + Dust s = Dust.NewDustPerfect(Projectile.Center + (vel - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 45 * scaleFx) * Projectile.scale, ModContent.DustType(), finalDustVel / scaleFx); + s.scale = scale * scaleFx * Projectile.scale; s.noGravity = true; s.color = Color.Lerp(Effects.ArsenalEffects.ArsenalGaussColor, Color.White, Math.Max(0, swingDirScale - 0.35f)); - s.fadeIn = 0.1f + swingDirScale; + s.fadeIn = 0.1f + swingDirScale * Projectile.scale; } } - Lighting.AddLight(Projectile.Center, Color.Lerp(Effects.ArsenalEffects.ArsenalGaussColor, Color.White, 0.3f).ToVector3() * 0.7f); + Lighting.AddLight(Projectile.Center, Color.Lerp(Effects.ArsenalEffects.ArsenalGaussColor, Color.White, 0.3f).ToVector3() * 0.7f * Projectile.scale); time++; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -138,7 +139,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float length = 135 * scale; float size = 135 * scale; float _ = float.NaN; - bool hit = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, start + Projectile.velocity.SafeNormalize(Vector2.UnitX) * length, size, ref _); + bool hit = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, start + Projectile.velocity.SafeNormalize(Vector2.UnitX) * length * Projectile.scale, size * Projectile.scale, ref _); return (hit); } public override bool PreDraw(ref Color lightColor) @@ -154,7 +155,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float sizeLerp = (float)Math.Pow((Utils.GetLerpValue(lifetime, lifetime * 0.2f, time, true)), 5f); Vector2 squash = new Vector2(1 + lerp * 0.5f, 1.25f - lerp * 1.1f) * 0.08f * sizeLerp; Vector2 rotationPoint = new Vector2(proj.Width * 0.85f, proj.Height / 2); - Vector2 drawPosition = Projectile.Center - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 105; + Vector2 drawPosition = Projectile.Center - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 105 * Projectile.scale; SpriteEffects spfx = (Projectile.ai[1] != 1 ? SpriteEffects.None : SpriteEffects.FlipVertically); if (Projectile.direction == -1) diff --git a/Projectiles/Melee/BalefulHarvesterHoldout.cs b/Projectiles/Melee/BalefulHarvesterHoldout.cs index 19382f94d0..7f505a7c99 100644 --- a/Projectiles/Melee/BalefulHarvesterHoldout.cs +++ b/Projectiles/Melee/BalefulHarvesterHoldout.cs @@ -19,10 +19,11 @@ namespace CalamityMod.Projectiles.Melee public override int AssignedItemID => ModContent.ItemType(); public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/BalefulHarvester"; - public override float HitboxOutset => 90; - public override Vector2 HitboxSize => new Vector2(140, 140); + public int size = 106; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(0, 96); public Vector2 mousePos; public Vector2 aimVel; @@ -44,7 +45,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; mousePos = Owner.Calamity().mouseWorld; aimVel = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; @@ -161,8 +161,8 @@ namespace CalamityMod.Projectiles.Melee if (CanHit) { Vector2 sparkVel = Vector2.UnitY.RotatedBy(FinalRotation + MathHelper.ToRadians(-45)) * (3.5f * Owner.direction); - Vector2 sparkPos = Owner.Center + Vector2.UnitX.RotatedBy(FinalRotation + MathHelper.ToRadians(-45)) * Main.rand.Next(80, 140); - CustomSprite critSpark = new(sparkPos, sparkVel, 15, "CalamityMod/Particles/CritSpark", 1f, Color.Orange, frameCount: 4, frame: Main.rand.Next(4)); + Vector2 sparkPos = Owner.Center + Vector2.UnitX.RotatedBy(FinalRotation + MathHelper.ToRadians(-45)) * Main.rand.Next(80, 140) * Projectile.scale; + CustomSprite critSpark = new(sparkPos, sparkVel, 15, "CalamityMod/Particles/CritSpark", 1f * Projectile.scale, Color.Orange, frameCount: 4, frame: Main.rand.Next(4)); GeneralParticleHandler.SpawnParticle(critSpark); } } @@ -220,16 +220,16 @@ namespace CalamityMod.Projectiles.Melee Rectangle vanillaSmearFrame = vanillaSmear.Frame(1, 4, 0, 0); Asset smear = ModContent.Request("CalamityMod/Particles/SemiCircularSmearSwipe"); float smearOpacity = CalamityUtils.Convert01To010(time / timeMax); - Main.EntitySpriteDraw(vanillaSmear.Value, Projectile.Center - Main.screenPosition, vanillaSmearFrame, new Color(193, 83, 43) * smearOpacity * 0.75f, FinalRotation - MathHelper.PiOver2, vanillaSmearFrame.Size() / 2f, 1.25f, SpriteEffects.None); - Main.EntitySpriteDraw(smear.Value, Projectile.Center - Main.screenPosition, null, new Color(247, 115, 0) * smearOpacity, FinalRotation, smear.Size() / 2f, 1.8f, SpriteEffects.None); + Main.EntitySpriteDraw(vanillaSmear.Value, Projectile.Center - Main.screenPosition, vanillaSmearFrame, new Color(193, 83, 43) * smearOpacity * 0.75f, FinalRotation - MathHelper.PiOver2, vanillaSmearFrame.Size() / 2f, 1.25f * Projectile.scale, SpriteEffects.None); + Main.EntitySpriteDraw(smear.Value, Projectile.Center - Main.screenPosition, null, new Color(247, 115, 0) * smearOpacity, FinalRotation, smear.Size() / 2f, 1.8f * Projectile.scale, SpriteEffects.None); if (smearOpacity > 0.65f) { Vector2 sparklePos = Projectile.Center - Main.screenPosition - (Vector2.UnitY.RotatedBy(FinalRotation + MathHelper.PiOver4 * Owner.direction) * 120f); Asset bloom = ModContent.Request("CalamityMod/Particles/BloomCircle"); - Main.EntitySpriteDraw(bloom.Value, sparklePos, null, Color.White * 0.75f, 0f, bloom.Size() / 2f, 0.2f, SpriteEffects.None); + Main.EntitySpriteDraw(bloom.Value, sparklePos, null, Color.White * 0.75f, 0f, bloom.Size() / 2f, 0.2f * Projectile.scale, SpriteEffects.None); Asset sparkle = ModContent.Request("CalamityMod/Particles/FullStar"); - Main.EntitySpriteDraw(sparkle.Value, sparklePos, null, Color.Orange, 0f, sparkle.Size() / 2f, 2f, SpriteEffects.None); + Main.EntitySpriteDraw(sparkle.Value, sparklePos, null, Color.Orange, 0f, sparkle.Size() / 2f, 2f * Projectile.scale, SpriteEffects.None); } } Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); diff --git a/Projectiles/Melee/BladecrestOathswordThrownBlade.cs b/Projectiles/Melee/BladecrestOathswordThrownBlade.cs index 500a311afe..9b7ff2326a 100644 --- a/Projectiles/Melee/BladecrestOathswordThrownBlade.cs +++ b/Projectiles/Melee/BladecrestOathswordThrownBlade.cs @@ -89,6 +89,8 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + if (time == 0) + Projectile.scale = Owner.GetMeleeScale(); if ((CurrentState & State.HasSpawned) == 0) { Projectile.timeLeft = Lifetime + ChargeupTime; @@ -99,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee { foreach (var target in Main.ActiveNPCs) { - if ((CurrentState & State.LeftTarget) == 0 && CircularHitboxCollision(Projectile.Center, Projectile.width / ((CurrentState & State.LeftTarget) != 0 ? 0.5f : 1), target.getRect())) + if ((CurrentState & State.LeftTarget) == 0 && CircularHitboxCollision(Projectile.Center, Projectile.width / ((CurrentState & State.LeftTarget) != 0 ? 0.5f : 1) * Projectile.scale, target.getRect())) { SoundStyle stuck = new("CalamityMod/Sounds/Item/DemonSwordImpact", 2); SoundEngine.PlaySound(stuck with { Volume = 0.75f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = 3 }, Projectile.Center); @@ -166,7 +168,7 @@ namespace CalamityMod.Projectiles.Melee // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 toMouse = GetAimDirection(); Projectile.velocity = toMouse * 14; - Projectile.Center = Owner.MountedCenter + toMouse * 12f; + Projectile.Center = Owner.MountedCenter + toMouse * 12f * Projectile.scale; Projectile.spriteDirection = Projectile.direction; CurrentState |= State.Thrown; time = 0; @@ -242,17 +244,18 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(3)) { Dust dust = Dust.NewDustPerfect( - Projectile.Center + safeVel.RotatedBy((CurrentState & State.LeftTarget) != 0 ? Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45) : 0) * ((CurrentState & State.LeftTarget) != 0 ? 45 : 60), - ModContent.DustType(), + Projectile.Center + safeVel.RotatedBy((CurrentState & State.LeftTarget) != 0 ? Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45) : 0) * ((CurrentState & State.LeftTarget) != 0 ? 45 : 60) * Projectile.scale, + ModContent.DustType(), dustVel, 0, default, - ((CurrentState & State.LeftTarget) != 0 ? 1.5f : 1) * Main.rand.NextFloat(0.8f, 0.9f)); + ((CurrentState & State.LeftTarget) != 0 ? 1.5f : 1) * Main.rand.NextFloat(0.8f, 0.9f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Red : Color.Crimson; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 100; + dust.fadeIn = Projectile.scale - 1; } } if (Main.rand.NextBool(5)) @@ -263,7 +266,7 @@ namespace CalamityMod.Projectiles.Melee texture: "CalamityMod/Particles/DemonSigilParticle", affectedByGravity: false, lifetime: 17, - scale: Main.rand.NextFloat(0.2f, 0.3f), + scale: Main.rand.NextFloat(0.2f, 0.3f) * Projectile.scale, color: Color.Lerp(Color.Crimson, Color.Red, Main.rand.NextFloat(0, 0.7f)) * 0.6f, stretch: new Vector2(1f, 1f), extraRotation: Main.rand.NextFloat(-1f, 1f)); @@ -297,13 +300,14 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = new Vector2(10, 10).RotatedByRandom(Math.PI) * Main.rand.NextFloat(0.2f, 1f) * Projectile.Opacity; if (Main.rand.NextBool(4)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Red : Color.Crimson; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 100; dust.velocity += Projectile.velocity; + dust.fadeIn = Projectile.scale - 1; } } @@ -318,7 +322,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.spriteDirection = Owner.direction; Projectile.direction = Owner.direction; - Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -45f * Owner.gravDir; + Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -45f * Owner.gravDir * Projectile.scale; Projectile.rotation = (-MathHelper.PiOver4 * Projectile.direction + armRotation) * Owner.gravDir; Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation); @@ -394,7 +398,7 @@ namespace CalamityMod.Projectiles.Melee // After exiting a target, the hitbox is larger public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - => (Projectile.numHits <= 0 || (CurrentState & State.LeftTarget) != 0) && CircularHitboxCollision(Projectile.Center, Projectile.width / ((CurrentState & State.LeftTarget) != 0 ? 0.5f : 1), targetHitbox); + => (Projectile.numHits <= 0 || (CurrentState & State.LeftTarget) != 0) && CircularHitboxCollision(Projectile.Center, Projectile.width / ((CurrentState & State.LeftTarget) != 0 ? 0.5f : 1) * Projectile.scale, targetHitbox); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/CometQuasherHoldout.cs b/Projectiles/Melee/CometQuasherHoldout.cs index 08ff873084..31284e82c0 100644 --- a/Projectiles/Melee/CometQuasherHoldout.cs +++ b/Projectiles/Melee/CometQuasherHoldout.cs @@ -20,12 +20,11 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/CometQuasher"; - public override float HitboxOutset => 90; - - public override Vector2 HitboxSize => new Vector2(110, 110); + public int size = 94; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(-4, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(-5, 96); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -45,7 +44,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, it does not influence Comet Quasher's projectile spawning @@ -159,20 +157,20 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 4; i++) { Vector2 particleVel = new Vector2(0, 3 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 110), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - Vector2 particlePos2 = Owner.Center + (new Vector2(Main.rand.Next(80, 110), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 110), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + Vector2 particlePos2 = Owner.Center + (new Vector2(Main.rand.Next(80, 110), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; if (i % 2 == 0) { - Particle orb = new CustomPulse(particlePos, particleVel * Main.rand.NextFloat(0.8f, 1.2f), Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, "CalamityMod/Particles/HealingPlus", new Vector2(1f, 1f), Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(0.8f, 1.2f), 0.2f, 23); + Particle orb = new CustomPulse(particlePos, particleVel * Main.rand.NextFloat(0.8f, 1.2f), Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, "CalamityMod/Particles/HealingPlus", new Vector2(1f, 1f), Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(0.8f, 1.2f) * Projectile.scale, 0.2f, 23); GeneralParticleHandler.SpawnParticle(orb); } else { - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos2, -particleVel.RotatedByRandom(0.2f) * 2, Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, 23, Main.rand.NextFloat(0.3f, 0.7f), 0.75f, 0, true)); + GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos2, -particleVel.RotatedByRandom(0.2f) * 2, Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, 23, Main.rand.NextFloat(0.3f, 0.7f) * Projectile.scale, 0.75f, 0, true)); } } - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(120, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1)); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(120 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1)); dust2.scale = Main.rand.NextFloat(0.55f, 0.85f); dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? Color.AliceBlue : Color.DodgerBlue; @@ -221,7 +219,8 @@ namespace CalamityMod.Projectiles.Melee if (spawnBoom) { Vector2 spawnSpot = target.Center + new Vector2(Main.rand.NextFloat(-550, 550), Main.rand.NextFloat(-750, -950)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), 0, Projectile.owner, 0, Main.rand.Next(3), 4); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), 0, Projectile.owner, 0, Main.rand.Next(3), 4); + meteor.scale = Projectile.scale; spawnBoom = false; } } diff --git a/Projectiles/Melee/CometQuasherMeteor.cs b/Projectiles/Melee/CometQuasherMeteor.cs index 6627821de0..c5ed0d8f22 100644 --- a/Projectiles/Melee/CometQuasherMeteor.cs +++ b/Projectiles/Melee/CometQuasherMeteor.cs @@ -64,11 +64,11 @@ namespace CalamityMod.Projectiles.Melee { if (time % 11 == 0) { - GlowSparkParticle orb = new(Projectile.Center + Main.rand.NextVector2Circular(20, 20), -Projectile.velocity * 2, false, 11, 0.03f, mainColor * Main.rand.NextFloat(0.7f, 1), new Vector2(1f, 1f), true, false, 0.6f); + GlowSparkParticle orb = new(Projectile.Center + Main.rand.NextVector2Circular(20, 20) * Projectile.scale - Projectile.velocity * 2, -Projectile.velocity * 2, false, 11, 0.025f * Projectile.scale, mainColor * Main.rand.NextFloat(0.7f, 1), new Vector2(1f, 1f), true, false, 0.6f); GeneralParticleHandler.SpawnParticle(orb); } if (time % 4 == 0) - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Projectile.Center, -Projectile.velocity * Main.rand.NextFloat(0.2f, 1.5f), Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, 6, Main.rand.NextFloat(0.4f, 0.9f), 0.65f, 0, true)); + GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Projectile.Center, -Projectile.velocity * Main.rand.NextFloat(0.2f, 1.5f), Main.rand.NextBool(4) ? Color.AliceBlue : Color.DodgerBlue, 6, Main.rand.NextFloat(0.4f, 0.9f) * Projectile.scale, 0.65f, 0, true)); } if (Main.rand.NextBool(13)) { @@ -120,7 +120,8 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.ai[2] > 0) { Vector2 spawnSpot = Owner.Center + new Vector2(Main.rand.NextFloat(-550, 550), Main.rand.NextFloat(-750, -950)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 0, Projectile.ai[2] - 1); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 0, Projectile.ai[2] - 1); + meteor.scale = Projectile.scale; } if (Projectile.owner == Main.myPlayer) @@ -132,13 +133,16 @@ namespace CalamityMod.Projectiles.Melee } for (int i = 0; i < 13; i++) { - Particle spark3 = new GlowOrbParticle(Projectile.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 9), false, 20, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(5) ? Color.AliceBlue : Color.DodgerBlue, true, false, false); + Particle spark3 = new GlowOrbParticle(Projectile.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 9), false, 20, Main.rand.NextFloat(0.5f, 1f) * Projectile.scale, Main.rand.NextBool(5) ? Color.AliceBlue : Color.DodgerBlue, true, false, false); GeneralParticleHandler.SpawnParticle(spark3); } - Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2f, 1f, 25, true); - GeneralParticleHandler.SpawnParticle(blastRing); - Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1f, 0.3f, 25, true); - GeneralParticleHandler.SpawnParticle(blastRing2); + if (!CalamityClientConfig.Instance.Photosensitivity) + { + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2f * Projectile.scale, 1f * Projectile.scale, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1f * Projectile.scale, 0.3f * Projectile.scale, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing2); + } } public override bool? CanCutTiles() => false; } diff --git a/Projectiles/Melee/DevilsDevastationHoldout.cs b/Projectiles/Melee/DevilsDevastationHoldout.cs index 093afc45b2..acb46b317d 100644 --- a/Projectiles/Melee/DevilsDevastationHoldout.cs +++ b/Projectiles/Melee/DevilsDevastationHoldout.cs @@ -29,15 +29,14 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/DevilsDevastation"; - public float hitboxMult = 1.3f; public Color clr = Color.Lerp(Color.DeepPink, Color.Orange, 0.5f); public SlotId SoundSlot; - public override float HitboxOutset => 335; - - public override Vector2 HitboxSize => new Vector2(395, 395) * hitboxMult; + public int size = 118 + 285; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size - 285); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(-3, 118); + public override float AdditionalScale => 0.15f; public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -78,7 +77,6 @@ namespace CalamityMod.Projectiles.Melee DrawUnconditionally = true; CanHit = false; Projectile.knockBack = 0; - Projectile.scale = 1.15f; Projectile.ai[1] = -1; bool isOwner = Main.myPlayer == Projectile.owner; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction @@ -284,8 +282,8 @@ namespace CalamityMod.Projectiles.Melee float deathFade = willDie ? Utils.GetLerpValue(0, postSwingCooldownMax, postSwingCooldown, true) : 1; float randRot = Main.rand.NextFloat(-30, 30); Vector2 dustVel = -Vector2.One.RotatedBy(Projectile.rotation + RotationOffset + MathHelper.ToRadians(90)).RotatedByRandom(0.3f) * Main.rand.NextFloat(7, 17) - Owner.velocity * 0.8f; - Vector2 placement = Owner.Center + (new Vector2(Main.rand.NextFloat(70, 500) * deathFade, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/BloomCircle", false, 13, Main.rand.NextFloat(0.04f, 0.06f) * 10, (Main.rand.NextBool() ? Color.MediumOrchid : clr) * deathFade, new Vector2(0.9f, 1), shrinkSpeed: 0.95f)); + Vector2 placement = Owner.Center + (new Vector2(Main.rand.NextFloat(70, 500) * deathFade, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/BloomCircle", false, 13, Main.rand.NextFloat(0.04f, 0.06f) * 10 * Projectile.scale, (Main.rand.NextBool() ? Color.MediumOrchid : clr) * deathFade, new Vector2(0.9f, 1), shrinkSpeed: 0.95f)); } if (lastHitTarget != null && lastHitTarget.life > 0 && lastHitTarget.active) { @@ -348,16 +346,17 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 8; i++) { float randRot = Main.rand.NextFloat(-20, -100); - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(560, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(MathHelper.ToRadians(randRot))), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.9f, 0, default, Main.rand.NextFloat(1.45f, 2.4f)); + Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(520 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(MathHelper.ToRadians(randRot))), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.9f, 0, default, Main.rand.NextFloat(1.45f, 2.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? clr : Color.BlueViolet; + dust.fadeIn = Projectile.scale - 1; } for (int i = 0; i < 4; i++) { float randRot = Main.rand.NextFloat(-20, -100); Vector2 dustVel = (new Vector2(0, 11 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Vector2 placement = Owner.Center + (new Vector2(560, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); - GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/DemonSigilParticle", false, 33, Main.rand.NextFloat(0.43f, 0.56f), Main.rand.NextBool() ? Color.MediumOrchid : clr, new Vector2(1, 1), shrinkSpeed: 0.1f)); + Vector2 placement = Owner.Center + (new Vector2(520, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)) * Projectile.scale; + GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/DemonSigilParticle", false, 33, Main.rand.NextFloat(0.43f, 0.56f) * Projectile.scale, Main.rand.NextBool() ? Color.MediumOrchid : clr, new Vector2(1, 1), shrinkSpeed: 0.1f)); } } } @@ -480,27 +479,29 @@ namespace CalamityMod.Projectiles.Melee if (true) { Asset tex2 = ModContent.Request("CalamityMod/Particles/BloomLineAngled"); - int draws = 30; + int draws = 60; for (int i = 0; i < draws; i++) { + float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 25 + i * 6); + float newSine = 0.3f + (0.7f - sine * 0.25f) * Utils.Remap(i, 0, draws, 0.8f, 0.6f); Vector2 offsetDir = Vector2.One.RotatedBy(Projectile.rotation + RotationOffset + MathHelper.ToRadians(90)); - Color auraColor = Color.Lerp(Color.MediumOrchid, clr, Utils.GetLerpValue(0, draws - 1, i)) with { A = 0 } * 0.38f * (willDie ? deathFade : 1); - Vector2 drawOffset = -offsetDir * 10 * deathFade * i; - Main.EntitySpriteDraw(tex2.Value, Projectile.Center - offsetDir * 70 - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(18, 18), tex2.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, tex2.Size() * 0.5f, Vector2.One * (1f - i * 0.02f) * 0.06f, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); + float jitter = Utils.Remap(i, 0, draws / 2, 10, 0f) * deathFade; + Color auraColor = Color.Lerp(Color.MediumOrchid, clr, Utils.GetLerpValue(0, draws - 1, i)) with { A = 0 } * 0.38f * (Utils.Remap(jitter, 0, 10, 1, 3.5f)) * (willDie ? deathFade : 1); + Vector2 drawOffset = -offsetDir * 5 * deathFade * i * Projectile.scale; + Main.EntitySpriteDraw(tex2.Value, Projectile.Center - offsetDir * 30 * Projectile.scale - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(jitter, jitter), tex2.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation.ToRotationVector2().RotatedByRandom(jitter * 0.085f).ToRotation() + RotationOffset + r, new Vector2(FlipAsSword ? tex2.Width() : 0, tex2.Height()), Vector2.One * (1f - i * 0.01f) * 0.06f * Projectile.scale * newSine * Utils.Remap(jitter, 0, 10, 1, 0.3f), spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } } for (int i = 0; i < 20; i++) { Color auraColor = Color.MediumOrchid with { A = 0 } * 0.18f * (willDie ? deathFade : 1); - Vector2 drawOffset = (MathHelper.TwoPi * i / 20f).ToRotationVector2() * 7 * (willDie ? (1 - deathFade) * 3 : 2); - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(7, 7), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); + Vector2 drawOffset = (MathHelper.TwoPi * i / 20f).ToRotationVector2() * 2 * (willDie ? (1 - deathFade) * 3 : 2); + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(4, 4), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } if ((useAnim > 0 || DrawUnconditionally)) { - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.75f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -65 : 65) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.9f * hitboxMult, SpriteEffects.None); - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, clr with { A = 0 } * fadeIn * 0.85f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -65 : 65) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 1.2f * hitboxMult, SpriteEffects.None); - + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.75f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -65 : 65) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 1.3f, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, clr with { A = 0 } * fadeIn * 0.85f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -65 : 65) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 1.75f, SpriteEffects.None); Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), Color.Lerp(Color.MediumOrchid with { A = 0 }, lightColor, deathFade) * deathFade, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } diff --git a/Projectiles/Melee/DevilsDevastationThrownBlade.cs b/Projectiles/Melee/DevilsDevastationThrownBlade.cs index 2daec84626..abc143e1bb 100644 --- a/Projectiles/Melee/DevilsDevastationThrownBlade.cs +++ b/Projectiles/Melee/DevilsDevastationThrownBlade.cs @@ -86,6 +86,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 toMouse = (Owner.Calamity().mouseWorld - Owner.Center).SafeNormalize(Vector2.UnitX * Owner.direction); Projectile.localAI[1] = toMouse.ToRotation(); Projectile.netUpdate = true; + Projectile.scale = Owner.GetMeleeScale(); } } @@ -138,7 +139,7 @@ namespace CalamityMod.Projectiles.Melee // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 toMouse = GetAimDirection(); Projectile.velocity = toMouse * 14; - Projectile.Center = Owner.MountedCenter + toMouse * 30f; + Projectile.Center = Owner.MountedCenter + toMouse * 30f * Projectile.scale; Projectile.spriteDirection = Projectile.direction; thrown = true; time = 0; @@ -211,32 +212,28 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = exitedTarget ? safeVel.RotatedBy(MathHelper.ToRadians(-90 * Projectile.direction) + Projectile.rotation) : safeVel.RotatedBy(MathHelper.ToRadians(70 * (i == 0 ? 1 : -1))) * 6; if (!exitedTarget) { - Particle spark = new VelChangingSpark(Projectile.Center + safeVel * 95, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 5, 0.2f, (clr) * 0.95f, new Vector2(1.2f, 1f), true, false, 0, false, 1.0f, 0.22f); + Particle spark = new VelChangingSpark(Projectile.Center + safeVel * 95 * Projectile.scale, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 5, 0.2f * Projectile.scale, (clr) * 0.95f, new Vector2(1.2f, 1f), true, false, 0, false, 1.0f, 0.22f); GeneralParticleHandler.SpawnParticle(spark); - Particle spark2 = new VelChangingSpark(Projectile.Center + safeVel * 95, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 10, 0.2f, (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.65f, new Vector2(1.2f, 1f), true, false, 0, false, 1.0f, 0.22f); + Particle spark2 = new VelChangingSpark(Projectile.Center + safeVel * 95 * Projectile.scale, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 10, 0.2f * Projectile.scale, (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.65f, new Vector2(1.2f, 1f), true, false, 0, false, 1.0f, 0.22f); GeneralParticleHandler.SpawnParticle(spark2); } float rot = Projectile.rotation + (MathHelper.TwoPi * i); Vector2 vel = (Utils.MoveTowards(-Projectile.velocity, new Vector2(0, -130).RotatedBy(rot).RotatedBy(-1.3f * Projectile.direction), (Utils.GetLerpValue(5, 2, Projectile.velocity.Length(), true)))); if (exitedTarget && i == 0) { - //Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel.RotatedBy(Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45)) * 60, ModContent.DustType(), dustVel * Main.rand.NextFloat(1, 4), 0, default, Main.rand.NextFloat(1.2f, 1.4f)); - //dust.noGravity = true; - //dust.color = Main.rand.NextBool() ? clr : Color.BlueViolet; - - - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + new Vector2(0, -70).RotatedBy(rot), Main.rand.NextBool(4) ? 278 : ModContent.DustType()); + Dust dust2 = Dust.NewDustPerfect(Projectile.Center + new Vector2(0, -70 * Projectile.scale).RotatedBy(rot), Main.rand.NextBool(4) ? 278 : ModContent.DustType()); dust2.noGravity = (dust2.type == 278 ? false : true); - dust2.scale = dust2.type == 278 ? 0.75f : 0.9f; + dust2.scale = (dust2.type == 278 ? 0.75f : 0.9f) * Projectile.scale; dust2.color = Main.rand.NextBool() ? Color.BlueViolet : clr; dust2.velocity = (vel * 2).RotatedByRandom(0.4f); + dust2.fadeIn = (dust2.type == 278 ? 0 : Projectile.scale - 1); } } if (Main.rand.NextBool(4)) { - Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f), Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); + Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f) * Projectile.scale, Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); GeneralParticleHandler.SpawnParticle(spark2); } } @@ -274,13 +271,14 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = new Vector2(10, 10).RotatedByRandom(Math.PI) * Main.rand.NextFloat(0.2f, 1f) * Projectile.Opacity; if (Main.rand.NextBool(4)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : clr; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 100; dust.velocity += Projectile.velocity; + dust.fadeIn = Projectile.scale - 1; } } public void ThrowAnimation(float chargeProgress) @@ -294,7 +292,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.spriteDirection = Owner.direction; Projectile.direction = Owner.direction; - Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -80f * Owner.gravDir; + Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -80f * Owner.gravDir * Projectile.scale; Projectile.rotation = (-MathHelper.PiOver4 * Projectile.direction + armRotation) * Owner.gravDir; Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation); @@ -391,7 +389,7 @@ namespace CalamityMod.Projectiles.Melee return base.CanDamage(); } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.3f : 1), targetHitbox); // After exiting a target, the hitbox is larger + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.3f : 1) * Projectile.scale, targetHitbox); // After exiting a target, the hitbox is larger public override bool PreDraw(ref Color lightColor) { Texture2D centerTexture = ModContent.Request("CalamityMod/Items/Weapons/Melee/DevilsDevastation").Value; @@ -409,9 +407,8 @@ namespace CalamityMod.Projectiles.Melee Asset p = ModContent.Request("CalamityMod/Particles/CircularSmearFire3"); Asset p2 = ModContent.Request("CalamityMod/Particles/SemiCircularSmearSwipe"); - Main.EntitySpriteDraw(p2.Value, generalDrawPos, null, clr with { A = 0 } * 0.65f, Projectile.rotation * Main.rand.NextFloat(1.6f, 1.7f), p2.Size() * 0.5f, 1.4f * Main.rand.NextFloat(0.8f, 1.15f), Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None); - Main.EntitySpriteDraw(p.Value, generalDrawPos, null, Color.MediumOrchid with { A = 0 } * 0.75f, Projectile.rotation * Main.rand.NextFloat(1.2f, 1.3f), p.Size() * 0.5f, 1.25f, Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None); - + Main.EntitySpriteDraw(p2.Value, generalDrawPos, null, clr with { A = 0 } * 0.65f * Projectile.Opacity, Projectile.rotation * Main.rand.NextFloat(1.6f, 1.7f), p2.Size() * 0.5f, 1.4f * Main.rand.NextFloat(0.8f, 1.15f) * Projectile.scale, Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None); + Main.EntitySpriteDraw(p.Value, generalDrawPos, null, Color.MediumOrchid with { A = 0 } * 0.75f * Projectile.Opacity, Projectile.rotation * Main.rand.NextFloat(1.2f, 1.3f), p.Size() * 0.5f, 1.25f * Projectile.scale, Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None); } Main.EntitySpriteDraw(centerTexture, Projectile.Center - Main.screenPosition, null, Color.Lerp(Color.BlueViolet with { A = 0 }, lightColor, Projectile.Opacity) * Projectile.Opacity, Projectile.rotation, centerTexture.Size() * 0.5f, Projectile.scale, Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally); diff --git a/Projectiles/Melee/ExaltedOathbladeHoldout.cs b/Projectiles/Melee/ExaltedOathbladeHoldout.cs index 279b825edd..f51c6b8198 100644 --- a/Projectiles/Melee/ExaltedOathbladeHoldout.cs +++ b/Projectiles/Melee/ExaltedOathbladeHoldout.cs @@ -25,13 +25,13 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/ExaltedOathblade"; - public float hitboxMult = 1.3f; - public override float HitboxOutset => 70; - - public override Vector2 HitboxSize => new Vector2(155, 155) * hitboxMult; + public int size = 88 + 20; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size - 20); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); + public override float AdditionalScale => 0.15f; - public override Vector2 SpriteOrigin => new(-3, 88); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -60,7 +60,6 @@ namespace CalamityMod.Projectiles.Melee DrawUnconditionally = true; CanHit = false; Projectile.knockBack = 0; - Projectile.scale = 1.15f; Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction mousePos = Owner.Calamity().mouseWorld; @@ -218,14 +217,15 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 4; i++) { - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(143, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f)); + Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(143 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; + dust.fadeIn = Projectile.scale - 1; } float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 8 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Vector2 placement = Owner.Center + (new Vector2(143, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); - GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/DemonSigilParticle", false, 23, Main.rand.NextFloat(0.23f, 0.36f), Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet, new Vector2(1, 1), shrinkSpeed: 0.2f)); + Vector2 placement = Owner.Center + (new Vector2(143 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); + GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/DemonSigilParticle", false, 23, Main.rand.NextFloat(0.23f, 0.36f) * Projectile.scale, Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet, new Vector2(1, 1), shrinkSpeed: 0.2f)); } } } @@ -336,7 +336,7 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.65f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.35f * hitboxMult, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.65f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.455f, SpriteEffects.None); Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), Color.Lerp(Color.MediumOrchid with { A = 0 }, lightColor, deathFade) * deathFade, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); diff --git a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs index 2e35aee3ab..b50aac643e 100644 --- a/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs +++ b/Projectiles/Melee/ExaltedOathbladeThrownBlade.cs @@ -67,6 +67,8 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + if (time == 0) + Projectile.scale = Owner.GetMeleeScale(); float playerDist = Vector2.Distance(Owner.Center, Projectile.Center); Projectile.spriteDirection = Projectile.direction; @@ -153,20 +155,21 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = exitedTarget ? safeVel.RotatedBy(MathHelper.ToRadians(-90 * Projectile.direction) + Projectile.rotation) : safeVel.RotatedBy(MathHelper.ToRadians(70 * (i == 0 ? 1 : -1))) * 6; if (!exitedTarget) { - Particle spark = new VelChangingSpark(Projectile.Center + safeVel * 75, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 9, 0.2f, (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.65f, new Vector2(1, 1f), true, false, 0, false, 1.0f, 0.2f); + Particle spark = new VelChangingSpark(Projectile.Center + safeVel * 75 * Projectile.scale, -dustVel, -Projectile.velocity, "CalamityMod/Particles/BloomCircle", 9, 0.2f * Projectile.scale, (Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet) * 0.65f, new Vector2(1, 1f), true, false, 0, false, 1.0f, 0.2f); GeneralParticleHandler.SpawnParticle(spark); } if (exitedTarget && i == 0 && Main.rand.NextBool()) { - Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel.RotatedBy(Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45)) * 45, ModContent.DustType(), dustVel * Main.rand.NextFloat(1, 4), 0, default, Main.rand.NextFloat(1.2f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel.RotatedBy(Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45)) * 45 * Projectile.scale, ModContent.DustType(), dustVel * Main.rand.NextFloat(1, 4), 0, default, Main.rand.NextFloat(1.2f, 1.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; + dust.fadeIn = Projectile.scale - 1; } } if (Main.rand.NextBool(4)) { - Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f), Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); + Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f) * Projectile.scale, Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); GeneralParticleHandler.SpawnParticle(spark2); } } @@ -196,13 +199,14 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = new Vector2(10, 10).RotatedByRandom(Math.PI) * Main.rand.NextFloat(0.2f, 1f) * Projectile.Opacity; if (Main.rand.NextBool(4)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 100; dust.velocity += Projectile.velocity; + dust.fadeIn = Projectile.scale - 1; } } public void throwAnimation() @@ -215,7 +219,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.spriteDirection = Owner.direction; Projectile.direction = Owner.direction; - Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -65f * Owner.gravDir; + Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -65f * Owner.gravDir * Projectile.scale; Projectile.rotation = (-MathHelper.PiOver4 * Projectile.direction + armRotation) * Owner.gravDir; Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation); @@ -338,7 +342,7 @@ namespace CalamityMod.Projectiles.Melee return base.CanDamage(); } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.25f : 1), targetHitbox); // After exiting a target, the hitbox is larger + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.25f : 1) * Projectile.scale, targetHitbox); // After exiting a target, the hitbox is larger public override bool PreDraw(ref Color lightColor) { Texture2D centerTexture = ModContent.Request("CalamityMod/Items/Weapons/Melee/ExaltedOathblade").Value; @@ -356,8 +360,8 @@ namespace CalamityMod.Projectiles.Melee Asset p = ModContent.Request("CalamityMod/Particles/CircularSmearSmokey"); Asset p2 = ModContent.Request("CalamityMod/Particles/SemiCircularSmearSwipe"); - Main.EntitySpriteDraw(p2.Value, generalDrawPos, null, Color.BlueViolet with { A = 0 } * 0.45f, Projectile.rotation * Main.rand.NextFloat(1.6f, 1.7f), p2.Size() * 0.5f, 1.2f * Main.rand.NextFloat(0.8f, 1.15f), SpriteEffects.None); - Main.EntitySpriteDraw(p.Value, generalDrawPos, null, Color.MediumOrchid with { A = 0 } * 0.65f, Projectile.rotation * Main.rand.NextFloat(1.2f, 1.3f), p.Size() * 0.5f, 0.95f, SpriteEffects.None); + Main.EntitySpriteDraw(p2.Value, generalDrawPos, null, Color.BlueViolet with { A = 0 } * 0.45f, Projectile.rotation * Main.rand.NextFloat(1.6f, 1.7f), p2.Size() * 0.5f, 1.2f * Main.rand.NextFloat(0.8f, 1.15f) * Projectile.scale, SpriteEffects.None); + Main.EntitySpriteDraw(p.Value, generalDrawPos, null, Color.MediumOrchid with { A = 0 } * 0.65f, Projectile.rotation * Main.rand.NextFloat(1.2f, 1.3f), p.Size() * 0.5f, 0.95f * Projectile.scale, SpriteEffects.None); } Main.EntitySpriteDraw(centerTexture, Projectile.Center - Main.screenPosition, null, Color.Lerp(Color.BlueViolet with { A = 0 }, lightColor, Projectile.Opacity) * Projectile.Opacity, Projectile.rotation, centerTexture.Size() * 0.5f, Projectile.scale, Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally); diff --git a/Projectiles/Melee/ForbiddenOathbladeHoldout.cs b/Projectiles/Melee/ForbiddenOathbladeHoldout.cs index ba2800c800..c3f9e30adc 100644 --- a/Projectiles/Melee/ForbiddenOathbladeHoldout.cs +++ b/Projectiles/Melee/ForbiddenOathbladeHoldout.cs @@ -26,13 +26,13 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/ForbiddenOathblade"; - public float hitboxMult = 1.3f; - public override float HitboxOutset => 60; - - public override Vector2 HitboxSize => new Vector2(120, 120) * hitboxMult; + public int size = 74 + 10; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size - 10); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); + public override float AdditionalScale => 0.15f; - public override Vector2 SpriteOrigin => new(-3, 74); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -62,7 +62,6 @@ namespace CalamityMod.Projectiles.Melee DrawUnconditionally = true; CanHit = false; Projectile.knockBack = 0; - Projectile.scale = 1.15f; Projectile.ai[1] = -1; bool isOwner = Main.myPlayer == Projectile.owner; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction @@ -274,13 +273,14 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 4; i++) { - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(123, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f)); + Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(113 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; + dust.fadeIn = Projectile.scale - 1; } float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 8 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Vector2 placement = Owner.Center + (new Vector2(123, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); + Vector2 placement = Owner.Center + (new Vector2(113 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); GeneralParticleHandler.SpawnParticle(new CustomSpark(placement, dustVel, "CalamityMod/Particles/DemonSigilParticle", false, 23, Main.rand.NextFloat(0.23f, 0.36f), Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet, new Vector2(1, 1), shrinkSpeed: 0.2f)); } } @@ -383,7 +383,7 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.65f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.29f * hitboxMult, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.BlueViolet with { A = 0 } * fadeIn * 0.65f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 == 0 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.377f, SpriteEffects.None); Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), Color.Lerp(Color.MediumOrchid with { A = 0 }, lightColor, deathFade) * deathFade, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); diff --git a/Projectiles/Melee/ForbiddenOathbladeThrownBlade.cs b/Projectiles/Melee/ForbiddenOathbladeThrownBlade.cs index 3f80950563..87501574ab 100644 --- a/Projectiles/Melee/ForbiddenOathbladeThrownBlade.cs +++ b/Projectiles/Melee/ForbiddenOathbladeThrownBlade.cs @@ -80,6 +80,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.myPlayer == Projectile.owner) { Vector2 toMouse = (Owner.Calamity().mouseWorld - Owner.Center).SafeNormalize(Vector2.UnitX * Owner.direction); + Projectile.scale = Owner.GetMeleeScale(); Projectile.localAI[1] = toMouse.ToRotation(); Projectile.netUpdate = true; } @@ -123,7 +124,7 @@ namespace CalamityMod.Projectiles.Melee // 15NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Vector2 toMouse = GetAimDirection(); Projectile.velocity = toMouse * 14; - Projectile.Center = Owner.MountedCenter + toMouse * 12f; + Projectile.Center = Owner.MountedCenter + toMouse * 12f * Projectile.scale; Projectile.spriteDirection = Projectile.direction; thrown = true; time = 0; @@ -197,16 +198,17 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = exitedTarget ? safeVel.RotatedBy(MathHelper.ToRadians(-90 * Projectile.direction) + Projectile.rotation) : safeVel.RotatedBy(MathHelper.ToRadians(90 * (i == 0 ? 1 : -1))).RotatedByRandom(0.1f) * Main.rand.NextFloat(3, 4); if (!exitedTarget && Main.rand.NextBool(3)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel * 60, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel * 60 * Projectile.scale, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(0.9f, 1.1f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 50; + dust.fadeIn = Projectile.scale - 1; } if (exitedTarget && i == 0) { - Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel.RotatedBy(Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45)) * 45, DustID.FireworksRGB, dustVel * Main.rand.NextFloat(1, 4), 0, default, Main.rand.NextFloat(0.4f, 0.6f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + safeVel.RotatedBy(Projectile.rotation - MathHelper.ToRadians(Projectile.direction * 45)) * 45 * Projectile.scale, DustID.FireworksRGB, dustVel * Main.rand.NextFloat(1, 4), 0, default, Main.rand.NextFloat(0.4f, 0.6f)); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; } @@ -214,7 +216,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(4)) { - Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f), Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); + Particle spark2 = new CustomSpark(Projectile.Center, -Projectile.velocity.RotatedByRandom(0.3f) * Main.rand.NextFloat(0.2f, 0.6f), "CalamityMod/Particles/DemonSigilParticle", false, 17, Main.rand.NextFloat(0.2f, 0.3f) * Projectile.scale, Color.Lerp(Color.MediumOrchid, Color.BlueViolet, Main.rand.NextFloat(0, 0.7f)) * 0.6f, new Vector2(1, 1), true, false, Main.rand.NextFloat(-1f, 1f), false, false); GeneralParticleHandler.SpawnParticle(spark2); } } @@ -252,13 +254,14 @@ namespace CalamityMod.Projectiles.Melee Vector2 dustVel = new Vector2(10, 10).RotatedByRandom(Math.PI) * Main.rand.NextFloat(0.2f, 1f) * Projectile.Opacity; if (Main.rand.NextBool(4)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(1.1f, 1.4f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.MediumOrchid : Color.BlueViolet; dust.noLight = true; dust.noLightEmittence = true; dust.alpha = 100; dust.velocity += Projectile.velocity; + dust.fadeIn = Projectile.scale - 1; } } public void throwAnimation(float chargeProgress) @@ -272,7 +275,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.spriteDirection = Owner.direction; Projectile.direction = Owner.direction; - Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -55f * Owner.gravDir; + Projectile.Center = Owner.MountedCenter + Vector2.UnitY.RotatedBy(armRotation * Owner.gravDir) * -55f * Owner.gravDir * Projectile.scale; Projectile.rotation = (-MathHelper.PiOver4 * Projectile.direction + armRotation) * Owner.gravDir; Owner.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, MathHelper.Pi + armRotation); @@ -395,7 +398,7 @@ namespace CalamityMod.Projectiles.Melee return base.CanDamage(); } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.5f : 1), targetHitbox); // After exiting a target, the hitbox is larger + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => (Projectile.numHits > 0 && !exitedTarget) ? false : CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width / (exitedTarget ? 0.5f : 1) * Projectile.scale, targetHitbox); // After exiting a target, the hitbox is larger public override bool PreDraw(ref Color lightColor) { Texture2D centerTexture = ModContent.Request("CalamityMod/Items/Weapons/Melee/ForbiddenOathblade").Value; diff --git a/Projectiles/Melee/GrandGuardianBoom.cs b/Projectiles/Melee/GrandGuardianBoom.cs index 271653a439..e3f7991409 100644 --- a/Projectiles/Melee/GrandGuardianBoom.cs +++ b/Projectiles/Melee/GrandGuardianBoom.cs @@ -28,23 +28,24 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + Projectile.scale = Projectile.ai[0]; if (mainColor == Color.White) { mainColor = Main.rand.NextBool() ? Color.Cyan : Color.DarkOrchid; - Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.45f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f, 35); + Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.45f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f * Projectile.scale, 35); GeneralParticleHandler.SpawnParticle(bolt2); - Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, (mainColor == Color.Cyan ? Color.Orchid : Color.Cyan) * 0.65f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1.26f, 15); + Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, (mainColor == Color.Cyan ? Color.Orchid : Color.Cyan) * 0.65f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1.26f * Projectile.scale, 15); GeneralParticleHandler.SpawnParticle(bolt3); for (int i = 0; i < 25; i++) { Vector2 dustVel = new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 0.8f) * 1; - Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel * 9, Main.rand.NextBool(4) ? 264 : 66, dustVel * 4, 0, default, Main.rand.NextFloat(0.8f, 1.4f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + dustVel * 9 * Projectile.scale, Main.rand.NextBool(4) ? 264 : 66, dustVel * 4, 0, default, Main.rand.NextFloat(0.8f, 1.4f)); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Lerp(mainColor, Color.White, 0.5f) : mainColor; bool color = Main.rand.NextBool(); - GenericSparkle sparker = new GenericSparkle(Projectile.Center + dustVel * 9, dustVel * 4, color ? Color.Cyan : Color.DarkOrchid, color ? Color.DarkOrchid : Color.Cyan, Main.rand.NextFloat(0.6f, 0.8f), 11, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); + GenericSparkle sparker = new GenericSparkle(Projectile.Center + dustVel * 9 * Projectile.scale, dustVel * 4, color ? Color.Cyan : Color.DarkOrchid, color ? Color.DarkOrchid : Color.Cyan, Main.rand.NextFloat(0.6f, 0.8f) * Projectile.scale, 11, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); GeneralParticleHandler.SpawnParticle(sparker); } } @@ -55,6 +56,6 @@ namespace CalamityMod.Projectiles.Melee } time++; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); } } diff --git a/Projectiles/Melee/GrandGuardianHoldout.cs b/Projectiles/Melee/GrandGuardianHoldout.cs index 6ab245f9cd..49e9347310 100644 --- a/Projectiles/Melee/GrandGuardianHoldout.cs +++ b/Projectiles/Melee/GrandGuardianHoldout.cs @@ -20,12 +20,12 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/GrandGuardian"; - public override float HitboxOutset => 112; - - public override Vector2 HitboxSize => new Vector2(180, 180); + public int size = 130 + 15; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size - 15); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(-3, 130); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -47,7 +47,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = 1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, as Grand Guardian has no projectiles @@ -151,8 +150,8 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 4; i++) { Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(particlePos, -particleVel.RotatedByRandom(0.2f), false, 19, Main.rand.NextFloat(0.5f, 1f), Main.rand.NextBool(4) ? Color.DarkOrchid : Color.DodgerBlue)); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(particlePos, -particleVel.RotatedByRandom(0.2f), false, 19, Main.rand.NextFloat(0.5f, 1f) * Projectile.scale, Main.rand.NextBool(4) ? Color.DarkOrchid : Color.DodgerBlue)); } } else @@ -171,10 +170,10 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 3; i++) { bool color = Main.rand.NextBool(); - GenericSparkle sparker = new GenericSparkle(Owner.Center + (new Vector2(198, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, color ? Color.Cyan : Color.DarkOrchid, color ? Color.DarkOrchid : Color.Cyan, Main.rand.NextFloat(0.4f, 0.6f), 10, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); + GenericSparkle sparker = new GenericSparkle(Owner.Center + (new Vector2(198 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, color ? Color.Cyan : Color.DarkOrchid, color ? Color.DarkOrchid : Color.Cyan, Main.rand.NextFloat(0.4f, 0.6f) * Projectile.scale, 10, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); GeneralParticleHandler.SpawnParticle(sparker); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(180, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2)); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(180 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2)); dust2.scale = Main.rand.NextFloat(0.55f, 0.85f); dust2.noGravity = true; dust2.color = Main.rand.NextBool() ? Color.Cyan : Color.DarkOrchid; @@ -198,7 +197,7 @@ namespace CalamityMod.Projectiles.Melee if (spawnBoom) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack * 0.5f, Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack * 0.5f, Projectile.owner, Projectile.scale); spawnBoom = false; } diff --git a/Projectiles/Melee/HellkiteHoldout.cs b/Projectiles/Melee/HellkiteHoldout.cs index f2595cf48f..25bca9e7f4 100644 --- a/Projectiles/Melee/HellkiteHoldout.cs +++ b/Projectiles/Melee/HellkiteHoldout.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Items/Weapons/Melee/Hellkite"; public override float HitboxOutset => 100; - public override Vector2 HitboxSize => new Vector2(185, 185) * Projectile.scale; + public override Vector2 HitboxSize => new Vector2(185, 185); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); public override Vector2 SpriteOrigin => new(-3, 124); @@ -55,7 +55,6 @@ namespace CalamityMod.Projectiles.Melee { CanHit = false; Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, as Hellkite has no projectiles @@ -118,7 +117,7 @@ namespace CalamityMod.Projectiles.Melee FlipAsSword = Owner.direction == -1 ? true : false; Vector2 bladePos = new Vector2(60, 0); - Vector2 particlePos = Owner.Center + (bladePos).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); + Vector2 particlePos = Owner.Center + (bladePos).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)) * Projectile.scale; if (Projectile.ai[2] == 5) { @@ -156,7 +155,7 @@ namespace CalamityMod.Projectiles.Melee } if (chargeTimer == chargeTimerMax) { - particlePos = Owner.Center + (bladePos).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); + particlePos = Owner.Center + (bladePos).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)) * Projectile.scale; SoundEngine.PlaySound(Hellkite.FullChargeSound with { Volume = 0.9f, PitchVariance = 0.2f }, Projectile.Center); chargedSwing = true; useAnim = storedUseAnim / 3; @@ -164,7 +163,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 20; i++) { - Particle spark2 = new LineParticle(particlePos, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f), false, 30, Main.rand.NextFloat(0.3f, 0.8f), Main.rand.NextBool(3) ? Color.Red : Color.OrangeRed); + Particle spark2 = new LineParticle(particlePos, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f), false, 30, Main.rand.NextFloat(0.3f, 0.8f) * Projectile.scale, Main.rand.NextBool(3) ? Color.Red : Color.OrangeRed); GeneralParticleHandler.SpawnParticle(spark2); Dust dust2 = Dust.NewDustPerfect(particlePos, DustID.RainbowMk2, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f)); dust2.scale = Main.rand.NextFloat(0.65f, 1.15f) * fadeIn; @@ -211,7 +210,6 @@ namespace CalamityMod.Projectiles.Melee postSwing = false; if (AnimationProgress == 0) { - Projectile.scale = 1; Animation = 0; doSwing = false; chargeTimer = 0; @@ -247,13 +245,13 @@ namespace CalamityMod.Projectiles.Melee CanHit = true; Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; if (chargedSwing) { for (int i = 0; i < 3; i++) { particleVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction) * Main.rand.NextFloat(0.3f, 1f)).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; GeneralParticleHandler.SpawnParticle(new AltSparkParticle(particlePos, -particleVel.RotatedByRandom(0.4f), false, 24, Main.rand.NextFloat(0.3f, 0.7f), Main.rand.NextBool(3) ? Color.OrangeRed : Color.DarkRed)); GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.4f), Main.rand.NextBool(4) ? Color.Red : Color.DarkRed, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f)); GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.4f) * 2, Main.rand.NextBool(4) ? Color.Crimson : Color.Red, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f, 0, true)); @@ -286,13 +284,13 @@ namespace CalamityMod.Projectiles.Melee { float randRot = Main.rand.NextFloat(-10, -45); Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - GeneralParticleHandler.SpawnParticle(new PointParticle(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(15, 18 + 1), Main.rand.NextFloat(0.7f, 1.2f), (Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed) * 0.8f)); + GeneralParticleHandler.SpawnParticle(new PointParticle(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), false, Main.rand.Next(15, 18 + 1), Main.rand.NextFloat(0.7f, 1.2f), (Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed) * 0.8f)); } for (int i = 0; i < 4; i++) { float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel * Main.rand.NextFloat(0.3f, 0.9f)); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel * Main.rand.NextFloat(0.3f, 0.9f)); dust2.scale = Main.rand.NextFloat(0.65f, 0.95f); dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? Color.Orange : Color.OrangeRed; @@ -304,7 +302,7 @@ namespace CalamityMod.Projectiles.Melee { float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel * Main.rand.NextFloat(0.1f, 0.5f)); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel * Main.rand.NextFloat(0.1f, 0.5f)); dust2.scale = Main.rand.NextFloat(0.55f, 0.85f); dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? Color.Orange : Color.OrangeRed; diff --git a/Projectiles/Melee/LightspeedDashHitbox.cs b/Projectiles/Melee/LightspeedDashHitbox.cs index 546b3f3247..fd26bc727a 100644 --- a/Projectiles/Melee/LightspeedDashHitbox.cs +++ b/Projectiles/Melee/LightspeedDashHitbox.cs @@ -28,7 +28,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } - + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void AI() { // Go where the player is going diff --git a/Projectiles/Melee/LightspeedHoldout.cs b/Projectiles/Melee/LightspeedHoldout.cs index 074be3fa64..4560a28a28 100644 --- a/Projectiles/Melee/LightspeedHoldout.cs +++ b/Projectiles/Melee/LightspeedHoldout.cs @@ -30,6 +30,7 @@ namespace CalamityMod.Projectiles.Melee public Vector2 innateOffset = new(23f, -0.1f); public Vector2 handPos; public float bladeRot = 0; + public float baseScale = 1; // Primary public int primaryStabfireRate => 2; @@ -148,7 +149,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.rotation -= MathHelper.TwoPi * 0.75f; } - Projectile.Center = handPos; + Projectile.Center = handPos + toMouse * Projectile.scale; Owner.heldProj = Projectile.whoAmI; Owner.itemTime = Owner.itemAnimation = 2; @@ -173,8 +174,8 @@ namespace CalamityMod.Projectiles.Melee { var player = Main.player[Projectile.owner]; var modPlayer = player.GetModPlayer(); - - Projectile.scale = 0.6f; + baseScale = MathHelper.Lerp(baseScale, player.GetMeleeScale(), 0.3f / Projectile.MaxUpdates); + Projectile.scale = baseScale; if (!Owner.channel && DashState == 0) { @@ -225,18 +226,18 @@ namespace CalamityMod.Projectiles.Melee Vector2 stabDir = toMouse.RotatedBy(offset); Vector2 stabOrigin = Projectile.Center; - Vector2 stabTip = stabOrigin + stabDir * 62f; + Vector2 stabTip = stabOrigin + stabDir * 62f * Projectile.scale; for (int i = 0; i < 4; i++) { - Vector2 spawnPos = stabTip + Main.rand.NextVector2Circular(18f, 12f); + Vector2 spawnPos = stabTip + Main.rand.NextVector2Circular(18f, 12f) * Projectile.scale; Vector2 vel = stabDir * Main.rand.NextFloat(5f, 19f); - Particle spark = new GlowSparkParticle(spawnPos, vel, false, Main.rand.Next(5, 8), Main.rand.NextFloat(0.02f, 0.07f), Color.Lerp(Color.Aqua, Color.OrangeRed, Main.rand.NextFloat(1f)) * 0.55f, new Vector2(Main.rand.NextFloat(0.475f, 0.535f), Main.rand.NextFloat(1.2f, 1.3f)), true, false); + Particle spark = new GlowSparkParticle(spawnPos, vel, false, Main.rand.Next(5, 8), Projectile.scale * Main.rand.NextFloat(0.02f, 0.07f), Color.Lerp(Color.Aqua, Color.OrangeRed, Main.rand.NextFloat(1f)) * 0.55f, new Vector2(Main.rand.NextFloat(0.475f, 0.535f), Main.rand.NextFloat(1.2f, 1.3f)), true, false); GeneralParticleHandler.SpawnParticle(spark); } - Particle afterImage = new CustomSpark(Projectile.Center + (stabDir * 10f) + Main.rand.NextVector2Circular(4f, 11f), (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(), new("CalamityMod/Items/Weapons/Melee/Lightspeed"), false, Main.rand.Next(5,9), Projectile.scale * Main.rand.NextFloat(0.9f, 1.02f), Color.White * Main.rand.NextFloat(0.66f, 0.825f), new Vector2(1, 1), true, false, flipHorizontal: Owner.direction == -1 ? true : false); + Particle afterImage = new CustomSpark(Projectile.Center + (stabDir * 10f) + Main.rand.NextVector2Circular(4f, 11f), (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(), new("CalamityMod/Items/Weapons/Melee/Lightspeed"), false, Main.rand.Next(5,9), 0.6f * Main.rand.NextFloat(0.9f, 1.02f), Color.White * Main.rand.NextFloat(0.66f, 0.825f), new Vector2(1, 1), true, false, flipHorizontal: Owner.direction == -1 ? true : false); GeneralParticleHandler.SpawnParticle(afterImage); // Make blade randomly vibrate @@ -260,7 +261,8 @@ namespace CalamityMod.Projectiles.Melee } // Spawn the hitbox - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.MountedCenter + toMouse * 20 * (float)Math.Pow(Projectile.scale, 4), toMouse * 25, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + Projectile attack = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.MountedCenter + toMouse * 20 * Projectile.scale, toMouse, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + attack.scale = Projectile.scale; } private void UseSecondary() @@ -276,7 +278,7 @@ namespace CalamityMod.Projectiles.Melee Owner.heldProj = Projectile.whoAmI; Owner.itemTime = Owner.itemAnimation = 2; - Projectile.scale = 0.6f; + Projectile.scale = baseScale * 0.6f; if (!firstSecondaryIteration) { @@ -354,7 +356,8 @@ namespace CalamityMod.Projectiles.Melee for (int k = 0; k < Owner.hurtCooldowns.Length; k++) Owner.hurtCooldowns[k] = Owner.immuneTime; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.MountedCenter, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage * 24, Projectile.knockBack * 4, Projectile.owner); + Projectile dash = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.MountedCenter, Projectile.velocity, ModContent.ProjectileType(), Projectile.damage * 24, Projectile.knockBack * 4, Projectile.owner); + dash.scale = Projectile.scale; } } @@ -369,7 +372,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.velocity *= DashAcceleration; - Projectile.scale = MathHelper.Lerp(1f, 0.4f, MathF.Pow(1f - DashTimer / DashDuration, 5)); + Projectile.scale = baseScale * MathHelper.Lerp(1f, 0.4f, MathF.Pow(1f - DashTimer / DashDuration, 5)); Owner.heldProj = Projectile.whoAmI; Owner.itemTime = Owner.itemAnimation = 2; @@ -403,7 +406,7 @@ namespace CalamityMod.Projectiles.Melee SpriteEffects spriteEffects = Owner.direction == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally; lightColor = Color.White; // Fullbright - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, lightColor * Projectile.Opacity, Projectile.rotation, origin, Projectile.scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, lightColor * Projectile.Opacity, Projectile.rotation, origin, 0.6f, spriteEffects, 0); DrawPierceTrail(); @@ -443,7 +446,7 @@ namespace CalamityMod.Projectiles.Melee { DashState = 0; DashTimer = 0; - Projectile.scale = 0.6f; + Projectile.scale = baseScale * 0.6f; } } } diff --git a/Projectiles/Melee/LightspeedM1Hitbox.cs b/Projectiles/Melee/LightspeedM1Hitbox.cs index 3e27b0a648..aad114d70e 100644 --- a/Projectiles/Melee/LightspeedM1Hitbox.cs +++ b/Projectiles/Melee/LightspeedM1Hitbox.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = 84; - Projectile.height = 64; + Projectile.width = 25; + Projectile.height = 25; Projectile.friendly = true; Projectile.penetrate = -1; Projectile.tileCollide = false; @@ -31,7 +31,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 4; } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = float.NaN; + float hitboxSize = Projectile.width * Projectile.scale; + Vector2 vel = Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10; + Vector2 start = (Projectile.timeLeft == 6 ? Main.player[Projectile.owner].Center : Projectile.Center - vel); + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, Projectile.Center + vel, hitboxSize * Projectile.scale, ref _); + } public override void AI() { Vector2 toMouse = Utils.DirectionTo(Owner.Center, Owner.ClampedMouseWorld() + MathHelper.Pi.ToRotationVector2()); @@ -39,7 +47,7 @@ namespace CalamityMod.Projectiles.Melee float rotation = toMouse.ToRotation(); Projectile.rotation = rotation; - Projectile.velocity = toMouse * 34; + Projectile.velocity = toMouse * 34 * Projectile.scale; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Melee/LucreciaBolt.cs b/Projectiles/Melee/LucreciaBolt.cs index 44d4c3f279..7c08cf0be9 100644 --- a/Projectiles/Melee/LucreciaBolt.cs +++ b/Projectiles/Melee/LucreciaBolt.cs @@ -46,7 +46,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 12; } - + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.ai[2]; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void AI() { // Little bit of ambient lighting as it travels @@ -54,7 +58,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.rotation = Projectile.velocity.ToRotation(); Projectile.velocity *= 1.01f; - Projectile.scale = Utils.GetLerpValue(0f, 0.1f, Projectile.timeLeft / 600f, true); + Projectile.scale = Utils.GetLerpValue(0f, 0.1f, Projectile.timeLeft / 600f, true) * Projectile.ai[2]; if (Projectile.FinalExtraUpdate()) Time++; @@ -103,7 +107,9 @@ namespace CalamityMod.Projectiles.Melee public float TrailWidth(float completionRatio, Vector2 vertexPos) { - float width = Utils.GetLerpValue(1f, 0.4f, completionRatio, true) * (float)Math.Sin(Math.Acos(1 - Utils.GetLerpValue(0f, 0.08f, completionRatio, true))); + float sine = MathF.Sin(Main.GlobalTimeWrappedHourly * 9 - completionRatio * 6); + float newSine = 0.7f - sine * 0.3f; + float width = newSine * (completionRatio < 0.4f ? 1 - MathF.Pow(Utils.GetLerpValue(0.4f, 0f, completionRatio, true), 3) : Utils.GetLerpValue(1f, 0.4f, completionRatio, true)) * (float)Math.Sin(Math.Acos(1 - Utils.GetLerpValue(0f, 0.08f, completionRatio, true))) * MathF.Pow(Projectile.ai[2], 0.4f); width *= Utils.GetLerpValue(0f, 0.1f, Projectile.timeLeft / 600f, true); @@ -123,7 +129,7 @@ namespace CalamityMod.Projectiles.Melee return baseColor * Projectile.Opacity; } - public float MiniTrailWidth(float completionRatio, Vector2 vertexPos) => TrailWidth(completionRatio, vertexPos) * 5.5f; + public float MiniTrailWidth(float completionRatio, Vector2 vertexPos) => TrailWidth(completionRatio, vertexPos) * 5.5f * Projectile.ai[2]; public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/LucreciaDNATrailCreator.cs b/Projectiles/Melee/LucreciaDNATrailCreator.cs index 09f3bb6b96..6c44e8285d 100644 --- a/Projectiles/Melee/LucreciaDNATrailCreator.cs +++ b/Projectiles/Melee/LucreciaDNATrailCreator.cs @@ -34,7 +34,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.alpha = 255; } - + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void AI() { Player owner = Main.player[Projectile.owner]; @@ -70,9 +74,9 @@ namespace CalamityMod.Projectiles.Melee middleStreakTimer = 6; // Spawn the main trail - Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.24f, Color.MediumPurple * 1.3f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.25f, glowOpacity: 0.4f); + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.24f * Projectile.scale, Color.MediumPurple * 1.3f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.25f, glowOpacity: 0.4f); GeneralParticleHandler.SpawnParticle(spark); - Particle spark2 = new CustomSpark(Projectile.Center + perpendicular, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.24f, Color.CornflowerBlue * 1.3f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.25f, glowOpacity: 0.4f); + Particle spark2 = new CustomSpark(Projectile.Center + perpendicular, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.24f * Projectile.scale, Color.CornflowerBlue * 1.3f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.25f, glowOpacity: 0.4f); GeneralParticleHandler.SpawnParticle(spark2); } @@ -83,8 +87,8 @@ namespace CalamityMod.Projectiles.Melee Vector2 purpleTrailOrigin = Projectile.Center + offsetLeft; Vector2 blueTrailOrigin = Projectile.Center + offsetRight; - Particle purpleLightEmission = new SquishyLightParticle(purpleTrailOrigin, -Projectile.velocity.RotatedByRandom(MathHelper.PiOver4 * 0.5f) * Main.rand.NextFloat(2f, 4f), Main.rand.NextFloat(0.3f, 0.6f), Color.MediumPurple, Main.rand.Next(18, 46), 1, 1.5f); - Particle blueLightEmission = new SquishyLightParticle(blueTrailOrigin, -Projectile.velocity.RotatedByRandom(MathHelper.PiOver4 * 0.5f) * Main.rand.NextFloat(2f, 4f), Main.rand.NextFloat(0.3f, 0.6f), Color.CornflowerBlue, Main.rand.Next(18, 46), 1, 1.5f); + Particle purpleLightEmission = new SquishyLightParticle(purpleTrailOrigin, -Projectile.velocity.RotatedByRandom(MathHelper.PiOver4 * 0.5f) * Main.rand.NextFloat(2f, 4f), Main.rand.NextFloat(0.3f, 0.6f) * Projectile.scale, Color.MediumPurple, Main.rand.Next(18, 46), 1, 1.5f); + Particle blueLightEmission = new SquishyLightParticle(blueTrailOrigin, -Projectile.velocity.RotatedByRandom(MathHelper.PiOver4 * 0.5f) * Main.rand.NextFloat(2f, 4f), Main.rand.NextFloat(0.3f, 0.6f) * Projectile.scale, Color.CornflowerBlue, Main.rand.Next(18, 46), 1, 1.5f); GeneralParticleHandler.SpawnParticle(blueLightEmission); GeneralParticleHandler.SpawnParticle(purpleLightEmission); @@ -100,7 +104,7 @@ namespace CalamityMod.Projectiles.Melee private float WidthFunction(float completionRatio, Vector2 vertexPos) { - return MathHelper.Lerp(12f, 0f, completionRatio); + return MathHelper.Lerp(12f * Projectile.scale, 0f, completionRatio); } @@ -126,8 +130,8 @@ namespace CalamityMod.Projectiles.Melee trailShader.SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); // Use the separate color functions for each trail - PrimitiveRenderer.RenderTrail(oldPositionsLeft, new PrimitiveSettings(WidthFunction, LeftColorFunction, (_,_) => Projectile.Size * 1f, pixelate: false, shader: trailShader)); - PrimitiveRenderer.RenderTrail(oldPositionsRight, new PrimitiveSettings(WidthFunction, RightColorFunction, (_,_) => Projectile.Size * 1f, pixelate: false, shader: trailShader)); + PrimitiveRenderer.RenderTrail(oldPositionsLeft, new PrimitiveSettings(WidthFunction, LeftColorFunction, (_,_) => Projectile.Size, pixelate: false, shader: trailShader)); + PrimitiveRenderer.RenderTrail(oldPositionsRight, new PrimitiveSettings(WidthFunction, RightColorFunction, (_,_) => Projectile.Size, pixelate: false, shader: trailShader)); return false; } } diff --git a/Projectiles/Melee/LucreciaHoldout.cs b/Projectiles/Melee/LucreciaHoldout.cs index 222b21699d..b4e2e1d4e5 100644 --- a/Projectiles/Melee/LucreciaHoldout.cs +++ b/Projectiles/Melee/LucreciaHoldout.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee public override int CooldownTime { get; set; } public override int swingTime { get; set; } public override bool AlternateSwings { get => base.AlternateSwings; set => base.AlternateSwings = value; } - public override float lineCollisionLength => 225; + public override float lineCollisionLength => 155; public bool helixFired = false; public bool gotEnergyThisSwing = false; @@ -50,7 +50,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.noEnchantmentVisuals = true; Projectile.Opacity = 0.2f; // Starting point, fades in quickly upon startup Projectile.width = Projectile.height = 54; - Projectile.scale = 1.25f; } public override void Spawn() @@ -107,6 +106,7 @@ namespace CalamityMod.Projectiles.Melee { Player player = Main.player[Projectile.owner]; var modplayer = player.GetModPlayer(); + baseScale = MathHelper.Lerp(baseScale, player.GetMeleeScale() + 0.25f, 0.3f / Projectile.MaxUpdates); if (IsAlternateThrust) { @@ -128,7 +128,7 @@ namespace CalamityMod.Projectiles.Melee if (timer % 8 == 0) { Vector2 pos = player.MountedCenter + Projectile.rotation.ToRotationVector2() * 60f; - Particle sparkle = new CritSpark(pos, new Vector2(7f, 0).RotatedBy(Projectile.rotation), Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f, 12, 0.3f, 1.2f); + Particle sparkle = new CritSpark(pos, new Vector2(7f, 0).RotatedBy(Projectile.rotation), Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(1f)), Color.White * 0.33f, 1.2f * Projectile.scale, 12, 0.3f, 1.2f); GeneralParticleHandler.SpawnParticle(sparkle); } Particle smear = new CircularSmearVFX(player.MountedCenter, Color.CornflowerBlue * 0.35f, Projectile.rotation, Projectile.scale * 1.25f); @@ -185,8 +185,10 @@ namespace CalamityMod.Projectiles.Melee if (!trailFXTriggered) { if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.Center, fireDirection * 5, ModContent.ProjectileType(), Projectile.damage * 7, Projectile.knockBack, Projectile.owner, 0f, 0f); - + { + Projectile attack = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), player.Center, fireDirection * 5, ModContent.ProjectileType(), Projectile.damage * 7, Projectile.knockBack, Projectile.owner, 0f, 0f); + attack.scale = baseScale; + } SoundStyle swish = new("CalamityMod/Sounds/Custom/MeatySlash"); SoundEngine.PlaySound(swish with { Volume = 0.3f, Pitch = Main.rand.NextFloat(0.1f, 0.2f) }, Projectile.Center); @@ -203,7 +205,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 particleOrigin = Projectile.Center; Vector2 particleSpeed = fireDirection.RotatedByRandom(MathHelper.ToRadians(46f)) * Main.rand.NextFloat(20f, 37f); - Particle sparks = new CritSpark(particleOrigin, particleSpeed, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(0f, 1f)), Color.NavajoWhite * 0.7f, Main.rand.NextFloat(0.9f, 2f), Main.rand.Next(38, 50), 0.1f, 1.5f, hueShift: 0.01f); + Particle sparks = new CritSpark(particleOrigin, particleSpeed, Color.Lerp(Color.CornflowerBlue, Color.MediumPurple, Main.rand.NextFloat(0f, 1f)), Color.NavajoWhite * 0.7f, Main.rand.NextFloat(0.9f, 2f) * Projectile.scale, Main.rand.Next(38, 50), 0.1f, 1.5f, hueShift: 0.01f); GeneralParticleHandler.SpawnParticle(sparks); } particlesSpawned = true; @@ -240,14 +242,15 @@ namespace CalamityMod.Projectiles.Melee Vector2 shootDir = player.MountedCenter.DirectionTo(mousePosition) * 10f; int dir = -Math.Sign(mousePosition.X); float scale = lineCollisionLength / 550f; - Particle swipe = new CustomSpark(player.MountedCenter - shootDir * 4, shootDir.RotatedBy(0.075f * (dir * (modplayer.swingNum % 2 == 0 ? 1 : -1))) * 1.22f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), scale, modplayer.swingNum % 2 == 0 ? Color.CornflowerBlue * 0.85f : Color.MediumPurple * 0.8f, new Vector2(1.1f, 1.3f), true, false, 0, false, false); + Particle swipe = new CustomSpark(player.MountedCenter - shootDir * 4 * Projectile.scale, shootDir.RotatedBy(0.075f * (dir * (modplayer.swingNum % 2 == 0 ? 1 : -1))) * 1.22f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), scale * Projectile.scale, modplayer.swingNum % 2 == 0 ? Color.CornflowerBlue * 0.85f : Color.MediumPurple * 0.8f, new Vector2(1.1f, 1.3f), true, false, 0, false, false); GeneralParticleHandler.SpawnParticle(swipe); var fireDirection = Vector2.Normalize(mousePosition - player.MountedCenter); var helixSpeed = 12f; var helixVelocity = fireDirection * helixSpeed; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), player.MountedCenter + fireDirection * 3, helixVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - + Projectile attack = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), player.MountedCenter + fireDirection * 3, helixVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + attack.ai[2] = Projectile.scale; + SoundStyle projectile = new("CalamityMod/Sounds/Item/LucreciaBoltFire"); SoundEngine.PlaySound(projectile with { Volume = 0.8f, Pitch = Main.rand.NextFloat(-0.06f, 0.1f) }, Projectile.Center); } diff --git a/Projectiles/Melee/MajesticGuardHoldout.cs b/Projectiles/Melee/MajesticGuardHoldout.cs index b10a3a2a49..03e7ec6d95 100644 --- a/Projectiles/Melee/MajesticGuardHoldout.cs +++ b/Projectiles/Melee/MajesticGuardHoldout.cs @@ -20,12 +20,11 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/MajesticGuard"; - public override float HitboxOutset => 105; - - public override Vector2 HitboxSize => new Vector2(140, 140); + public int size = 100 + 10; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size - 10); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(-5, 100); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -46,7 +45,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = 1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, as Majestic Guard has no projectiles @@ -148,8 +146,8 @@ namespace CalamityMod.Projectiles.Melee CanHit = true; Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - GeneralParticleHandler.SpawnParticle(new AltLineParticle(particlePos, -particleVel.RotatedByRandom(0.2f), false, 19, Main.rand.NextFloat(0.3f, 0.7f), Main.rand.NextBool(3) ? Color.Silver : Color.Goldenrod)); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + GeneralParticleHandler.SpawnParticle(new AltLineParticle(particlePos, -particleVel.RotatedByRandom(0.2f), false, 19, Main.rand.NextFloat(0.3f, 0.7f) * Projectile.scale, Main.rand.NextBool(3) ? Color.Silver : Color.Goldenrod)); } else CanHit = false; @@ -166,7 +164,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 2; i++) { - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(150, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2)); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(150 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 2)); dust2.scale = Main.rand.NextFloat(0.55f, 0.85f); dust2.noGravity = true; dust2.color = Main.rand.NextBool() ? Color.Silver : Color.Gold; diff --git a/Projectiles/Melee/MantisClawHoldout.cs b/Projectiles/Melee/MantisClawHoldout.cs index 72d110327a..f0ed376d31 100644 --- a/Projectiles/Melee/MantisClawHoldout.cs +++ b/Projectiles/Melee/MantisClawHoldout.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Projectiles.Melee public override Vector2 SpriteOrigin => new(0, 20); public override int AssignedItemID => ModContent.ItemType(); + public override bool IgnoreAutoScale => true; public float ClawOpenness = MathHelper.ToRadians(80); public float BubbleSize = 0f; @@ -39,6 +40,8 @@ namespace CalamityMod.Projectiles.Melee } public override void ResetStyle() { + if (Projectile.scale < 0.8f && m2KillTimer <= 0) + Projectile.active = false; if (AnimationCooldown) { if (NumberOfAnimations % 5 <= BlastChargeUses) @@ -137,6 +140,7 @@ namespace CalamityMod.Projectiles.Melee // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Projectile slash = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, Owner.DirectionTo(Owner.Calamity().mouseWorld) * 6f, ModContent.ProjectileType(), Projectile.damage, 2f, Owner.whoAmI); slash.rotation = Owner.AngleTo(Owner.Calamity().mouseWorld) + MathHelper.ToRadians(Main.rand.NextFloat(-25, 25)); + slash.localAI[0] = Owner.GetMeleeScale(); } SlashTimer++; diff --git a/Projectiles/Melee/MantisClawSlash.cs b/Projectiles/Melee/MantisClawSlash.cs index a0783efbce..a89a09ccf7 100644 --- a/Projectiles/Melee/MantisClawSlash.cs +++ b/Projectiles/Melee/MantisClawSlash.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -14,6 +15,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Particles/SlashSmear"; + public float maxScale = 0; private const int TimerCap = 20; Color startColor; Color endColor; @@ -35,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnSpawn(IEntitySource source) { Projectile.scale = 0f; + Projectile.ai[2] = Main.rand.NextFloat(0.5f, 1.25f); if (Main.rand.NextBool(2)) dir = -1; @@ -53,14 +56,21 @@ namespace CalamityMod.Projectiles.Melee startColor = ColorList[Main.rand.Next(ColorList.Count)]; endColor = ColorList[Main.rand.Next(ColorList.Count)]; } - - public override void ModifyDamageHitbox(ref Rectangle hitbox) + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - hitbox = new Rectangle((int)Projectile.Center.X - 65, (int)Projectile.Center.Y - 65, 130, 130); + int size = 60; + int scale = (int)(size * Math.Max(Projectile.ai[2], 1)); + Vector2 position = Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.Zero) * size / 2; + return CalamityUtils.CircularHitboxCollision(position, scale, targetHitbox); } public override void AI() { + if (maxScale == 0) + { + maxScale = Projectile.localAI[0]; + Projectile.ai[2] *= maxScale; + } Projectile.velocity *= 0.9f; if (Projectile.timeLeft > (TimerCap / 2)) @@ -88,7 +98,7 @@ namespace CalamityMod.Projectiles.Melee for (float i = 0; i < 1; i += 0.33f) { Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, tex.Frame(), Color.Lerp(startColor, endColor, Projectile.ai[1] / TimerCap).MultiplyRGBA(new Color(255, 255, 255, 0f)), - Projectile.rotation - (dir == -1 ? MathHelper.ToRadians(-135f) : MathHelper.ToRadians(180f)) + Projectile.ai[0], tex.Size() / 2, MathHelper.Lerp(0.6f, 1f, i) * Projectile.scale, dir == 1 ? SpriteEffects.None : SpriteEffects.FlipVertically); + Projectile.rotation - (dir == -1 ? MathHelper.ToRadians(-135f) : MathHelper.ToRadians(180f)) + Projectile.ai[0], tex.Size() / 2, MathHelper.Lerp(0.6f, 1f, i) * Math.Min(Projectile.scale, maxScale), dir == 1 ? SpriteEffects.None : SpriteEffects.FlipVertically); } return false; } diff --git a/Projectiles/Melee/OldLordClaymoreHoldout.cs b/Projectiles/Melee/OldLordClaymoreHoldout.cs index cf3264b909..71afbafc72 100644 --- a/Projectiles/Melee/OldLordClaymoreHoldout.cs +++ b/Projectiles/Melee/OldLordClaymoreHoldout.cs @@ -22,13 +22,12 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/OldLordClaymore"; - public float hitboxMult = 1.3f; - public override float HitboxOutset => 60; - - public override Vector2 HitboxSize => new Vector2(105, 105) * hitboxMult; + public int size = 76; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(-3, 70); + public override float AdditionalScale => 0.2f; public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -50,7 +49,6 @@ namespace CalamityMod.Projectiles.Melee { CanHit = false; Projectile.knockBack = 0; - Projectile.scale = 1.15f; // Needs to be slightly bigger for viablility Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction mousePos = Owner.Calamity().mouseWorld; @@ -167,14 +165,15 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 4; i++) { - Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(115, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f)); + Dust dust = Dust.NewDustPerfect(Owner.Center + (new Vector2(95 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), Vector2.One.RotatedByRandom(MathHelper.Pi) * 0.6f, 0, default, Main.rand.NextFloat(1.15f, 1.5f) * Projectile.scale); dust.noGravity = true; dust.color = Main.rand.NextBool() ? Color.Orange :Color.OrangeRed; + dust.fadeIn = Projectile.scale - 1; } float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 8 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Owner.Center + (new Vector2(115, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), dustVel, false, 23, Main.rand.NextFloat(0.4f, 0.8f), Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Owner.Center + (new Vector2(95 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), dustVel, false, 23, Main.rand.NextFloat(0.4f, 0.8f), Main.rand.NextBool(4) ? Color.Orange : Color.OrangeRed)); } } } @@ -247,8 +246,7 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), auraColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } - //Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.Orange with { A = 0 } * (float)Math.Pow(fadeIn, 20) * 0.2f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(-Projectile.ai[1] * 95 * fadeIn) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.33f * hitboxMult, SpriteEffects.None); - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.OrangeRed with { A = 0 } * fadeIn * 0.5f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(Projectile.ai[1] == 1 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.25f * hitboxMult, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, Color.OrangeRed with { A = 0 } * fadeIn * 0.5f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(Projectile.ai[1] == 1 ? -70 : 70) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.325f, SpriteEffects.None); Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), lightColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); diff --git a/Projectiles/Melee/StellarStrikerHoldout.cs b/Projectiles/Melee/StellarStrikerHoldout.cs index d06ba14221..75277743b9 100644 --- a/Projectiles/Melee/StellarStrikerHoldout.cs +++ b/Projectiles/Melee/StellarStrikerHoldout.cs @@ -22,12 +22,11 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/StellarStriker"; - public override float HitboxOutset => 90; - - public override Vector2 HitboxSize => new Vector2(130, 130); + public int size = 118; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(0, 118); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -47,7 +46,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, it does not influence Stellar Striker's projectile spawning @@ -161,24 +159,24 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 3; i++) { Vector2 particleVel = new Vector2(0, 3 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 130), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - Particle orb = new CustomPulse(particlePos, -particleVel * Main.rand.NextFloat(1.1f, 3.2f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, "CalamityMod/Particles/Sparkle", new Vector2(2f, 1f), particleVel.ToRotation(), Main.rand.NextFloat(0.4f, 1.1f), 0.2f, 23); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 130), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + Particle orb = new CustomPulse(particlePos, -particleVel * Main.rand.NextFloat(1.1f, 3.2f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, "CalamityMod/Particles/Sparkle", new Vector2(2f, 1f), particleVel.ToRotation(), Main.rand.NextFloat(0.4f, 1.1f) * Projectile.scale, 0.2f, 23); GeneralParticleHandler.SpawnParticle(orb); } for (int i = 0; i < 4; i++) { float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Particle spark2 = new GlowSparkParticle(Owner.Center + (new Vector2(140, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.4f)), -dustVel, false, 20, Main.rand.NextFloat(0.007f, 0.012f), Color.Turquoise, new Vector2(1.3f, 0.5f), true, false, Main.rand.NextFloat(0.5f, 0.7f)); + Particle spark2 = new GlowSparkParticle(Owner.Center + (new Vector2(140 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.4f)), -dustVel, false, 20, Main.rand.NextFloat(0.007f, 0.012f) * Projectile.scale, Color.Turquoise, new Vector2(1.3f, 0.5f), true, false, Main.rand.NextFloat(0.5f, 0.7f)); GeneralParticleHandler.SpawnParticle(spark2); } } else if (Main.rand.NextBool(3)) { Vector2 particleVel = new Vector2(0, 3 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 130), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(5, 130), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; - Particle orb = new CustomPulse(particlePos, particleVel * Main.rand.NextFloat(0.8f, 1.2f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, "CalamityMod/Particles/HealingPlus", new Vector2(1f, 1f), Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(0.8f, 1.2f), 0.2f, 23); + Particle orb = new CustomPulse(particlePos, particleVel * Main.rand.NextFloat(0.8f, 1.2f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, "CalamityMod/Particles/HealingPlus", new Vector2(1f, 1f), Main.rand.NextFloat(-2, 2), Main.rand.NextFloat(0.8f, 1.2f) * Projectile.scale, 0.2f, 23); GeneralParticleHandler.SpawnParticle(orb); //GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, 23, Main.rand.NextFloat(0.2f, 0.6f), 0.65f, 0, true)); @@ -220,7 +218,8 @@ namespace CalamityMod.Projectiles.Melee if (spawnBoom) { Vector2 spawnSpot = target.Center + new Vector2(Main.rand.NextFloat(-550, 550), Main.rand.NextFloat(-750, -950)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), Projectile.knockBack, Projectile.owner, 0, 0, 7); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.5f), Projectile.knockBack, Projectile.owner, 0, 0, 7); + meteor.scale = Projectile.scale; spawnBoom = false; } diff --git a/Projectiles/Melee/StellarStrikerMeteor.cs b/Projectiles/Melee/StellarStrikerMeteor.cs index 0cfc50fec9..e187bb142b 100644 --- a/Projectiles/Melee/StellarStrikerMeteor.cs +++ b/Projectiles/Melee/StellarStrikerMeteor.cs @@ -1,5 +1,6 @@ using System; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -67,28 +68,25 @@ namespace CalamityMod.Projectiles.Melee if (targetDist < 1400f) { - if (time % 11 == 0) - { - GlowSparkParticle orb = new(Projectile.Center + Main.rand.NextVector2Circular(20, 20), -Projectile.velocity * 2, false, 11, 0.03f, mainColor * Main.rand.NextFloat(0.7f, 1), new Vector2(1f, 1f), true, false, 0.6f); - GeneralParticleHandler.SpawnParticle(orb); - } if (time % 4 == 0) { - GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Projectile.Center, -Projectile.velocity * Main.rand.NextFloat(0.2f, 1.5f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, 6, Main.rand.NextFloat(0.3f, 0.7f), 0.65f, 0, true)); + GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(Projectile.Center, -Projectile.velocity * Main.rand.NextFloat(0.2f, 1.5f), Main.rand.NextBool(4) ? Color.PaleTurquoise : Color.Turquoise, 6, Main.rand.NextFloat(0.3f, 0.7f) * Projectile.scale, 0.65f, 0, true)); } } - if (time % 2 == 0) - { - // Spawn in a helix-style pattern - float sine = (float)Math.Sin(Projectile.timeLeft * 0.575f / MathHelper.Pi); + + // Spawn in a helix-style pattern + float sine = (float)Math.Sin(Projectile.timeLeft * 0.575f / MathHelper.Pi); - Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * wavePower; + Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * wavePower; - Dust dust = Dust.NewDustPerfect(Projectile.Center + offset * direction, DustID.RainbowMk2, -Projectile.velocity * Main.rand.NextFloat(0.2f, 0.3f)); - dust.scale = Main.rand.NextFloat(0.85f, 0.95f); - dust.noGravity = true; - dust.color = Main.rand.NextBool(3) ? Color.PaleTurquoise : Color.Turquoise; - } + Dust dust = Dust.NewDustPerfect(Projectile.Center - Projectile.velocity * 2, ModContent.DustType(), (Projectile.timeLeft % 2 == 0 ? -Projectile.velocity * 2 : offset * direction * 0.5f)); + dust.scale = Main.rand.NextFloat(1.15f, 1.25f) * Projectile.scale; + dust.noGravity = true; + dust.color = Main.rand.NextBool(3) ? Color.PaleTurquoise : Color.Turquoise; + dust.fadeIn = Projectile.scale * 1.25f; + dust.noLight = true; + dust.noLightEmittence = true; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; time++; @@ -97,7 +95,8 @@ namespace CalamityMod.Projectiles.Melee { spawnMet = false; Vector2 spawnSpot = Owner.Center + new Vector2(Main.rand.NextFloat(-550, 550), Main.rand.NextFloat(-750, -950)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 0, Projectile.ai[2] - 1); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 0, Projectile.ai[2] - 1); + meteor.scale = Projectile.scale; } } @@ -106,6 +105,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], Color.White, 1, tex); + CalamityUtils.DrawProjectileWithBackglow(Projectile, Color.Turquoise with { A = 0 }, lightColor, 4 * Projectile.scale); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) @@ -138,7 +138,7 @@ namespace CalamityMod.Projectiles.Melee } for (int i = 0; i < 6; i++) { - Particle spark3 = new SparkParticle(Projectile.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 14), false, 20, Main.rand.NextFloat(0.3f, 0.8f), Main.rand.NextBool(5) ? Color.PaleTurquoise : Color.Turquoise); + Particle spark3 = new SparkParticle(Projectile.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(3.5f, 14), false, 20, Main.rand.NextFloat(0.3f, 0.8f) * Projectile.scale, Main.rand.NextBool(5) ? Color.PaleTurquoise : Color.Turquoise); GeneralParticleHandler.SpawnParticle(spark3); } for (int i = 0; i < 18; i++) @@ -149,10 +149,13 @@ namespace CalamityMod.Projectiles.Melee c.noGravity = true; c.color = Main.rand.NextBool(3) ? Color.PaleTurquoise : Color.Turquoise; } - Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2f, 1f, 25, true); - GeneralParticleHandler.SpawnParticle(blastRing); - Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1f, 0.3f, 25, true); - GeneralParticleHandler.SpawnParticle(blastRing2); + if (!CalamityClientConfig.Instance.Photosensitivity) + { + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2f * Projectile.scale, 1f * Projectile.scale, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * 0.7f, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 1f * Projectile.scale, 0.3f * Projectile.scale, 25, true); + GeneralParticleHandler.SpawnParticle(blastRing2); + } } public override bool? CanCutTiles() => false; } diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 0db89dd408..5f3a83f5e5 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -147,7 +147,8 @@ namespace CalamityMod // Xyk 3MARCH2026: Will be implemented better by Doze eventually if (addHeldItemScale) baseScale += (player.HeldItem.scale - 1); - + if (player.kbGlove) + baseScale += 1;//REMOVE after testing is complete if (player.HasBuff(BuffID.Tipsy)) baseScale += 0.15f; From c9be847590b9c10b36de2b2d6cf6ecc23d90b088 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sat, 21 Mar 2026 15:43:33 -0700 Subject: [PATCH 032/126] Omnigun (flavor text is placeholder) --- Gores/OmniARCasing.png | Bin 0 -> 155 bytes Gores/OmniGrenadeShell.png | Bin 0 -> 203 bytes Gores/OmniShotgunShell.png | Bin 0 -> 163 bytes Gores/OmniSniperCasing.png | Bin 0 -> 152 bytes Items/Weapons/Ranged/OmniGun.cs | 51 ++++ Items/Weapons/Ranged/OmniGun.png | Bin 0 -> 962 bytes ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 14 ++ .../Mods.CalamityMod.Projectiles.Ranged.hjson | 3 + Projectiles/Ranged/OmniGrenade.cs | 107 +++++++++ Projectiles/Ranged/OmniGrenade.png | Bin 0 -> 259 bytes Projectiles/Ranged/OmniGunHoldout.cs | 220 ++++++++++++++++++ Projectiles/Ranged/OmniShotgunShot.cs | 63 +++++ Projectiles/Ranged/OmniShotgunShot.png | Bin 0 -> 140 bytes Projectiles/Ranged/OmniSniperShot.cs | 110 +++++++++ Projectiles/Ranged/OmniSniperShot.png | Bin 0 -> 153 bytes 15 files changed, 568 insertions(+) create mode 100644 Gores/OmniARCasing.png create mode 100644 Gores/OmniGrenadeShell.png create mode 100644 Gores/OmniShotgunShell.png create mode 100644 Gores/OmniSniperCasing.png create mode 100644 Items/Weapons/Ranged/OmniGun.cs create mode 100644 Items/Weapons/Ranged/OmniGun.png create mode 100644 Projectiles/Ranged/OmniGrenade.cs create mode 100644 Projectiles/Ranged/OmniGrenade.png create mode 100644 Projectiles/Ranged/OmniGunHoldout.cs create mode 100644 Projectiles/Ranged/OmniShotgunShot.cs create mode 100644 Projectiles/Ranged/OmniShotgunShot.png create mode 100644 Projectiles/Ranged/OmniSniperShot.cs create mode 100644 Projectiles/Ranged/OmniSniperShot.png diff --git a/Gores/OmniARCasing.png b/Gores/OmniARCasing.png new file mode 100644 index 0000000000000000000000000000000000000000..03a5f79ee825055abc1d1e433854b0cbccb82f6e GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CG!3HG1zpHNqQjEnx?oJHr&dIz4azZ^_9780g zCi`p@`g#7qfddIC8Yh9&fr58`irI2%BodMo1UDRz=<5^G5SnSaiU$PD`xbRg&S73W ud)BvlHXyK^I2|nBf3L$h;ql~LW`-+jLTfLT{(cO!fWgz%&t;ucLK6Ta+cTp8 literal 0 HcmV?d00001 diff --git a/Gores/OmniGrenadeShell.png b/Gores/OmniGrenadeShell.png new file mode 100644 index 0000000000000000000000000000000000000000..9da004d0c8764fc5346d801d3d183f0b49cb94bd GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^d_c^_!3HE-Zss2cQjEnx?oJHr&dIz4a#}rI978lF zE}f{&*X$s|z~00FjjpQo84v-sSk7zgQu&X%Q~loCIB}J BNSXiu literal 0 HcmV?d00001 diff --git a/Gores/OmniShotgunShell.png b/Gores/OmniShotgunShell.png new file mode 100644 index 0000000000000000000000000000000000000000..5dd01912ff09d0d10cc4f1a01a752d3f0bef86f4 GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^d_c^>!3HEx3Z6Ryq!^2X+?^QKos)S9 "Items.Weapons.Ranged"; + + public static int AmmoSavedPercent = 66; + public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(AmmoSavedPercent); + public override void SetDefaults() + { + Item.width = 118; + Item.height = 32; + Item.damage = 66; + Item.DamageType = DamageClass.Ranged; + Item.useAnimation = Item.useTime = 6; + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.knockBack = 5f; + Item.UseSound = null; + Item.noUseGraphic = true; + Item.channel = true; + Item.autoReuse = true; + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 16f; + Item.useAmmo = AmmoID.Bullet; + + Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; + Item.rare = ModContent.RarityType(); + } + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent; + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + + // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction + // We set the rotation to the direction to the mouse so the first frame doesn't appear bugged out. + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + return false; + } + } +} diff --git a/Items/Weapons/Ranged/OmniGun.png b/Items/Weapons/Ranged/OmniGun.png new file mode 100644 index 0000000000000000000000000000000000000000..34664bc2aefe84d554db88cc6a1f9f270f3fb4d3 GIT binary patch literal 962 zcmV;z13mnSP)Px&d`Uz>RA_#v2{!<^{jN{-Gz=az|8al#2C>@&A0t!qOMm9FgFCiw(C~__;%+Z0Qc`b2jJ?placo{a10>H%P? zINtEW>OYV_5os??P6DtnSAqrxZ!J^|{GERSz*2b(fHQx7MfxwEzZ}`NrpB(eW1{$l zy$@?;aAs^usf`|)yL;EcNQY34w5G~{@xqI`?Lzylu|j5vk*5WSk%NC$bMUF9Hvkj| zhw8?qs@glha(B{p57h)onf>}6>il0q{WD`z$}(g74^>8ZC|7zpRqe%zO3u?r^QvAE zdcqXf;82{(-8OEGbk!P3+lAs+yfW3s5klt~9ex%$Uia0;qg9P+qRiNovMhhv+^HOB ztG&>O@~{Srka@zIA2K0sb#CKWX}kR$wtrH*na`T5nMm!Ku_l;YZD--l`r7q+Tw_KAwO zjt*hhd5TvkKHKg+*%ICiqT^J1*!8%#ZCUO6XUU9BDee~(GGX?$mjfDCzj3jqdR6Dm zol5}RnEC+!RD+67@pjKet9cn_bLpsA{|USP9LPtHE17;&uj6f(oSH%LtX8hJWX7fx z*Vs^X+bmvAwK;8Ox-z04?L7=YzWP@q-ByjED&9W9vg`BGBz4hoqr;W!+8phzuf6rJ z%nwz?DZ&BSLRYy#1?fSgU5n%-EFD_V0?l^`cBp zI-=FTI5AfDo2uG%iqUrA?N__1@K)C#&5{|LQrebd#Y(@mYWBL8xVdz_n<_G6Q%c)M kU&y45V#s "Projectiles.Ranged"; + public override void SetDefaults() + { + Projectile.width = 20; + Projectile.height = 20; + Projectile.friendly = true; + Projectile.hostile = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.timeLeft = 1800; + Projectile.ignoreWater = true; + Projectile.tileCollide = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + public override void AI() + { + if (Projectile.velocity.Y < 25f) + Projectile.velocity.Y += 0.3f; + int fire = Dust.NewDust(Projectile.position, Projectile.width, (int)(Projectile.height * 0.1f), DustID.Torch, 0f, 0f, 100, default); + Main.dust[fire].velocity *= 3f; + if (Main.rand.NextBool()) + { + Main.dust[fire].scale = 0.3f; + Main.dust[fire].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } + + Projectile.rotation = Projectile.velocity.ToRotation(); + } + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item62 with { Volume = 7f }, Projectile.Center); + Projectile.ExpandHitboxBy(250); + Projectile.Damage(); + Player Owner = Main.player[Projectile.owner]; + Owner.SetScreenshake(3f); + for (int i = 0; i < 2; i++) + { + Particle center = new CustomSpark(Projectile.Center, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 11, 0.95f, Color.OrangeRed * 0.8f, new Vector2(1f, 1f), true, true, glowOpacity: 0.9f); + GeneralParticleHandler.SpawnParticle(center); + } + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.OrangeRed * 0.8f, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-12, 12), 0f, 0.15f, 21, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.OrangeRed * 0.8f, "CalamityMod/Particles/PlasmaExplosion", Vector2.One, Main.rand.NextFloat(-10, 10), 0f, 0.07f, 21); + GeneralParticleHandler.SpawnParticle(blastRing2); + Particle blastRing3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Red * 0.8f, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-12, 12), 0f, 0.1f, 21, true); + GeneralParticleHandler.SpawnParticle(blastRing3); + Particle pulse = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/RoarPulse", new Vector2(1f, 1f), 0, 0.01f, 0.4f, 15, true); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/SmallBloomRing", new Vector2(1f, 1f), 0, 0.01f, 4f, 15, true, 0.8f); + GeneralParticleHandler.SpawnParticle(pulse2); + for (int i = 0; i < 12; i++) + { + Vector2 sparkVelocity = Vector2.UnitX.RotatedByRandom(MathHelper.TwoPi) * MathHelper.Lerp(10, 30, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(Projectile.Center, sparkVelocity, false, Main.rand.Next(10, 15), Main.rand.NextFloat(1f, 1.2f), Main.rand.NextBool() ? Color.OrangeRed : Color.Red); + GeneralParticleHandler.SpawnParticle(spark); + } + for (int i = 1; i < 21; i++) + { + Vector2 velocity = Main.rand.NextVector2Unit() * Main.rand.NextFloat(9f, 14f); + Dust spark = Dust.NewDustPerfect(Projectile.Center, 278, velocity); + spark.color = Main.rand.NextBool() ? Color.OrangeRed : Color.Gold; + } + for (int j = 0; j < 25; j++) + { + int dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 3f); + Main.dust[dust2].noGravity = true; + Main.dust[dust2].velocity *= 5f; + dust2 = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 2f); + Main.dust[dust2].velocity *= 2f; + } + } + + public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) + { + modifiers.SourceDamage *= 0f; + if (Main.masterMode) modifiers.SourceDamage.Flat += 200f; + else if (Main.expertMode) modifiers.SourceDamage.Flat += 150f; + else modifiers.SourceDamage.Flat += 100f; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + Vector2 position = Projectile.Center - Main.screenPosition; + Vector2 origin = texture.Size() * 0.5f; + + Main.EntitySpriteDraw(texture, position, null, Projectile.GetAlpha(lightColor), Projectile.rotation, origin, Projectile.scale, SpriteEffects.None); + + return false; + } + } +} diff --git a/Projectiles/Ranged/OmniGrenade.png b/Projectiles/Ranged/OmniGrenade.png new file mode 100644 index 0000000000000000000000000000000000000000..408648ebb008f3c069b024af9ed38bddd8f51ef6 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~g!3HGv?z=Y!NHG=%xjQkeJ16rJB3r>_b!=!Y0bO_-44S#f(gSMMafyLC^}KeNlnuahoTgu&C*&t;uc GLK6UfPGYD4 literal 0 HcmV?d00001 diff --git a/Projectiles/Ranged/OmniGunHoldout.cs b/Projectiles/Ranged/OmniGunHoldout.cs new file mode 100644 index 0000000000..658e44ca0f --- /dev/null +++ b/Projectiles/Ranged/OmniGunHoldout.cs @@ -0,0 +1,220 @@ +using System; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + + +namespace CalamityMod.Projectiles.Ranged +{ + public class OmniGunHoldout : BaseGunHoldoutProjectile + { + + public static Asset MuzzleFlash; + public override int AssociatedItemID => ModContent.ItemType(); + public override float MaxOffsetLengthFromArm => 24f; + public override float OffsetXUpwards => -5f; + public override float BaseOffsetY => -1f; + public override float OffsetYDownwards => 5f; + public override Vector2 GunTipPosition => Projectile.Center + (Projectile.velocity * 51); + + public int Time = 0; + public int shotCounter = 0; + public int framesBetweenShots = 0; + private float flashVariant; + public override void Load() + { + MuzzleFlash = ModContent.Request("CalamityMod/Projectiles/Ranged/M1GarandMuzzleFlash", AssetRequestMode.ImmediateLoad); + } + + public override void KillHoldoutLogic() + { + //If the player is dead, kill the holdout. + if (Owner.CantUseHoldout() || HeldItem.type != AssociatedItemID) + Projectile.Kill(); + } + + public override void HoldoutAI() + { + //Pause to give the effect of reloading + if (Time == 20) + { + Player Owner = Main.player[Projectile.owner]; + SoundEngine.PlaySound(SoundID.Item149, Projectile.Center); + } + if (Time >= 70) + { + if (framesBetweenShots == 0) + { + //Here we detect which ammo the bullets will use + Owner.PickAmmo(Owner.HeldItem, out int bulletAMMO, out float SpeedNoUse, out int bulletDamage, out float kBackNoUse, out _); + #region Sniper Shot + if (shotCounter == 0) + { + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 19; + #region Visuals and Sounds + SoundEngine.PlaySound(CommonCalamitySounds.LargeWeaponFireSound with { Volume = 0.45f }, Projectile.Center); + if (Main.netMode != NetmodeID.Server) + { + string goreType = "OmniSniperCasing"; + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center + (-Projectile.velocity * 6), -Projectile.velocity * 4f, Mod.Find(goreType).Type); + } + for (int i = 0; i <= 4; i++) + { + Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(3) ? 303 : 244, (shootVelocity * Main.rand.NextFloat(0.2f, 1.1f)).RotatedByRandom(0.4f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.8f, 1.4f); + } + // "Smoke" ring + Particle shootPulse = new DirectionalPulseRing(GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 4f, Color.Gray * 0.5f, new Vector2(0.5f, 1f), Projectile.velocity.ToRotation(), 0.1f, 0.475f, 18); + GeneralParticleHandler.SpawnParticle(shootPulse); + #endregion + OffsetLengthFromArm -= 20f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(1.5f)), ModContent.ProjectileType(), (int)(Projectile.damage * 10f), Projectile.knockBack, Projectile.owner); + shotCounter++; + framesBetweenShots = 40; + } + #endregion + #region AR Burst + if (shotCounter >= 1 && shotCounter <= 10 && framesBetweenShots == 0) + { + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 19; + #region Visuals and Sounds + SoundStyle fire = new("CalamityMod/Sounds/Item/GunShotSmallAlt"); + SoundEngine.PlaySound(fire with { Volume = 0.7f, Pitch = 0.1f}, Projectile.Center); + if (Main.netMode != NetmodeID.Server) + { + string goreType = "OmniARCasing"; + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center + (-Projectile.velocity * 9), Projectile.velocity.RotatedBy(2f * -Owner.direction) * Main.rand.NextFloat(0.6f, 0.7f), Mod.Find(goreType).Type); + } + // Direct smoke + for (int i = 0; i < 2; i++) + { + Particle smoke = new HeavySmokeParticle(GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 7f * Main.rand.NextFloat(0.4f, 1.5f), Color.Gray, Main.rand.Next(30, 50), Main.rand.NextFloat(0.22f, 0.44f), 0.35f, Main.rand.NextFloat(-0.2f, 0.2f), Main.rand.NextBool(), required: true); + GeneralParticleHandler.SpawnParticle(smoke); + } + for (int i = 0; i <= 4; i++) + { + Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(3) ? 303 : 244, (shootVelocity * Main.rand.NextFloat(0.2f, 1.1f)).RotatedByRandom(0.4f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.8f, 1.4f); + } + #endregion + framesBetweenShots = 8; + OffsetLengthFromArm -= 3f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(4f)), bulletAMMO, Projectile.damage, Projectile.knockBack, Projectile.owner); + shotCounter++; + if (shotCounter > 10) + framesBetweenShots = 30; + } + #endregion + #region Shotgun Blast + if (shotCounter == 11 && framesBetweenShots == 0) + { + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 19; + #region Visuals and Sounds + SoundStyle FireSound = new("CalamityMod/Sounds/Item/Hydra"); + SoundEngine.PlaySound(FireSound with { Volume = 0.7f }, Projectile.Center); + if (Main.netMode != NetmodeID.Server) + { + string goreType = "OmniShotgunShell"; + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center + (-Projectile.velocity * 9), Projectile.velocity.RotatedBy(2f * -Owner.direction) * Main.rand.NextFloat(0.6f, 0.7f), Mod.Find(goreType).Type); + } + for (int i = 0; i <= 4; i++) + { + Dust dust = Dust.NewDustPerfect(GunTipPosition, Main.rand.NextBool(3) ? 303 : 244, (shootVelocity * Main.rand.NextFloat(0.2f, 1.1f)).RotatedByRandom(0.4f)); + dust.noGravity = true; + dust.scale = Main.rand.NextFloat(0.8f, 1.4f); + } + // Direct smoke + for (int i = 0; i < 16; i++) + { + Particle smoke = new HeavySmokeParticle(GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 7f * Main.rand.NextFloat(0.4f, 1.5f), Color.Gray, Main.rand.Next(30, 50), Main.rand.NextFloat(0.22f, 0.44f), 0.35f, Main.rand.NextFloat(-0.2f, 0.2f), Main.rand.NextBool(), required: true); + GeneralParticleHandler.SpawnParticle(smoke); + } + // "Smoke" ring + Particle shootPulse = new DirectionalPulseRing(GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * 4f, Color.Gray * 0.5f, new Vector2(0.5f, 1f), Projectile.velocity.ToRotation(), 0.1f, 0.475f, 18); + GeneralParticleHandler.SpawnParticle(shootPulse); + #endregion + framesBetweenShots = 8; + OffsetLengthFromArm -= 20f; + Owner.velocity += -Projectile.velocity * 7f; + for (int i = 0; i < 8; i++) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 1.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 3f), Projectile.knockBack, Projectile.owner); + shotCounter++; + if (shotCounter > 11) + framesBetweenShots = 30; + } + #endregion + #region Grenade + if (shotCounter == 12 && framesBetweenShots == 0) + { + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 30; + #region Visuals and Sounds + SoundStyle fire = new("CalamityMod/Sounds/Item/LauncherHeavyShot"); + SoundEngine.PlaySound(fire with { Volume = 0.7f, PitchVariance = 0.1f }, Projectile.Center); + if (Main.netMode != NetmodeID.Server) + { + string goreType = "OmniGrenadeShell"; + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center + (-Projectile.velocity * 6), -Projectile.velocity * 4f, Mod.Find(goreType).Type); + } + for (int i = 0; i <= 13; i++) + { + Dust dust = Dust.NewDustPerfect(GunTipPosition, 303, shootVelocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.2f, 0.4f), 80, default, Main.rand.NextFloat(0.4f, 1.3f)); + dust.noGravity = false; + dust.color = Color.White; + + Dust dust2 = Dust.NewDustPerfect(GunTipPosition, 278, shootVelocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.1f, 0.5f)); + dust2.noGravity = true; + dust2.scale = Main.rand.NextFloat(0.52f, 0.72f); + dust2.color = Color.Lerp(Color.Orange, Color.Gold, Main.rand.NextFloat(0f, 1f)); + } + ; + #endregion + OffsetLengthFromArm -= 24f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 10f), Projectile.knockBack, Projectile.owner); + + Time = 0; + shotCounter = 0; + } + #endregion + } + if (framesBetweenShots > 0) + framesBetweenShots--; + } + Time++; + } + public override bool PreDraw(ref Color lightColor) + { + if (Time < 2) + return false; + Texture2D texture = TextureAssets.Projectile[Type].Value; + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + float drawRotation = Projectile.rotation + (Projectile.spriteDirection == -1 ? MathHelper.Pi : 0f); + float scale = Projectile.scale * Owner.gravDir; + Vector2 rotationPoint = texture.Size() * 0.5f; + SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + // Flash + if (Time == 70 || shotCounter == 11 && framesBetweenShots == 0) + { + Texture2D flashTex = MuzzleFlash.Value; + int flashFrameY = (int)flashVariant; + Vector2 flashPos = GunTipPosition + Vector2.UnitX.RotatedBy(Projectile.rotation) * MuzzleFlash.Width() * 0.4f - Main.screenPosition; + Rectangle flashFrame = flashTex.Frame(verticalFrames: 3, frameY: flashFrameY); + Main.EntitySpriteDraw(flashTex, flashPos, flashFrame, Color.White, drawRotation, flashFrame.Size() * 0.5f, scale * 0.8f, flipSprite); + } + + Main.EntitySpriteDraw(texture, drawPosition, null, Projectile.GetAlpha(lightColor), drawRotation, rotationPoint, scale, flipSprite); + return false; + } + } +} diff --git a/Projectiles/Ranged/OmniShotgunShot.cs b/Projectiles/Ranged/OmniShotgunShot.cs new file mode 100644 index 0000000000..814c889888 --- /dev/null +++ b/Projectiles/Ranged/OmniShotgunShot.cs @@ -0,0 +1,63 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class OmniShotgunShot : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = 4; + Projectile.height = 4; + Projectile.light = 0.5f; + Projectile.alpha = 255; + Projectile.DamageType = DamageClass.Ranged; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.aiStyle = ProjAIStyleID.Arrow; + AIType = ProjectileID.BulletHighVelocity; + Projectile.extraUpdates = 3; + Projectile.penetrate = 1; + Projectile.timeLeft = 15; + } + + public override bool PreDraw(ref Color lightColor) + { + CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); + return false; + } + + public override void OnKill(int timeLeft) + { + SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); + Projectile.ExpandHitboxBy(32); + for (int d = 0; d < 2; d++) + { + Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f); + } + for (int d = 0; d < 10; d++) + { + int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 0, default, 2.5f); + Main.dust[idx].noGravity = true; + Main.dust[idx].velocity *= 3f; + idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Torch, 0f, 0f, 100, default, 1.5f); + Main.dust[idx].velocity *= 2f; + Main.dust[idx].noGravity = true; + } + Projectile.maxPenetrate = -1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + } +} diff --git a/Projectiles/Ranged/OmniShotgunShot.png b/Projectiles/Ranged/OmniShotgunShot.png new file mode 100644 index 0000000000000000000000000000000000000000..bc8355e36cec90f78c9cc13c67c9e871f919d397 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^Y#_`5A|IT2?*XJ3i-X*q7}lMWc?smWdAc};aLlYd zy^zl#fWhJ7;gIubC(krCeTGs}7k|a16KB7x#9F(pm@Omon>R>4^}VH!@r`R= l<5d(z1Xpchf4=okH@nIi9;Lk-!a?>ic)I$ztaD0e0swODFb@C# literal 0 HcmV?d00001 diff --git a/Projectiles/Ranged/OmniSniperShot.cs b/Projectiles/Ranged/OmniSniperShot.cs new file mode 100644 index 0000000000..6d7b7f76f1 --- /dev/null +++ b/Projectiles/Ranged/OmniSniperShot.cs @@ -0,0 +1,110 @@ +using CalamityMod.Particles; +using CalamityMod.Sounds; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Ranged +{ + public class OmniSniperShot : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Ranged"; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 4; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + public const int DoubleDamageTime = 90; + public static int Lifetime = 600; + public override void SetDefaults() + { + Projectile.width = 20; + Projectile.height = 6; + Projectile.light = 0.5f; + Projectile.alpha = 255; + Projectile.extraUpdates = 7; + Projectile.scale = 1.18f; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Ranged; + Projectile.ignoreWater = true; + Projectile.aiStyle = ProjAIStyleID.Arrow; + AIType = ProjectileID.BulletHighVelocity; + Projectile.penetrate = 5; + Projectile.timeLeft = Lifetime; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation(); + Projectile.damage += Projectile.originalDamage / DoubleDamageTime; + if (Projectile.timeLeft == Lifetime - 2) + { + for (int i = 0; i <= 4; i++) //Dragon's Breath shot particles my beloved + { + Vector2 sparkVelocity = Projectile.velocity * 0.5f; + + float sparkScale1 = Main.rand.NextFloat(0.3f, 0.8f); + Vector2 sparkvelocity1 = sparkVelocity.RotatedByRandom(0.45f) * Main.rand.NextFloat(0.4f, 0.95f); + SparkParticle spark1 = new SparkParticle(Projectile.Center, sparkvelocity1, false, 6, sparkScale1, Main.rand.NextBool() ? Color.Goldenrod : Color.DarkGoldenrod); + GeneralParticleHandler.SpawnParticle(spark1); + + float sparkScale2 = Main.rand.NextFloat(0.4f, 1f); + Vector2 sparkvelocity2 = sparkVelocity.RotatedByRandom(0.2f) * Main.rand.NextFloat(1.1f, 3.1f); + SparkParticle spark2 = new SparkParticle(Projectile.Center, sparkvelocity2, false, 6, sparkScale2, Main.rand.NextBool() ? Color.Goldenrod : Color.DarkGoldenrod); + GeneralParticleHandler.SpawnParticle(spark2); + } + } + if (Projectile.timeLeft < Lifetime - 3 && Projectile.timeLeft > Lifetime - 150) + { + SparkParticle spark = new SparkParticle(Projectile.Center, -Projectile.velocity * 0.05f, false, 9, 1.2f, Color.Coral * 0.3f); + GeneralParticleHandler.SpawnParticle(spark); + } + } + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(Projectile.Center, Projectile.velocity, Projectile.width, Projectile.height); + SoundEngine.PlaySound(SoundID.Dig, Projectile.Center); + return true; + } + public override void OnKill(int timeLeft) + { + for (int i = 0; i <= 6; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool() ? 158 : 55, new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.5f), 0, default, Main.rand.NextFloat(1.6f, 2.2f)); + dust.noGravity = true; + dust.fadeIn = 0.5f; + } + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + //Always critically strikes + modifiers.SetCrit(); + for (int i = 0; i <= 2; i++) + { + LineParticle spark = new LineParticle(Projectile.Center, -Projectile.velocity.RotatedBy(Main.rand.NextFloat(0.18f, 0.44f)) * Main.rand.NextFloat(0.4f, 2.5f), false, 8, 0.9f, Main.rand.NextBool() ? Color.Goldenrod : Color.Gold); + GeneralParticleHandler.SpawnParticle(spark); + LineParticle spark2 = new LineParticle(Projectile.Center, -Projectile.velocity.RotatedBy(Main.rand.NextFloat(-0.18f, -0.44f)) * Main.rand.NextFloat(0.4f, 2.5f), false, 8, 0.9f, Main.rand.NextBool() ? Color.Goldenrod : Color.Gold); + GeneralParticleHandler.SpawnParticle(spark2); + } + + for (int i = 0; i <= 3; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool() ? 158 : 55, new Vector2(5, 5).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.5f), 0, default, Main.rand.NextFloat(1.6f, 2.2f)); + dust.noGravity = true; + dust.fadeIn = 0.5f; + } + } + + public override bool PreDraw(ref Color lightColor) + { + CalamityUtils.DrawAfterimagesFromEdge(Projectile, 0, lightColor); + return false; + } + } +} diff --git a/Projectiles/Ranged/OmniSniperShot.png b/Projectiles/Ranged/OmniSniperShot.png new file mode 100644 index 0000000000000000000000000000000000000000..5961f6820806b8371e890ad672f4ef791a7ae5ce GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^B0$W>!3HD`Pv18eNHG=%xjQkeJ16rJ$O-mzaSV}| zn(VVt=;wI{riw3aGOhbxUki0hu@ly86J(A^=((BwRssa_Wd8PqE^IT^@A~uauRd7l viHm|=%g#Bk^ioQKFRN+tTx2|ZSb#zLme}UYzfL^^8qeVA>gTe~DWM4fPRcWe literal 0 HcmV?d00001 From 50aefcef5f76fc8807ef915e39a22dae9e3b38d9 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 20:19:15 -0400 Subject: [PATCH 033/126] Vouchers (lacks textures, vfx, and sfx) --- Items/Tools/AggressiveVoucher.png | Bin 0 -> 200 bytes Items/Tools/CombatVoucher.png | Bin 0 -> 239 bytes Items/Tools/HurriedVoucher.png | Bin 0 -> 203 bytes Items/Tools/OddVoucher.png | Bin 0 -> 197 bytes Items/Tools/TinkerersVoucher.cs | 298 ++++++++++++++++++ Items/Tools/UnbreakableVoucher.png | Bin 0 -> 198 bytes .../en-US/Mods.CalamityMod.Items.Tools.hjson | 53 ++++ Prefixes/ReforgeChange.cs | 9 + 8 files changed, 360 insertions(+) create mode 100644 Items/Tools/AggressiveVoucher.png create mode 100644 Items/Tools/CombatVoucher.png create mode 100644 Items/Tools/HurriedVoucher.png create mode 100644 Items/Tools/OddVoucher.png create mode 100644 Items/Tools/TinkerersVoucher.cs create mode 100644 Items/Tools/UnbreakableVoucher.png diff --git a/Items/Tools/AggressiveVoucher.png b/Items/Tools/AggressiveVoucher.png new file mode 100644 index 0000000000000000000000000000000000000000..0908cdbf375eed15cab5d14fbf392fecbfa2de89 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq!^2X+?^QKos)S9L{*8nfT_aatVN#u4T($$9wj`oM!#LW1(Y;yv!h|1}VnUiR&w%v3$T x{cg)6e*}88-jw{JdVfhz#A9Bzf~E7{vt7QddYJzLhXc?x44$rjF6*2UngBE=Mr!~7 literal 0 HcmV?d00001 diff --git a/Items/Tools/CombatVoucher.png b/Items/Tools/CombatVoucher.png new file mode 100644 index 0000000000000000000000000000000000000000..7e4cd8a16661bfee4fe7d22b9a417ec53e4b2bf5 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^5+BksgJS#E@t;*U z`ObK#$-hZs-TNPrCoX*4JYfN&#H$NuBpWOmnz+8zE#gsF($`mLkaf@@vSDIZLguU+ zAuaR5FMQ>Vu~T>=?4;Mu`0F>rGocyWoKxMI=S|ks>*ipzN;BE_U1F=*P3Cjfr<0(&qggkM>BZ3`njxgN@xNAf?Zq| literal 0 HcmV?d00001 diff --git a/Items/Tools/HurriedVoucher.png b/Items/Tools/HurriedVoucher.png new file mode 100644 index 0000000000000000000000000000000000000000..62895a9442cb398438e53af395ebec6ef797a2f1 GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq!^2X+?^QKos)S9?HQ1@+gn9 zp%2fpHqOXNvCl=?*h&o5ctlwkeoAfFDX-S2bG${bv$y{ZznDZbNILUHSD;D4n~Fh2f{vhMn?ieLBZm^g4U{-|&k`ECxwuzUT@xNtk@(C3}R= pBW43rpBGF&M2ro9VA8A~3{53!%Ii1i@&ld1;OXk;vd$@?2>||rLu~*6 literal 0 HcmV?d00001 diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs new file mode 100644 index 0000000000..029fe85840 --- /dev/null +++ b/Items/Tools/TinkerersVoucher.cs @@ -0,0 +1,298 @@ +using System; +using System.Collections.Generic; +using System.IO; +using CalamityMod.Prefixes; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Tools +{ + public static class VoucherReforgeSystem + { + public static int ForcedPrefix = -1; + } + + public class VoucherGlobalItem : GlobalItem + { + public override void PreReforge(Item item) + { + Player player = Main.LocalPlayer; + bool isAccessory = item.accessory; + + VoucherReforgeSystem.ForcedPrefix = -1; + + for (int i = 0; i < player.inventory.Length; i++) + { + Item invItem = player.inventory[i]; + + if (invItem.ModItem is VoucherItem voucher) + { + if (voucher.IsUsableVoucher(player, item, isAccessory)) + { + VoucherReforgeSystem.ForcedPrefix = voucher.GetPrefixForItem(player, item, isAccessory); + + invItem.stack--; + if (invItem.stack <= 0) + invItem.TurnToAir(); + + break; + } + } + } + } + } + + public abstract class VoucherItem : ModItem + { + #region CyclePrefixes + protected virtual int[] prefixChoices => Array.Empty(); + protected int chosenPrefix = 0; + public override void ModifyTooltips(List tooltips) + { + string selected = GetSelectedPrefixName(); + string all = GetAllPrefixNames(); + + foreach (var line in tooltips) + { + if (line.Mod == "Terraria" && line.Name.StartsWith("Tooltip")) + { + line.Text = line.Text + .Replace("{0}", selected) + .Replace("{1}", all); + } + } + } + + public string GetAllPrefixNames() + { + var pool = prefixChoices; + if (pool.Length == 0) + return null; + + List names = new(); + + foreach (int p in pool) + { + if (p >= 0 && p < Lang.prefix.Length && Lang.prefix[p] != null) + names.Add(Lang.prefix[p].Value); + } + + return string.Join(", ", names); + } + + public string GetSelectedPrefixName() + { + var pool = prefixChoices; + if (pool.Length == 0) + return null; + + int p = pool[chosenPrefix]; + + if (p >= 0 && p < Lang.prefix.Length && Lang.prefix[p] != null) + return Lang.prefix[p].Value; + + return null; + } + #endregion + + public bool IsUsableVoucher(Player player, Item itemBeingReforged, bool isAccessory) + { + return Item.favorited && CanApply(player, itemBeingReforged, isAccessory); + } + + public override bool CanRightClick() => Main.keyState.PressingShift(); + + public override void RightClick(Player player) + { + if (prefixChoices.Length == 0) + return; + + chosenPrefix++; + if (chosenPrefix >= prefixChoices.Length) + chosenPrefix = 0; + + Item.NetStateChanged(); + } + + public override bool ConsumeItem(Player player) => false; + + public override void NetSend(BinaryWriter writer) + { + writer.Write(chosenPrefix); + } + + public override void NetReceive(BinaryReader reader) + { + chosenPrefix = reader.ReadInt32(); + } + + public virtual bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return true; + } + + public virtual int GetPrefixForItem(Player player, Item itemBeingReforged, bool isAccessory) + { + if (prefixChoices.Length == 0) + return -1; + + // Combat Voucher handles 50/50 loss logic for weapons on its own + if (isAccessory) + { + if (Main.rand.NextBool()) + return prefixChoices[chosenPrefix]; + else + return ModContent.PrefixType(); + } + + return prefixChoices[chosenPrefix]; + } + } + + public class CombatVoucher : VoucherItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 28; + Item.rare = ItemRarityID.Green; + Item.value = 0; + } + + public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return !isAccessory; + } + + public override int GetPrefixForItem(Player player, Item itemBeingReforged, bool isAccessory) + { + int prefix; + + if (itemBeingReforged.DamageType == DamageClass.Melee) + prefix = PrefixID.Legendary; + else if (itemBeingReforged.DamageType == DamageClass.Ranged) + prefix = PrefixID.Unreal; + else if (itemBeingReforged.DamageType == DamageClass.Magic) + prefix = PrefixID.Mythical; + else if (itemBeingReforged.DamageType == DamageClass.Summon) + prefix = PrefixID.Ruthless; + else + prefix = PrefixID.Godly; + + return Main.rand.NextBool() ? prefix : ModContent.PrefixType(); + } + } + + public class AggressiveVoucher : VoucherItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + + protected override int[] prefixChoices => new int[] + { + PrefixID.Jagged, + PrefixID.Angry, + PrefixID.Spiked, + PrefixID.Menacing, + PrefixID.Precise, + PrefixID.Lucky + }; + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 28; + Item.rare = ItemRarityID.Green; + Item.value = 0; + } + + public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return isAccessory; + } + } + + public class UnbreakableVoucher : VoucherItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + + protected override int[] prefixChoices => new int[] + { + PrefixID.Hard, + PrefixID.Armored, + PrefixID.Guarding, + PrefixID.Warding, + ModContent.PrefixType(), + ModContent.PrefixType() + }; + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 28; + Item.rare = ItemRarityID.Green; + Item.value = 0; + } + + public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return isAccessory; + } + } + + public class HurriedVoucher : VoucherItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + + protected override int[] prefixChoices => new int[] + { + PrefixID.Brisk, + PrefixID.Fleeting, + PrefixID.Hasty, + PrefixID.Quick + }; + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 28; + Item.rare = ItemRarityID.Green; + Item.value = 0; + } + + public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return isAccessory; + } + } + + public class OddVoucher : VoucherItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Tools"; + + protected override int[] prefixChoices => new int[] + { + PrefixID.Arcane, + PrefixID.Wild, + PrefixID.Rash, + PrefixID.Intrepid, + PrefixID.Violent, + ModContent.PrefixType() + }; + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 28; + Item.rare = ItemRarityID.Green; + Item.value = 0; + } + + public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) + { + return isAccessory; + } + } +} diff --git a/Items/Tools/UnbreakableVoucher.png b/Items/Tools/UnbreakableVoucher.png new file mode 100644 index 0000000000000000000000000000000000000000..9e91540620bb25aa6d3a28f486abcf3e56423eb2 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq!^2X+?^QKos)S9>zk@YYs zz|`l&B+)m2C8RDKona6n!0;sdz_Yp;7Mo;*cd3}!ZL*I@=;8WS$8-6D=;Dk6YMr in your inventory to cycle between targeted reforges] + ''' +} + AntiCystOintment: { DisplayName: Anti-Cyst Ointment Tooltip: @@ -141,6 +152,15 @@ BrokenWaterFilter: { ''' } +CombatVoucher: { + DisplayName: Combat Voucher + Tooltip: + ''' + Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + This effect only applies to reforging weapons + ''' +} + Cosmolight: { DisplayName: Cosmolight Tooltip: @@ -205,6 +225,17 @@ GreatbayPickaxe: { Tooltip: Can mine Demonite, Crimtane, Meteorite, Sea Prisms and Sea Prism Crystals } +HurriedVoucher: { + DisplayName: Hurried Voucher + Tooltip: + ''' + Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + Targeted Reforge: {0} + Selectable Reforges: {1} + [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] + ''' +} + InfernaCutter: { DisplayName: Inferna Cutter Tooltip: @@ -268,6 +299,17 @@ NormalityRelocator: { ''' } +OddVoucher: { + DisplayName: Odd Voucher + Tooltip: + ''' + Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + Targeted Reforge: {0} + Selectable Reforges: {1} + [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] + ''' +} + ReefclawHamaxe: { DisplayName: Reefclaw Hamaxe Tooltip: "" @@ -379,6 +421,17 @@ TorrentialTear: { ''' } +UnbreakableVoucher: { + DisplayName: Unbreakable Voucher + Tooltip: + ''' + Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + Targeted Reforge: {0} + Selectable Reforges: {1} + [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] + ''' +} + VoodooDemonVoodooDoll: { DisplayName: Voodoo Demon Voodoo Doll Tooltip: diff --git a/Prefixes/ReforgeChange.cs b/Prefixes/ReforgeChange.cs index 5a42927f66..45b15fdb4b 100644 --- a/Prefixes/ReforgeChange.cs +++ b/Prefixes/ReforgeChange.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using CalamityMod.Items.Tools; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Packets; @@ -29,6 +30,14 @@ namespace CalamityMod.Prefixes public override int ChoosePrefix(Item item, UnifiedRandom rand) { + // Voucher override + if (VoucherReforgeSystem.ForcedPrefix != -1) + { + int forced = VoucherReforgeSystem.ForcedPrefix; + VoucherReforgeSystem.ForcedPrefix = -1; + return forced; + } + if (storedPrefix == -1 && item.CountsAsClass() && (item.maxStack == 1 || item.AllowReforgeForStackableItem)) { // Crafting (or first reforge of) a rogue weapon has a 75% chance for a random modifier, this check is done by vanilla From 3b88f5d2d879d3b2f02c020ca6c4a8fa0b38512f Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 21 Mar 2026 18:12:49 -0700 Subject: [PATCH 034/126] Earth --- Projectiles/Melee/EarthBoom.cs | 4 +- Projectiles/Melee/EarthHoldout.cs | 46 +++++++++++----------- Projectiles/Melee/EarthMeteor.cs | 65 +++++++++++++++++-------------- 3 files changed, 62 insertions(+), 53 deletions(-) diff --git a/Projectiles/Melee/EarthBoom.cs b/Projectiles/Melee/EarthBoom.cs index b71021e706..b0080b8a33 100644 --- a/Projectiles/Melee/EarthBoom.cs +++ b/Projectiles/Melee/EarthBoom.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - Projectile.width = Projectile.height = 500; + Projectile.width = Projectile.height = 620; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; @@ -26,6 +26,6 @@ namespace CalamityMod.Projectiles.Melee { } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.width * 0.5f * Projectile.scale, targetHitbox); } } diff --git a/Projectiles/Melee/EarthHoldout.cs b/Projectiles/Melee/EarthHoldout.cs index c51b91ec44..dac1a280f5 100644 --- a/Projectiles/Melee/EarthHoldout.cs +++ b/Projectiles/Melee/EarthHoldout.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; @@ -22,11 +23,12 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/Earth"; - public override float HitboxOutset => 135; - public override Vector2 HitboxSize => new Vector2(288, 288) * (1 + bladeFade * 1.2f); + public int size = 186 + 30; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size) * (1 + bladeFade * 1.25f); + public override Vector2 SpriteOrigin => new(0, size - 30); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(0, 186f); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -195,22 +197,21 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, (int)(170 * (1 + bladeFade * 0.6f))), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); - GeneralParticleHandler.SpawnParticle(new GlowSparkParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.75f, 0.9f), false, 14, Main.rand.NextFloat(0.06f, 0.03f), mainColor, new Vector2(1.3f, 0.2f), true, false, 0.55f)); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, (int)(170 * (1 + bladeFade * 0.6f))), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; + GeneralParticleHandler.SpawnParticle(new GlowSparkParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * Main.rand.NextFloat(0.75f, 0.9f), false, 14, Main.rand.NextFloat(0.06f, 0.03f) * Projectile.scale, mainColor, new Vector2(1.3f, 0.2f), true, false, 0.55f)); } for (int i = 0; i < 6; i++) { Vector2 particleVel = new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, (int)(270 * (1 + bladeFade * 0.6f))), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, (int)(270 * (1 + bladeFade * 0.6f))), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))) * Projectile.scale; if (Main.rand.NextBool(3)) { - Particle sparker = new CustomSpark(particlePos + Main.rand.NextVector2Circular(15, 15), -particleVel * Main.rand.NextFloat(0.4f, 0.8f), "CalamityMod/Particles/Sparkle", false, 30, Main.rand.NextFloat(1.2f, 2.2f), mainColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true); + Particle sparker = new CustomSpark(particlePos + Main.rand.NextVector2Circular(15, 15), -particleVel * Main.rand.NextFloat(0.4f, 0.8f), "CalamityMod/Particles/Sparkle", false, 30, Main.rand.NextFloat(1.2f, 2.2f) * Projectile.scale, mainColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true); GeneralParticleHandler.SpawnParticle(sparker); } else { - GeneralParticleHandler.SpawnParticle(new CustomSpark(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, "CalamityMod/Particles/LargeBloom", false, Main.rand.Next(7, 9 + 1), Main.rand.NextFloat(0.3f, 0.35f), mainColor * 0.65f, new Vector2(1f, 1.2f), true, false, 0, false, false, 0.45f)); - //GeneralParticleHandler.SpawnParticle(new HeavySmokeParticle(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, mainColor, 23, Main.rand.NextFloat(0.5f, 1f), 0.65f, Main.rand.NextFloat(-0.1f, 0.1f), true)); + GeneralParticleHandler.SpawnParticle(new CustomSpark(particlePos, -particleVel.RotatedByRandom(0.2f) * 2, "CalamityMod/Particles/LargeBloom", false, Main.rand.Next(7, 9 + 1), Main.rand.NextFloat(0.3f, 0.35f) * Projectile.scale, mainColor * 0.65f, new Vector2(1f, 1.2f), true, false, 0, false, false, 0.45f)); } } } @@ -237,10 +238,10 @@ namespace CalamityMod.Projectiles.Melee float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 10 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - GenericSparkle sparker = new GenericSparkle(Owner.Center + (new Vector2(270 * (1 + bladeFade * 0.6f), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), Vector2.Zero, Color.White, mainColor, Main.rand.NextFloat(0.5f, 0.7f), 11, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); + GenericSparkle sparker = new GenericSparkle(Owner.Center + (new Vector2(270 * (1 + bladeFade * 0.6f), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)) * Projectile.scale, Vector2.Zero, Color.White, mainColor, Main.rand.NextFloat(0.5f, 0.7f) * Projectile.scale, 11, Main.rand.NextFloat(-0.1f, 0.1f), 2.68f); GeneralParticleHandler.SpawnParticle(sparker); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(270 * (1 + bladeFade * 0.6f), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), DustID.FireworksRGB, dustVel); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(270 * (1 + bladeFade * 0.6f), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)) * Projectile.scale, DustID.FireworksRGB, dustVel); dust2.scale = Main.rand.NextFloat(0.65f, 1.05f); dust2.noGravity = true; dust2.color = Color.Lerp(Color.White, mainColor, 0.5f); @@ -294,7 +295,8 @@ namespace CalamityMod.Projectiles.Melee else spawnSpot = chosenTarget.Center + new Vector2(Main.rand.NextFloat(-450, 450), Main.rand.NextFloat(-450, -650)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner, 0, chosenTarget == null ? 0 : chosenTarget.whoAmI, 2); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 1.2f), Projectile.knockBack, Projectile.owner, 0, chosenTarget == null ? 0 : chosenTarget.whoAmI, 2); + meteor.scale = Projectile.scale; } spawnBoom = false; @@ -349,7 +351,6 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { // Only draw the projectile if the projectile's owner is currently using the item this projectile is attached to. - float spriteMult = 1.13f; if ((useAnim > 0 || DrawUnconditionally) && Owner.ItemAnimationActive) { Asset tex = ModContent.Request(Texture); @@ -370,26 +371,27 @@ namespace CalamityMod.Projectiles.Melee { if (swingCount % 2 != 0) { - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -80 : 80) * -Owner.direction, swoosh.Size() * 0.5f, spriteMult * Projectile.scale * 3.15f / 4, SpriteEffects.None); - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -80 : 80) * -Owner.direction, swoosh.Size() * 0.5f, spriteMult * Projectile.scale * 3.15f / 4, SpriteEffects.FlipVertically); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -80 : 80) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.89f, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -80 : 80) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 0.89f, SpriteEffects.FlipVertically); } else - Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -85 : 85) * -Owner.direction, swoosh.Size() * 0.5f, spriteMult * Projectile.scale * 3.15f * 1.6f / 4, SpriteEffects.None); + Main.EntitySpriteDraw(swoosh.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), null, mainColor with { A = 0 } * fadeIn * 0.9f, (FinalRotation + MathHelper.ToRadians(45)) + MathHelper.ToRadians(swingCount % 2 != 0 ? -85 : 85) * -Owner.direction, swoosh.Size() * 0.5f, Projectile.scale * 1.423f, SpriteEffects.None); } Asset tex2 = ModContent.Request("CalamityMod/Particles/BloomCircle"); - int draws = 24; + int draws = 45; for (int i = 0; i < draws; i++) { bool swordTip = i > draws * 0.73f; - float swordTipScale = swordTip ? Utils.Remap(i, (int)(draws * 0.73f), draws, 0.9f, 0.35f) : 1; + float swordTipScale = (swordTip ? Utils.Remap(i, (int)(draws * 0.73f), draws, 0.9f, 0.35f) : 1); Vector2 offsetDir = Vector2.One.RotatedBy(Projectile.rotation + RotationOffset + MathHelper.ToRadians(90)); Color bladeColor = Color.Lerp(Color.MediumTurquoise, Color.Lerp(Color.LimeGreen, Color.OrangeRed, (i * 0.8f) / draws), i / (draws * 0.6f)); - Color auraColor = Color.Lerp(bladeColor, Color.White, 0.2f) with { A = 0 } * 0.4f * bladeFade; - Vector2 drawOffset = -offsetDir * 9 * i * bladeFade; - Main.EntitySpriteDraw(tex2.Value, Projectile.Center - offsetDir * 70 - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(2, 2), tex2.Frame(1, FrameCount, 0, Frame), auraColor, RotationOffset + Projectile.rotation + MathHelper.ToRadians(45), tex2.Size() * 0.5f, new Vector2(0.7f * swordTipScale, 1f) * (0.75f * swordTipScale) * 0.7f * bladeFade * spriteMult, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); + Color auraColor = Color.Lerp(bladeColor, Color.White, 0.2f) with { A = 0 } * 0.3f * bladeFade; + Vector2 drawOffset = -offsetDir * 5 * i * bladeFade * Projectile.scale; + float bladeHiltMult = (MathHelper.Lerp(1.55f, 1, 1 - MathF.Pow(Utils.GetLerpValue(i > draws * 0.08f ? draws * 0.55f : 0, draws * 0.04f, i, true), 5))); + Main.EntitySpriteDraw(tex2.Value, Projectile.Center - offsetDir * 70 * Projectile.scale - Main.screenPosition + drawOffset + new Vector2(0, Owner.gfxOffY) + Main.rand.NextVector2Circular(2, 2), tex2.Frame(1, FrameCount, 0, Frame), auraColor, RotationOffset + Projectile.rotation + MathHelper.ToRadians(45), tex2.Size() * 0.5f, new Vector2(0.7f * swordTipScale * MathF.Pow(bladeHiltMult, 0.6f), 0.5f / bladeHiltMult) * (0.75f * swordTipScale) * 0.9f * bladeFade * bladeHiltMult * Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); } Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY), tex.Frame(1, FrameCount, 0, Frame), lightColor, Projectile.rotation + RotationOffset + r, FlipAsSword ? new Vector2(tex.Width() - SpriteOrigin.X, SpriteOrigin.Y) : SpriteOrigin, Projectile.scale, spriteEffects != SpriteEffects.None ? spriteEffects : (FlipAsSword ? SpriteEffects.FlipHorizontally : SpriteEffects.None)); diff --git a/Projectiles/Melee/EarthMeteor.cs b/Projectiles/Melee/EarthMeteor.cs index 8acfbb5dd5..3b5754c090 100644 --- a/Projectiles/Melee/EarthMeteor.cs +++ b/Projectiles/Melee/EarthMeteor.cs @@ -45,7 +45,6 @@ namespace CalamityMod.Projectiles.Melee float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); NPC targeted = Projectile.ai[1] == 0 ? Owner.ClampedMouseWorld().ClosestNPCAt(1000) : Main.npc[(int)Projectile.ai[1]]; - Projectile.scale = 1.2f; randomColor = Main.rand.Next(3) switch { 0 => Color.OrangeRed, @@ -90,7 +89,8 @@ namespace CalamityMod.Projectiles.Melee else spawnSpot = targeted.Center + new Vector2(Main.rand.NextFloat(-450, 450), Main.rand.NextFloat(-450, -650)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1], Projectile.ai[2] - 1); + Projectile meteor = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), spawnSpot, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, Projectile.ai[1], Projectile.ai[2] - 1); + meteor.scale = Projectile.scale; } if (time == fallTime) { @@ -120,26 +120,29 @@ namespace CalamityMod.Projectiles.Melee // Spawn in a helix-style pattern float sine = (float)Math.Sin(Projectile.timeLeft * 0.475f / MathHelper.Pi); - Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * (16f + 34 * fadeIn); + Vector2 offset = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(MathHelper.PiOver2) * sine * (16f + 34 * fadeIn) * Projectile.scale; if (targetDist < 1400f && time % 2 == 0) { - CustomSpark orb = new(Projectile.Center + offset, -Projectile.velocity * 0.5f, "CalamityMod/Particles/BloomCircle", false, 10, 0.3f + (0.4f * fadeIn), mainColor, new Vector2(0.5f, 1f), true, false); + CustomSpark orb = new(Projectile.Center + offset, -Projectile.velocity * 0.5f, "CalamityMod/Particles/BloomCircle", false, 10, (0.3f + (0.4f * fadeIn)) * Projectile.scale, mainColor, new Vector2(0.5f, 1f), true, false); GeneralParticleHandler.SpawnParticle(orb); - CustomSpark orb2 = new(Projectile.Center - offset, -Projectile.velocity * 0.5f, "CalamityMod/Particles/BloomCircle", false, 10, 0.3f + (0.4f * fadeIn), mainColor, new Vector2(0.5f, 1f), true, false); + CustomSpark orb2 = new(Projectile.Center - offset, -Projectile.velocity * 0.5f, "CalamityMod/Particles/BloomCircle", false, 10, (0.3f + (0.4f * fadeIn)) * Projectile.scale, mainColor, new Vector2(0.5f, 1f), true, false); GeneralParticleHandler.SpawnParticle(orb2); } } else { - float randSize = Main.rand.NextFloat(0.8f, 1.2f); - for (int i = 0; i < 2; i++) + float randSize = Main.rand.NextFloat(0.8f, 1.2f) * Projectile.scale; + if (!CalamityClientConfig.Instance.Photosensitivity) { - Particle bloom = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * (float)Math.Pow(Utils.Remap(time, 0, fallTime, 0f, 1f), 3), "CalamityMod/Particles/LargeBloom", new Vector2(Utils.Remap(time, 0, fallTime, 0.3f, 4), Utils.Remap(time, fallTime * 0.6f, fallTime, 1, 4)), 0, 0.8f * randSize, 0f, 3); - GeneralParticleHandler.SpawnParticle(bloom); + for (int i = 0; i < 2; i++) + { + Particle bloom = new CustomPulse(Projectile.Center, Vector2.Zero, mainColor * (float)Math.Pow(Utils.Remap(time, 0, fallTime, 0f, 1f), 3), "CalamityMod/Particles/LargeBloom", new Vector2(Utils.Remap(time, 0, fallTime, 0.3f, 4), Utils.Remap(time, fallTime * 0.6f, fallTime, 1, 4)), 0, 0.8f * randSize, 0f, 3); + GeneralParticleHandler.SpawnParticle(bloom); + } + Particle bloom3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * (float)Math.Pow(Utils.Remap(time, 0, fallTime, 0f, 1f), 3), "CalamityMod/Particles/LargeBloom", new Vector2(Utils.Remap(time, 0, fallTime, 0.3f, 4), Utils.Remap(time, fallTime * 0.6f, fallTime, 1, 4)), 0, 0.65f * randSize, 0f, 3); + GeneralParticleHandler.SpawnParticle(bloom3); } - Particle bloom3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White * (float)Math.Pow(Utils.Remap(time, 0, fallTime, 0f, 1f), 3), "CalamityMod/Particles/LargeBloom", new Vector2(Utils.Remap(time, 0, fallTime, 0.3f, 4), Utils.Remap(time, fallTime * 0.6f, fallTime, 1, 4)), 0, 0.65f * randSize, 0f, 3); - GeneralParticleHandler.SpawnParticle(bloom3); } Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; time++; @@ -149,10 +152,12 @@ namespace CalamityMod.Projectiles.Melee Asset tex = ModContent.Request("CalamityMod/Particles/VerticalSmearRagged"); if (time <= fallTime) return false; - - for (int i = 0; i < 10; i++) + if (!CalamityClientConfig.Instance.Photosensitivity) { - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.UnitX) * (i - 110), null, mainColor with { A = 0 }, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale * new Vector2(0.4f - i * 0.05f, 1.3f + i * 0.1f) * 0.4f, i % 2 == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally); + for (int i = 0; i < 10; i++) + { + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition + Projectile.velocity.SafeNormalize(Vector2.UnitX) * (i - 110), null, mainColor with { A = 0 }, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale * new Vector2(0.4f - i * 0.05f, 1.3f + i * 0.1f) * 0.4f, i % 2 == 0 ? SpriteEffects.None : SpriteEffects.FlipHorizontally); + } } return false; @@ -169,7 +174,8 @@ namespace CalamityMod.Projectiles.Melee { Player Owner = Main.player[Projectile.owner]; Owner.SetScreenshake(4.5f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); + Projectile boom = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.75f), Projectile.knockBack, Projectile.owner); + boom.scale = Projectile.scale; for (int i = 0; i < 15; i++) { randomColor = Main.rand.Next(3) switch @@ -183,29 +189,30 @@ namespace CalamityMod.Projectiles.Melee dust2.noGravity = false; dust2.color = Color.Lerp(Color.White, randomColor, 0.5f); - Particle sparker = new CustomSpark(target.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(5.5f, 20), "CalamityMod/Particles/Sparkle", false, 38, Main.rand.NextFloat(2.2f, 4.8f), randomColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true); + Particle sparker = new CustomSpark(target.Center, Vector2.One.RotatedByRandom(100) * Main.rand.NextFloat(5.5f, 20), "CalamityMod/Particles/Sparkle", false, 38, Main.rand.NextFloat(2.2f, 4.8f) * Projectile.scale, randomColor, new Vector2(0.4f, Main.rand.NextFloat(0.9f, 1.4f)), true, true); GeneralParticleHandler.SpawnParticle(sparker); } - - for (int i = 0; i < 3; i++) - { - string tex = "CalamityMod/Particles/ShatteredExplosion"; - Particle bolt1 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 12, 0.5f - i * 0.08f, Color.OrangeRed * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); - GeneralParticleHandler.SpawnParticle(bolt1); - Particle bolt2 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 10, 0.4f - i * 0.08f, Color.MediumTurquoise * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); - GeneralParticleHandler.SpawnParticle(bolt2); - Particle bolt3 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 8, 0.35f - i * 0.08f, Color.LawnGreen * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); - GeneralParticleHandler.SpawnParticle(bolt3); - } SoundStyle fire2 = new("CalamityMod/Sounds/Item/EarthMeteor"); SoundEngine.PlaySound(fire2 with { Volume = 0.9f }, target.Center); if (!CalamityClientConfig.Instance.Photosensitivity) { - Particle blastRing = new CustomPulse(target.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 4f, 3f, 18, true); + for (int i = 0; i < 3; i++) + { + string tex = "CalamityMod/Particles/ShatteredExplosion"; + Particle bolt1 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 12, (0.5f - i * 0.08f) * Projectile.scale, Color.OrangeRed * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); + GeneralParticleHandler.SpawnParticle(bolt1); + Particle bolt2 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 10, (0.4f - i * 0.08f) * Projectile.scale, Color.MediumTurquoise * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); + GeneralParticleHandler.SpawnParticle(bolt2); + Particle bolt3 = new CustomSpark(target.Center, Vector2.Zero, tex, false, 8, (0.35f - i * 0.08f) * Projectile.scale, Color.LawnGreen * 0.8f, Vector2.One * 0.65f, extraRotation: Main.rand.NextFloat(-10f, 10f), shrinkSpeed: (i == 0 ? 0.6f : 0.8f)); + GeneralParticleHandler.SpawnParticle(bolt3); + + } + + Particle blastRing = new CustomPulse(target.Center, Vector2.Zero, mainColor, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 4f * Projectile.scale, 3f * Projectile.scale, 18, true); GeneralParticleHandler.SpawnParticle(blastRing); - Particle blastRing2 = new CustomPulse(target.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 3f, 2f, 18, true); + Particle blastRing2 = new CustomPulse(target.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 3f * Projectile.scale, 2f * Projectile.scale, 18, true); GeneralParticleHandler.SpawnParticle(blastRing2); } } From 2b54b84dc03ded32d05dd5fa4ef6c36461b46424 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 21:56:19 -0400 Subject: [PATCH 035/126] Omnigun balancing, sfx, and vfx --- Items/Weapons/Ranged/OmniGun.cs | 2 +- Projectiles/Ranged/OmniGunHoldout.cs | 24 +++++++++++++++++++----- Sounds/Item/RocketSmall.ogg | Bin 0 -> 26108 bytes 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 Sounds/Item/RocketSmall.ogg diff --git a/Items/Weapons/Ranged/OmniGun.cs b/Items/Weapons/Ranged/OmniGun.cs index 6e7bb8ed97..2ee1c77800 100644 --- a/Items/Weapons/Ranged/OmniGun.cs +++ b/Items/Weapons/Ranged/OmniGun.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 118; Item.height = 32; - Item.damage = 66; + Item.damage = 72; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = 6; Item.useStyle = ItemUseStyleID.Shoot; diff --git a/Projectiles/Ranged/OmniGunHoldout.cs b/Projectiles/Ranged/OmniGunHoldout.cs index 658e44ca0f..a633ec2b3c 100644 --- a/Projectiles/Ranged/OmniGunHoldout.cs +++ b/Projectiles/Ranged/OmniGunHoldout.cs @@ -8,9 +8,11 @@ using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; +using Terraria.ModLoader.UI; namespace CalamityMod.Projectiles.Ranged @@ -25,7 +27,9 @@ namespace CalamityMod.Projectiles.Ranged public override float BaseOffsetY => -1f; public override float OffsetYDownwards => 5f; public override Vector2 GunTipPosition => Projectile.Center + (Projectile.velocity * 51); + public override float RecoilResolveSpeed => CurrentRecoilResolveSpeed; + public float CurrentRecoilResolveSpeed = 0; public int Time = 0; public int shotCounter = 0; public int framesBetweenShots = 0; @@ -61,7 +65,9 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 19; #region Visuals and Sounds - SoundEngine.PlaySound(CommonCalamitySounds.LargeWeaponFireSound with { Volume = 0.45f }, Projectile.Center); + SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/GunShotBig") with { Volume = 1f, Pitch = -0.1f }, Projectile.Center); + SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/GunShotHeavy") with { Volume = 0.35f, Pitch = -0.15f }, Projectile.Center); + if (Main.netMode != NetmodeID.Server) { string goreType = "OmniSniperCasing"; @@ -78,7 +84,9 @@ namespace CalamityMod.Projectiles.Ranged GeneralParticleHandler.SpawnParticle(shootPulse); #endregion OffsetLengthFromArm -= 20f; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(1.5f)), ModContent.ProjectileType(), (int)(Projectile.damage * 10f), Projectile.knockBack, Projectile.owner); + CurrentRecoilResolveSpeed = 0.14f; + + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(1.5f)), ModContent.ProjectileType(), (int)(Projectile.damage * 6f), Projectile.knockBack, Projectile.owner); shotCounter++; framesBetweenShots = 40; } @@ -110,6 +118,7 @@ namespace CalamityMod.Projectiles.Ranged #endregion framesBetweenShots = 8; OffsetLengthFromArm -= 3f; + CurrentRecoilResolveSpeed = 0.3f; Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(4f)), bulletAMMO, Projectile.damage, Projectile.knockBack, Projectile.owner); shotCounter++; if (shotCounter > 10) @@ -146,9 +155,13 @@ namespace CalamityMod.Projectiles.Ranged #endregion framesBetweenShots = 8; OffsetLengthFromArm -= 20f; + CurrentRecoilResolveSpeed = 0.12f; + + // Propel the owner backward Owner.velocity += -Projectile.velocity * 7f; + for (int i = 0; i < 8; i++) - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 1.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 3f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 1.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 2.6f), Projectile.knockBack, Projectile.owner); shotCounter++; if (shotCounter > 11) framesBetweenShots = 30; @@ -159,7 +172,7 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 30; #region Visuals and Sounds - SoundStyle fire = new("CalamityMod/Sounds/Item/LauncherHeavyShot"); + SoundStyle fire = new SoundStyle("CalamityMod/Sounds/Item/GunShotHeavy"); SoundEngine.PlaySound(fire with { Volume = 0.7f, PitchVariance = 0.1f }, Projectile.Center); if (Main.netMode != NetmodeID.Server) { @@ -180,8 +193,9 @@ namespace CalamityMod.Projectiles.Ranged ; #endregion OffsetLengthFromArm -= 24f; - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 10f), Projectile.knockBack, Projectile.owner); + CurrentRecoilResolveSpeed = 0.15f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity, ModContent.ProjectileType(), (int)(Projectile.damage * 9f), Projectile.knockBack, Projectile.owner); Time = 0; shotCounter = 0; } diff --git a/Sounds/Item/RocketSmall.ogg b/Sounds/Item/RocketSmall.ogg new file mode 100644 index 0000000000000000000000000000000000000000..0399e3bd88164ea3b42f6f3d29ea476e5a92e206 GIT binary patch literal 26108 zcmce-by!?YvoE@Ech}%9!4e#TyA1B`u0aAJxLa^{8Qdih2=49#*Wd&QF~VKseZRf; zIrn+axqsb7Pt(=YUA?;cSJl-rsx~$n04(tD!)^Od!i*vX9flId+r{17&f_TyHt55@ zMULVACfZ?CpKAWs^HdWCq`Hj~Uf@VQ{;v-m+&`Rn!2-H=uC^Si?lx48cIMiD`BTYL zaX;sN{`}>0UMePtm8F-3owE&TqH(iXe9%p)SvHM`fuf2u9@|p$bvr{!;Q@Mes{SalGIOQ}c`j8hi7cf)dxFwnc3> zqR|_VDS@M$eYr{=0YP9l0of#c`3C&)2J*>S zI@Pai>Uey!JklDP%39##Wu)V6we0P+>>Z$&5oXXHpw}K|uo7l;A7(}z{%`mmuyy|w z{&t-T1}LBvNZVsBq9HBX6)1uW4X=g;ET2R|g_2CeoLnqlW^G?G?j<5jYpe%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06LrhWuP*}AN!irnN9ciS@({yE%Jjih|-x`6mL9 z;QrZrd3NL>ycln0##A@B?Iy)G`i~j||8gM~$4mY_M7X7gi<>Ni~6{%}? z8ko}fG?7XvwX*MbntS4PxcjyUL)HJn&x}EG9~)j0u?P~CwMrDD+TBxg)m8G<2nY#@ z&SJI3b`^rK&j`%*Od@3NFUQf!g=(^V&}0>k3cNBd}FIU97@U44tW;71QvyKXhX zpE?)U+gr8X=W%d)wzQrfSVyST%tcRz-gD=Z9zj_aV0yqd-m%i*$CX!*D%}OodVAE= zx+CX)+M23u(eCoe!w2TxQ)2aFzr;%9(k7s5bqb7kef9L@(*bj@tS=Z1BFRWjj-+SY zRw5s1r}-}nZf(V@2$j)z)1fGG(A9$7Sl;RER*OJ<>7Kq1Egr6bCI=wm{rZB8#T(4h zPAly%w!A*f3w72z{Q@z0_HDOF+3Rdid@3J%S+6^aHD000Sa0Z(UVQvd`moB#j-0000oXaE2Q0002hn16Z$|Nj`C zCHycAME=@?I&Y*kW0dgGD`fgH;0d+ix*vae>!Z=^!?C#kIQ0=3x%Rr>_S&)B*UQSD z`u*~Jt!==q@zpT6Z8?L1*9$1*JT3svQ+UoYcB@L{Q~&?~00=6>??ar35FdXJt$);qt~YVEV+nEC6s7q9Iesiqo><2rY|sNsJx8{kx9T56^4|8DE_^*Y=3biW9Xdfd?? z>!;t{M$vK+7+4RepQjA8%GSTzrzxz(}>(}c{`{!aQnr+{h9B|9&bEgi6 z`t14p|9hIXSF^sqZME%NaPjr}H92wI{7c(QsLR(Ub`_X@{;sboFINx!{Qck0UMbVh z{ro+*9_R61d+z6+UM#RW2l)Mc^zs2?r?JWR68An-e)G*Y-~8B+9|)fYVWsoJ=F QefirTWKM++)@*i|0Kp*WLjV8( literal 0 HcmV?d00001 From 8a659e3435814f5ab7671f944617e749c2ceac2a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 21 Mar 2026 21:57:03 -0400 Subject: [PATCH 036/126] unneeded usings --- Projectiles/Ranged/OmniGunHoldout.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Projectiles/Ranged/OmniGunHoldout.cs b/Projectiles/Ranged/OmniGunHoldout.cs index a633ec2b3c..c4f6aa0401 100644 --- a/Projectiles/Ranged/OmniGunHoldout.cs +++ b/Projectiles/Ranged/OmniGunHoldout.cs @@ -1,18 +1,14 @@ -using System; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; -using CalamityMod.Sounds; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; using Terraria.Audio; -using Terraria.DataStructures; using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; -using Terraria.ModLoader.UI; namespace CalamityMod.Projectiles.Ranged From 088b809cf404da28b9551a5ef08e9ff93ea25cc0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 21 Mar 2026 20:28:24 -0700 Subject: [PATCH 037/126] Judgement+Order --- Items/Weapons/Melee/GreatswordofJudgement.cs | 22 ++++++++++----- Items/Weapons/Melee/Orderbringer.cs | 26 ++++++++++++------ Projectiles/Melee/JudgementProj.cs | 24 ++++++++-------- Projectiles/Melee/OrderbringerBeam.cs | 8 ++++-- Projectiles/Melee/OrderbringerWaveProj.cs | 29 ++++++++------------ Projectiles/Melee/StarofJudgement.cs | 13 +++++++-- Projectiles/Melee/StarofOrder.cs | 17 ++++++++---- 7 files changed, 83 insertions(+), 56 deletions(-) diff --git a/Items/Weapons/Melee/GreatswordofJudgement.cs b/Items/Weapons/Melee/GreatswordofJudgement.cs index cc8e3162bd..c463e7fd21 100644 --- a/Items/Weapons/Melee/GreatswordofJudgement.cs +++ b/Items/Weapons/Melee/GreatswordofJudgement.cs @@ -25,6 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee public bool spawnProj = true; public bool spawnTrueMeleeProj = true; public bool playSound = true; + public float scaling = 1; public Color clr = Color.MediumOrchid; @@ -48,10 +49,14 @@ namespace CalamityMod.Items.Weapons.Melee { return false; } + public override void ModifyItemScale(Player player, ref float scale) + { + scale = scaling = player.GetMeleeScale(); + } public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { // Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC - float scale = 8f; + float scale = 8f * scaling; Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y); } @@ -60,7 +65,7 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 mPos = player.Calamity().mouseWorld; Vector2 shootDir = player.Center.DirectionTo(mPos); float _ = float.NaN; - bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 145, Item.width * 3f, ref _); + bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30 * scaling, player.Center + shootDir * 145 * scaling, Item.width * 3f * scaling, ref _); return ((canHit && hitCheck) ? null : false); } public override void UseAnimation(Player player) @@ -109,9 +114,11 @@ namespace CalamityMod.Items.Weapons.Melee if (completion >= 0.65f && spawnProj) { if (!player.Calamity().bladeArmEnchant) // Manually remove projectiles when Tainted - Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); - - Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.6f, clr, new Vector2(1f, 1f), true, false, 0, false, false); + { + Projectile beam = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); + beam.ai[1] = scaling; + } + Particle swipe = new CustomSpark(player.Center - shootDir * 5 * scaling, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.6f * scaling, clr, new Vector2(1f, 1f), true, false, 0, false, false); GeneralParticleHandler.SpawnParticle(swipe); SoundEngine.PlaySound(SoundID.Item60, player.Center); @@ -123,7 +130,7 @@ namespace CalamityMod.Items.Weapons.Melee } float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225)); - bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180; + bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180 * scaling; player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); @@ -143,7 +150,8 @@ namespace CalamityMod.Items.Weapons.Melee for (int i = 0; i < 2; i++) { Vector2 vel = player.Center.DirectionFrom(target.Center).RotatedByRandom(0.7f) * Main.rand.NextFloat(18, 20); - Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI, 0, (i == 0 ? -1 : 1), 1); + Projectile star = Projectile.NewProjectileDirect(player.GetSource_ItemUse(Item), player.Center, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI, 0, (i == 0 ? -1 : 1), 1); + star.scale = scaling; } spawnTrueMeleeProj = false; } diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 3fc0e1639a..50a43e3b0f 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -31,6 +31,7 @@ namespace CalamityMod.Items.Weapons.Melee public bool spawnProj = true; public bool spawnTrueMeleeProj = true; public bool playSound = true; + public float scaling = 1; public override void SetDefaults() { Item.width = Item.height = 112; @@ -46,6 +47,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5.5f; } + public override void ModifyItemScale(Player player, ref float scale) + { + scale = scaling = player.GetMeleeScale(); + } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { return false; @@ -53,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { // Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC - float scale = 8f; + float scale = 8f * scaling; Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y); } @@ -62,7 +67,7 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 mPos = player.Calamity().mouseWorld; Vector2 shootDir = player.Center.DirectionTo(mPos); float _ = float.NaN; - bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 245, Item.width * 3f, ref _); + bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30 * scaling, player.Center + shootDir * 215 * scaling, Item.width * 3f * scaling, ref _); return ((canHit && hitCheck) ? null : false); } public override void UseAnimation(Player player) @@ -110,17 +115,19 @@ namespace CalamityMod.Items.Weapons.Melee { if (!player.Calamity().bladeArmEnchant) // Manually remove projectiles when Tainted { - Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); - + Projectile beam = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); + beam.ai[1] = scaling; + for (int i = 0; i < 4; i++) { float rot = Main.rand.NextFloat(0.5f, 0.65f) * (Main.rand.NextBool() ? 1 : -1); Vector2 vel = (shootDir * 2.5f).RotatedByRandom(0.6f); - Projectile.NewProjectile(player.GetSource_FromThis(), player.ClampedMouseWorld() - (shootDir * 40) + Main.rand.NextVector2Circular(130, 130), vel.RotatedBy(rot) * Main.rand.NextFloat(0.9f, 1.2f), ModContent.ProjectileType(), (int)(Item.damage * 0.12f), (int)(Item.knockBack * 0.2f), player.whoAmI, 0, rot, 1); + Projectile star = Projectile.NewProjectileDirect(player.GetSource_FromThis(), player.ClampedMouseWorld() - (shootDir * 40) + Main.rand.NextVector2Circular(130, 130), vel.RotatedBy(rot) * Main.rand.NextFloat(0.9f, 1.2f), ModContent.ProjectileType(), (int)(Item.damage * 0.12f), (int)(Item.knockBack * 0.2f), player.whoAmI, 0, rot, 1); + star.scale = scaling; } } - Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false); + Particle swipe = new CustomSpark(player.Center - shootDir * 5 * scaling, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f * scaling, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false); GeneralParticleHandler.SpawnParticle(swipe); SoundEngine.PlaySound(SoundID.Item60, player.Center); @@ -132,8 +139,8 @@ namespace CalamityMod.Items.Weapons.Melee } float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225)); - bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 240; - Vector2 tipPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180; + bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 240 * scaling; + Vector2 tipPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180 * scaling; player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); @@ -159,7 +166,8 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 spawnPos = mouseClamped + new Vector2(Main.rand.NextFloat(-300, 300), -900); Vector2 vel = (targetPos - spawnPos).SafeNormalize(Vector2.UnitY) * 10; - Projectile.NewProjectile(player.GetSource_ItemUse(Item), spawnPos, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI); + Projectile skybeam = Projectile.NewProjectileDirect(player.GetSource_ItemUse(Item), spawnPos, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI); + skybeam.scale = scaling; } spawnTrueMeleeProj = false; } diff --git a/Projectiles/Melee/JudgementProj.cs b/Projectiles/Melee/JudgementProj.cs index 6f80d0ed85..4d4580b19f 100644 --- a/Projectiles/Melee/JudgementProj.cs +++ b/Projectiles/Melee/JudgementProj.cs @@ -33,8 +33,8 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 137; - Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 137; + Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 137 * Projectile.ai[1]; + Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 137 * Projectile.ai[1]; if (time == 0) { @@ -52,7 +52,8 @@ namespace CalamityMod.Projectiles.Melee // Spawn 2 if (time % 85 == 0 && time > 10) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 0.8f, hitboxSize * 0.8f) - Projectile.velocity * 2, (-Projectile.velocity * 3).RotatedByRandom(0.9f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.35f), 3f, Projectile.owner, 0f); + Projectile star = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 0.8f, hitboxSize * 0.8f) - Projectile.velocity * 2, (-Projectile.velocity * 3).RotatedByRandom(0.9f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.35f), 3f, Projectile.owner, 0f); + star.scale = Projectile.ai[1]; } } else @@ -68,30 +69,31 @@ namespace CalamityMod.Projectiles.Melee { if (Projectile.timeLeft % 4 == 0) { - SparkParticle spark = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(185f)), false, 15, 1f, mainColor * 0.25f); + SparkParticle spark = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(185f)), false, 15, 1f * Projectile.ai[1], mainColor * 0.25f); GeneralParticleHandler.SpawnParticle(spark); } if (Projectile.timeLeft % 4 == 0) { - SparkParticle spark = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-185f)), false, 15, 1f, mainColor * 0.25f); + SparkParticle spark = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-185f)), false, 15, 1f * Projectile.ai[1], mainColor * 0.25f); GeneralParticleHandler.SpawnParticle(spark); } } if (Main.rand.NextBool(3)) { - Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize, hitboxSize) - Projectile.velocity * 2, ModContent.DustType()); - trailDust.scale = Main.rand.NextFloat(0.7f, 0.85f) - (time < 150 ? 0 : time * 0.001f); + Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize, hitboxSize) * Projectile.ai[1] - Projectile.velocity * 2 * Projectile.ai[1], ModContent.DustType()); + trailDust.scale = (Main.rand.NextFloat(0.7f, 0.85f) - (time < 150 ? 0 : time * 0.001f)) * Projectile.ai[1]; trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.85f, 1.5f); trailDust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; trailDust.noGravity = true; + trailDust.fadeIn = Projectile.ai[1] - 1; } if (Main.rand.NextBool(12)) { - GlowOrbParticle orb = new GlowOrbParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(10f, 30f), false, 17, Main.rand.NextFloat(0.4f, 0.75f), mainColor, true, true); + GlowOrbParticle orb = new GlowOrbParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(10f, 30f), false, 17, Main.rand.NextFloat(0.4f, 0.75f) * Projectile.ai[1], mainColor, true, true); GeneralParticleHandler.SpawnParticle(orb); - GlowOrbParticle orb2 = new GlowOrbParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(10f, 30f), false, 17, Main.rand.NextFloat(0.4f, 0.75f), mainColor, true, true); + GlowOrbParticle orb2 = new GlowOrbParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(10f, 30f), false, 17, Main.rand.NextFloat(0.4f, 0.75f) * Projectile.ai[1], mainColor, true, true); GeneralParticleHandler.SpawnParticle(orb2); } } @@ -103,7 +105,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D tex = ModContent.Request(Texture).Value; float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft); for (int i = 0; i < 5; i++) - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 9 * i, null, mainColor with { A = 0 } * fadeOut * 0.6f, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade) + 0.01f * i, 1 + (0.45f * waveFade) - 0.06f * i) * Projectile.scale, SpriteEffects.None, 0); + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 9 * i, null, mainColor with { A = 0 } * fadeOut * 0.6f, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade) + 0.01f * i, 1 + (0.45f * waveFade) - 0.06f * i) * Projectile.scale * Projectile.ai[1], SpriteEffects.None, 0); return false; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) @@ -113,6 +115,6 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.damage < 1) Projectile.damage = 1; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize * Projectile.ai[1], targetHitbox); } } diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 2fc3736a21..31447a9c88 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -34,7 +34,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } - + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void AI() { Player player = Main.player[Projectile.owner]; @@ -46,7 +50,7 @@ namespace CalamityMod.Projectiles.Melee float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); if (Projectile.timeLeft % 12 == 0 && targetDist < 1400f) { - Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 23, 0.25f, mainColor * 0.75f, new Vector2(1f, 7.35f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 23, 0.25f * Projectile.scale, mainColor * 0.75f, new Vector2(1f, 7.35f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); GeneralParticleHandler.SpawnParticle(spark); } time++; diff --git a/Projectiles/Melee/OrderbringerWaveProj.cs b/Projectiles/Melee/OrderbringerWaveProj.cs index c75a37a4ae..14f1a81d43 100644 --- a/Projectiles/Melee/OrderbringerWaveProj.cs +++ b/Projectiles/Melee/OrderbringerWaveProj.cs @@ -17,7 +17,6 @@ namespace CalamityMod.Projectiles.Melee public float hitboxSize = 10; public Color mainColor; public float fade = 1; - public float damageMult = 1; public float fadeOut = 1; public override void SetDefaults() { @@ -36,8 +35,8 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(125f)) * Projectile.scale) * 190; - Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-125f)) * Projectile.scale) * 190; + Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(125f)) * Projectile.scale) * 190 * Projectile.ai[1]; + Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-125f)) * Projectile.scale) * 190 * Projectile.ai[1]; Player player = Main.player[Projectile.owner]; mainColor = player.Calamity().lightRGB; @@ -66,26 +65,26 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextBool(3)) { - Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 1.25f, hitboxSize * 1.25f) - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 25, ModContent.DustType()); - trailDust.scale = Main.rand.NextFloat(1.6f, 1.95f) - (time < 150 ? 0 : time * 0.001f); + Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 1.25f, hitboxSize * 1.25f)* Projectile.ai[1] - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 25 * Projectile.ai[1], ModContent.DustType()); + trailDust.scale = (Main.rand.NextFloat(1.6f, 1.95f) - (time < 150 ? 0 : time * 0.001f)) * Projectile.ai[1]; trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.85f, 1.5f); trailDust.color = mainColor; trailDust.noGravity = true; - trailDust.fadeIn = 2f; + trailDust.fadeIn = 2f * Projectile.ai[1]; } if (time % 9 == 0 && time < 200) { - Particle spark = new CustomSpark(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f, mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); + Particle spark = new CustomSpark(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f * Projectile.ai[1], mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); GeneralParticleHandler.SpawnParticle(spark); - Particle spark2 = new CustomSpark(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f, mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); + Particle spark2 = new CustomSpark(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f * Projectile.ai[1], mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); GeneralParticleHandler.SpawnParticle(spark2); } if (Main.rand.NextBool(12)) { - Particle orb3 = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor); + Particle orb3 = new SparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f) * Projectile.ai[1], mainColor); GeneralParticleHandler.SpawnParticle(orb3); - Particle orb4 = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f), mainColor); + Particle orb4 = new SparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)) * Main.rand.NextFloat(5f, 20f), false, 15, Main.rand.NextFloat(0.8f, 1.35f) * Projectile.ai[1], mainColor); GeneralParticleHandler.SpawnParticle(orb4); } } @@ -99,7 +98,7 @@ namespace CalamityMod.Projectiles.Melee float waveFade = (float)Math.Pow(Utils.GetLerpValue(0, 250, Projectile.timeLeft, true), 2); float waveFade2 = (float)Math.Pow(Utils.GetLerpValue(0, 80, Projectile.timeLeft, true), 2); for (int i = 1; i < 15; i++) // Weird for loop because of squash code - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 6f * i, null, mainColor with { A = 0 } * waveFade * (1 - 0.1f * i), Projectile.rotation, tex.Size() / 2f, new Vector2(1.1f * MathHelper.Lerp(waveFade2, 1, 0.3f), 0.6f + (1 - waveFade) * 0.8f) * Projectile.scale * 1.1f, SpriteEffects.None, 0); + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 6f * i, null, mainColor with { A = 0 } * waveFade * (1 - 0.1f * i), Projectile.rotation, tex.Size() / 2f, new Vector2(1.1f * MathHelper.Lerp(waveFade2, 1, 0.3f), 0.6f + (1 - waveFade) * 0.8f) * Projectile.scale * 1.1f * Projectile.ai[1], SpriteEffects.None, 0); return false; } @@ -107,12 +106,6 @@ namespace CalamityMod.Projectiles.Melee { target.AddBuff(ModContent.BuffType(), 300); } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - // Deal more damage on pierce - modifiers.SourceDamage *= damageMult; - } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize * Projectile.ai[1], targetHitbox); } } diff --git a/Projectiles/Melee/StarofJudgement.cs b/Projectiles/Melee/StarofJudgement.cs index b370747d9f..ba2e6a8a1b 100644 --- a/Projectiles/Melee/StarofJudgement.cs +++ b/Projectiles/Melee/StarofJudgement.cs @@ -21,6 +21,11 @@ namespace CalamityMod.Projectiles.Melee ProjectileID.Sets.TrailCacheLength[Type] = 12; ProjectileID.Sets.TrailingMode[Type] = 2; } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void SetDefaults() { Projectile.width = 44; @@ -40,7 +45,8 @@ namespace CalamityMod.Projectiles.Melee if (time == 0) { mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - Projectile.scale = (Projectile.ai[2] == 1 ? 0.75f : 0.5f); + if (Projectile.numHits == 0) + Projectile.scale *= (Projectile.ai[2] == 1 ? 0.75f : 0.5f); if (Projectile.ai[2] == 1) { Projectile.localNPCHitCooldown = -1; @@ -60,7 +66,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.velocity = Projectile.velocity.RotatedBy(0.085f * Projectile.ai[1]); if (time % 2 == 0) { - Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f), true, false, shrinkSpeed: 0.3f); + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f) * Projectile.scale, true, false, shrinkSpeed: 0.3f); GeneralParticleHandler.SpawnParticle(spark); } } @@ -70,10 +76,11 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(3)) { Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(5, 5) - Projectile.velocity, ModContent.DustType()); - trailDust.scale = Main.rand.NextFloat(0.7f, 0.85f); + trailDust.scale = Main.rand.NextFloat(0.9f, 1.05f) * Projectile.scale; trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.5f); trailDust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; trailDust.noGravity = true; + trailDust.fadeIn = Projectile.scale - 1; } } diff --git a/Projectiles/Melee/StarofOrder.cs b/Projectiles/Melee/StarofOrder.cs index 958b843c75..70ea4ffbad 100644 --- a/Projectiles/Melee/StarofOrder.cs +++ b/Projectiles/Melee/StarofOrder.cs @@ -2,6 +2,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Particles; +using Microsoft.Build.Construction; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -35,14 +36,18 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 7; } - + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float hitboxSize = Projectile.width * Projectile.scale; + return CalamityUtils.CircularHitboxCollision(Projectile.Center, hitboxSize, targetHitbox); + } public override void AI() { Player player = Main.player[Projectile.owner]; mainColor = player.Calamity().lightRGB; - if (time == 0) + if (time == 0 && Projectile.numHits == 0) { - Projectile.scale = Main.rand.NextFloat(0.65f, 0.8f); + Projectile.scale *= Main.rand.NextFloat(0.65f, 0.8f); } float sine = (float)Math.Sin(time * 0.575f * Projectile.scale / MathHelper.Pi); @@ -59,7 +64,7 @@ namespace CalamityMod.Projectiles.Melee } if (time % 2 == 0 && Projectile.numHits < 1) { - Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f), true, false, shrinkSpeed: 0.3f); + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f) * Projectile.scale, true, false, shrinkSpeed: 0.3f); GeneralParticleHandler.SpawnParticle(spark); } @@ -107,10 +112,10 @@ namespace CalamityMod.Projectiles.Melee { Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f); Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity * 2, ModContent.DustType(), velocity * 8); - dust.scale = 3.5f; + dust.scale = 3.5f * Projectile.scale; dust.color = mainColor; dust.noGravity = true; - dust.fadeIn = 6f; + dust.fadeIn = 6f * Projectile.scale; } } } From 276e00a1cb1b6752294c0719c81616f664fc2a9c Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 21 Mar 2026 22:30:37 -0700 Subject: [PATCH 038/126] HolyCol+Skytide --- Projectiles/Melee/BurningHolyBlast.cs | 3 +- Projectiles/Melee/DragoonBigBolt.cs | 14 ++--- Projectiles/Melee/DragoonSmallBolt.cs | 8 +-- Projectiles/Melee/EarthHoldout.cs | 1 - Projectiles/Melee/HolyColliderHoldout.cs | 68 ++++++++++++---------- Projectiles/Melee/HolyColliderHolyFire.cs | 52 +++++++++-------- Projectiles/Melee/SkytideDragoonHoldout.cs | 46 +++++++++------ 7 files changed, 105 insertions(+), 87 deletions(-) diff --git a/Projectiles/Melee/BurningHolyBlast.cs b/Projectiles/Melee/BurningHolyBlast.cs index bf2e0d5981..15f81199ae 100644 --- a/Projectiles/Melee/BurningHolyBlast.cs +++ b/Projectiles/Melee/BurningHolyBlast.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using Microsoft.Build.Construction; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; @@ -35,6 +36,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.damage = 1; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius * Projectile.ai[0], targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplosionRadius * Projectile.ai[0] * Projectile.scale, targetHitbox); } } diff --git a/Projectiles/Melee/DragoonBigBolt.cs b/Projectiles/Melee/DragoonBigBolt.cs index baf5c2aef5..1fd4fb8a29 100644 --- a/Projectiles/Melee/DragoonBigBolt.cs +++ b/Projectiles/Melee/DragoonBigBolt.cs @@ -52,21 +52,21 @@ namespace CalamityMod.Projectiles.Melee if (time < 120) { float velMult = (Projectile.ai[1] == 0.5f ? 0.2f : 3 * sizeMult); - Particle spark3 = new CustomSpark(pos, Projectile.velocity * 1.2f * velMult, "CalamityMod/Particles/GlowSpark", false, 11, 0.15f * sizeMult, usedColor, new Vector2(2f, 0.8f), true, true, shrinkSpeed: 1f); + Particle spark3 = new CustomSpark(pos, Projectile.velocity * 1.2f * velMult, "CalamityMod/Particles/GlowSpark", false, 11, 0.15f * sizeMult * Projectile.scale, usedColor, new Vector2(2f, 0.8f), true, true, shrinkSpeed: 1f); GeneralParticleHandler.SpawnParticle(spark3); sizeMult *= 0.97f; } - Particle spark2 = new BoltParticle(pos, -Projectile.velocity * 0.05f, false, 30, 0.6f, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); + Particle spark2 = new BoltParticle(pos, -Projectile.velocity * 0.05f, false, 30, 0.6f * Projectile.scale, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); GeneralParticleHandler.SpawnParticle(spark2); } if (Main.rand.NextBool(35)) { - Particle spark2 = new BoltParticle(pos, Projectile.velocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.9f), false, 23, Main.rand.NextFloat(0.2f, 0.25f), usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); + Particle spark2 = new BoltParticle(pos, Projectile.velocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.9f), false, 23, Main.rand.NextFloat(0.2f, 0.25f) * Projectile.scale, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); GeneralParticleHandler.SpawnParticle(spark2); } if (Main.rand.NextBool(10)) { - Particle spark2 = new CustomSpark(pos, Projectile.velocity * Main.rand.NextFloat(-0.4f, 0.4f), "CalamityMod/Particles/DrainLineBloom", false, 80, Main.rand.NextFloat(1.2f, 1.3f) * sizeMult, usedColor, new Vector2(1, 4), true, true); + Particle spark2 = new CustomSpark(pos, Projectile.velocity * Main.rand.NextFloat(-0.4f, 0.4f), "CalamityMod/Particles/DrainLineBloom", false, 80, Main.rand.NextFloat(1.2f, 1.3f) * sizeMult * Projectile.scale, usedColor, new Vector2(1, 4), true, true); GeneralParticleHandler.SpawnParticle(spark2); } if (time % 5 == 0) @@ -80,9 +80,9 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 3; i++) { - Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Cyan, "CalamityMod/Particles/BloomCircle", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f, 1.48f, 15); + Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Cyan, "CalamityMod/Particles/BloomCircle", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f * Projectile.scale, 1.48f * Projectile.scale, 15); GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f, 0.925f, 15); + Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f * Projectile.scale, 0.925f * Projectile.scale, 15); GeneralParticleHandler.SpawnParticle(orb2); } } @@ -132,7 +132,7 @@ namespace CalamityMod.Projectiles.Melee } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { - float size = 45 * sizeMult * (Projectile.numHits > 0 ? 6 : 1); + float size = 45 * sizeMult * (Projectile.numHits > 0 ? 6 : 1) * Projectile.scale; Player Owner = Main.player[Projectile.owner]; if (time <= 1 && Projectile.ai[1] != 0.5f) { diff --git a/Projectiles/Melee/DragoonSmallBolt.cs b/Projectiles/Melee/DragoonSmallBolt.cs index d230a95b11..66e1f1a513 100644 --- a/Projectiles/Melee/DragoonSmallBolt.cs +++ b/Projectiles/Melee/DragoonSmallBolt.cs @@ -43,12 +43,12 @@ namespace CalamityMod.Projectiles.Melee Vector2 pos = Projectile.Center; if (Projectile.timeLeft % 3 == 0) { - Particle spark2 = new BoltParticle(pos, -Projectile.velocity * 0.05f, false, 15, 0.4f, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.5f); + Particle spark2 = new BoltParticle(pos, -Projectile.velocity * 0.05f, false, 15, 0.4f * Projectile.scale, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.5f); GeneralParticleHandler.SpawnParticle(spark2); } if (Main.rand.NextBool(35)) { - Particle spark2 = new BoltParticle(pos, Projectile.velocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.9f), false, 23, Main.rand.NextFloat(0.2f, 0.25f), usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); + Particle spark2 = new BoltParticle(pos, Projectile.velocity.RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1.9f), false, 23, Main.rand.NextFloat(0.2f, 0.25f) * Projectile.scale, usedColor, new Vector2(1.8f, 0.8f), true, true, false, 0.3f); GeneralParticleHandler.SpawnParticle(spark2); } if (time % 5 == 0) @@ -83,10 +83,10 @@ namespace CalamityMod.Projectiles.Melee if (time <= 1) { float _ = float.NaN; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Owner.Center, 25, ref _); + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Owner.Center, 25 * Projectile.scale, ref _); } else - return CalamityUtils.CircularHitboxCollision(Projectile.Center, 25, targetHitbox); + return CalamityUtils.CircularHitboxCollision(Projectile.Center, 25 * Projectile.scale, targetHitbox); } public override bool? CanCutTiles() => false; } diff --git a/Projectiles/Melee/EarthHoldout.cs b/Projectiles/Melee/EarthHoldout.cs index dac1a280f5..c91ce030e4 100644 --- a/Projectiles/Melee/EarthHoldout.cs +++ b/Projectiles/Melee/EarthHoldout.cs @@ -54,7 +54,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = 1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, it does not influence Earth's projectile spawning diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 959a2e1553..e790d631b5 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -25,12 +25,11 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/HolyCollider"; - public override float HitboxOutset => 100; - - public override Vector2 HitboxSize => new Vector2(200, 200) * Projectile.scale; + public int size = 146; + public override float HitboxOutset => size * 0.85f; + public override Vector2 HitboxSize => new Vector2(size, size); + public override Vector2 SpriteOrigin => new(0, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - - public override Vector2 SpriteOrigin => new(0, 146); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = false; @@ -61,7 +60,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = -1; // 14NOV2024: Ozzatron: clamped mouse position unnecessary, it does not influence Holy Collider's projectile spawning @@ -121,7 +119,7 @@ namespace CalamityMod.Projectiles.Melee else Owner.direction = 1; FlipAsSword = Owner.direction == -1 ? true : false; - Vector2 bladePos = new Vector2(76, 0); + Vector2 bladePos = new Vector2(76 * Projectile.scale, 0); Vector2 particlePos = Owner.Center + (bladePos).RotatedBy(FinalRotation + MathHelper.ToRadians(-45) - 0.1f * (FlipAsSword ? 1 : -1) * -Projectile.ai[1]); if (Projectile.ai[2] == 5) @@ -137,14 +135,15 @@ namespace CalamityMod.Projectiles.Melee if (chargeTimer < chargeTimerMax && !chargedSwing) chargeTimer++; - Vector2 particleVel = (Owner.Center - particlePos).SafeNormalize(Vector2.UnitX) * -9; + Vector2 particleVel = (Owner.Center - particlePos).SafeNormalize(Vector2.UnitX) * -9 * Projectile.scale; - Dust dust2 = Dust.NewDustPerfect(particlePos, ModContent.DustType(), particleVel.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.2f, 1)); - dust2.scale = Main.rand.NextFloat(0.95f, 1.45f) * fadeIn; + Dust dust2 = Dust.NewDustPerfect(particlePos, ModContent.DustType(), particleVel.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.5f, 1.4f)); + dust2.scale = Main.rand.NextFloat(1.45f, 1.95f) * fadeIn * Projectile.scale; dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? mainColor2 : mainColor1; + dust2.fadeIn = Projectile.scale * 1.5f; - Particle spark3 = new LineParticle(particlePos, particleVel.RotatedByRandom(100) * Main.rand.NextFloat(0.3f, 0.9f), false, 18, Main.rand.NextFloat(0.5f, 0.8f) * fadeIn, Main.rand.NextBool(3) ? mainColor2 : mainColor1); + Particle spark3 = new LineParticle(particlePos, particleVel.RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 0.6f), false, 18, Main.rand.NextFloat(0.5f, 0.8f) * fadeIn * Projectile.scale, Main.rand.NextBool(3) ? mainColor2 : mainColor1); GeneralParticleHandler.SpawnParticle(spark3); if (SoundEngine.TryGetActiveSound(AudSlot, out var ChargeSound) && ChargeSound.IsPlaying) @@ -166,13 +165,14 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fullCharge = new("CalamityMod/Sounds/Custom/Providence/ProvidenceBurn"); SoundEngine.PlaySound(fullCharge with { Volume = 0.7f, Pitch = 0.5f }, Projectile.Center); + chargedSwing = true; chargedSwing = true; useAnim = storedUseAnim / 2; chargeTimer++; for (int i = 0; i < 20; i++) { - Particle spark2 = new LineParticle(particlePos, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f), false, 30, Main.rand.NextFloat(0.3f, 0.8f), Main.rand.NextBool(3) ? mainColor2 : mainColor1); + Particle spark2 = new LineParticle(particlePos, new Vector2(8, 8).RotatedByRandom(100) * Main.rand.NextFloat(0.5f, 1f), false, 30, Main.rand.NextFloat(0.3f, 0.8f) * Projectile.scale, Main.rand.NextBool(3) ? mainColor2 : mainColor1); GeneralParticleHandler.SpawnParticle(spark2); } } @@ -216,7 +216,6 @@ namespace CalamityMod.Projectiles.Melee postSwing = false; if (AnimationProgress == 0) { - Projectile.scale = 1; Animation = 0; doSwing = false; chargeTimer = 0; @@ -251,28 +250,29 @@ namespace CalamityMod.Projectiles.Melee } playSwingSound = false; } - if ( time > (int)(timeMax * (chargedSwing ? 0.1f : 0.3f)) && time < (int)(timeMax * (chargedSwing ? 0.95f : 0.85f))) + if (time > (int)(timeMax * (chargedSwing ? 0.1f : 0.3f)) && time < (int)(timeMax * (chargedSwing ? 0.95f : 0.85f))) { CanHit = true; Vector2 particleVel = new Vector2(0, 2 * -Projectile.ai[1] * Owner.direction).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + Vector2 particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170) * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); if (!chargedSwing) { for (int i = 0; i < 3; i++) { particleVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction) * Main.rand.NextFloat(0.3f, 1f)).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)); - particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170), 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); + particlePos = Owner.Center + (new Vector2(Main.rand.Next(30, 170) * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))); if (i < 2) { - Dust dust2 = Dust.NewDustPerfect(particlePos, ModContent.DustType(), -particleVel.RotatedByRandom(0.3f)); - dust2.scale = Main.rand.NextFloat(0.95f, 1.45f); + Dust dust2 = Dust.NewDustPerfect(particlePos, ModContent.DustType(), -particleVel.RotatedByRandom(0.3f)); + dust2.scale = Main.rand.NextFloat(0.95f, 1.45f) * Projectile.scale; dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? mainColor2 : mainColor1; + dust2.fadeIn = Projectile.scale - 1; } else { - Particle spark = new CustomSpark(particlePos, (-particleVel * 0.2f).RotatedByRandom(0.3f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 17, Main.rand.NextFloat(0.9f, 1.1f), Color.Lerp(Color.Orchid, Color.White, Main.rand.NextFloat(0, 0.7f)), new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); + Particle spark = new CustomSpark(particlePos, (-particleVel * 0.2f).RotatedByRandom(0.3f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 17, Main.rand.NextFloat(0.9f, 1.1f) * Projectile.scale, Color.Lerp(Color.Orchid, Color.White, Main.rand.NextFloat(0, 0.7f)), new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); GeneralParticleHandler.SpawnParticle(spark); } } @@ -299,10 +299,10 @@ namespace CalamityMod.Projectiles.Melee { float randRot = Main.rand.NextFloat(-10, -45); Vector2 dustVel = (new Vector2(0, 15 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - GeneralParticleHandler.SpawnParticle(new CustomSpark(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), "CalamityMod/Particles/LargeBloom", false, Main.rand.Next(7, 9 + 1), Main.rand.NextFloat(0.3f, 0.35f), (Main.rand.NextBool(4) ? Color.DarkGoldenrod : Color.Goldenrod), new Vector2(1f, 1.2f), true, false, 0, false, false, 0.45f)); + GeneralParticleHandler.SpawnParticle(new CustomSpark(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), "CalamityMod/Particles/LargeBloom", false, Main.rand.Next(7, 9 + 1), Main.rand.NextFloat(0.3f, 0.35f) * Projectile.scale, (Main.rand.NextBool(4) ? Color.DarkGoldenrod : Color.Goldenrod), new Vector2(1f, 1.2f), true, false, 0, false, false, 0.45f)); if (i % 3 == 0) { - Particle spark = new CustomSpark(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 27, Main.rand.NextFloat(1.15f, 1.3f), Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); + Particle spark = new CustomSpark(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)).RotatedByRandom(0.4f)), -dustVel * Main.rand.NextFloat(0.4f, 0.7f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 27, Main.rand.NextFloat(1.15f, 1.3f) * Projectile.scale, Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); GeneralParticleHandler.SpawnParticle(spark); } } @@ -310,10 +310,11 @@ namespace CalamityMod.Projectiles.Melee { float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = (new Vector2(0, 35 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.3f, 0.9f)); - dust2.scale = Main.rand.NextFloat(0.95f, 1.45f); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.2f, 0.6f)); + dust2.scale = Main.rand.NextFloat(1.35f, 1.85f) * Projectile.scale; dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? mainColor2 : mainColor1; + dust2.fadeIn = Projectile.scale * 0.3f; } } else @@ -322,10 +323,11 @@ namespace CalamityMod.Projectiles.Melee { float randRot = Main.rand.NextFloat(-30, -60); Vector2 dustVel = -(new Vector2(0, 25 * -Projectile.ai[1] * Owner.direction)).RotatedBy(FinalRotation + MathHelper.ToRadians(randRot)); - Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.15f)), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.1f, 0.5f)); - dust2.scale = Main.rand.NextFloat(0.75f, 0.9f); + Dust dust2 = Dust.NewDustPerfect(Owner.Center + (new Vector2(170 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.15f)), ModContent.DustType(), dustVel * Main.rand.NextFloat(0.1f, 0.5f)); + dust2.scale = Main.rand.NextFloat(0.75f, 0.9f) * Projectile.scale; dust2.noGravity = true; dust2.color = Main.rand.NextBool(3) ? mainColor2 : mainColor1; + dust2.fadeIn = Projectile.scale - 1; } } @@ -340,12 +342,13 @@ namespace CalamityMod.Projectiles.Melee projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()); bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10) || isProviProj; - if (Vector2.Distance(Owner.Center + (new Vector2(60, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 + Math.Max(projectile.width, projectile.height) && projectile.active && isAFireball) + if (Vector2.Distance(Owner.Center + (new Vector2(60 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 * Projectile.scale + Math.Max(projectile.width, projectile.height) && projectile.active && isAFireball) { if (isProviProj) { Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projectile.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f, ModContent.ProjectileType(), (int)((Projectile.damage * 0.1) + projectile.damage), Projectile.knockBack, Projectile.owner, 0, 15, 5); - Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f, 11); + proj.localAI[0] = Projectile.scale; + Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f * Projectile.scale, 11); GeneralParticleHandler.SpawnParticle(orb2); if (projectile.type == ModContent.ProjectileType()) projectile.active = false; @@ -366,13 +369,13 @@ namespace CalamityMod.Projectiles.Melee { Projectile projectile = Main.projectile[x]; bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10); - if (Vector2.Distance(Owner.Center + (new Vector2(60, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 && isAFireball) + if (Vector2.Distance(Owner.Center + (new Vector2(60 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 * Projectile.scale + Math.Max(projectile.width, projectile.height) && isAFireball) { Vector2 launch = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f; projectile.velocity += launch; projectile.timeLeft = 300; projectile.owner = Owner.whoAmI; - Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f, 11); + Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f * Projectile.scale, 11); GeneralParticleHandler.SpawnParticle(orb2); } } @@ -411,6 +414,7 @@ namespace CalamityMod.Projectiles.Melee // 14NOV2024: Ozzatron: clamped mouse position unnecessary, only used for direction Projectile fadedFire = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, ((Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -11).RotatedByRandom(0.6f) * Main.rand.NextFloat(0.3f, 1f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.01), Projectile.knockBack, Projectile.owner, 10, target.whoAmI); fadedFire.timeLeft = Main.rand.Next(40, 55 + 1); + fadedFire.localAI[0] = Projectile.scale; } } } @@ -427,12 +431,13 @@ namespace CalamityMod.Projectiles.Melee Dust chargefull = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB); Vector2 vel = (MathHelper.TwoPi * i / 4f).ToRotationVector2().RotatedBy(starAngle) * 4f; - Particle pulse = new CustomSpark(target.Center, vel, "CalamityMod/Particles/BloomCircle", false, 12, 1.2f, Color.Orange, new Vector2(3.2f, 0.9f), true, true, shrinkSpeed: 0.95f); + Particle pulse = new CustomSpark(target.Center, vel, "CalamityMod/Particles/BloomCircle", false, 12, 1.2f * Projectile.scale, Color.Orange, new Vector2(3.2f, 0.9f), true, true, shrinkSpeed: 0.95f); GeneralParticleHandler.SpawnParticle(pulse); } for (int i = 0; i < 4; i++) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0); + proj.localAI[0] = Projectile.scale; } } } @@ -454,7 +459,6 @@ namespace CalamityMod.Projectiles.Melee { Asset tex = ModContent.Request(Texture); Asset glowTex = ModContent.Request("CalamityMod/Items/Weapons/Melee/HolyColliderGlow"); - Asset shineTex = ModContent.Request("CalamityMod/Particles/Sparkle"); bool flipAsSword = (swingCount % 2 == 0 ? !FlipAsSword : FlipAsSword); float r = flipAsSword ? MathHelper.ToRadians(90) : 0f; Vector2 generalDrawPos = Projectile.Center - Main.screenPosition + new Vector2(0, Owner.gfxOffY); diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index 85a8a361da..3fb9c19dba 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -18,11 +18,11 @@ namespace CalamityMod.Projectiles.Melee public bool setStats = true; public static int statMax = 8; public int setStatTimer = statMax; + public ref float scale => ref Projectile.localAI[0]; public ref float time => ref Projectile.ai[1]; public override void SetStaticDefaults() { Main.projFrames[Type] = 4; - ProjectileID.Sets.CultistIsResistantTo[Type] = true; } public override void SetDefaults() @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee Dust chargefull = Dust.NewDustPerfect(Projectile.Center, DustID.FireworksRGB); Vector2 vel = (MathHelper.TwoPi * i / 4f).ToRotationVector2().RotatedBy(starAngle) * 8f; - Particle pulse = new GlowSparkParticle(Projectile.Center, vel, false, 10, 0.08f, Color.Orange, new Vector2(3.2f, 0.9f), true, true, 0.9f); + Particle pulse = new GlowSparkParticle(Projectile.Center, vel, false, 10, 0.08f * scale, Color.Orange, new Vector2(3.2f, 0.9f), true, true, 0.9f); GeneralParticleHandler.SpawnParticle(pulse); } } @@ -100,20 +100,21 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextBool()) { - Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(80, 80), ModContent.DustType(), (Projectile.velocity * 2) * Main.rand.NextFloat(0.1f, 1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(80, 80) * scale, ModContent.DustType(), (Projectile.velocity * 2) * Main.rand.NextFloat(0.1f, 1f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(1.85f, 2.45f); + dust.scale = Main.rand.NextFloat(1.85f, 2.45f) * scale; dust.color = Main.rand.NextBool() ? Color.OrangeRed : Color.Goldenrod; dust.noLightEmittence = true; + dust.fadeIn = scale - 1; } if (Main.rand.NextBool()) { - Particle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(80, 80), -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), false, 11, 0.9f, Main.rand.NextBool() ? Color.Goldenrod : Color.Orange); + Particle spark = new SparkParticle(Projectile.Center + Main.rand.NextVector2Circular(80, 80) * scale, -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), false, 11, 0.9f * scale, Main.rand.NextBool() ? Color.Goldenrod : Color.Orange); GeneralParticleHandler.SpawnParticle(spark); } else { - Particle spark = new CustomSpark(Projectile.Center + Main.rand.NextVector2Circular(80, 80), -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 27, Main.rand.NextFloat(1.15f, 1.3f), Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); + Particle spark = new CustomSpark(Projectile.Center + Main.rand.NextVector2Circular(80, 80) * scale, -Projectile.velocity * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/ProvidenceMarkParticle", false, 27, Main.rand.NextFloat(1.15f, 1.3f) * scale, Main.rand.NextBool(4) ? Color.Khaki : Color.Orange, new Vector2(1.3f, 0.5f), true, false, 0, false, false, Main.rand.NextFloat(0.1f, 0.2f)); GeneralParticleHandler.SpawnParticle(spark); } @@ -123,11 +124,12 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextBool(5)) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (new Vector2(0, -7)).RotatedByRandom(0.2) * Main.rand.NextFloat(0.2f, 1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (new Vector2(0, -7)).RotatedByRandom(0.2) * Main.rand.NextFloat(0.2f, 1f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.85f, 1.45f) * Projectile.scale; dust.color = Color.Goldenrod; dust.noLightEmittence = true; + dust.fadeIn = scale - 1; } if (Projectile.velocity.Length() > 8) @@ -147,7 +149,7 @@ namespace CalamityMod.Projectiles.Melee time++; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, isLaunched ? 100 : 20, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, (isLaunched ? 100 : 20) * scale, targetHitbox); public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 180); @@ -163,25 +165,29 @@ namespace CalamityMod.Projectiles.Melee SoundStyle sound = new("CalamityMod/Sounds/Item/HolyColliderProjectileHit"); SoundEngine.PlaySound(sound with { Volume = 1f }, Projectile.Center); - for (int g = 0; g < 3; g++) + if (!CalamityClientConfig.Instance.Photosensitivity) { - Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2.8f * (g + 1), 1.7f, 18, true); - GeneralParticleHandler.SpawnParticle(blastRing); - Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2.2f * (g + 1), 1.3f, 18, true); - GeneralParticleHandler.SpawnParticle(blastRing2); - } - for (int i = 0; i < 5; i++) - { - Particle orb1 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.OrangeRed, Color.Orange, i * 0.2f), i == 4 ? "CalamityMod/Particles/ShatteredExplosion" : "CalamityMod/Particles/FlameExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.11f + i * 0.05f, 18); - GeneralParticleHandler.SpawnParticle(orb1); + for (int g = 0; g < 3; g++) + { + Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.OrangeRed, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2.8f * (g + 1) * scale, 1.7f * scale, 18, true); + GeneralParticleHandler.SpawnParticle(blastRing); + Particle blastRing2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 2.2f * (g + 1) * scale, 1.3f * scale, 18, true); + GeneralParticleHandler.SpawnParticle(blastRing2); + } + for (int i = 0; i < 5; i++) + { + Particle orb1 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.OrangeRed, Color.Orange, i * 0.2f), i == 4 ? "CalamityMod/Particles/ShatteredExplosion" : "CalamityMod/Particles/FlameExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, (0.11f + i * 0.05f) * scale, 18); + GeneralParticleHandler.SpawnParticle(orb1); + } } for (int i = 0; i < 25; i++) { - Particle spark = new SparkParticle(Projectile.Center, new Vector2(21, 21).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 1f), true, 55, 0.85f, Main.rand.NextBool() ? Color.Goldenrod : Color.OrangeRed); + Particle spark = new SparkParticle(Projectile.Center, new Vector2(21, 21).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 1f), true, 55, 0.85f * scale, Main.rand.NextBool() ? Color.Goldenrod : Color.OrangeRed); GeneralParticleHandler.SpawnParticle(spark); } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.47), Projectile.knockBack, Projectile.owner, 1.8f); + Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.47), Projectile.knockBack, Projectile.owner, 1.8f); + blast.scale = scale; } } public override bool PreDraw(ref Color lightColor) @@ -196,8 +202,8 @@ namespace CalamityMod.Projectiles.Melee // The back glow float power = !setStats ? 2.4f : 0.6f; float randSize = Main.rand.NextFloat(0.8f, 1.1f); - Main.EntitySpriteDraw(bloomTexture, drawPos, null, Color.Goldenrod with { A = 0 }, Projectile.rotation, bloomTexture.Size() * 0.5f, 0.65f * randSize * power * Projectile.scale, SpriteEffects.None, 0); - Main.EntitySpriteDraw(bloomTexture, drawPos, null, Color.White with { A = 0 } * 0.65f, Projectile.rotation, bloomTexture.Size() * 0.5f, 0.45f * randSize * power * Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(bloomTexture, drawPos, null, Color.Goldenrod with { A = 0 }, Projectile.rotation, bloomTexture.Size() * 0.5f, 0.65f * randSize * power * Projectile.scale * scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(bloomTexture, drawPos, null, Color.White with { A = 0 } * 0.65f, Projectile.rotation, bloomTexture.Size() * 0.5f, 0.45f * randSize * power * Projectile.scale * scale, SpriteEffects.None, 0); Texture2D usedTex = (!setStats ? bigTexture : smallTexture); Rectangle frame = usedTex.Frame(1, 4, 0, Projectile.frame); @@ -206,7 +212,7 @@ namespace CalamityMod.Projectiles.Melee float drawRotation = Projectile.rotation; if (setStatTimer == statMax || !setStats) - Main.EntitySpriteDraw(usedTex, drawPosition, frame, Color.White, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); + Main.EntitySpriteDraw(usedTex, drawPosition, frame, Color.White, drawRotation, rotationPoint, Projectile.scale * scale, SpriteEffects.None); return false; } } diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index 686133e319..f06dafaa1a 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Projectiles.Melee public override LocalizedText DisplayName => CalamityUtils.GetItemName(); public override string Texture => "CalamityMod/Items/Weapons/Melee/SkytideDragoon"; - public override float HitboxOutset => 245; - - public override Vector2 HitboxSize => new Vector2(40, 40); // long thin hitbox for a spear is done in collision, the X here determines hitbox width + public int size = 140; + public override float HitboxOutset => size * 1.45f; + public override Vector2 HitboxSize => new Vector2(30, 30); // Has custom collision + public override Vector2 SpriteOrigin => new(0, size); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(0, 135); public Vector2 mousePos; public Vector2 aimVel; public bool doSwing = true; @@ -56,7 +56,6 @@ namespace CalamityMod.Projectiles.Melee public override void WhenSpawned() { Projectile.knockBack = 0; - Projectile.scale = 1; Projectile.ai[1] = 1; mousePos = Owner.Calamity().mouseWorld; @@ -151,18 +150,19 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { Color color = Color.Lerp(Color.White, Main.rand.NextBool() ? color1 : color2, 0.65f); - Vector2 pos = Owner.Center + (new Vector2(160, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); - Vector2 vel = Projectile.rotation.ToRotationVector2().RotatedByRandom(0.4f) * Main.rand.NextFloat(2f, 8f); - Dust dust = Dust.NewDustPerfect(pos, ModContent.DustType(), vel, 0, default, Main.rand.NextFloat(1.85f, 2.2f)); + Vector2 pos = Owner.Center + (new Vector2(160 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.3f)); + Vector2 vel = Projectile.rotation.ToRotationVector2().RotatedByRandom(0.2f) * Main.rand.NextFloat(1f, 4f); + Dust dust = Dust.NewDustPerfect(pos, ModContent.DustType(), vel, 0, default, Main.rand.NextFloat(1.85f, 2.2f) * Projectile.scale); dust.noGravity = true; dust.color = color; + dust.fadeIn = Projectile.scale - 1; - Particle spark2 = new BoltParticle(pos, -vel.RotatedBy(Owner.direction == 1 ? MathHelper.ToRadians(45) : MathHelper.ToRadians(-135)) * Main.rand.NextFloat(1.5f, 1.8f), false, 13, Main.rand.NextFloat(0.2f, 0.35f), color * 0.8f, new Vector2(1.2f, 1f), true, true, false, 0.25f); + Particle spark2 = new BoltParticle(pos, -vel.RotatedBy(Owner.direction == 1 ? MathHelper.ToRadians(45) : MathHelper.ToRadians(-135)) * Main.rand.NextFloat(1.5f, 1.8f), false, 13, Main.rand.NextFloat(0.2f, 0.35f) * Projectile.scale, color * 0.8f, new Vector2(1.2f, 1f), true, true, false, 0.25f); GeneralParticleHandler.SpawnParticle(spark2); if (i % 2 == 0) { - Particle orb = new CustomSpark(pos, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 35, 0.75f, color * 0.75f, new Vector2(1f, 1)); + Particle orb = new CustomSpark(pos, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 35, 0.75f * Projectile.scale, color * 0.75f, new Vector2(1f, 1)); GeneralParticleHandler.SpawnParticle(orb); } } @@ -222,7 +222,8 @@ namespace CalamityMod.Projectiles.Melee SoundStyle sound = new("CalamityMod/Sounds/Item/SkytideBolt"); SoundEngine.PlaySound(sound with { Volume = 0.8f }, Projectile.Center); Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + new Vector2(0, -600), new Vector2(0, 10), ModContent.ProjectileType(), (int)(Projectile.damage * 10), Projectile.knockBack, Projectile.owner, 0, 0.5f); - proj.timeLeft = 45; + proj.timeLeft = (int)(45 / Projectile.scale); + proj.scale = Projectile.scale; swingCount = 0; attackPower = 6; } @@ -233,7 +234,8 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(fire with { Volume = 1f, Pitch = -0.2f }, Projectile.Center); SoundStyle fire2 = new("CalamityMod/Sounds/Item/AuricBulletHit"); SoundEngine.PlaySound(fire2 with { Volume = 0.5f, Pitch = 0.2f }, Projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2, aimVel.SafeNormalize(Vector2.UnitX) * -10, ModContent.ProjectileType(), (int)(Projectile.damage * 10), Projectile.knockBack, Projectile.owner, 0, 1f); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2 * Projectile.scale, aimVel.SafeNormalize(Vector2.UnitX) * -10, ModContent.ProjectileType(), (int)(Projectile.damage * 10), Projectile.knockBack, Projectile.owner, 0, 1f); + proj.scale = Projectile.scale; swingCount = -1; attackPower = 0; } @@ -243,7 +245,8 @@ namespace CalamityMod.Projectiles.Melee { float rot = (0.1f * attackPower * i / 6f); Vector2 vel = rot.ToRotationVector2().RotatedBy(aimVel.ToRotation()) * -7; - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2, vel, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0, rot); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - aimVel * 2 * Projectile.scale, vel, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0, rot); + proj.scale = Projectile.scale; } attackPower--; } @@ -267,12 +270,17 @@ namespace CalamityMod.Projectiles.Melee { Color color = Color.Lerp(Color.White, Main.rand.NextBool() ? color1 : color2, 0.65f); float bonus = (1 - (7 / (attackPower + 1))) * 0.3f; - Vector2 pos = Owner.Center + (new Vector2(160, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.05f)); + Vector2 pos = Owner.Center + (new Vector2(160 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.05f)); Vector2 vel = Projectile.rotation.ToRotationVector2().RotatedBy(MathHelper.ToRadians(-45)).RotatedByRandom(0.5f) * Main.rand.NextFloat(6f, 10f); - Dust dust = Dust.NewDustPerfect(pos, Main.rand.NextBool(3) ? 278 : ModContent.DustType(), vel * (1 + bonus), 0, default, Main.rand.NextFloat(1.05f, 1.4f)); + Dust dust = Dust.NewDustPerfect(pos, Main.rand.NextBool(3) ? 278 : ModContent.DustType(), vel * (1 + bonus), 0, default, Main.rand.NextFloat(1.05f, 1.4f)); dust.noGravity = !(dust.type == 278); dust.color = color; dust.scale += bonus; + if (dust.type != 278) + { + dust.scale *= Projectile.scale; + dust.fadeIn = Projectile.scale - 1; + } } } } @@ -342,15 +350,15 @@ namespace CalamityMod.Projectiles.Melee { // While not super visible here, this hitbox extention effect looks great and I'll use it on stuff like Terra Lance later Color tipColor = Color.Lerp(color2, color1, (i + 4) / 6) with { A = 0 } * 0.3f * fadeIn; - Vector2 scale = new Vector2(0.25f - i * 0.04f, (1.5f + i * 0.15f) * colorFadeIn) * (0.75f * colorFadeIn * Main.rand.NextFloat(0.9f, 1.1f) + 0.25f); - Main.EntitySpriteDraw(tex2.Value, Owner.Center - Main.screenPosition + fxPosRot.ToRotationVector2() * 130, null, tipColor, fxRot, tex2.Size() * 0.5f, scale, SpriteEffects.None); + Vector2 scale = new Vector2(0.25f - i * 0.04f, (1.5f + i * 0.15f) * colorFadeIn) * (0.75f * colorFadeIn * Main.rand.NextFloat(0.9f, 1.1f) + 0.25f) * Projectile.scale; + Main.EntitySpriteDraw(tex2.Value, Owner.Center - Main.screenPosition + fxPosRot.ToRotationVector2() * 130 * Projectile.scale, null, tipColor, fxRot, tex2.Size() * 0.5f, scale, SpriteEffects.None); } for (int i = 0; i < 6; i++) { // the electric orb at the tip Color orbColor = Color.Lerp(Color.Lerp(color2, color1, (i + 2) / 6), Color.White, i / 6) with { A = 0 } * 0.5f; - Vector2 scale = new Vector2(Math.Abs(sine * 0.5f) + 0.1f, 1) * (0.05f + i * 0.01f) * attackMult * Main.rand.NextFloat(0.9f, 1.1f) * 2; - Main.EntitySpriteDraw(orb.Value, Owner.Center - Main.screenPosition + fxPosRot.ToRotationVector2() * 180 + tipOutset, null, orbColor, Main.rand.NextFloat(-5, 5), orb.Size() * 0.5f, scale, SpriteEffects.None); + Vector2 scale = new Vector2(Math.Abs(sine * 0.5f) + 0.1f, 1) * (0.05f + i * 0.01f) * attackMult * Main.rand.NextFloat(0.9f, 1.1f) * 2 * Projectile.scale; + Main.EntitySpriteDraw(orb.Value, Owner.Center - Main.screenPosition + fxPosRot.ToRotationVector2() * 188 * Projectile.scale + tipOutset * Projectile.scale, null, orbColor, Main.rand.NextFloat(-5, 5), orb.Size() * 0.5f, scale, SpriteEffects.None); } } return false; From a8ab9a2a52e71dc876c072411ea052044d383b4b Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 22 Mar 2026 00:37:35 -0700 Subject: [PATCH 039/126] Final batch --- Items/Weapons/Melee/TheBurningSky.cs | 4 ++++ Items/Weapons/Melee/WulfrumScrewdriver.cs | 8 ++++--- Projectiles/Melee/BurningMeteor.cs | 8 ++++++- Projectiles/Melee/DragonRageFireball.cs | 8 +++++-- Projectiles/Melee/DragonRageStaff.cs | 8 +++++-- Projectiles/Melee/MurasamaSlash.cs | 3 ++- Projectiles/Melee/OmnibladeSwing.cs | 23 ++++++++++----------- Projectiles/Melee/PhotonRipperProjectile.cs | 12 ++++++----- Projectiles/Melee/SkytideDragoonHoldout.cs | 2 +- Projectiles/Melee/TyphonsGreedBubble.cs | 14 +++++++++---- Projectiles/Melee/TyphonsGreedStaff.cs | 4 +++- Projectiles/Melee/WulfrumScrew.cs | 1 - Projectiles/Melee/WulfrumScrewdriverProj.cs | 5 +++-- 13 files changed, 65 insertions(+), 35 deletions(-) diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index 4147065fcb..56c8923805 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -47,6 +47,10 @@ namespace CalamityMod.Items.Weapons.Melee } public override bool RangedPrefix() => true; //class identity is fake public override bool MeleePrefix() => false; + public override void ModifyItemScale(Player player, ref float scale) + { + scale = player.GetMeleeScale(); + } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { diff --git a/Items/Weapons/Melee/WulfrumScrewdriver.cs b/Items/Weapons/Melee/WulfrumScrewdriver.cs index ff12b06675..a38fd73aa6 100644 --- a/Items/Weapons/Melee/WulfrumScrewdriver.cs +++ b/Items/Weapons/Melee/WulfrumScrewdriver.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float ScrewBazingaModeDamageMult = 6.5f; public static float ScrewBazingaAimAssistAngle = 0.52f; //This may look high but remember this is the FULL angle, so it actually checks for half that angle deviation public static float ScrewBazingaAimAssistReach = 600f; + public float scaler = 1; public override ModItem Clone(Item item) { @@ -99,6 +100,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void HoldItem(Player player) { + scaler = player.GetMeleeScale(); player.Calamity().mouseWorldListener = true; if (Main.myPlayer == player.whoAmI) @@ -143,8 +145,8 @@ namespace CalamityMod.Items.Weapons.Melee //Prevent it from being thrown at any less than -1f chuckSpeed.Y = Math.Clamp(chuckSpeed.Y, -1f, 3f); - int p = Projectile.NewProjectile(source, position, chuckSpeed, ModContent.ProjectileType(), damage, knockback, player.whoAmI); - + Projectile p = Projectile.NewProjectileDirect(source, position, chuckSpeed, ModContent.ProjectileType(), damage, knockback, player.whoAmI); + p.scale = scaler + 0.2f; ScrewStored = false; return false; } @@ -188,7 +190,7 @@ namespace CalamityMod.Items.Weapons.Melee position = Vector2.Lerp(new Vector2(ScrewPosition.X, ScrewPosition.Y), new Vector2(ScrewStart.X, ScrewStart.Y), ProgressionOfScrew); float rotation = ScrewPosition.Z.AngleLerp(ScrewStart.Z, ProgressionOfScrew); float outlineOpacity = (float)Math.Pow(1 - ScrewTimer / ScrewTime, 2); - scale = 1.05f + 0.05f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f); + scale = 1.05f * scale + 0.05f * (float)Math.Sin(Main.GlobalTimeWrappedHourly * 0.5f); Main.spriteBatch.Draw(screwOutlineTex, position, null, Color.Lerp(Color.GreenYellow, Color.White, (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.5f + 0.5f) * outlineOpacity, rotation, screwOutlineTex.Size() / 2f, scale, 0, 0); Main.spriteBatch.Draw(screwTex, position, null, Color.White, rotation, screwTex.Size() / 2f, scale, 0, 0); diff --git a/Projectiles/Melee/BurningMeteor.cs b/Projectiles/Melee/BurningMeteor.cs index 61dafb5b13..2499c312b7 100644 --- a/Projectiles/Melee/BurningMeteor.cs +++ b/Projectiles/Melee/BurningMeteor.cs @@ -31,7 +31,13 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 180; Projectile.ignoreWater = true; } - + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + Player Owner = Main.player[Projectile.owner]; + float scale = Projectile.scale = Owner.GetMeleeScale(); + Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; + hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + } public override void AI() { int randomToSubtract = Main.rand.Next(1, 4); diff --git a/Projectiles/Melee/DragonRageFireball.cs b/Projectiles/Melee/DragonRageFireball.cs index 40ea618ffa..90e440f997 100644 --- a/Projectiles/Melee/DragonRageFireball.cs +++ b/Projectiles/Melee/DragonRageFireball.cs @@ -31,7 +31,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = lifeTime; Projectile.DamageType = DamageClass.Melee; } - + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * Projectile.scale; + hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + } public override void AI() { if (Projectile.ai[0] == 0f) @@ -76,7 +80,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnKill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - Projectile.ExpandHitboxBy(80); + Projectile.ExpandHitboxBy(80 * Projectile.scale); for (int d = 0; d < 5; d++) { int idx = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CopperCoin, 0f, 0f, 100, default, 1f); diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index 5286f392d9..d6d7a9910a 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -37,6 +37,7 @@ namespace CalamityMod.Projectiles.Melee { Player player = Main.player[Projectile.owner]; float spinCycleTime = 50f; + Projectile.scale = player.GetMeleeScale(); // If the player is dead, destroy the projectile if (player.dead || !player.channel) @@ -183,7 +184,8 @@ namespace CalamityMod.Projectiles.Melee Vector2 velocity = new Vector2(0f, speed); velocity = velocity.RotatedBy(angleStep * i * Main.rand.NextFloat(0.9f, 1.1f)); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack / 3f, Projectile.owner); + Projectile fire = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack / 3f, Projectile.owner); + fire.scale = Projectile.scale; } Main.player[Projectile.owner].Calamity().dragonRageCooldown = 60; } @@ -238,12 +240,14 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { + Vector2 newSize = new Point(projHitbox.Width, projHitbox.Height).ToVector2() * Projectile.scale; + projHitbox = new Rectangle(projHitbox.X - (int)((newSize.X - projHitbox.Width) / 2f), projHitbox.Y - (int)((newSize.Y - projHitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); if (projHitbox.Intersects(targetHitbox)) { return true; } float spinning = Projectile.rotation - MathHelper.PiOver4 * (float)Math.Sign(Projectile.velocity.X); - float staffRadiusHit = 110f; + float staffRadiusHit = 110f * Projectile.scale; float useless = 0f; if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center + spinning.ToRotationVector2() * -staffRadiusHit, Projectile.Center + spinning.ToRotationVector2() * staffRadiusHit, 23f * Projectile.scale, ref useless)) { diff --git a/Projectiles/Melee/MurasamaSlash.cs b/Projectiles/Melee/MurasamaSlash.cs index 62c19d5938..3b1b753c7b 100644 --- a/Projectiles/Melee/MurasamaSlash.cs +++ b/Projectiles/Melee/MurasamaSlash.cs @@ -60,9 +60,10 @@ namespace CalamityMod.Projectiles.Melee { if (time == 0) { + Projectile.scale = Owner.GetMeleeScale(); if (Main.zenithWorld) { - Projectile.scale = 2; + Projectile.scale *= 2; Projectile.damage = (int)(Projectile.damage * 2); } Projectile.frame = Main.zenithWorld ? 6 : 10; diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index f40e864581..1773b96cd7 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.StatDebuffs; +using System; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; using Microsoft.Xna.Framework; @@ -33,9 +34,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 3; } - + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + float scale = Owner.GetMeleeScale(); + Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; + hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + } public override void AI() { + Projectile.scale = Owner.GetMeleeScale(); Projectile.frameCounter++; Projectile.frame = Projectile.frameCounter / 3; if (Projectile.frame >= Main.projFrames[Type]) @@ -52,16 +59,8 @@ namespace CalamityMod.Projectiles.Melee // Rotation and directioning. Projectile.rotation = Owner.gravDir == -1f ? MathHelper.Pi : 0f; - Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); - - // Sprite and player directioning. - Projectile.spriteDirection = Projectile.direction * (int)(Owner.gravDir); - if (Projectile.direction == 1) - Projectile.Left = Owner.MountedCenter; - else - Projectile.Right = Owner.MountedCenter; - Projectile.position.X += (Projectile.spriteDirection == 1 ? -92f : 96f) * Owner.gravDir; - Projectile.position.Y -= 80f * Owner.gravDir; + Projectile.direction = Projectile.spriteDirection = MathF.Sign(Owner.Center.DirectionTo(Owner.ClampedMouseWorld()).X); + Projectile.Center = Owner.MountedCenter + new Vector2(Projectile.width * 0.1f * Projectile.scale * Projectile.direction, -Projectile.height * 0.5f * Projectile.scale); Owner.ChangeDir(Projectile.direction); // Prevents the projectile from dying diff --git a/Projectiles/Melee/PhotonRipperProjectile.cs b/Projectiles/Melee/PhotonRipperProjectile.cs index 2208750278..9f2f91ffb2 100644 --- a/Projectiles/Melee/PhotonRipperProjectile.cs +++ b/Projectiles/Melee/PhotonRipperProjectile.cs @@ -63,6 +63,7 @@ namespace CalamityMod.Projectiles.Melee // Recalculate damage every frame for balance reasons, as this is a long-lasting holdout. // This is important because you could start using it while benefitting from Auric Tesla standstill bonus, for example. Projectile.damage = Owner.HeldItem is null ? 0 : Owner.GetWeaponDamage(Owner.HeldItem); + Projectile.scale = Owner.GetMeleeScale(); DetermineDamage(); PlayChainsawSounds(); @@ -139,7 +140,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.rotation -= MathHelper.Pi; // Positioning close to the player's arm. - Projectile.position = playerRotatedPosition - Projectile.Size * 0.5f + directionAngle.ToRotationVector2() * 30f; + Projectile.position = playerRotatedPosition - Projectile.Size * 0.5f + directionAngle.ToRotationVector2() * 30f * Projectile.scale; // Update the position a tiny bit every frame at random to make it look like the saw is vibrating. // It is reset on the next frame. @@ -191,7 +192,7 @@ namespace CalamityMod.Projectiles.Melee for (int i = 0; i < 2; i++) { - Vector2 spawnPosition = Projectile.Center + Projectile.velocity * 35f; + Vector2 spawnPosition = Projectile.Center + Projectile.velocity * 35f * Projectile.scale; // Spawn the dust a little bit on the chainsaw. X variance is less than Y variance to ensure that dust does not // spawn too far from the blade. @@ -235,7 +236,8 @@ namespace CalamityMod.Projectiles.Melee shootReach = 72f; } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, Projectile.velocity, ModContent.ProjectileType(), (int)ToothDamage, 0f, Projectile.owner, shootReach, Projectile.whoAmI, Projectile.ai[2]); + Projectile prismTooth = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, Projectile.velocity, ModContent.ProjectileType(), (int)ToothDamage, 0f, Projectile.owner, shootReach, Projectile.whoAmI, Projectile.ai[2]); + prismTooth.scale = Projectile.scale; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -243,9 +245,9 @@ namespace CalamityMod.Projectiles.Melee // Collision is done as a line to bypass the fact that hitboxes cannot rotate and that // this projectile is notably flat in terms of sprite shape. float _ = 0f; - float width = Projectile.scale * 36f; + float width = Projectile.scale * 36f * Projectile.scale; Vector2 start = Projectile.Center; - Vector2 end = Projectile.Center + Projectile.velocity * 70f; + Vector2 end = Projectile.Center + Projectile.velocity * 70f * Projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), start, end, width, ref _); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index f06dafaa1a..fe9c672a73 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.Melee { // Perform an AABB line collision check to check the whole spear. float _ = float.NaN; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (Projectile.rotation - MathHelper.ToRadians(45)).ToRotationVector2() * HitboxOutset + tipOutset, HitboxSize.X * Projectile.scale, ref _); + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + ((Projectile.rotation - MathHelper.ToRadians(45)).ToRotationVector2() * HitboxOutset + tipOutset) * Projectile.scale, HitboxSize.X * Projectile.scale, ref _); } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { diff --git a/Projectiles/Melee/TyphonsGreedBubble.cs b/Projectiles/Melee/TyphonsGreedBubble.cs index b62d82e9dd..f418a91a2b 100644 --- a/Projectiles/Melee/TyphonsGreedBubble.cs +++ b/Projectiles/Melee/TyphonsGreedBubble.cs @@ -28,7 +28,13 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = 1; Projectile.timeLeft = 300; } - + public override void ModifyDamageHitbox(ref Rectangle hitbox) + { + Player Owner = Main.player[Projectile.owner]; + float scale = Projectile.scale; + Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; + hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + } public override void AI() { Projectile.frameCounter++; @@ -95,9 +101,9 @@ namespace CalamityMod.Projectiles.Melee { SoundEngine.PlaySound(SoundID.Item21, Projectile.position); Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = 64; - Projectile.position.X -= (float)(Projectile.width / 2); - Projectile.position.Y -= (float)(Projectile.height / 2); + Projectile.width *= (int)(2 * Projectile.scale); Projectile.height *= (int)(2 * Projectile.scale); + Projectile.position.X -= (float)(Projectile.width / (int)(2 * Projectile.scale)); + Projectile.position.Y -= (float)(Projectile.height / (int)(2 * Projectile.scale)); for (int i = 0; i < 2; i++) { Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.Water, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); diff --git a/Projectiles/Melee/TyphonsGreedStaff.cs b/Projectiles/Melee/TyphonsGreedStaff.cs index 17cf90d7a2..864635f6ab 100644 --- a/Projectiles/Melee/TyphonsGreedStaff.cs +++ b/Projectiles/Melee/TyphonsGreedStaff.cs @@ -41,6 +41,7 @@ namespace CalamityMod.Projectiles.Melee float rotationSpeed = -0.7853982f; Vector2 actualPosition = player.RotatedRelativePoint(player.MountedCenter, true); Vector2 rotationPoint = Vector2.Zero; + Projectile.scale = player.GetMeleeScale(); if (player.dead) { @@ -142,6 +143,7 @@ namespace CalamityMod.Projectiles.Melee var source = Projectile.GetSource_FromThis(); Projectile bubble = CalamityUtils.ProjectileBarrage(source, Projectile.Center, player.Center, Main.rand.NextBool(), 800f, 800f, 0f, 800f, 10f, ModContent.ProjectileType(), (int)(Projectile.damage * 1), Projectile.knockBack * 0.5f, Projectile.owner, true); bubble.ai[1] = Main.rand.NextFloat() + 0.5f; + bubble.scale = Projectile.scale; } } } @@ -162,7 +164,7 @@ namespace CalamityMod.Projectiles.Melee } float f = Projectile.rotation - 0.7853982f * (float)Math.Sign(Projectile.velocity.X); float rotationFactor = 0f; - float collisionRadius = 110f; + float collisionRadius = 110f * Projectile.scale; if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center + f.ToRotationVector2() * -collisionRadius, Projectile.Center + f.ToRotationVector2() * collisionRadius, 23f * Projectile.scale, ref rotationFactor)) { return true; diff --git a/Projectiles/Melee/WulfrumScrew.cs b/Projectiles/Melee/WulfrumScrew.cs index 104bca3d8a..7e4b87d2cd 100644 --- a/Projectiles/Melee/WulfrumScrew.cs +++ b/Projectiles/Melee/WulfrumScrew.cs @@ -52,7 +52,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.extraUpdates = 3; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 1; - Projectile.scale = 1.2f; } public override void AI() diff --git a/Projectiles/Melee/WulfrumScrewdriverProj.cs b/Projectiles/Melee/WulfrumScrewdriverProj.cs index 6b82d56b3d..15b24a242b 100644 --- a/Projectiles/Melee/WulfrumScrewdriverProj.cs +++ b/Projectiles/Melee/WulfrumScrewdriverProj.cs @@ -62,6 +62,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { + if (EndLag == 0) //Initialization { EndLag = (float)Math.Max(Owner.HeldItem.useTime - MaxTime, 1); @@ -73,7 +74,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation Projectile.Center = Owner.MountedCenter + OffsetFromPlayer; - Projectile.scale = 1f + (float)Math.Sin(LifetimeCompletion * MathHelper.Pi) * 0.2f; //SWAGGER + Projectile.scale = Owner.GetMeleeScale() * 1f + (float)Math.Sin(LifetimeCompletion * MathHelper.Pi) * 0.2f; //SWAGGER //Make the owner look like theyre holding the sword bla bla Owner.heldProj = Projectile.whoAmI; @@ -222,7 +223,7 @@ namespace CalamityMod.Projectiles.Melee Rectangle frame = new Rectangle(0, (smearTex.Height / 3) * frameCount, smearTex.Width, smearTex.Height / 3); float opacity = 1 - (float)Math.Pow(LifetimeCompletion / 0.6f, 0.5f); - Main.spriteBatch.Draw(smearTex, Projectile.Center + Projectile.velocity * 67f - Main.screenPosition, frame, Color.White * opacity, Projectile.rotation, frame.Size() / 2f, 0.9f, 0, 0); + Main.spriteBatch.Draw(smearTex, Projectile.Center + Projectile.velocity * 67f * Projectile.scale - Main.screenPosition, frame, Color.White * opacity, Projectile.rotation, frame.Size() / 2f, 0.9f * Projectile.scale, 0, 0); } return false; } From 9a75e4a0b35747bc846ca75a0523dbbfee1926a5 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 22 Mar 2026 00:41:38 -0700 Subject: [PATCH 040/126] Removed testing glove scale --- Utilities/PlayerUtils.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 5f3a83f5e5..ebdca2b3c4 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -147,8 +147,6 @@ namespace CalamityMod // Xyk 3MARCH2026: Will be implemented better by Doze eventually if (addHeldItemScale) baseScale += (player.HeldItem.scale - 1); - if (player.kbGlove) - baseScale += 1;//REMOVE after testing is complete if (player.HasBuff(BuffID.Tipsy)) baseScale += 0.15f; From a2191014a1c06e45fd58b7680330b68ca41a379e Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 22 Mar 2026 14:59:31 -0700 Subject: [PATCH 041/126] Bacon Oil Sprites fixes The Sandwich spritesheet --- Buffs/Alcohol/BaconOilBuff.png | Bin 5376 -> 3543 bytes Items/Potions/Alcohol/BaconOil.png | Bin 4356 -> 3268 bytes Items/Potions/Food/TheSandwich.png | Bin 2054 -> 4924 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Buffs/Alcohol/BaconOilBuff.png b/Buffs/Alcohol/BaconOilBuff.png index 72c4ddb6070d8737df5c887a2c4165860448b3b1..1873b16f5b3696a49371688817160e5b5bf710f4 100644 GIT binary patch delta 790 zcmV+x1L^#LD%TsZstOAW5&!@T5&_cPe*BZQ3MqdA<4Ht8R9J=0*KcUmRUF6h*Mv05 z)>UREa&ODbuq?za39^>09+@a+Ac!(p$S5d-(KBHg^`Ji}QXxec4(W-61^LL-6^fXd zq9sMH=|xsHwzdA*jNKj_PM6=${dCXn@AKr|-;Z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>xM_?Hess@dUL27PQBf9U=9h9!M zSjvAaQpjd73{VvCM>>cN`*BHLj;{R*`C69mp8YFwW{TcGlwiU~^576|mrCix2bg7x z4PQ;;=rsAk@3@(GMIq25kQJ6QnSe&MP5Sz(8+a-8b-J?Kust3Yt67$2=SfXZGj;hb z3f2|+U85Y0J#t^Mf4b~e88&~7 zYKv@oRUrA=$%8~A!^F)2g04Oy$q@odobNvKdz|^tm)U;T4*K?WQJ$H{NEOHx+BEBM z)1D~1MkBoOPuF?l?=uX1y1~#L1zvql=IP&(=m(%)C9q*s)FuxeS$3p7czaM!AXRP?1#mqp|$KZ+GDc1c)St2)N?}d`Vnp zh?jo+6opcjYOO%M(j=F*kSqz+qZ0|~?B5n9+2`iUScytXF!<#~JOgdo3x|JjwYH+V zP3pxawgs8l0zY~DKUkd3lg}6{0l)sGZW5!NB(|W<)`W=0I?*)^Y#YTHrHzMleunbWB!$#8 znYn2i(j?)}jNu}|J|<9blfCvDGv#+#42^T`T#6q)bO!nVDnX>n2`qO$vuR;8Z5nNX ztU-5=kG{1D5`EqDt?6NS`!+V-xR*XpKQ27T=rn0kq)3HnnvEIMVw^U*U7=jMM8!^% wjZSg)_$5yK$pu^ija>Rez{mbM{kQ@D1yr%V^=yEWw*UYD07*qoM6N<$g1|5w`~Uy| diff --git a/Items/Potions/Alcohol/BaconOil.png b/Items/Potions/Alcohol/BaconOil.png index 98afd8bb8b19a7006b65beefe4d5cb0afba79a62..0c9a1f686aeb840f455080baec9d96a0e18043a7 100644 GIT binary patch delta 532 zcmV+v0_**RBE%UXiBL{Q4GJ0x0000DNk~Le0000C0000s2nGNE0P~c1EU_WI3V#96 zNklbw16|-!_W{?P(;pFNY$(IR0BMU3Bo96D>?7D!vIUgwn=6$Q@v9+0a#T)!Do9CZX6f;e zpr)!lu0000(vD?JPn_6>f4DXo!1znWGm(ItsQ%$LjD(J-*9*YJ z_8DjijSszl9eHZH;lSJ+!XNQdzorQ!yr4ZpPy}wSMoy>B!s+vgClhq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A?==3x3$r)HdliZ~S#8ldLM{sC@)3q&JzWp=x+fjv1oqsQ0 ztA7ivAclDM55JLfw?9JI2r=o2*_a`d+(l_fQ=zRkfT{^R``S|0lcC*?LufP%)YEPG zNWcHWnO$7ASjHkI)i3V_AYy-uz=6B}H0ou4Y!@SE)J&X?bY6V>Wxi_vI`yc%9FiCE zkkTH804PEQ7!EBje@sS0F+N&Xf7K7K6*8q|uh7)|FAi6JCQ|OT8OsW!Q#D2m-8(A# b(!KUSJn~Fb-G!XY00000NkvXXu0mjfOFjp9 diff --git a/Items/Potions/Food/TheSandwich.png b/Items/Potions/Food/TheSandwich.png index a20e32b7bd6c4c4de6192bf1095029c083fd0966..63404497ee21d8358960c56e6ff3001508e227cc 100644 GIT binary patch literal 4924 zcmcImXHe7Kv;G0nJE4dmO`2dRkzPa~La0)ucWEyzN{|i_LJ3WZAWeD`ML2{Winj z#CV1^2Hz&zW{}Dd_j<&`&4?IA+XhP!6Op83(C$bE_++3aaHwHQ83jc62eMc_rIs%) zipa2b^9DO~;u)NoBSY(H75idq;0`Wlk^3mjBfkwl@46E@*$gC~N0NTgHK#<<6q++H z5qe@1<6Z5^iD>=+B%Z(zcwL#+uL7IDaQf@c=!n60guj_2e|WLzbo6S&HMjkVyD z1Pn402)oBK*6eHpa>{180+`1GnT=9OX=Y&=g<(b+OQta8;2o%RyNV}j@Btk3tVXx26TJ{iq89+F7PHffJ_^Bt@DODH} z0bU6Ne!vFo{)~y6f5n4_=zE60T8c68m&dXTS{p|vrh(#@@OV8!e9u=2I@!cK%aYSs z>=v9$&jAd}h~TU7WqJCysl>(DGLix#LU zb8eV9jq!440ccOS?dtxd)yUY+d0jr z3s<)b!5g*D@BDHI*h`a3MM$dK%6hv5l|j4vhnL|eG^_bB$K2$Xeq5}K=lt!l;;$b; zhstz$bTb;P`a!XzS!&S_kMpyS>ANmVX0RFP*<;3$40GaA-dhjDxBy`hMjp!Gr=lY} zq13&aBqzA|(X7n3XZVQAP_ri8%YIh=@FX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5X4qQKL+cqr^miT3e37)tbxRu$bbg!_n^Mk-T%VTT~NmexNJp?mC%Egkp91&j+GQe zQ4~c{6h%=KMSf8fMN$4g*zZQ*jzo7t=X?bo`wTwZ(%owM)G-1ccZ|2x^r>S6Jmwh0 z25+h9Q^yE+%rV|p)2EIR=yJz+YfYazM!;h+26#(NpE^dsV~#;T##?Io)G-1ck1^g- j)2EJ66h-kkJ$n2LzX^SvMBwEs00000NkvXXu0mjfO|tOg From 0c9dace26afae04648a6803dfe80a9deeedf8f0c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 22 Mar 2026 18:02:40 -0400 Subject: [PATCH 042/126] Omniblade nerf --- Items/Weapons/Melee/Omniblade.cs | 5 ++--- Projectiles/Melee/OmnibladeSwing.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/Omniblade.cs b/Items/Weapons/Melee/Omniblade.cs index ac56bb47f4..19639914f2 100644 --- a/Items/Weapons/Melee/Omniblade.cs +++ b/Items/Weapons/Melee/Omniblade.cs @@ -15,10 +15,9 @@ namespace CalamityMod.Items.Weapons.Melee Item.height = 146; Item.damage = 100; Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance; - Item.crit = 45; - Item.useAnimation = 12; + Item.crit = 41; + Item.useTime = Item.useAnimation = 12; Item.useStyle = ItemUseStyleID.Swing; - Item.useTime = 12; Item.useTurn = true; Item.knockBack = 6f; Item.UseSound = SoundID.Item1; diff --git a/Projectiles/Melee/OmnibladeSwing.cs b/Projectiles/Melee/OmnibladeSwing.cs index 1773b96cd7..e232e01c3b 100644 --- a/Projectiles/Melee/OmnibladeSwing.cs +++ b/Projectiles/Melee/OmnibladeSwing.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.ContinuouslyUpdateDamageStats = true; Projectile.ownerHitCheck = true; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 3; + Projectile.idStaticNPCHitCooldown = 5; } public override void ModifyDamageHitbox(ref Rectangle hitbox) { From 60846f2b9dac60a87dd1eba81405a54e1edb513a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sun, 29 Mar 2026 00:56:18 -0500 Subject: [PATCH 043/126] eclipse fall --- Items/Weapons/Rogue/EclipsesFall.cs | 14 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 5 + Projectiles/Rogue/EclipseFragment.cs | 107 ++++++++++ Projectiles/Rogue/EclipseFragment.png | Bin 0 -> 5097 bytes Projectiles/Rogue/EclipseSpark.cs | 82 ++++++++ Projectiles/Rogue/EclipseSpear.cs | 182 ++++++++++++++++++ Projectiles/Rogue/EclipseSpear.png | Bin 0 -> 9821 bytes Projectiles/Rogue/EclipsesFallMain.cs | 78 -------- Projectiles/Rogue/EclipsesFallSpear.cs | 154 +++++++++++++++ Projectiles/Rogue/EclipsesSmol.cs | 44 ----- Projectiles/Rogue/EclipsesSmol.png | Bin 1416 -> 0 bytes Projectiles/Rogue/EclipsesSmolGlow.png | Bin 1051 -> 0 bytes Projectiles/Rogue/EclipsesStealth.cs | 129 ------------- Projectiles/Rogue/VegaStar.cs | 3 +- 14 files changed, 536 insertions(+), 262 deletions(-) create mode 100644 Projectiles/Rogue/EclipseFragment.cs create mode 100644 Projectiles/Rogue/EclipseFragment.png create mode 100644 Projectiles/Rogue/EclipseSpark.cs create mode 100644 Projectiles/Rogue/EclipseSpear.cs create mode 100644 Projectiles/Rogue/EclipseSpear.png delete mode 100644 Projectiles/Rogue/EclipsesFallMain.cs create mode 100644 Projectiles/Rogue/EclipsesFallSpear.cs delete mode 100644 Projectiles/Rogue/EclipsesSmol.cs delete mode 100644 Projectiles/Rogue/EclipsesSmol.png delete mode 100644 Projectiles/Rogue/EclipsesSmolGlow.png delete mode 100644 Projectiles/Rogue/EclipsesStealth.cs diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 073d54b200..476e665729 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -17,13 +17,13 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 82; Item.height = 88; - Item.damage = 500; + Item.damage = 900; Item.knockBack = 3.5f; Item.useAnimation = Item.useTime = 24; Item.autoReuse = true; Item.DamageType = RogueDamageClass.Instance; - Item.shootSpeed = 15f; - Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 32f; + Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; @@ -35,9 +35,6 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - if (player.Calamity().StealthStrikeAvailable()) - type = ModContent.ProjectileType(); - int proj = Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); @@ -50,9 +47,8 @@ namespace CalamityMod.Items.Weapons.Rogue { CreateRecipe(). AddIngredient(). - AddIngredient(8). - AddIngredient(8). - AddIngredient(12). + AddIngredient(5). + AddIngredient(15). AddTile(). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 5d761dc64b..4a9d6a9c32 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -334,3 +334,8 @@ WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals +EclipseFragment.DisplayName: Eclipse Fragment +EclipseGuandao.DisplayName: Eclipse Guandao +EclipsesFallSpear.DisplayName: Eclipses Fall Spear +EclipseSpark.DisplayName: Eclipse Spark +EclipseSpear.DisplayName: Eclipse Spear diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs new file mode 100644 index 0000000000..fe05b515d8 --- /dev/null +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -0,0 +1,107 @@ +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipseFragment : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public static int lifetime => 1200; + Color? color = null; + public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * 0.02f; + if (Projectile.ai[0] < -1) + { + Projectile.penetrate = 1; + Projectile.damage = Projectile.originalDamage; + Projectile.stopsDealingDamageAfterPenetrateHits = false; + var target = Projectile.FindTargetWithinRange(4000); + if (target is not null) + { + Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; + Projectile.velocity *= 0.95f; + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); + } + } + + if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) + { + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) + { + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); + Projectile.velocity *= Projectile.ai[2]; + Projectile.ai[2]--; + } + if (Projectile.ai[2] > 0 && Projectile.velocity.Length() > 1) + { + + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); + } + } + else + { + if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) + { + if (Projectile.timeLeft > 100) + Projectile.timeLeft = 100; + Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.velocity *= 0f; + if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) + { + Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; + Main.projectile[(int)Projectile.ai[0] - 1].netUpdate = true; + Projectile.active = false; + } + } + } + } + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) + return false; + return null; + } + + public override void OnKill(int timeLeft) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(Projectile.GetSource_Death(),Projectile.Center,Vector2.Zero,ModContent.ProjectileType(),Projectile.damage,Projectile.knockBack,Projectile.owner); + } + public override bool PreDraw(ref Color lightColor) + { + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + } +} diff --git a/Projectiles/Rogue/EclipseFragment.png b/Proj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MN2Ze;$?xBCo+36mqOv)!cAhranwtNN?D;jA1?zCGIPxvk1e zX!@7Zv3}ImTa%i3w>mzcHIqi2iwR3x!thHdTJtYvlmnhTsk|+>8SlD*$qP#>nA>>` zekNqtT(R6d{4-7p8hWzC+|rkJr|4~G@|M^q3!11IuL!9i%Hq|hNBjHTrg|JU%NIUr zyE3t{j^_;&rVWv8CXI|KUO6A(kw2=YwABcfbBmIL!!%3b^{mCZV+&;Mop-}_FQOw* zktnRoF|gNEqL~~qPWgjelN@F&t8pttt~FCS7<+qt{*7!m|m==Z=L_+!_@2q*$6F8-n4e^9Bp zDCg=t-$H}ef9DBBpNR%|GaTPo?`rdU^Z>MzQec(MS1Fz*hiE!;2-SomT)nK*&iQ5P z#cySNIk!2~2>3(e+o@N8#Al0tx$)~jU90M~#bLNurI)mlzf-CemQB4N)HrS+G7OuO z^FC5zu~0oaaJSDO)^5JTqsT9!s4rOM@F-#f>Wv&KKMYaSp3+$SxsDT#VACTH&#Mqd L7KS+Z^?UyVm-2Oe literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs new file mode 100644 index 0000000000..db09560aa8 --- /dev/null +++ b/Projectiles/Rogue/EclipseSpark.cs @@ -0,0 +1,82 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipseSpark : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int lifetime = 150; + Color? color = null; + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 6; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localAI[0] = 20f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * Projectile.ai[0]; + + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) + { + Projectile.velocity.Normalize(); + Projectile.velocity *= Projectile.localAI[0]; + Projectile.localAI[0]--; + } + + if (Projectile.localAI[0] == 0) + { + Projectile.Kill(); + } + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73),Main.rand.NextFloat()); + GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center,Projectile.velocity* 0.001f,false,10,1, color.Value)); + } + + public override bool OnTileCollide(Vector2 oldVelocity) + { + Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); + Projectile.Kill(); + return false; + } + + public override void OnKill(int timeLeft) + { + return; + for (int i = 0; i < 5; i++) + { + int dustToUse = Main.rand.Next(0, 3); + int dustType = 0; + switch (dustToUse) + { + case 0: + dustType = 109; + break; + case 1: + dustType = 111; + break; + case 2: + dustType = 132; + break; + } + + int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, Projectile.velocity.X, Projectile.velocity.Y, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0.75f; + } + } + } +} diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs new file mode 100644 index 0000000000..05dc251e75 --- /dev/null +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs; +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + [PierceResistException] + public class EclipseSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + bool initialized = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + (Vector2 start, Vector2 end) LinePos = (new(), new()); + float LineWidth = 0; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 48; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 1; + Projectile.timeLeft = 600 * Projectile.MaxUpdates; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void AI() + { + if (!initialized) + { + Projectile.ai[0] = -1; + Projectile.localAI[0] = Projectile.ai[2]; + Projectile.ai[2] = 0; + initialized = true; + } + + Projectile.originalDamage = (int)(1000 * (Projectile.ai[2]/20f)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0]) + { + LinePos.end = Projectile.position; + Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; + Projectile.Damage(); + Projectile.ai[0] = -1; + LineWidth = 1f; + LinePos.start = Projectile.Center; + } + Projectile.velocity *= 0.9f; + LineWidth -= 0.05f; + } + public override bool PreDraw(ref Color lightColor) + { + + if (LineWidth > 0) + { + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + + using (Main.spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + + List posList = []; + //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. + for (var i = 0; i <= 10; i++) + { + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 10f)); + } + var pos = posList.ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 32); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 24); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + } + } + var tex = TextureAssets.Item[ModContent.ItemType()]; + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied,null,null,null,null,Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * (Projectile.localAI[0] > 0 ? Projectile.ai[2]/Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(),targetHitbox.Size(),Projectile.oldPosition+ new Vector2(Projectile.width,Projectile.height)*0.5f,Projectile.Center,48f,ref _)) + { + return true; + } + + return base.Colliding(projHitbox, targetHitbox); + } + + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < 0) + return false; + return null; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + //Half damage to any NPC that isn't the primary target + if (Projectile.ai[0] != target.whoAmI) + modifiers.SourceDamage *= 0.5f; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Projectile.ai[0] = -1; + Projectile.netUpdate = true; + } + + public override void OnKill(int timeLeft) + { + return; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); + return mainColor * MathF.Pow(1 - completion*1.1f, 0.5f); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + } +} diff --git a/Projectiles/Rogue/EclipseSpear.png b/Projectiles/Rogue/EclipseSpear.png new file mode 100644 index 0000000000000000000000000000000000000000..fe72281fb50053a91ac71f3f35ecbeac88ac557e GIT binary patch literal 9821 zcmZ8{cUTk47xn^T0~Ec|5#%aGK`=rnp~|&@B#875h7y4Q0ue$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OEG1u}R{33WdsNxQcV_;t9tm}`P{eO=hf#VP4`Qv-Q zx90vpkq+#28~A~GjwIXs_gjustib4<#Fec-cf(je7%db`73`hfdFALe3HDXmzBir8 aUZCc`R0755@6Nq5QpQ(IFOv*iAN(I9Qatzo literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/EclipsesFallMain.cs b/Projectiles/Rogue/EclipsesFallMain.cs deleted file mode 100644 index acae2f710c..0000000000 --- a/Projectiles/Rogue/EclipsesFallMain.cs +++ /dev/null @@ -1,78 +0,0 @@ -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesFallMain : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - - // these also affect KB - public static float RainDamageMult = 0.4f; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f); - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => SpawnSpears(target); - public override void OnHitPlayer(Player target, Player.HurtInfo info) => SpawnSpears(target); - - private void SpawnSpears(Entity target) - { - int spearAmt = Main.rand.Next(3, 4 + 1); // 3 or 4 spears - for (int n = 0; n < spearAmt; n++) - { - Vector2 spawnPos = target.Center - new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(500f, 800f)); - Vector2 spearVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, target, 29f, 2) + Vector2.UnitX * Main.rand.NextFloat(-6f, 6f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, spearVel, ModContent.ProjectileType(), (int)(Projectile.damage * RainDamageMult), Projectile.knockBack * RainDamageMult, Projectile.owner); - } - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs new file mode 100644 index 0000000000..f6857c153e --- /dev/null +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.CalPlayer; +using CalamityMod.Particles; +using CalamityMod.Systems.Mechanic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class EclipsesFallSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + private int SplitProjDamage => (int)(Projectile.damage * 0.5f); + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 2; + Projectile.penetrate = 1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; + Projectile.timeLeft = 150 * Projectile.MaxUpdates; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(5)) + { + Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); + float trailScale = Main.rand.NextFloat(0.8f, 1.2f); + Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; + Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); + GeneralParticleHandler.SpawnParticle(eclipseTrail); + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + int onHitCount = 6; + float spread = 20f; + int projectileDamage = SplitProjDamage; + float kb = 5f; + int sparkID = ModContent.ProjectileType(); + int starID = ModContent.ProjectileType(); + for (int i = 0; i < onHitCount; i++) + { + int projID = i % 3 == 0 ? starID : sparkID; + Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; + float speed = Main.rand.NextFloat(1.5f, 2f); + float moveDuration = Main.rand.Next(5, 15); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration,20); + } + + SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); + + + List frags = new(); + var p = -2; + foreach (var item in Main.ActiveProjectiles) + { + + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner) + { + if (Projectile.Calamity().stealthStrike) + { + if (item.timeLeft < 520) + { + item.Kill(); + continue; + } + item.timeLeft = 600; + p = item.whoAmI; + } + item.ai[0] = target.whoAmI; + } + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) + { + frags.Add(item); + } + } + if (Projectile.Calamity().stealthStrike && p < 0) + for (int i = 0; i < 1; i++) + { + int projID = ModContent.ProjectileType(); + Vector2 velocity = Vector2.Zero; + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI,0,Math.Min(20,frags.Count(x => x.ai[0] == 0))); + proj.rotation = Projectile.rotation; + p = proj.whoAmI; + } + + + frags = frags.OrderBy(x => x.timeLeft).ToList(); + int toRemove = frags.Count(x => x.ai[0] == 0) - 20; + foreach (var item in frags) + { + if (toRemove > 0 && item.ai[0] == 0) + { + item.ai[0] = -2; + item.timeLeft = EclipseFragment.lifetime; + toRemove--; + continue; + } + if (Projectile.Calamity().stealthStrike) + { + if (item.ai[0] == 0) + { + item.ai[1] = Main.rand.Next(5, 15); + item.ai[2] = 20; + } + item.ai[0] = p + 1; + item.timeLeft = EclipseFragment.lifetime; + item.damage = 0; + item.netUpdate = true; + } + } + + + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } +} diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs deleted file mode 100644 index f9831d85bc..0000000000 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesSmol : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; - public override void SetDefaults() - { - Projectile.width = Projectile.height = 24; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.timeLeft = 75 * Projectile.MaxUpdates; - } - - public override void AI() - { - Lighting.AddLight(Projectile.Center, 0.5f, 0.4f, 0.15f); - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 16f, 20f); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesSmol.png b/Projectiles/Rogue/EclipsesSmol.png deleted file mode 100644 index 96e05053b1abe262e187e51ede1a71de07e44673..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1416 zcmV;31$X+1P)MyaEkY6BF?SBSi!?+!aJH5zNVlJ+ZdbK~-RmZ=7KW9=QC%%2IDW9JV@8iRb~;xrxWD$BqvN ztt^UJFlg1h0j{i>G2O~>OUGKd`@kbB&)$1u4O*U24wNt}^r{ubtQdo8E3VlSZQkE! z<%8bsRz838wzU}LKt(i38AEe4iNEu{f~gE5K1}Mky)&at)K{)iZ3|TFgKO6M)U!O} zmtYbMQig@HUS0+fch};n_AA-%$c-NvZ7PjX4pdI932DrP!?)~pS3vPEU+#RhJ86HI zqz)P;bZwn${m5QC?ysBcGQLPZ#>Zu6?NUga3TIR(jjI?tP=UFb0vG}cKw;LFD|_vd zY7&fME*2s>b2J!tspCwBIWTF{$6asba3#4ki&c#3<@#c23D; z%T<#`X0jIyB763|cxm-qCr(V83TG4n9jHjwqdMe^v^yiMOd@N2KDr{)g?1xXUbn2N zS`~Bh%-!zqnPqWdSWKHrW0V7xlTqr6=&sJ2cItm<53}fZal=WgV!ep$#dUlbS+D>7 zPiqg8h)X@|O|g$x_*@T0IZzSkLyjB9;FKA8!i_(4bI8cF*KCOY>3=kk{FGTR4n{q_ zFyGqsUU+OJ{VHRW0~LFTrCtGxF(x!eQ|75wDMNS+ox`0zJ};wfsZ1&@>k-(2iZDyX zyfGs6HR(`y)gomQzK2x;&3ZU&G>QA**ma+-az;5&O)^QlsTSdrV(U@w?si+K$xDt{ ziL+O~#QoSk;cs2Xs*F(~COJ@b1Q2bUaZHocN2yZ}Id?Q`{k89Qi#gw3XZ%y@DnQQU z-Do~+XYN2HLa#uD=4={{eKeh;(N2Aru6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|(Sxr0fU}O8!ZrC2khFbrqSsKfJy<055ufF)j(sBnnc~hDuHIb zT7}Jd_04vWMwv7-Dl$n?v#67_?$SydV>I>+HKZ?Tl*!byq4f(yF-fzTR_amZ&h~1M z8>6NrjWTI&R4uy!&(ZWA4YcmUM9p?;;#g*-Q6|-^&&+|&m}Wb-UcwCa*NQvJj?_~; zw_`td?RzL`l!IX5PxQG|I%j%4(LzBsBoE z4$>Hd5yUE>A4Al<$T0d_XTLPcr1w=-M2|x^PuncE@_lWbEC9=(rnZ>ri^7sU(zU(=Cgz` zdQTTIE5_7FqfDlrMa^nstyv#5X_U#-7pgO<`|Gk8nd~r;t4G5 z*OS;;Cyg@Mv4pkmH0a-?QAu(D%+37<=V5@&?!?X10000EWmrjOO-%qQ0000800000 V0002eQ "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - - // these also affect KB - public const float RainDamageMult = 0.2f; - public const float ExplosionDamageMult = 0.5f; - - private bool changedTimeLeft = false; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - // Uses localAI[1] to decide how many frames until the next spear drops. - public override void AI() - { - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.3f); - // Behavior when not sticking to anything - if (Projectile.ai[0] == 0f) - { - // Keep the spear oriented in the correct direction - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - // Behavior when having impaled a target - else - { - // Eclipse's Fall is guaranteed to impale for 10 seconds, no more, no less - if (!changedTimeLeft) - { - Projectile.MaxUpdates = 1; - Projectile.timeLeft = 600; - changedTimeLeft = true; - } - - // Spawn spears. As this uses local AI, it's done client-side only. - if (Projectile.owner == Main.myPlayer) - { - Projectile.localAI[1] -= 1f; - if (Projectile.localAI[1] <= 0f) - { - // Set up the spear counter for next time. Used to be every 5 frames there was a 50% chance; now it's more reliable but slower. - Projectile.localAI[1] = Main.rand.Next(8, 10+1); // 8 to 10 frames between each spearfall - - int type = ModContent.ProjectileType(); - Vector2 spawnPos = Projectile.Center - new Vector2(Main.rand.NextFloat(-100f, 100f), Main.rand.NextFloat(500f, 800f)); - Vector2 spearVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(spawnPos, Main.npc[(int)Projectile.ai[1]], 29f, 2) + Vector2.UnitX * Main.rand.NextFloat(-6f, 6f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spawnPos, spearVel, type, (int)(Projectile.damage * RainDamageMult), Projectile.knockBack * RainDamageMult, Projectile.owner); - } - } - } - - // Sticky behavior. Lets the projectile impale enemies and sticks to its impaled enemy automatically. - Projectile.StickyProjAI(10); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => Projectile.ModifyHitNPCSticky(1); - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (targetHitbox.Width > 8 && targetHitbox.Height > 8) - { - targetHitbox.Inflate(-targetHitbox.Width / 8, -targetHitbox.Height / 8); - } - return null; - } - - public override bool PreDraw(ref Color lightColor) - { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - - public override bool? CanHitNPC(NPC target) => Projectile.ai[0] == 1f ? false : base.CanHitNPC(target); - - public override bool CanHitPvp(Player target) => Projectile.ai[0] != 1f; - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); - if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * ExplosionDamageMult), Projectile.knockBack * ExplosionDamageMult, Projectile.owner); - } - } -} diff --git a/Projectiles/Rogue/VegaStar.cs b/Projectiles/Rogue/VegaStar.cs index 4c2240f9f7..0986d31102 100644 --- a/Projectiles/Rogue/VegaStar.cs +++ b/Projectiles/Rogue/VegaStar.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue public class VegaStar : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public static int lifetime = 300; + public static int lifetime => 600; public override void SetStaticDefaults() { @@ -29,7 +29,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 5; - lifetime = 600; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 20f; From 975cc6b13d678eb9a9904135ceb6df56477311cd Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 30 Mar 2026 19:47:50 -0500 Subject: [PATCH 044/126] paleo / partisan pt 1 --- Items/Weapons/Rogue/ProfanedPartisan.cs | 7 +- Items/Weapons/Rogue/SpearofPaleolith.cs | 5 +- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 19 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 1 + Projectiles/Rogue/EclipseFragment.png | Bin 5097 -> 5334 bytes Projectiles/Rogue/EclipseSpear.cs | 2 +- Projectiles/Rogue/EclipsesFallSpear.cs | 2 +- Projectiles/Rogue/FossilShardThrown.cs | 29 +++- Projectiles/Rogue/ProfanedPartisanFlare.cs | 124 +++++++++++++ Projectiles/Rogue/ProfanedPartisanProj.cs | 164 ++++++++++++------ Projectiles/Rogue/ProfanedPartisanSpear.cs | 90 ++++------ Projectiles/Rogue/SpearofPaleolithProj.cs | 89 ++++++---- 12 files changed, 380 insertions(+), 152 deletions(-) create mode 100644 Projectiles/Rogue/ProfanedPartisanFlare.cs diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 5814d9db9d..11510f690f 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -11,19 +11,20 @@ namespace CalamityMod.Items.Weapons.Rogue { public class ProfanedPartisan : RogueWeapon { + public static int ShardBaseDamage => 88; public override void SetDefaults() { Item.width = 68; Item.height = 68; - Item.damage = 222; + Item.damage = 333; Item.crit = 15; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.noUseGraphic = true; - Item.useTime = 18; - Item.useAnimation = 18; + Item.useTime = 21; + Item.useAnimation = 21; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; Item.rare = ModContent.RarityType(); diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index 519c1c8cb2..32a36636f4 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -9,11 +9,12 @@ namespace CalamityMod.Items.Weapons.Rogue { public class SpearofPaleolith : RogueWeapon { + public static int ShardBaseDamage => 25; public override void SetDefaults() { Item.width = 54; Item.height = 54; - Item.damage = 65; + Item.damage = 70; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 27; @@ -25,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Rogue Item.value = CalamityGlobalItem.RarityPinkBuyPrice; Item.rare = ItemRarityID.Pink; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 35f; + Item.shootSpeed = 6f; Item.DamageType = RogueDamageClass.Instance; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 79545b4952..24cfc9a19e 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -358,8 +358,10 @@ EclipsesFall: { DisplayName: Eclipse's Fall Tooltip: ''' - Summons spears from the sky on hit - Stealth strikes impale enemies and summon a constant barrage of spears over time + Throws a javelin that shatters into fragments of primordial light upon enemy hits + If more than 20 fragments exist, the oldest fragments will seek out enemies to attack + Stealth strikes coalsce fragments into an eclipse spear, gaining power based on the number of fragments + The eclipse spear will pierce though any enemy hit by Eclipse's Fall 'When the sun goes dark, you will know judgement' ''' } @@ -865,8 +867,10 @@ ProfanedPartisan: { DisplayName: Profaned Partisan Tooltip: ''' - Fires an unholy spear that explodes on enemy hits - Stealth strikes spawn smaller spears to fly along side it + Throws a profaned spear that splits into miniature spears upon hitting an enemy + Stealth strikes remain impaled in an enemy for 10 seconds + While an enemy is impaled, all spears that strike them instead erupt into homing fireballs + Inflicts [cbuff:CalamityMod/HolyFlames] ''' } @@ -1086,9 +1090,10 @@ SpearofPaleolith: { DisplayName: Spear of Paleolith Tooltip: ''' - Throws an ancient spear that shatters enemy armor - Spears rain fossil shards as they travel - Stealth strikes travel slower but further, raining more fossil shards + Throws an ancient spear that shatters into fossil shards upon hitting an enemy + Stealth strikes remain impaled in the enemy for 10 seconds + While an enemy is impaled, all spears that strike them erupt into even more fossil shards + Inflicts [cbuff:CalamityMod/ArmorCrunch] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 4a9d6a9c32..74ea651bdb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -339,3 +339,4 @@ EclipseGuandao.DisplayName: Eclipse Guandao EclipsesFallSpear.DisplayName: Eclipses Fall Spear EclipseSpark.DisplayName: Eclipse Spark EclipseSpear.DisplayName: Eclipse Spear +ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare diff --git a/Projectiles/Rogue/EclipseFragment.png b/Projectiles/Rogue/EclipseFragment.png index 93296c6a1e958f87d706f2e6c3d1322550eea3dc..fc489108d07fce3d76d96c5523b5ab3ce9a1fe14 100644 GIT binary patch delta 5101 zcmVI(iuxktoFlY50~hjP{LCx??J_X?ae znftg7-90)GHF00BS* zko$8y<+%5{DOazPa<2oq1IFZD3!FN+`>GwvwNUS=lZ!nf-E|=rha~sWkH4Yg!RXPC zzaa;ho*q@X`!@E+2jk>p88=36q>e`Kk2H$!y%6u3ivR%BqNMt%SlWoS4FKfwJOW6= z#UG=c0SdrAOg+!SRSkS(^nY)CsB;LD1ONwvhlhIF18n~H@AzRqRW}`7GH?YiRj z=1aT%G`a1~6&=~cjJ}*pYE}@e0YGz`{Py9F(8=TP+ORLb`d5aZRDbBOKelJE*-n<+ z(L)U6y8Z#IFT?Kx;h5cfU5oWwPdv=_=1c0@r2;^l-3>M<*H312#SO{rdz!XAxpfNb zdl3L~v9K|@0MO1}l=a&{dm4DQzSn^`giM2s;ti;;T9VaiT*)_P&yUE9~AeLcf5;`9aeoBP3U?hidldwar&*un0DsecxSBp2@+Hgq`~b+-VZ zaLr{20Mwus<}MeD005F(rFfUhbFaDf!mMJ^cPdSV4*IX0;hLZa-*t;8a4~2u0i=QNz1HqE&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`agT;ibdl%ozE8?aulv0+kS!$-OrH<>SlxE#DHAM&y`XCse?9!Ve6~Rgp7MT)baR z`?L)Xa%X(dZ431n%zXC(7dhghLuJEL#*&t1+WZ$D(`+MZ6ZRU$J>PZoc~wI4 zR4LrC_o(M!CcnVeduuKWEmac;z71}y8zE7q*;KY92=^+_Ia&N-Sflr!_}<4$INC`f zl*R+&i>nPIx#_kF7Sl;v$uE7|-5bNOWKa_8`P!!0J$yR+;oK*VF_-G`je^dx$%k`w zOSgi?(6R!J9RJsPzrk<`YLs1;heF!W_kd~508I~qt+V;}C!4)@HHAn`|I#|wkGlKn z&@=8=#RaxzFz9pm@YE%&i0nl>k;U{fKrmN6cgthOw{~Fi!qN)%Zf^Z;b1Dd%D^i+= ze<8?2!cG=j+4wW=6~6CE+LHck&5*Jbl5Ee9wtn;Z$^L$ig(0u~@`cZO?(E!LXJ9z+O|a zPEzDJ?JsgoZkVmK+M@uu1~$_=+4}nYluipx3aEn^s$sG|hWEnhybq(HUeaBaGnemO zKQskU>p5LijDu546FRKQzpq%K{FeqR-eX3uXWQJ=All7at!;ZLhFrvq-UgLsY%^78@m$V6u zF|wxBCX^GICApY>LZSASOB!-u!)_rCa&dnrR{JUsf6>uH@~M=!R#}FNime8%qwu=9GMoR9i1p zjSk$W7{@rycX}1xjx3~vXdLz`HXy#pp|V5I0)5Wl4B$UbI)Y1!Vz#sZgsHU&0e<7b F{{Y=#Uj_gG diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 05dc251e75..50161ddbd0 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - Projectile.ai[0] = -1; + //Projectile.ai[0] = -1; Projectile.netUpdate = true; } diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs index f6857c153e..80da75fd77 100644 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue public override void SetDefaults() { - Projectile.width = Projectile.height = 40; + Projectile.width = Projectile.height = 50; Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.tileCollide = false; diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index dc34689d70..4dce7a9c4e 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -1,4 +1,6 @@ using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Weapons.Rogue; +using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -14,17 +16,30 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 10; Projectile.height = 10; Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.Arrow; - Projectile.timeLeft = 90; - AIType = ProjectileID.WoodenArrowFriendly; + Projectile.penetrate = 4; + Projectile.aiStyle = ProjAIStyleID.GroundProjectile; + Projectile.timeLeft = 600; + AIType = ProjectileID.SpikyBall; Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localNPCHitCooldown = 15; + Projectile.usesLocalNPCImmunity = true; } - public override void AI() + public override bool PreAI() { - Projectile.rotation += Projectile.velocity.Y; - Projectile.velocity.Y *= 1.05f; + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = SpearofPaleolith.ShardBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + + Projectile.velocity.X *= 0.975f; + return true; + } + public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) + { + fallThrough = false; + return true; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60); diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs new file mode 100644 index 0000000000..231f372217 --- /dev/null +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -0,0 +1,124 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.NPCs.Providence; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Graphics.PackedVector; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + public class ProfanedPartisanFlare : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public int timer = 0; + public override string Texture => "CalamityMod/Projectiles/Boss/HolyFire"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 4; + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + } + public override void SetDefaults() + { + Projectile.width = 20; + Projectile.height = 20; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = 3; + Projectile.extraUpdates = 0; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 30; + Projectile.timeLeft = 600; + Projectile.tileCollide = false; + } + + public override bool? CanHitNPC(NPC target) + { + return true; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(ModContent.BuffType(), 120); + } + + NPC target = null; + public override void AI() + { + + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = ProfanedPartisan.ShardBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0 && target.active && !target.dontTakeDamage) + { + Projectile.Calamity().HomingTarget = target.whoAmI; + var dis = Projectile.Distance(target.Center); + Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis/160)*0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); + } + else + { + target = GetTargetInRange(2000); + } + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + } + public override void OnKill(int timeLeft) + { + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + + for (int i = 0; i < 25; i++) + { + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.8f, 1.2f), hiColor)); + } + + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, 0f, 0.5f, 0.1f, 4)); + + for (float i = 0; i < 1; i += 0.25f) + { + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f * i, 0.075f * i, 24)); + } + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 16)); + + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); + SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; + var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + return false; + } + + NPC GetTargetInRange(float range) + { + var player = Main.player[Projectile.owner]; + { + NPC gotTarget = null; + float currentDistance = range; + foreach (var npc in Main.ActiveNPCs) + { + if (Projectile.localNPCImmunity[npc.whoAmI] > 0) + continue; + var myDistance = npc.Distance(Projectile.Center); + + if (npc.CanBeChasedBy() && myDistance < currentDistance) + { + currentDistance = myDistance; + gotTarget = npc; + } + } + return gotTarget; + } + } + } +} diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index b7c056a4ad..68b13ed38f 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -1,5 +1,8 @@ -using CalamityMod.Buffs.DamageOverTime; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; @@ -13,10 +16,13 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/ProfanedPartisan"; + + public static int Lifetime => 600; + public int ExplodeTime => 60 * Projectile.MaxUpdates; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; + ProjectileID.Sets.TrailingMode[Type] = -1; } public override void SetDefaults() @@ -24,47 +30,91 @@ namespace CalamityMod.Projectiles.Rogue Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; - Projectile.penetrate = 9; - Projectile.timeLeft = 600; - Projectile.extraUpdates = 3; - Projectile.tileCollide = false; + Projectile.penetrate = 1; + Projectile.extraUpdates = 5; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 12; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + } + public float StuckEnemyID + { + get { return Projectile.ai[0]; } + set { Projectile.ai[0] = value; } + } + public float StuckEnemyDistance + { + get { return Projectile.ai[1]; } + set { Projectile.ai[1] = value; } + } + public float StuckEnemyRotation + { + get { return Projectile.ai[2]; } + set { Projectile.ai[2] = value; } } public override void AI() { - if (Projectile.ai[0] < 0.4f) + Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.2f); + if (StuckEnemyID > 0) { - Projectile.ai[0] += 0.1f; + Projectile.tileCollide = false; + if (!Main.npc[(int)StuckEnemyID - 1].active) + { + StuckEnemyID = 0; + Projectile.velocity = -Vector2.UnitY.RotatedByRandom(0.25f) * Main.rand.NextFloat(0, 1f); + Projectile.tileCollide = true; + return; + } + Projectile.Center = Main.npc[(int)StuckEnemyID - 1].Center + Vector2.UnitX.RotatedBy(StuckEnemyRotation) * StuckEnemyDistance; + return; } - else + else if (Projectile.damage == 0) //after running out of penetrate hits, if not impaled or dead { - Projectile.tileCollide = true; + Projectile.velocity *= 0.975f; + float intensity = 1 - Projectile.timeLeft / (float)ExplodeTime; + Projectile.position += Main.rand.NextVector2CircularEdge(intensity, intensity); + + if (Projectile.timeLeft == 1) + { + + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + + for (int i = 0; i < 25; i++) + { + GeneralParticleHandler.SpawnParticle(new GlowOrbParticle(Projectile.Center, new Vector2(Main.rand.NextFloat(10), 0).RotatedByRandom(MathHelper.TwoPi), false, 10, Main.rand.NextFloat(0.8f, 1.2f), hiColor)); + } + + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/BloomCircle", Vector2.One, 0f, 0.5f, 0.1f, 4)); + + for (float i = 0; i < 1; i += 0.25f) + { + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f * i, 0.075f * i, 24)); + } + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, hiColor, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.02f, 0.045f, 16)); + + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); + SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); + if (Main.myPlayer == Projectile.owner) + { + for (var i = 0; i < 3; i++) + { + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i - 1) * 0.25f + Main.rand.NextFloat(-0.1f, 0.1f)) * 24f, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + } + } + } + return; } - //Backwards projectile fix - Projectile.spriteDirection = Projectile.direction = (Projectile.velocity.X > 0).ToDirectionInt(); - Projectile.rotation = Projectile.velocity.ToRotation() + (Projectile.spriteDirection == 1 ? 0f : MathHelper.Pi); - //Rotating 45 degrees if shooting right - if (Projectile.spriteDirection == 1) - { - Projectile.rotation += MathHelper.ToRadians(45f); - DrawOffsetX = -26; - DrawOriginOffsetX = 13; - DrawOriginOffsetY = 2; - } - //Rotating 45 degrees if shooting right - if (Projectile.spriteDirection == -1) - { - Projectile.rotation -= MathHelper.ToRadians(45f); - DrawOffsetX = 2; - DrawOriginOffsetX = -13; - DrawOriginOffsetY = 2; - } + Projectile.velocity *= 0.998f; + if (Projectile.timeLeft < (Lifetime - 45)*Projectile.MaxUpdates) + Projectile.velocity.Y += 0.02f; + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; if (Main.rand.NextBool(3)) { int d = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, Projectile.velocity.X, Projectile.velocity.Y, 100, default, 1.1f); @@ -72,20 +122,6 @@ namespace CalamityMod.Projectiles.Rogue Main.dust[d].velocity *= 0.3f; Main.dust[d].velocity += Projectile.velocity * 0.85f; } - Lighting.AddLight(Projectile.Center, 1f, 0.8f, 0.2f); - - if (Projectile.Calamity().stealthStrike) //Stealth strike - { - Vector2 spearPosition = new Vector2(Projectile.Center.X + Main.rand.NextFloat(-15f, 15f), Projectile.Center.Y + Main.rand.NextFloat(-15f, 15f)); - Vector2 spearSpeed = Projectile.velocity; - if (Projectile.timeLeft % 18 == 0) - { - int projID = ModContent.ProjectileType(); - int spearDamage = (int)(Projectile.damage * 0.4f); - float spearKB = 1f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), spearPosition, spearSpeed, projID, spearDamage, spearKB, Projectile.owner); - } - } } public override void OnKill(int timeLeft) @@ -95,20 +131,48 @@ namespace CalamityMod.Projectiles.Rogue Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 50, default, 2.6f); } SoundEngine.PlaySound(SoundID.Item45, Projectile.position); - - int projID = ModContent.ProjectileType(); - int explosionDamage = (int)(Projectile.damage * 0.8f); - float explosionKB = 8f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, projID, explosionDamage, explosionKB, Projectile.owner); } public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); + float glowIntensity = Projectile.damage == 0 && StuckEnemyID == 0 ? 4f * (1-(Projectile.timeLeft/(float)ExplodeTime)) : 0f; + Projectile.DrawProjectileWithBackglow(Color.Yellow, lightColor, glowIntensity); return false; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + Projectile.tileCollide = false; + if (Projectile.Calamity().stealthStrike) + { + StuckEnemyID = target.whoAmI + 1; + StuckEnemyDistance = Projectile.Distance(target.Center); + StuckEnemyRotation = Projectile.DirectionFrom(target.Center).ToRotation(); + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + } + else + { + Projectile.timeLeft = ExplodeTime; + } + bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); + int splitType = strongSplit ? ModContent.ProjectileType() : ModContent.ProjectileType(); + if (!strongSplit) + for (var i = 0; i < 3; i++) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, 0f); + p.hostile = false; + p.friendly = true; + p.DamageType = Projectile.DamageType; + if (strongSplit) + p.Calamity().conditionalHomingRange = 600; + p.localNPCImmunity[target.whoAmI] = 60; + } + target.AddBuff(ModContent.BuffType(), 180); + if (!strongSplit) + { + Projectile.Kill(); + } + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 180); } diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 0f9ab63c40..0c9a9b8ab3 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.Providence; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -10,9 +11,6 @@ namespace CalamityMod.Projectiles.Rogue public class ProfanedPartisanSpear : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public int timer = 0; - - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; public override void SetDefaults() { Projectile.width = 10; @@ -20,72 +18,60 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.extraUpdates = 3; + Projectile.penetrate = 5; + Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (Projectile.ai[1] != 1f) - { - if (Projectile.velocity.X != oldVelocity.X) - { - Projectile.velocity.X = -oldVelocity.X; - } - if (Projectile.velocity.Y != oldVelocity.Y) - { - Projectile.velocity.Y = -oldVelocity.Y; - } - Projectile.ai[1] = 1f; - Projectile.ai[0] = 1f; - Projectile.extraUpdates = 2; - if (Projectile.timeLeft > 280) - Projectile.timeLeft = 280; - } - return false; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 180); - OnHitEffects(); } public override void OnHitPlayer(Player target, Player.HurtInfo info) { target.AddBuff(ModContent.BuffType(), 180); - OnHitEffects(); - } - - private void OnHitEffects() - { - if (Projectile.ai[1] != 1f) - { - Projectile.velocity.X *= -1f; - Projectile.velocity.Y *= -1f; - Projectile.ai[1] = 1f; - Projectile.ai[0] = 1f; - Projectile.extraUpdates = 2; - if (Projectile.timeLeft > 280) - Projectile.timeLeft = 280; - } } public override void AI() { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - - if (Projectile.ai[0] == 1f) - timer++; - if (timer >= 5) - Projectile.penetrate = 1; - if (timer >= 10) + float timeGateValue = 30f; + if (Projectile.ai[0] <= 0f) //Copied from HolySpear.cs { - CalamityUtils.HomeInOnNPC(Projectile, !Projectile.tileCollide, 300f, 7f, 20f); + Projectile.ai[1] += 1f; + + float slowGateValue = 25f; + float fastGateValue = 10f; + float minVelocity = 2f; + float maxVelocity = minVelocity * 5f; + float extremeVelocity = maxVelocity * 2f; + float deceleration = 0.9f; + float acceleration = 2f; + + if (Projectile.localAI[1] >= timeGateValue) + { + if (Projectile.velocity.Length() < extremeVelocity) + Projectile.velocity *= acceleration; + } + else + { + if (Projectile.ai[1] <= slowGateValue) + { + if (Projectile.velocity.Length() > minVelocity) + Projectile.velocity *= deceleration; + } + else if (Projectile.ai[1] < slowGateValue + fastGateValue) + { + if (Projectile.velocity.Length() < maxVelocity) + Projectile.velocity *= acceleration; + } + else + Projectile.ai[1] = 0f; + } } + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index 1ddf1453bf..f818062d6a 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,4 +1,5 @@ -using CalamityMod.Buffs.StatDebuffs; +using System.Linq; +using CalamityMod.Buffs.StatDebuffs; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -11,14 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofPaleolith"; - private bool stealthInit = false; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - + public static int Lifetime => 600; public override void SetDefaults() { Projectile.width = 12; @@ -26,33 +20,51 @@ namespace CalamityMod.Projectiles.Rogue Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = 1; - Projectile.aiStyle = ProjAIStyleID.StickProjectile; - Projectile.timeLeft = 600; - AIType = ProjectileID.BoneJavelin; + Projectile.extraUpdates = 5; + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; Projectile.DamageType = RogueDamageClass.Instance; } - + public float StuckEnemyID + { + get { return Projectile.ai[0]; } + set { Projectile.ai[0] = value; } + } + public float StuckEnemyDistance + { + get { return Projectile.ai[1]; } + set { Projectile.ai[1] = value; } + } + public float StuckEnemyRotation + { + get { return Projectile.ai[2]; } + set { Projectile.ai[2] = value; } + } public override void AI() { - if (Projectile.Calamity().stealthStrike && !stealthInit) + if (StuckEnemyID > 0) { - Projectile.velocity *= 0.5f; - Projectile.timeLeft = 1800; - stealthInit = true; + Projectile.tileCollide = false; + if (!Main.npc[(int)StuckEnemyID - 1].active) + { + StuckEnemyID = 0; + Projectile.velocity = -Vector2.UnitY.RotatedByRandom(0.25f) * Main.rand.NextFloat(0, 1f); + Projectile.tileCollide = true; + return; + } + Projectile.Center = Main.npc[(int)StuckEnemyID - 1].Center + Vector2.UnitX.RotatedBy(StuckEnemyRotation) * StuckEnemyDistance; + return; } - if (Main.rand.NextBool(4)) + Projectile.velocity *= 0.998f; + if (Projectile.timeLeft < (Lifetime - 25) * Projectile.MaxUpdates) + Projectile.velocity.Y += 0.02f; + + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(20)) { Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f); } - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); - if (Projectile.timeLeft % 3 == 0) - { - if (Projectile.owner == Main.myPlayer) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 0.5), Projectile.knockBack, Projectile.owner, 0f, 0f); - } - } + } public override bool PreDraw(ref Color lightColor) @@ -63,13 +75,32 @@ namespace CalamityMod.Projectiles.Rogue public override void OnKill(int timeLeft) { - for (int i = 0; i <= 10; i++) + for (int i = 0; i <= 5; i++) { - Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.oldVelocity.X * 0.5f, Projectile.oldVelocity.Y * 0.5f); + Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.Teleporter, Projectile.oldVelocity.X*2.5f, Projectile.oldVelocity.Y*2.5f); } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Projectile.Calamity().stealthStrike) + { + Projectile.stopsDealingDamageAfterPenetrateHits = true; + StuckEnemyID = target.whoAmI + 1; + StuckEnemyDistance = Projectile.Distance(target.Center); + StuckEnemyRotation = Projectile.DirectionFrom(target.Center).ToRotation(); + Projectile.timeLeft = Lifetime * Projectile.MaxUpdates; + } + + bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); + int shardCount = strongSplit ? 5 : 3; + for (var i = 0; i < shardCount; i++) + { + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); + p.localNPCImmunity[target.whoAmI] = 30; + } + target.AddBuff(ModContent.BuffType(), 120); + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); } From daf4bde2de352af5a8a89fe5254ec0e5a04b1f41 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 1 Apr 2026 03:31:59 -0400 Subject: [PATCH 045/126] fixes and barebones fx --- Items/Tools/TinkerersVoucher.cs | 45 ++++++++++++++++++- .../en-US/Mods.CalamityMod.Items.Tools.hjson | 6 ++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index 029fe85840..4caab5f1cd 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using CalamityMod.Prefixes; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -11,6 +12,7 @@ namespace CalamityMod.Items.Tools public static class VoucherReforgeSystem { public static int ForcedPrefix = -1; + public static bool RollWon = false; } public class VoucherGlobalItem : GlobalItem @@ -36,6 +38,30 @@ namespace CalamityMod.Items.Tools if (invItem.stack <= 0) invItem.TurnToAir(); + if (Main.netMode != NetmodeID.Server) + { + if (VoucherReforgeSystem.RollWon) + { + for (int d = 0; d < 24; d++) + { + int dust = Dust.NewDust(player.position, player.width, player.height, DustID.Confetti, 0f, 0f, 100, default, 1f); + Main.dust[dust].velocity *= 2f; + Main.dust[dust].noGravity = false; + } + + SoundEngine.PlaySound(SoundID.Item4, player.position); + } + else + { + for (int d = 0; d < 20; d++) + { + int dust = Dust.NewDust(player.position, player.width, player.height, DustID.Smoke, 0f, 0f, 100, default, 1.2f); + Main.dust[dust].velocity *= 1.5f; + } + + SoundEngine.PlaySound(SoundID.Item16, player.position); + } + } break; } } @@ -137,15 +163,21 @@ namespace CalamityMod.Items.Tools if (prefixChoices.Length == 0) return -1; - // Combat Voucher handles 50/50 loss logic for weapons on its own if (isAccessory) { if (Main.rand.NextBool()) + { + VoucherReforgeSystem.RollWon = true; return prefixChoices[chosenPrefix]; + } else + { + VoucherReforgeSystem.RollWon = false; return ModContent.PrefixType(); + } } + VoucherReforgeSystem.RollWon = true; return prefixChoices[chosenPrefix]; } } @@ -182,7 +214,16 @@ namespace CalamityMod.Items.Tools else prefix = PrefixID.Godly; - return Main.rand.NextBool() ? prefix : ModContent.PrefixType(); + if (Main.rand.NextBool()) + { + VoucherReforgeSystem.RollWon = true; + return prefix; + } + else + { + VoucherReforgeSystem.RollWon = false; + return ModContent.PrefixType(); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index b6b6c876c4..b709086eb1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -18,6 +18,7 @@ AggressiveVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -157,7 +158,7 @@ CombatVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies to reforging weapons + This effect only applies when reforging weapons ''' } @@ -230,6 +231,7 @@ HurriedVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -304,6 +306,7 @@ OddVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -426,6 +429,7 @@ UnbreakableVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] From ebb6947705c2e75e76753fbdab4ab66445db0c38 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Wed, 1 Apr 2026 04:18:50 -0400 Subject: [PATCH 046/126] Resprites --- Items/Tools/AggressiveVoucher.png | Bin 200 -> 543 bytes Items/Tools/CombatVoucher.png | Bin 239 -> 489 bytes Items/Tools/HurriedVoucher.png | Bin 203 -> 510 bytes Items/Tools/OddVoucher.png | Bin 197 -> 541 bytes Items/Tools/TinkerersVoucher.cs | 20 ++++++++++---------- Items/Tools/UnbreakableVoucher.png | Bin 198 -> 548 bytes 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Items/Tools/AggressiveVoucher.png b/Items/Tools/AggressiveVoucher.png index 0908cdbf375eed15cab5d14fbf392fecbfa2de89..a76f8ad5805fee69a41abda6cd226d021b666c03 100644 GIT binary patch literal 543 zcmV+)0^t3LP)Px#1ZP1_K>z@;j|==^1poj6$w@>(R7gwJmdz_fQ53*`Pl`kmLnBf{S@>G`C`t@P zDP^H7eEb2FEbPdF@exy`EMz+iOO1srWGE!13`z1f!ZeL(LNTPq;`N?)pCOCE^Q*f! z=bpvAzs^1HN#z~85u%WMwrxzsl-j%{04j=80ce{zlmOzyvcE@C4cT1P09dA;00^9i z#L5`ancE6LeXC+7p|lHt_3;HTwW01F#n9>Onotl7UkLHYTrmKn11CcMGtv_agg9g^ z17N9FF=Kv1b!Af#fTH$(0A9B|@P(PZ?HvGYHX8to&L9A{50AR)k7T4IfzH_U*bD%k z)jKfrD~mTKjHoyFU-^t%5XH<(cprf4d*$ZuGy#yFs6?un=Ak|ShEFCUn9{RBr2`eKdN$Vp$&t4bLUY8bs`#`^icA&s{=*#Kszw&+B zM|y4oo7@C8wfI0@;XqyyYVbhK%TE%TLf) h=oMmzTQ=vn>L{*8nfT_aatVN#u4T($$9wj`oM!#LW1(Y;yv!h|1}VnUiR&w%v3$T x{cg)6e*}88-jw{JdVfhz#A9Bzf~E7{vt7QddYJzLhXc?x44$rjF6*2UngBE=Mr!~7 diff --git a/Items/Tools/CombatVoucher.png b/Items/Tools/CombatVoucher.png index 7e4cd8a16661bfee4fe7d22b9a417ec53e4b2bf5..039206c49dd91ae5fd8c42e526ed60d806bad739 100644 GIT binary patch literal 489 zcmVPx#1ZP1_K>z@;j|==^1poj6lSxEDR7gwJ)xS$saU90+*D2E|OL1ul?vO-D6jV5< zNi@_HvOzG=v}E>!;^u8QeCV8mlEID6 zeUA^H@ABq(&Pi%2Eo<<2=w~r%E31P&;OK!qaHcw+z^44!|0fAUCqImU=EM?MsW0X) z+r;enPH_BmYNqGlIZ&ItO}P!->IDz(e#;$fnM=F$YPc(xZ+niVy6qe4d*x-zu8 z1(!$nfLi?>88flAvFi2TuQJR{Tm-v%)7AWmFcyX$-e0EFD_hUdn;!{y|M@!^Lyblw z-h!n&)8P4XdKc{2o_22KOA{RFOAQVWbc5!2KR9*iJeWLNrK1f6$>IH=HD3oWn`y`P zc5P+@U5XBcq4*x%y!Mt-8@e#C6+E#@#?YgWU&$Bq#W2i{1=3g%EWjcnLp00000NkvXXu0mjf`7hlW literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^5+BksgJS#E@t;*U z`ObK#$-hZs-TNPrCoX*4JYfN&#H$NuBpWOmnz+8zE#gsF($`mLkaf@@vSDIZLguU+ zAuaR5FMQ>Vu~T>=?4;Mu`0F>rGocyWoKxMI=S|ks>*ipzN;BE_U1F=*P3Cjfr<0(&qggkM>BZ3`njxgN@xNAf?Zq| diff --git a/Items/Tools/HurriedVoucher.png b/Items/Tools/HurriedVoucher.png index 62895a9442cb398438e53af395ebec6ef797a2f1..92ec38b48c4fa6adc88c946795c09293488f7525 100644 GIT binary patch literal 510 zcmVPx#1ZP1_K>z@;j|==^1poj6s7XXYR7gwJ)V*s{Q5eVZPwWs~qPAct_>$;ghf<3X z2Nz#a92A#=1sAJ!uyYkG=wj;PROsODU!Wqmh=_||Es9e^O)R2qsjow82C2j4(A-Oc zOT^pnaybv@9C*I>`JK#-(fq0=OxKo@rM6P47r=qu&EVYl>kMp&Z~Ombf}!%Y?cmXL z2l)75F}|}+4E7dd>ulcz@T5FRstpaDKL{otzld#ET=)ixb9-X-B-Nd>$x@7M`K{pa zN@VEBnP_&>Z|L+u$0}UCQUXt3R%kFYklPPVjg73GYC`DnUgb@!-kJX$TL)9OPV|Fk z4}XyAl(jMx{&g@@e|sO)rrt;2PhH^EyQssdYz_SUoCRNgZPG}w_#O20_ah zqvY)5y6d1?-2%Ecu7E=SGEEGH8NB^qHsvX6WhfBdqhzX*Gx9f*h7KLu2PP(-lWIf5 zBgesfWrhY*?IxHBtRF*3LTdgMM?1S?>(r*~4=oF#g%SV)g#Z8m07*qoM6N<$f|j}M Ac>n+a literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq!^2X+?^QKos)S9?HQ1@+gn9 zp%2fpHqOXNvCl=?*h&o5ctlwkeoAfFDX-S2bG${bv$y{ZznDZbNILUHSD;D4Px#1ZP1_K>z@;j|==^1poj6$4Nv%R7gwJ)?a9iaU93-*O?Y`?84g2%ns9TB;-&2 zl*lPj#7v^y&mU5_=)uUQOoUtWOvuNy(W_Gzpyups@X zv;-O#Hi2|~nj%xlHL+N+bb#ec8^HSZ!=UBJ zB4%ZVrrs|DU48qC`{i$Zimh`U>%ikH$7A(MSqd2nhQj`B=YErDL#tM{fx`C!MHy;XRtbCjbrOQnWFhQhQa*U-V8N5Px%=szf!sy4w)VD=a)z3;!?HG{n!h fs}Ig3bISe#YZ9VE7;Kzt00000NkvXXu0mjf9%KiX literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CH!3HFy_x^nYq!^2X+?^QKos)S9n~Fh2f{vhMn?ieLBZm^g4U{-|&k`ECxwuzUT@xNtk@(C3}R= pBW43rpBGF&M2ro9VA8A~3{53!%Ii1i@&ld1;OXk;vd$@?2>||rLu~*6 diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index 4caab5f1cd..1f6ed34a6b 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -188,8 +188,8 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - Item.width = 24; - Item.height = 28; + Item.width = 36; + Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; } @@ -243,8 +243,8 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - Item.width = 24; - Item.height = 28; + Item.width = 36; + Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; } @@ -271,8 +271,8 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - Item.width = 24; - Item.height = 28; + Item.width = 36; + Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; } @@ -297,8 +297,8 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - Item.width = 24; - Item.height = 28; + Item.width = 36; + Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; } @@ -325,8 +325,8 @@ namespace CalamityMod.Items.Tools public override void SetDefaults() { - Item.width = 24; - Item.height = 28; + Item.width = 36; + Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; } diff --git a/Items/Tools/UnbreakableVoucher.png b/Items/Tools/UnbreakableVoucher.png index 9e91540620bb25aa6d3a28f486abcf3e56423eb2..bab18aaed6ef8549d189a60329e5a902bcd455eb 100644 GIT binary patch literal 548 zcmV+<0^9wGP)Px#1ZP1_K>z@;j|==^1poj6&PhZ;R7gwJ)lWziQ2@vB&qfi{+8z|7f6Hp!QkTdm zJe3-q3L!!IcSz{eB`AU@f*`%55JIP*Ls@k0CUg?YLmFs#%T=TZYdvgskqSEuBQw)_ zh!$MGFo*Z%4ZQiz?>8@XzV*e5GJO3#lANk2NA`|_)}{>T>VKDlP4Q*xPbxIj-robZ zJ)Z{Ozs<#0R*3ri9dPVaU}kH}1u)Y0kg7J+)zJYark}+Y%>DR3Q@M05Hf~ti4|;A7 zvJnhz4%_r=p(%DFG_zPLfq_RC!NR96pnlIzaQ*UAP@4%dk>oGK>G&`-Q@t%aaq!X# z^yaUD$>J*_Z+3IwG!Zj}LLqz>G&VMZ`*(xqW{W{fL+ZBFfSODe9NL`+M_ZnNleeyb zzO(&QqoFl7v{)*w=I38%s5=n5a@l6NY_r--rfklZr-m(04X=*Z+|YWlnxXDpXTWUg zBbfL+Nu)htmc~Y36Uolw2XDdL{CiORxddAGwSn=OH==as&k@Pc_=n&t+0000>zk@YYs zz|`l&B+)m2C8RDKona6n!0;sdz_Yp;7Mo;*cd3}!ZL*I@=;8WS$8-6D=;Dk6YMr Date: Thu, 2 Apr 2026 21:17:37 -0400 Subject: [PATCH 047/126] Start of unique happiness report dialogue for The Gift and The Monument Eight NPCs done so far: Guide, Merchant, Nurse, Arms Dealer, Angler, Truffle, Tax Collector, Cyborg --- Items/Tools/TheGift.cs | 22 +++ .../en-US/Mods.CalamityMod.Vanilla.hjson | 163 ++++++++++++++++++ 2 files changed, 185 insertions(+) diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index f65ac856a7..0f2732cf12 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -5,6 +5,7 @@ using Microsoft.Xna.Framework; using Terraria; using Terraria.GameContent; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.Items.Tools @@ -79,6 +80,15 @@ namespace CalamityMod.Items.Tools { self._currentPriceAdjustment += TheMonument.MonumentHappinessReduction; self.LimitAndRoundMultiplier(self._currentPriceAdjustment); + string dialogueKey; + if (npc.type < NPCID.Count) + dialogueKey = $"Mods.CalamityMod.Vanilla.TownNPCMood.{NPCID.Search.GetName(npc.type)}.Monument"; + else + { + var modNPC = NPCLoader.GetNPC(npc.type); + dialogueKey = $"Mods.{modNPC.Mod.Name}.NPCs.{modNPC.Name}.TownNPCMood.Monument"; + } + self._currentHappiness += Language.Exists(dialogueKey) ? Language.GetTextValue(dialogueKey) : CalamityUtils.GetTextValue("Vanilla.TownNPCMood.DefaultMonument") + " "; } // The Gift sets happiness to a fixed either extremely high or extremely low value, depending on its random state. @@ -89,6 +99,18 @@ namespace CalamityMod.Items.Tools self._currentPriceAdjustment = 0.5f; else self._currentPriceAdjustment = 1.75f; + + string locKey = gift.Value ? "GiftPositive" : "GiftNegative"; + string dialogueKey; + if (npc.type < NPCID.Count) + dialogueKey = $"Mods.CalamityMod.Vanilla.TownNPCMood.{NPCID.Search.GetName(npc.type)}.{locKey}"; + else + { + var modNPC = NPCLoader.GetNPC(npc.type); + dialogueKey = $"Mods.{modNPC.Mod.Name}.NPCs.{modNPC.Name}.TownNPCMood.{locKey}"; + } + // Yes, it's intentional that this completely overrides all other happiness report dialogue + self._currentHappiness = Language.Exists(dialogueKey) ? Language.GetTextValue(dialogueKey) : CalamityUtils.GetTextValue($"Vanilla.TownNPCMood.Default{locKey}") + " "; } } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 504863dab8..c0c6a28f46 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -410,3 +410,166 @@ WitchDoctorChat: { } WizardChat.Hardmode: Space just got way too close for comfort. + +TownNPCMood: { + // Default dialogues if, for example, a modded NPC does not have a dialogue line registered + DefaultMonument: I hate The Monument. + DefaultGiftPositive: I love The Gift. + DefaultGiftNegative: I hate The Gift. + + Angler: { + Monument: That monument is sooooooo ugly! I think it needs some chopped fish thrown allllll over it! + GiftPositive: Hey! I don't know how you got a hold of all that squishy gross stuff in that gift, but it might be the best prank material I've ever seen! He he he! + GiftNegative: Are you stupid?! I would NEVER fall for such a laaaaame gift prank like that! You better catch a lot of awesome fish to make up! + } + + ArmsDealer: { + Monument: Was anyone really itchin' to have a big ol' statue in my firing ground, because I wasn't! + GiftPositive: That new ammo belt was just the gift I've been lookin' for, buddy! Let's test it out together later! + GiftNegative: Do you know what you're doin' by pullin' a bomb in a box prank on me? I can kill you in over seven hundred ways, and that's just with my guns! + } + + BestiaryGirl: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Clothier: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Cyborg: { + Monument: Analysis of nearby monument: Provides zero positive qualities to all lifeforms nearby. + GiftPositive: Gift content scan revealed extremely pure silicon for use in upgraded processors. It appears I appreicate that. + GiftNegative: Gift content scan revealed attempt to trigger malfunction in my systems. Translation: I hate this. + } + + DD2Bartender: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Demolitionist: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Dryad: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + DyeTrader: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + GoblinTinkerer: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Golfer: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Guide: { + Monument: I quite dislike that monument you have over there. How could one have such little humbleness! + GiftPositive: A thoughtful gift in this world is always a welcome sight. I greatly appreciate it! + GiftNegative: Apologies, I'm currently in shock over your decision to gift me my own voodoo doll. If only I could curse you! + } + + Mechanic: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Merchant: { + Monument: That awful monument is driving away my business! + GiftPositive: What a lovely gift of exotic wares you gave me, friend! Please peruse my shop at clearance rates. + GiftNegative: Why offer a "gift" of rubbish Angel Statues? I tire of your jokes, so if you want business, it'll be extra. + } + + Nurse: { + Monument: Eww, who would put such an ugly rock in this town? + GiftPositive: Hey! Thanks for that gift from earlier. You ever need face reconstruction, you know who to call. + GiftNegative: YOU, I hope you understand that gifting the ONLY DOCTOR HERE some snake oil is how to make me never want to treat you! + } + + Painter: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + PartyGirl: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Pirate: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Princess: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + SantaClaus: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Steampunker: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Stylist: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + TaxCollector: { + Monument: HA! Yes! What a fantastic monument celebrating what I have accomplished! + GiftPositive: What a steal, getting a gift full of the only thing worth a damn in this world -- money! + GiftNegative: Bah! You think you're a jester with that lump of coal? Get out of my sight! + } + + Truffle: { + Monument: Your kind have very strange decorative tastes, such as that monument nearby. + GiftPositive: I love them, my new gifted shroomble companions. It's great to see more of our kind around here! + GiftNegative: A little pig jumped out of that gift you gave me earlier, and tried to eat my face! Perhaps I can't trust you either. + } + + WitchDoctor: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } + + Wizard: { + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder + } +} From 9893b189a51dd7e5ac4be07500353ba62da0e01f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 3 Apr 2026 20:13:02 -0400 Subject: [PATCH 048/126] Added dialogue for Painter, Santa, and Bandit Plus partial dialogue for Clothier and Brimstone Witch --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 12 ++++++++++++ .../en-US/Mods.CalamityMod.Vanilla.hjson | 18 +++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index da3390cf62..e5ff0054da 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -352,6 +352,9 @@ Archmage: { DislikeNPC: I dislike {NPCName}'s blatant disregard of magic. I cannot blame his functions, but he is quite ignorant. LikeNPC_Princess: "{NPCName} has some very quaint spells. I'm quite impressed, for someone of her age." Princess_LovesNPC: "{NPCName} makes the best ice cream I've ever tasted, it's so good!" + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder } } @@ -432,6 +435,9 @@ Bandit: { DislikeNPC: What a goody two shoes, {NPCName} is! I dislike her out of principle! …And because she has almost no material goods. LikeNPC_Princess: I couldn't bear to steal anything from {NPCName}, she's so cute! Princess_LovesNPC: "{NPCName} gifts me with nice exact replicas of other's things, I wonder how they do it!" + Monument: Yo, if your pockets ever feel lighter, that's not me, alright? You brought this on yourself buddy. + GiftPositive: Heeeey, my man! How's it goin'? I really 'preciate your gift, I have no idea how you got your hands on that kind of lockpicker's kit, but you'd catch me dead before I asked any questions! + GiftNegative: Hey man, what the hell is up with that gift?! I'm the most wanted in seven different city-states, do you got any idea how much a warrant on my name messes up my work?! You better do something to clean that mess before they have me walking to the gallows! } } @@ -475,6 +481,9 @@ BrimstoneWitch: { DislikeNPC: Such a racket! All {NPCName} does is make noise, day in and day out! I can't stand her! LikeNPC_Princess: What a strangely pleasant kid {NPCName} is to be around. Princess_LovesNPC: "{NPCName} is always lonely, it's why I want to hang out with her, no one should be left alone like that!" + Monument: placeholder + GiftPositive: Hey, uh... thanks for the gift, really. I never thought you'd ever give me anything, for obvious reasons. But... thanks, really. It's lovely. + GiftNegative: What the hell was that gift? You know what, I don't even want to think about it. Screw you. } } @@ -558,6 +567,9 @@ SeaKing: { HateNPC: "{NPCName} is just a child, but his attitude towards marine life is unacceptable! Absolutely unacceptable!" LikeNPC_Princess: That child, {NPCName}. She is an innocent soul. Let us hope the horrors of war never reach her. Princess_LovesNPC: "{NPCName} always smiles when I'm nearby, I like being around him just for that!" + Monument: placeholder + GiftPositive: placeholder + GiftNegative: placeholder } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index c0c6a28f46..a056c2dd03 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -424,7 +424,7 @@ TownNPCMood: { } ArmsDealer: { - Monument: Was anyone really itchin' to have a big ol' statue in my firing ground, because I wasn't! + Monument: Was anyone really itchin' to have a big ol' statue in my firing ground? Because I wasn't! GiftPositive: That new ammo belt was just the gift I've been lookin' for, buddy! Let's test it out together later! GiftNegative: Do you know what you're doin' by pullin' a bomb in a box prank on me? I can kill you in over seven hundred ways, and that's just with my guns! } @@ -436,14 +436,14 @@ TownNPCMood: { } Clothier: { - Monument: placeholder + Monument: I think I am becoming too old to understand this... "modern art". GiftPositive: placeholder GiftNegative: placeholder } Cyborg: { Monument: Analysis of nearby monument: Provides zero positive qualities to all lifeforms nearby. - GiftPositive: Gift content scan revealed extremely pure silicon for use in upgraded processors. It appears I appreicate that. + GiftPositive: Gift content scan revealed extremely pure silicon for use in upgraded processors. It appears I appreciate that. GiftNegative: Gift content scan revealed attempt to trigger malfunction in my systems. Translation: I hate this. } @@ -508,9 +508,9 @@ TownNPCMood: { } Painter: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Oh, no no no, that statue has gotta be the dullest artpiece I have ever seen. + GiftPositive: How did ya know exactly the paint color I have been looking for? My newest mural greatly appreciates dat! + GiftNegative: You must be sick and cruel, because that water bomb prank of yours washed all over my latest work! Aye, you oughta be covered in red, and not paint! } PartyGirl: { @@ -532,9 +532,9 @@ TownNPCMood: { } SantaClaus: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Is this what the holiday season means to people now? Naughty, you are! + GiftPositive: Ho ho ho! What an unusual feeling for someone to be gifting me something at this time of year! You'd be great taking up the mantle! + GiftNegative: What a horrible gift you thought you could give me. You will get no presents this year! } Steampunker: { From 650d39d2d5cc0ff3f307f797489702da03c2c075 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 3 Apr 2026 21:29:41 -0500 Subject: [PATCH 049/126] prim fix + whole line tweaks --- Graphics/Primitives/PrimitiveRenderer.cs | 4 +- Graphics/Primitives/PrimitiveSettings.cs | 2 +- Projectiles/Rogue/EclipseFragment.cs | 104 ++++++++++++++--- Projectiles/Rogue/EclipseSpark.cs | 124 ++++++++++++++++----- Projectiles/Rogue/EclipseSpear.cs | 8 +- Projectiles/Rogue/FossilShardThrown.cs | 11 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 74 +++++++++++- Projectiles/Rogue/ProfanedPartisanSpear.cs | 5 +- Projectiles/Rogue/SpearofPaleolithProj.cs | 16 ++- 9 files changed, 287 insertions(+), 61 deletions(-) diff --git a/Graphics/Primitives/PrimitiveRenderer.cs b/Graphics/Primitives/PrimitiveRenderer.cs index 8c9a78f382..d962242faa 100644 --- a/Graphics/Primitives/PrimitiveRenderer.cs +++ b/Graphics/Primitives/PrimitiveRenderer.cs @@ -322,7 +322,7 @@ namespace CalamityMod.Graphics.Primitives } // Legacy behaviour: sample based on requested point count using Catmull-Rom style interpolation. - PositionsIndex = 1; + PositionsIndex = 0; float controlCountMinusOne = controlCount - 1f; PrimitiveSmoothingType legacyType = settings.SmoothingType; @@ -344,8 +344,6 @@ namespace CalamityMod.Graphics.Primitives MainPositions[PositionsIndex] = EvaluateCurve(legacyType, p0, p1, p2, p3, localSplineInterpolant, settings); PositionsIndex++; } - - MainPositions[0] = controlPoints[0]; MainPositions[PositionsIndex] = controlPoints[controlCount - 1]; PositionsIndex++; controlPoints.Clear(); diff --git a/Graphics/Primitives/PrimitiveSettings.cs b/Graphics/Primitives/PrimitiveSettings.cs index ebc4b51fcd..7996352e4e 100644 --- a/Graphics/Primitives/PrimitiveSettings.cs +++ b/Graphics/Primitives/PrimitiveSettings.cs @@ -309,7 +309,7 @@ namespace CalamityMod.Graphics.Primitives SmoothingTension = smoothingTension; FrameTransportMode = frameTransportMode; Topology = topology; - CapStyle = PrimitiveCapStyle.Flat; + CapStyle = capStyle; } } } diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs index fe05b515d8..d3a9935295 100644 --- a/Projectiles/Rogue/EclipseFragment.cs +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -1,10 +1,13 @@ -using CalamityMod.Particles; +using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.Audio; using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -15,7 +18,12 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public static int lifetime => 1200; Color? color = null; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 40; @@ -29,6 +37,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.idStaticNPCHitCooldown = 10; Projectile.MaxUpdates = 2; Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.tileCollide = false; } public override void AI() @@ -44,8 +53,6 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; Projectile.velocity *= 0.95f; - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); } } @@ -54,15 +61,9 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) { Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); - Projectile.velocity *= Projectile.ai[2]; + Projectile.velocity *= Projectile.ai[2]; Projectile.ai[2]--; } - if (Projectile.ai[2] > 0 && Projectile.velocity.Length() > 1) - { - - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center, Projectile.velocity * 0.001f, false, 10, 1, color.Value)); - } } else { @@ -71,7 +72,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.timeLeft > 100) Projectile.timeLeft = 100; Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); - Projectile.velocity *= 0f; + Projectile.velocity = new(0, 1E-05f); if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) { Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; @@ -91,10 +92,39 @@ namespace CalamityMod.Projectiles.Rogue public override void OnKill(int timeLeft) { if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(Projectile.GetSource_Death(),Projectile.Center,Vector2.Zero,ModContent.ProjectileType(),Projectile.damage,Projectile.knockBack,Projectile.owner); + Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); } public override bool PreDraw(ref Color lightColor) { + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16).ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + using (Main.spriteBatch.Scope()) { Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); @@ -103,5 +133,51 @@ namespace CalamityMod.Projectiles.Rogue } return false; } + + // Matches Saros Possesion sunfire with slight edits + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(238, 226, 153); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return mainColor; + } } } diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs index db09560aa8..00b437d0a9 100644 --- a/Projectiles/Rogue/EclipseSpark.cs +++ b/Projectiles/Rogue/EclipseSpark.cs @@ -1,7 +1,13 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Particles; +using System; +using System.Linq; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue @@ -12,6 +18,12 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public static int lifetime = 150; Color? color = null; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 6; @@ -25,6 +37,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; } public override void AI() @@ -36,47 +49,98 @@ namespace CalamityMod.Projectiles.Rogue Projectile.velocity.Normalize(); Projectile.velocity *= Projectile.localAI[0]; Projectile.localAI[0]--; + Projectile.timeLeft++; } if (Projectile.localAI[0] == 0) { - Projectile.Kill(); + Projectile.velocity = new(0, 1E-05f); + Projectile.damage = 0; + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); + if (dis < 0.1f) + Projectile.Kill(); } - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73),Main.rand.NextFloat()); - GeneralParticleHandler.SpawnParticle(new SparkParticle(Projectile.Center,Projectile.velocity* 0.001f,false,10,1, color.Value)); } - public override bool OnTileCollide(Vector2 oldVelocity) + public override bool PreDraw(ref Color lightColor) { - Collision.HitTiles(Projectile.position + Projectile.velocity, Projectile.velocity, Projectile.width, Projectile.height); - Projectile.Kill(); + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + return false; } - public override void OnKill(int timeLeft) + public float FireWidthFunction(float completion, Vector2 vertexPos) { - return; - for (int i = 0; i < 5; i++) - { - int dustToUse = Main.rand.Next(0, 3); - int dustType = 0; - switch (dustToUse) - { - case 0: - dustType = 109; - break; - case 1: - dustType = 111; - break; - case 2: - dustType = 132; - break; - } + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, Projectile.velocity.X, Projectile.velocity.Y, 0, default, 1.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 0.75f; - } + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = color.Value; + return mainColor; } } } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 50161ddbd0..4b297972ea 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -93,16 +93,16 @@ namespace CalamityMod.Projectiles.Rogue List posList = []; //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. - for (var i = 0; i <= 10; i++) + for (var i = 0; i <= 2; i++) { - posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 10f)); + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); } var pos = posList.ToArray(); GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 32); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length + 24); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); diff --git a/Projectiles/Rogue/FossilShardThrown.cs b/Projectiles/Rogue/FossilShardThrown.cs index 4dce7a9c4e..c7d160009e 100644 --- a/Projectiles/Rogue/FossilShardThrown.cs +++ b/Projectiles/Rogue/FossilShardThrown.cs @@ -34,7 +34,16 @@ namespace CalamityMod.Projectiles.Rogue } Projectile.velocity.X *= 0.975f; - return true; + var tile = Main.tile[(Projectile.Bottom + Vector2.UnitY).ToTileCoordinates()]; + if (tile.HasUnactuatedTile && tile.TileType == TileID.ConveyorBeltLeft) + { + Projectile.velocity.X = 2; + } + else if (tile.HasUnactuatedTile && tile.TileType == TileID.ConveyorBeltRight) + { + Projectile.velocity.X = -2; + } + return true; } public override bool TileCollideStyle(ref int width, ref int height, ref bool fallThrough, ref Vector2 hitboxCenterFrac) { diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 231f372217..6ddbec8df3 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -1,13 +1,17 @@ -using CalamityMod.Buffs.DamageOverTime; +using System; +using System.Linq; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.NPCs.Providence; using CalamityMod.Particles; -using CalamityMod.Projectiles.Boss; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Graphics.PackedVector; using Terraria; using Terraria.Audio; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -25,6 +29,8 @@ namespace CalamityMod.Projectiles.Rogue } public override void SetDefaults() { + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 2; Projectile.width = 20; Projectile.height = 20; Projectile.friendly = true; @@ -36,6 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; + Projectile.scale = 0.75f; } public override bool? CanHitNPC(NPC target) @@ -51,6 +58,14 @@ namespace CalamityMod.Projectiles.Rogue NPC target = null; public override void AI() { + Projectile.frameCounter++; + if (Projectile.frameCounter > 3) + { + Projectile.frame++; + Projectile.frameCounter = 0; + } + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.frame = 0; if (Projectile.originalDamage == 0) { @@ -61,7 +76,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.Calamity().HomingTarget = target.whoAmI; var dis = Projectile.Distance(target.Center); - Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis/160)*0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); + Projectile.velocity = Projectile.velocity.ToRotation().AngleLerp(Projectile.DirectionTo(target.Center).ToRotation(), (Projectile.Distance(target.Center) < 160 ? 0.1f + (1 - dis / 160) * 0.4f : 0.1f)).ToRotationVector2() * Projectile.velocity.Length(); } else { @@ -90,14 +105,61 @@ namespace CalamityMod.Projectiles.Rogue SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact.WithPitchOffset(0.6f), Projectile.Center); SoundEngine.PlaySound(SoundID.Item100.WithPitchOffset(0.4f), Projectile.Center); } - public override bool PreDraw(ref Color lightColor) { + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(8).ToList(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() *0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } + public float FireWidthFunction(float completion, Vector2 pos) + { + float width; + float maxBodyWidth = 16f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + // Crop the tip of the trail into a conic shape. + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 pos) + { + Color mainColor = ProvUtils.GetProjectileColor(255); + Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); + return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + } NPC GetTargetInRange(float range) { diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 0c9a9b8ab3..aac6cd529b 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -13,6 +13,8 @@ namespace CalamityMod.Projectiles.Rogue public new string LocalizationCategory => "Projectiles.Rogue"; public override void SetDefaults() { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 2; Projectile.width = 10; Projectile.height = 10; Projectile.friendly = true; @@ -23,6 +25,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; + Projectile.tileCollide = false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { @@ -77,7 +80,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Projectile.GetAlpha(lightColor), Projectile.rotation, tex.Size() / 2f, Projectile.scale, SpriteEffects.None, 0); + CalamityUtils.DrawAfterimagesCentered(Projectile, 2, Color.White); return false; } } diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index f818062d6a..21c51c8af3 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,5 +1,6 @@ using System.Linq; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -96,9 +97,22 @@ namespace CalamityMod.Projectiles.Rogue int shardCount = strongSplit ? 5 : 3; for (var i = 0; i < shardCount; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f) * Main.rand.NextFloat(0.9f,1.1f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 30; } + for (int i = 0; i < shardCount; i++) + { + int sparkLifetime = Main.rand.Next(8, 22); + float sparkScale = Main.rand.NextFloat(0.5f, 1f); + var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } target.AddBuff(ModContent.BuffType(), 120); } From 8b76755f1010f649eee562621835883b189c41e7 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sat, 4 Apr 2026 00:35:38 -0400 Subject: [PATCH 050/126] Fixes, better fx --- Items/Tools/TinkerersVoucher.cs | 51 ++++++++++++++++--- .../en-US/Mods.CalamityMod.Items.Tools.hjson | 10 ++-- Prefixes/AccessoryPrefix.cs | 2 +- 3 files changed, 50 insertions(+), 13 deletions(-) diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index 1f6ed34a6b..93ba974043 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -1,7 +1,11 @@ using System; using System.Collections.Generic; using System.IO; +using CalamityMod.Dusts; +using CalamityMod.Particles; using CalamityMod.Prefixes; +using CalamityMod.Projectiles.Environment; +using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; using Terraria.ID; @@ -42,21 +46,49 @@ namespace CalamityMod.Items.Tools { if (VoucherReforgeSystem.RollWon) { - for (int d = 0; d < 24; d++) + for (int dustCount = 0; dustCount < 8; dustCount++) { - int dust = Dust.NewDust(player.position, player.width, player.height, DustID.Confetti, 0f, 0f, 100, default, 1f); - Main.dust[dust].velocity *= 2f; - Main.dust[dust].noGravity = false; + // Light dust and sparks + Vector2 sparkVel = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3f, 12f); + Vector2 dustVel = (sparkVel).SafeNormalize(Vector2.UnitY).RotatedBy(Main.rand.Next(100)) * Main.rand.NextFloat(1f, 15f); + Vector2 fxPos = player.Center + sparkVel; + Color fxColor = Color.Lerp(Color.MediumAquamarine, Color.MediumSeaGreen, Main.rand.NextFloat(1f)); + + Particle fx = new CustomSpark(fxPos, sparkVel, "CalamityMod/Particles/Sparkle", false, (int)(Main.rand.Next(30, 60)), Main.rand.NextFloat(1.3f, 1.8f), fxColor, new Vector2(0.5f, 1.1f), extraRotation: 0, shrinkSpeed: Main.rand.NextFloat(0.1f, 0.3f)); + GeneralParticleHandler.SpawnParticle(fx); + + Dust dust = Dust.NewDustPerfect(fxPos, ModContent.DustType(), dustVel, 0, default, Main.rand.NextFloat(0.8f, 1.6f)); + dust.noGravity = true; + dust.color = fxColor; + + + // Crit sparkles + Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(1f, 25f); + Color color = Main.rand.NextBool() ? Color.LightBlue : Color.LightSkyBlue; + + Particle sparkle = new CritSpark(player.MountedCenter, velocity, color, bloom: Color.Cyan, scale: 1f, lifeTime: Main.rand.Next(15, 60)); + GeneralParticleHandler.SpawnParticle(sparkle); } SoundEngine.PlaySound(SoundID.Item4, player.position); } else { - for (int d = 0; d < 20; d++) + for (int d = 0; d < 10; d++) { - int dust = Dust.NewDust(player.position, player.width, player.height, DustID.Smoke, 0f, 0f, 100, default, 1.2f); - Main.dust[dust].velocity *= 1.5f; + for (int smokeCount = 0; smokeCount < 3; smokeCount++) + { + Vector2 velocity = Main.rand.NextVector2CircularEdge(1f, 1f) * Main.rand.NextFloat(3f, 12f); + Color smokeStart = Main.rand.NextBool() ? Color.Gray : Color.LightGray; + Color smokeEnd = Color.DimGray; + float smokeSize = Main.rand.NextFloat(0.9f, 2f); + + Particle smoke = new SmallSmokeParticle(player.MountedCenter, velocity, smokeStart, smokeEnd, smokeSize, Main.rand.Next(90, 140)); + GeneralParticleHandler.SpawnParticle(smoke); + } + + Particle skull = new DesertProwlerSkullParticle(player.Center, new Vector2(2.5f, 2.5f).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f), Main.rand.NextBool() ? Color.LightGray : Color.Silver, Color.Gray, Main.rand.NextFloat(0.15f, 0.5f), Main.rand.Next(100, 190)); + GeneralParticleHandler.SpawnParticle(skull); } SoundEngine.PlaySound(SoundID.Item16, player.position); @@ -192,6 +224,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; + Item.maxStack = 9999; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -247,6 +280,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; + Item.maxStack = 9999; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -275,6 +309,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; + Item.maxStack = 9999; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -301,6 +336,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; + Item.maxStack = 9999; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -329,6 +365,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = 0; + Item.maxStack = 9999; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson index 237ef9fc90..e3eec7e692 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Tools.hjson @@ -18,7 +18,7 @@ AggressiveVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -158,7 +158,7 @@ CombatVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging weapons + This effect only applies when reforging weapons ''' } @@ -231,7 +231,7 @@ HurriedVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -306,7 +306,7 @@ OddVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] @@ -429,7 +429,7 @@ UnbreakableVoucher: { Tooltip: ''' Favorite this item in your inventory to increase the likelihood of obtaining a desirable reforge - This effect only applies when reforging accessories + This effect only applies when reforging accessories Targeted Reforge: {0} Selectable Reforges: {1} [c/aaaaaa:Shift- in your inventory to cycle between targeted reforges] diff --git a/Prefixes/AccessoryPrefix.cs b/Prefixes/AccessoryPrefix.cs index df51e2392f..ba8fadb9d6 100644 --- a/Prefixes/AccessoryPrefix.cs +++ b/Prefixes/AccessoryPrefix.cs @@ -76,7 +76,7 @@ namespace CalamityMod.Prefixes { valueMult = 2.5f; } - public override float RollChance(Item item) => 10; // Is manually applied by an item, can't be rerolled normally + public override float RollChance(Item item) => 0; // Is manually applied by an item, can't be rerolled normally public override bool CanRoll(Item item) { return true; From 02785793352aacdae23e4b1d322fa4799d5dcf55 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 4 Apr 2026 13:40:50 -0400 Subject: [PATCH 051/126] Golfer and Zoologist dialogue Altered dialogue logic to support Zoologist transformed dialogue --- Items/Tools/TheGift.cs | 10 ++++++++++ Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 15 +++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 0f2732cf12..62071ed9e9 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -82,7 +82,12 @@ namespace CalamityMod.Items.Tools self.LimitAndRoundMultiplier(self._currentPriceAdjustment); string dialogueKey; if (npc.type < NPCID.Count) + { dialogueKey = $"Mods.CalamityMod.Vanilla.TownNPCMood.{NPCID.Search.GetName(npc.type)}.Monument"; + // Zoologist has separate dialogue when transformed + if (npc.type == NPCID.BestiaryGirl && npc.ShouldBestiaryGirlBeLycantrope()) + dialogueKey += "Transformed"; + } else { var modNPC = NPCLoader.GetNPC(npc.type); @@ -103,7 +108,12 @@ namespace CalamityMod.Items.Tools string locKey = gift.Value ? "GiftPositive" : "GiftNegative"; string dialogueKey; if (npc.type < NPCID.Count) + { dialogueKey = $"Mods.CalamityMod.Vanilla.TownNPCMood.{NPCID.Search.GetName(npc.type)}.{locKey}"; + // Zoologist has separate dialogue when transformed + if (npc.type == NPCID.BestiaryGirl && npc.ShouldBestiaryGirlBeLycantrope()) + dialogueKey += "Transformed"; + } else { var modNPC = NPCLoader.GetNPC(npc.type); diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index a056c2dd03..a28547b66b 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -430,9 +430,12 @@ TownNPCMood: { } BestiaryGirl: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: This monument is like, totally giving me the creeps, bro! + MonumentTransformed: Rrr... BIG ROCK. BAD! NO!! + GiftPositive: Hey!! You're like, suuuper rad and all for gifting me that cute little bunny! Now umm... I need to think of a name for it! + GiftPositiveTransformed: LOVE. GOOD GIFT. CUTE! + GiftNegative: Eek!! Did you really, like, gift me a dead bunny? I really totally hate when people think that's funny! + GiftNegativeTransformed: Grahh!! HATE. CRUEL. GIFT. WATCH YOURSELF!! } Clothier: { @@ -478,9 +481,9 @@ TownNPCMood: { } Golfer: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: This must be mockery. I don't want a monument of greed erected so close to my home. + GiftPositive: I don't know where you found that wedge, but it's been a real lifesaver in the sand. Thanks for helping my game! + GiftNegative: Tell me something. Why did the shoddy driver in that gift splinter all over the place after one swing? Golf is a delicate sport, and this really hurts! } Guide: { From 277695a9bc324ead68d4b315a07207eedff42519 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 14:40:51 -0500 Subject: [PATCH 052/126] Finished until feedback --- Items/Weapons/Rogue/EclipsesFall.cs | 19 ++++ Items/Weapons/Rogue/SpearofPaleolith.cs | 3 + .../Mods.CalamityMod.Projectiles.Rogue.hjson | 3 +- Projectiles/Rogue/EclipseExplosion.cs | 87 ++++++++++++++++++ Projectiles/Rogue/EclipseExplosion.png | Bin 0 -> 10002 bytes Projectiles/Rogue/EclipseFragment.cs | 14 ++- Projectiles/Rogue/EclipseSpear.cs | 37 +++++--- Projectiles/Rogue/EclipsesFallSpear.cs | 36 +++----- Projectiles/Rogue/PaleoShatterExplosion.cs | 39 ++++++++ Projectiles/Rogue/PaleoShatterExplosion.png | Bin 0 -> 6870 bytes Projectiles/Rogue/ProfanedPartisanProj.cs | 11 ++- Projectiles/Rogue/SpearofPaleolithProj.cs | 48 +++++++--- 12 files changed, 244 insertions(+), 53 deletions(-) create mode 100644 Projectiles/Rogue/EclipseExplosion.cs create mode 100644 Projectiles/Rogue/EclipseExplosion.png create mode 100644 Projectiles/Rogue/PaleoShatterExplosion.cs create mode 100644 Projectiles/Rogue/PaleoShatterExplosion.png diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 476e665729..1ef8714b37 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -13,6 +13,25 @@ namespace CalamityMod.Items.Weapons.Rogue { public class EclipsesFall : RogueWeapon { + /// + /// Base damage of the spear, dynamically updated to match rogue stats. + /// This is reduced if the spear has less fragments than MaxFragmentCount + /// + public static int EclipseSpearBaseDmg => 1000; + /// + /// How much damage fragments and sparks should do + /// + public static float FragmentDmgMult => 0.5f; + /// + /// How many fragments are spawned per spear hit + /// + public static int FragmentCount => 2; + /// + /// How many fragments can exist before they start homing in. + /// Also the required amount of fragments for 100% base dmg on Eclipse Spear + /// + public static int MaxFragmentCount => 20; + public override void SetDefaults() { Item.width = 82; diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index 32a36636f4..b8be3087ac 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -10,6 +10,9 @@ namespace CalamityMod.Items.Weapons.Rogue public class SpearofPaleolith : RogueWeapon { public static int ShardBaseDamage => 25; + + public static int NormalShardCount => 3; + public static int ImpaledShardCount => 5; public override void SetDefaults() { Item.width = 54; diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 74ea651bdb..30e53d4f60 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -335,8 +335,9 @@ WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals EclipseFragment.DisplayName: Eclipse Fragment -EclipseGuandao.DisplayName: Eclipse Guandao EclipsesFallSpear.DisplayName: Eclipses Fall Spear EclipseSpark.DisplayName: Eclipse Spark EclipseSpear.DisplayName: Eclipse Spear ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare +EclipseExplosion.DisplayName: Eclipse Explosion +PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion diff --git a/Projectiles/Rogue/EclipseExplosion.cs b/Projectiles/Rogue/EclipseExplosion.cs new file mode 100644 index 0000000000..8ec802cdb2 --- /dev/null +++ b/Projectiles/Rogue/EclipseExplosion.cs @@ -0,0 +1,87 @@ +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Utilities.Daybreak; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Rogue +{ + //Based on Terratomere explosion + public class EclipseExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 520; + Projectile.friendly = true; + Projectile.ignoreWater = false; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 150; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.scale = 0.2f; + Projectile.hide = true; + } + + public override void AI() + { + // Play an explosion sound on the first frame of this projectile's existence. + if (Projectile.localAI[0] == 0f) + { + SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); + Projectile.localAI[0] = 1f; + } + + // Emit a strong white light. + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); + + // Determine frames. Once the maximum frame is reached the projectile dies. + Projectile.frameCounter++; + if (Projectile.frameCounter % 5 == 4) + Projectile.frame++; + if (Projectile.frame >= 17) + Projectile.Kill(); + + // Exponentially accelerate. + Projectile.scale *= 1.013f; + Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); + } + + public override bool PreDraw(ref Color lightColor) + { + return base.PreDraw(ref lightColor); + } + + public void AdditiveDraw(SpriteBatch spriteBatch) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; + Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 origin = frame.Size() * 0.5f; + + for (int i = 0; i < 2; i++) + { + Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; + Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); + lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; + Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); + } + if (Projectile.timeLeft < 149) + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); + Main.spriteBatch.End(); + } + } + } +} diff --git a/Projectiles/Rogue/EclipseExplosion.png b/Projectiles/Rogue/EclipseExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..58635d492ab68802ba32b787b493389492d85bab GIT binary patch literal 10002 zcmb7q3p`Y7+qaUG<1Xd2F}pA-IZVPhjgF)yQ>kr}^Hh@*gJB$o31N4lEHa8wNm34# zgu*aRt%&U$jl*O)g~6aPjG1p~_dM_OJ-_#PzxP|e-&*%|U-$pM*P3--_y4-?Yt8i& z_O`N8s#0QNVzPEe4xJJcTf-F-6Q9{24r^AFWvbv}P2efp17ZcuYU6Na9by0R{bFLT z5~T&65^!DP1orgd-vizn+xm$_A}ux5*;s2K<0$v-PR`df5yNg3QXC2Q5R)REvUh+n ze;;D6n|8Or+Kt2`PJv=#ay6^xng+jT=U}BW>F^&U2fqs>vS+|~u@j!&z9fD7!>4~U z)<@}^UH0w8z?iq^|FFAYXSYji16+|1Q(Yq=wg#4t!so9)W%$>K?N}rJL%$Z5QES$U z{Q{TH@aY}D?uY&oEUz9O@VVOmALYN@R1AI}cO=Eu!3e`WMuux1{ypky4~d6=kCY6{ ztH)Y+oV7oYr_9i>^s^Vr&~UXC+fsEzJF)wrn3#5y-J$)bL)@nNZUziLd!5gAQ+Pzh?LlW?-VeA|_Yh>?wJ0a)EE}Lh1$blP8u5z3Y$qO@ENa%ffDE@`X zLA3TbEr`hv`Ta!sw$+iVKg%^=4A|2=bpQKu;4X!g!FwH>0YAw=gamogyX*#y@*B2t zo4RD7^Q3p^(Ho%Tn!z&_KcltU)3yZ`1I&iJ|~vYO2#yMfjDMvG{5`!xeFj zH5u6ct$?3S>KCcIc-&B^Ht6Q^aCK732IZPZJ{N^Jt4wwpSe|w*yj?gyfd`A_kMoie(LPvjApuJ14ev$Q&n=L-4%9CB9W`MEK_bP=CGt) zd@a$9*%LUaFryJA)KkQ37DxY6u?DbSkEn=iC$sr?moJ=b0*`knV!~u|rkQh^NUF>a zvASJT)L7|t$~Wun4BH1CAy3yp@ne37>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p`2d!LF5&8VHF*DBJus@Z1&DCpY@F zw1t1V4k`qg0`eOVvTo{=3s!$-fDRzP>v&YFPtk;xd1+9l8LI3d928fzDSOXnO`&r5Va;&6A8Ug)@9 zvvOxNm|+2OCNtImI`FmnF?haoDa7%6Q#=@}8$MEWIlxw@iBOx%VyV&uwJg!mQdLpI|GP&?aWqh;mAU)LF-PU`nwezl4isD~8kp7EYR@Vk_MK^+@N>elBADa2q=$6y5>10A-)T(K3q&P6> zE;Vzb4UpuFfUlQS?nu<3-ymlwteW~n->VdpuB?W)%T@_Dz5_Zg z{?Y(bW@bQumCy0vE^(fLG!h{NWa2H8%95iez~8L13NK>dcv}ky-96{QE!vZKUQvHv zNPFE8^smDNC{j-=(>jcMxFr^BIaWDV_JMKri30mca%Pgw5w?bJ+$wL4YP-*4p)cy2h(g9YQ0L3)Ek6s-OWHg_MfeuO&{UltSp% z`{5mBgXk}DmA0kw@RHwRZuuDFH_}!ta`~XXq|dg;3S+>AF7~$kRF{F8z=?lUD^k@) zkABM;R^LvJUA^Py=Zu*!oK^|-)z;CYmvV;rN$=}d4g7M7`=UyVR*6vD1MQgf;NECT zsS{FE4dELpZ1Ox#1Mzn2W1G;;xZ)<5+>VDlj|F2#lkjl?N5(I1ZaEBF3T*73~P9d!D7$0GiZ{AIe>o^P7eN3;$;O7XlG3AVy!$5cmcbdt5mhg)=Mxb1yPKs%;S(AK_Kk32CE}_NIOoUDrBS}apU!2w9k7@!>gxF7 zSN8B<4{D)Ot`fSz2_9 z_t{DB(WsVAD8M7^IX>7%>-v 100) Projectile.timeLeft = 100; - Projectile.Center = Vector2.Lerp(Projectile.Center, Main.projectile[(int)Projectile.ai[0] - 1].Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); Projectile.velocity = new(0, 1E-05f); - if (Projectile.Distance(Main.projectile[(int)Projectile.ai[0] - 1].Center) < 16) + if (Projectile.Distance(proj.Center) < 16) { - Main.projectile[(int)Projectile.ai[0] - 1].ai[2]++; - Main.projectile[(int)Projectile.ai[0] - 1].netUpdate = true; + proj.ai[2]++; + proj.netUpdate = true; + if (proj.ai[2] == proj.localAI[0]) + SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); Projectile.active = false; + } } } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 4b297972ea..03f1b8635c 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -1,15 +1,13 @@ using System; using System.Collections.Generic; -using System.Linq; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs; -using CalamityMod.Particles; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -45,7 +43,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 1; - Projectile.timeLeft = 600 * Projectile.MaxUpdates; + Projectile.timeLeft = 1200 * Projectile.MaxUpdates; Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() @@ -58,8 +56,8 @@ namespace CalamityMod.Projectiles.Rogue initialized = true; } - Projectile.originalDamage = (int)(1000 * (Projectile.ai[2]/20f)); - if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0]) + Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) { LinePos.end = Projectile.position; Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; @@ -75,7 +73,7 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { - + if (LineWidth > 0) { var device = Main.instance.GraphicsDevice; @@ -112,11 +110,12 @@ namespace CalamityMod.Projectiles.Rogue } } var tex = TextureAssets.Item[ModContent.ItemType()]; - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + if (Projectile.Opacity > 0.5f) + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); using (Main.spriteBatch.Scope()) { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied,null,null,null,null,Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * (Projectile.localAI[0] > 0 ? Projectile.ai[2]/Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); Main.spriteBatch.End(); } return false; @@ -125,7 +124,7 @@ namespace CalamityMod.Projectiles.Rogue public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float _ = 0; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(),targetHitbox.Size(),Projectile.oldPosition+ new Vector2(Projectile.width,Projectile.height)*0.5f,Projectile.Center,48f,ref _)) + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) { return true; } @@ -149,12 +148,24 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - //Projectile.ai[0] = -1; + + if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) + { + Projectile.Opacity = 0; + Projectile.Center = target.Center; + Projectile.timeLeft = 60 * Projectile.MaxUpdates; + Projectile.velocity = new(0, 1E-05f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + } Projectile.netUpdate = true; + if (Projectile.ai[0] == target.whoAmI) + SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); } public override void OnKill(int timeLeft) { + if (Projectile.Opacity > 0) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); return; } @@ -166,7 +177,7 @@ namespace CalamityMod.Projectiles.Rogue public Color FireColorFunction(float completion, Vector2 vertexPos) { Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); - return mainColor * MathF.Pow(1 - completion*1.1f, 0.5f); + return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); } public float FireCoreWidthFunction(float completion, Vector2 vertexPos) diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs index 80da75fd77..82f3bb6bf6 100644 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ b/Projectiles/Rogue/EclipsesFallSpear.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using CalamityMod.CalPlayer; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; -using CalamityMod.Systems.Mechanic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -18,13 +17,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - private int SplitProjDamage => (int)(Projectile.damage * 0.5f); - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } + private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); public override void SetDefaults() { @@ -55,7 +48,7 @@ namespace CalamityMod.Projectiles.Rogue public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - int onHitCount = 6; + int onHitCount = EclipsesFall.FragmentCount + 4; float spread = 20f; int projectileDamage = SplitProjDamage; float kb = 5f; @@ -63,36 +56,37 @@ namespace CalamityMod.Projectiles.Rogue int starID = ModContent.ProjectileType(); for (int i = 0; i < onHitCount; i++) { - int projID = i % 3 == 0 ? starID : sparkID; + int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; float speed = Main.rand.NextFloat(1.5f, 2f); float moveDuration = Main.rand.Next(5, 15); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration,20); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); } SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); - + List frags = new(); var p = -2; foreach (var item in Main.ActiveProjectiles) { - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner) + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) { - if (Projectile.Calamity().stealthStrike) + if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) { - if (item.timeLeft < 520) + if (item.timeLeft < 1120 * item.MaxUpdates) { - item.Kill(); + item.timeLeft = 60 * item.MaxUpdates; + item.ai[0] = target.whoAmI; continue; } - item.timeLeft = 600; + item.timeLeft = 1200 * item.MaxUpdates; p = item.whoAmI; } - item.ai[0] = target.whoAmI; + item.ai[0] = target.whoAmI; } if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) { @@ -104,14 +98,14 @@ namespace CalamityMod.Projectiles.Rogue { int projID = ModContent.ProjectileType(); Vector2 velocity = Vector2.Zero; - var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI,0,Math.Min(20,frags.Count(x => x.ai[0] == 0))); + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); proj.rotation = Projectile.rotation; p = proj.whoAmI; } frags = frags.OrderBy(x => x.timeLeft).ToList(); - int toRemove = frags.Count(x => x.ai[0] == 0) - 20; + int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; foreach (var item in frags) { if (toRemove > 0 && item.ai[0] == 0) diff --git a/Projectiles/Rogue/PaleoShatterExplosion.cs b/Projectiles/Rogue/PaleoShatterExplosion.cs new file mode 100644 index 0000000000..d9366c8580 --- /dev/null +++ b/Projectiles/Rogue/PaleoShatterExplosion.cs @@ -0,0 +1,39 @@ +using CalamityMod.Items.Weapons.Magic; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Projectiles.Rogue +{ + public class PaleoShatterExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.width = 84; + Projectile.height = 152; + Projectile.friendly = true; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 60; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.tileCollide = false; + } + + public override void AI() + { + if (Projectile.timeLeft == 60) + Projectile.Bottom = Projectile.Center + new Vector2(0,16); + if (Projectile.timeLeft % 3f == 2f) + Projectile.frame++; + if (Projectile.frame >= Main.projFrames[Type]) + Projectile.Kill(); + } + } +} diff --git a/Projectiles/Rogue/PaleoShatterExplosion.png b/Projectiles/Rogue/PaleoShatterExplosion.png new file mode 100644 index 0000000000000000000000000000000000000000..7740b1ff36b35d048c9e08dbfb75ae370a8c4024 GIT binary patch literal 6870 zcmbVRc{rPCyVseoozHaC46U{lQz96pQ;MQwYLC6BCACaTElF)96qU@hhSI7^?1V`X zNo^Cv+R#odweMS$bZTso$XF5;!g(^+`ObH)>zqH%b#Uc<-@Nbhyw7vrzx(&Q?^}wK zgO$XWvR{gciAlh%&7Hx~RZQ$3YX3Y2&N4f8gTUb*f!FM>iHT9ukMG|)3a*btI$N2F zRS%w91sC7?Sv%W{iN!(1#C}Q?6BB^1ep(R|Lw_$O#`;lA%rI9>>~wfx%k`_^#X)6lcU_Gxo;ccP`Wf9C`TaKZH1u@#CFqsY#I)4e4%*F! z3-2sa@64p~YH`sjFnX>rBXDpq&meFKrW5GK97>}zmSg#`yT*rG+ROdcU~T{3pI>2h z)Z(8a*@J#W-vO7Ry;a|01s<9$$E)F9D^aai%G=UQUue&!;%rRQ(z2c2`cJlzh`~e(3npJn`De#O7WtY39B+3@pnND%{q~W8Bbr(Y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!o&EtZ>U+sF=P^059g+!l+@l(GO-5%2BI?_V z+WPU7Bte}^|1|e#d_<}1?;Z-^A1Ss=!eLTLR4G$)9@++ZdqD2#6)9@^!X_~v-|5iUCaP7$d8k`Y* zb2mmo7SND0sdwY$Y9QbFE!g0Bsr=5DS9GWD;g~Yo zQXscx)l{17Akfr(Sywujf7h`m{*(r`0zgf;gOlj literal 0 HcmV?d00001 diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 68b13ed38f..16c12acd08 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -6,6 +6,7 @@ using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -21,8 +22,8 @@ namespace CalamityMod.Projectiles.Rogue public int ExplodeTime => 60 * Projectile.MaxUpdates; public override void SetStaticDefaults() { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = -1; + ProjectileID.Sets.TrailCacheLength[Type] = 24; + ProjectileID.Sets.TrailingMode[Type] = 2; } public override void SetDefaults() @@ -135,6 +136,12 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { + + for (var i = 0; i < ProjectileID.Sets.TrailCacheLength[Type]; i += 3) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition, null, lightColor * Projectile.Opacity * (i > 0 ? (1 - i / (float)ProjectileID.Sets.TrailCacheLength[Type]) * 0.25f : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + } + float glowIntensity = Projectile.damage == 0 && StuckEnemyID == 0 ? 4f * (1-(Projectile.timeLeft/(float)ExplodeTime)) : 0f; Projectile.DrawProjectileWithBackglow(Color.Yellow, lightColor, glowIntensity); return false; diff --git a/Projectiles/Rogue/SpearofPaleolithProj.cs b/Projectiles/Rogue/SpearofPaleolithProj.cs index 21c51c8af3..a6f3267548 100644 --- a/Projectiles/Rogue/SpearofPaleolithProj.cs +++ b/Projectiles/Rogue/SpearofPaleolithProj.cs @@ -1,8 +1,11 @@ using System.Linq; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -14,6 +17,12 @@ namespace CalamityMod.Projectiles.Rogue public override string Texture => "CalamityMod/Items/Weapons/Rogue/SpearofPaleolith"; public static int Lifetime => 600; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 24; + ProjectileID.Sets.TrailingMode[Type] = 2; + } public override void SetDefaults() { Projectile.width = 12; @@ -70,7 +79,10 @@ namespace CalamityMod.Projectiles.Rogue public override bool PreDraw(ref Color lightColor) { - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); + for (var i = 0; i < ProjectileID.Sets.TrailCacheLength[Type]; i += 3) + { + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.oldPos[i] + Projectile.Size * 0.5f - Main.screenPosition, null, lightColor * Projectile.Opacity * (i>0 ? (1 - i / (float)ProjectileID.Sets.TrailCacheLength[Type]) * 0.25f : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + } return false; } @@ -94,25 +106,37 @@ namespace CalamityMod.Projectiles.Rogue } bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); - int shardCount = strongSplit ? 5 : 3; + int shardCount = strongSplit ? SpearofPaleolith.ImpaledShardCount : SpearofPaleolith.NormalShardCount; for (var i = 0; i < shardCount; i++) { var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(0,-1).RotatedByRandom(1) * (strongSplit ? 10 : 7.5f) * Main.rand.NextFloat(0.9f,1.1f), ModContent.ProjectileType(), 0 /*Shard dmg is set in its AI*/, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 30; } - for (int i = 0; i < shardCount; i++) + if (strongSplit) { - int sparkLifetime = Main.rand.Next(8, 22); - float sparkScale = Main.rand.NextFloat(0.5f, 1f); - var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; - if (Main.rand.NextBool(5)) - sparkScale *= 1.4f; - - Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); - SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); - GeneralParticleHandler.SpawnParticle(spark); + SoundEngine.PlaySound(SoundID.DeerclopsRubbleAttack with { PitchVariance = 0.5f}, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Projectile.owner); } + else + { + for (int i = 0; i < shardCount; i++) + { + int sparkLifetime = Main.rand.Next(8, 22); + float sparkScale = Main.rand.NextFloat(0.5f, 1f); + var sparkColor = Main.rand.NextBool() ? Color.DarkGoldenrod : Color.SandyBrown; + + if (Main.rand.NextBool(5)) + sparkScale *= 1.4f; + + Vector2 sparkVelocity = Vector2.UnitY.RotatedByRandom(1) * MathHelper.Lerp(-7.5f, -15, Main.rand.NextFloat()); + SparkParticle spark = new SparkParticle(target.Center, sparkVelocity, false, sparkLifetime, sparkScale, sparkColor); + GeneralParticleHandler.SpawnParticle(spark); + } + } + SoundEngine.PlaySound(SoundID.DeerclopsStep with { Pitch = 0.5f, PitchVariance = 0.5f, Volume = 1f, }, Projectile.Center); + SoundEngine.PlaySound(SoundID.DD2_CrystalCartImpact with { Pitch = -0.5f, PitchVariance = 0.5f, Volume = 1f, }, Projectile.Center); + target.AddBuff(ModContent.BuffType(), 120); } From 5a5b5bb6dc0d1609f9383d94802d2ebe665e973a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 16:00:11 -0500 Subject: [PATCH 053/126] spear following + partisan star --- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- Projectiles/Rogue/EclipseSpear.cs | 13 ++- Projectiles/Rogue/ProfanedPartisanFlare.cs | 87 +++++++++++++++---- 3 files changed, 84 insertions(+), 18 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 24cfc9a19e..2cbc368d64 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -869,7 +869,7 @@ ProfanedPartisan: { ''' Throws a profaned spear that splits into miniature spears upon hitting an enemy Stealth strikes remain impaled in an enemy for 10 seconds - While an enemy is impaled, all spears that strike them instead erupt into homing fireballs + While an enemy is impaled, all spears that strike them instead shatter into exploding stars Inflicts [cbuff:CalamityMod/HolyFlames] ''' } diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs index 03f1b8635c..6fc0cec0af 100644 --- a/Projectiles/Rogue/EclipseSpear.cs +++ b/Projectiles/Rogue/EclipseSpear.cs @@ -67,9 +67,20 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ai[0] = -1; LineWidth = 1f; LinePos.start = Projectile.Center; + Projectile.localAI[1] = 0; + } + + + LineWidth -= 0.05f; + Projectile.localAI[1]++; + if (Projectile.localAI[1] > 60) + { + var dis = Projectile.Distance(Main.player[Projectile.owner].Center); + Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + } Projectile.velocity *= 0.9f; - LineWidth -= 0.05f; } public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 6ddbec8df3..d5f6e15ffb 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -3,8 +3,8 @@ using System.Linq; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs.Providence; using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; using CalamityMod.Utilities.Daybreak; using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; - Projectile.scale = 0.75f; + Projectile.scale = 1f; } public override bool? CanHitNPC(NPC target) @@ -107,32 +107,87 @@ namespace CalamityMod.Projectiles.Rogue } public override bool PreDraw(ref Color lightColor) { + Color hiColor = new Color(255, 155, 25, 255); + Color loColor = new Color(255, 0, 0, 0); + Projectile.Opacity = 1; Main.spriteBatch.End(out var ss); var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( + using var trailLease = RenderTargetPool.Shared.Rent( device, Main.screenWidth / 2, Main.screenHeight / 2, RenderTargetDescriptor.Default ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(8).ToList(); + //Everything is drawn to this lease, which then is drawn to screen with the desired opacity. + //This is used to allow projectile opacity to scale nicely + using var mainLease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth, + Main.screenHeight, + RenderTargetDescriptor.Default + ); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + using (mainLease.Scope(clearColor: Color.Transparent)) + { + using (trailLease.Scope(clearColor: Color.Transparent)) + { + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(Projectile.oldPos.Take(5).ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), Projectile.oldPos.Length + 32); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(trailLease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + + + float lerpMult = MathHelper.Lerp(0.5f, 1.5f, Math.Abs(MathF.Sin(Projectile.localAI[1] / 10f))); + + Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[ModContent.ProjectileType()].Value; + Vector2 drawPos = Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); + Color baseColor = Color.Lerp(hiColor, loColor, 0.5f); + Color baseColor2 = hiColor; + baseColor.A = 0; + baseColor *= lerpMult; + baseColor2 *= lerpMult; + Vector2 origin = texture.Size() / 2f; + Vector2 scale = new Vector2(0.5f, 1f) * ((lerpMult - 1) * 0.5f + 1f) * 1.2f * Projectile.scale; + + SpriteEffects spriteEffects = SpriteEffects.None; + if (Projectile.spriteDirection == -1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Projectile.rotation += MathHelper.ToRadians(lerpMult * 2f); + + float upRight = MathHelper.PiOver4; + float up = MathHelper.PiOver2; + float upLeft = 3f * MathHelper.PiOver4; + float left = MathHelper.Pi; + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upLeft + Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, upRight - Projectile.rotation, origin, scale, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upLeft + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, upRight - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, up + Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor, left - Projectile.rotation, origin, scale * 0.6f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, up + Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + Main.EntitySpriteDraw(texture, drawPos, null, baseColor2, left - Projectile.rotation, origin, scale * 0.36f, spriteEffects, 0); + + scale = new Vector2(1f, 1f); + texture = ModContent.Request("CalamityMod/Particles/GlowOrbParticle").Value; + using (Main.spriteBatch.Scope()) + { + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Matrix.Identity); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, baseColor2, 0, texture.Size() * 0.5f, 1f, 0, 0f); + Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, 0.5f, 0, 0f); + Main.spriteBatch.End(); + } + Main.spriteBatch.End(); } Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * 0.75f, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.Draw(mainLease.Target, Vector2.Zero, null, Color.White * Projectile.Opacity, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); Main.spriteBatch.End(); - Main.spriteBatch.Begin(ss); - - Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - var frame = tex.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() *0.5f, Projectile.scale, SpriteEffects.None, 0); return false; } public float FireWidthFunction(float completion, Vector2 pos) @@ -156,9 +211,9 @@ namespace CalamityMod.Projectiles.Rogue public Color FireColorFunction(float completion, Vector2 pos) { - Color mainColor = ProvUtils.GetProjectileColor(255); + Color mainColor = new Color(255, 155, 25, 255); Color endColor = Color.Lerp(mainColor, Color.Transparent, Utils.GetLerpValue(0.8f, 1f, completion, true)); - return Color.Lerp(mainColor, endColor, completion) * Projectile.Opacity; + return Color.Lerp(mainColor, Color.Transparent, completion); } NPC GetTargetInRange(float range) From 16284e5020bf6d1c6754a84f07332a765c9f3e3e Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 18:19:02 -0500 Subject: [PATCH 054/126] Balance --- Items/Weapons/Rogue/EclipsesFall.cs | 6 +++--- Items/Weapons/Rogue/ProfanedPartisan.cs | 5 +++-- Projectiles/Rogue/EclipseFragment.cs | 2 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 2 +- Projectiles/Rogue/ProfanedPartisanProj.cs | 7 +------ Projectiles/Rogue/ProfanedPartisanSpear.cs | 8 +++++++- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 1ef8714b37..864a04ef16 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -17,11 +17,11 @@ namespace CalamityMod.Items.Weapons.Rogue /// Base damage of the spear, dynamically updated to match rogue stats. /// This is reduced if the spear has less fragments than MaxFragmentCount /// - public static int EclipseSpearBaseDmg => 1000; + public static int EclipseSpearBaseDmg => 1250; /// /// How much damage fragments and sparks should do /// - public static float FragmentDmgMult => 0.5f; + public static float FragmentDmgMult => 0.33f; /// /// How many fragments are spawned per spear hit /// @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 82; Item.height = 88; - Item.damage = 900; + Item.damage = 1000; Item.knockBack = 3.5f; Item.useAnimation = Item.useTime = 24; Item.autoReuse = true; diff --git a/Items/Weapons/Rogue/ProfanedPartisan.cs b/Items/Weapons/Rogue/ProfanedPartisan.cs index 11510f690f..ae93270b57 100644 --- a/Items/Weapons/Rogue/ProfanedPartisan.cs +++ b/Items/Weapons/Rogue/ProfanedPartisan.cs @@ -11,12 +11,13 @@ namespace CalamityMod.Items.Weapons.Rogue { public class ProfanedPartisan : RogueWeapon { - public static int ShardBaseDamage => 88; + public static int SpearBaseDamage => 125; + public static int StarBaseDamage => 80; public override void SetDefaults() { Item.width = 68; Item.height = 68; - Item.damage = 333; + Item.damage = 300; Item.crit = 15; Item.knockBack = 8f; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs index 6e37ffc635..c10b177f24 100644 --- a/Projectiles/Rogue/EclipseFragment.cs +++ b/Projectiles/Rogue/EclipseFragment.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 40; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 5; + Projectile.penetrate = 4; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index d5f6e15ffb..0d30035773 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -69,7 +69,7 @@ namespace CalamityMod.Projectiles.Rogue if (Projectile.originalDamage == 0) { - Projectile.originalDamage = ProfanedPartisan.ShardBaseDamage; + Projectile.originalDamage = ProfanedPartisan.StarBaseDamage; Projectile.ContinuouslyUpdateDamageStats = true; } if (target != null && Projectile.localNPCImmunity[target.whoAmI] <= 0 && target.active && !target.dontTakeDamage) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 16c12acd08..cdf91a2dd2 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -166,12 +166,7 @@ namespace CalamityMod.Projectiles.Rogue if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, (int)(Projectile.damage * 0.25), Projectile.knockBack, Projectile.owner, 0f, 0f); - p.hostile = false; - p.friendly = true; - p.DamageType = Projectile.DamageType; - if (strongSplit) - p.Calamity().conditionalHomingRange = 600; + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index aac6cd529b..76b9fae7af 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -1,5 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.NPCs.Providence; +using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -39,6 +39,12 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { + if (Projectile.originalDamage == 0) + { + Projectile.originalDamage = ProfanedPartisan.SpearBaseDamage; + Projectile.ContinuouslyUpdateDamageStats = true; + } + float timeGateValue = 30f; if (Projectile.ai[0] <= 0f) //Copied from HolySpear.cs { From 5d0197fca714220792367ac1a70aac7114a7ace7 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 20:45:01 -0500 Subject: [PATCH 055/126] Localization + Reorg + Darksun Effect --- ChatTags/CustomColorEffectHandler.cs | 51 ++ Items/Weapons/Rogue/EclipsesFall.cs | 772 +++++++++++++++++- ...Mods.CalamityMod.Items.Weapons.Rogue.hjson | 6 +- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 4 +- .../Mods.CalamityMod.Projectiles.Rogue.hjson | 22 +- .../Mods.CalamityMod.Projectiles.Summon.hjson | 2 +- Projectiles/Rogue/EclipseExplosion.cs | 87 -- Projectiles/Rogue/EclipseFragment.cs | 189 ----- Projectiles/Rogue/EclipseSpark.cs | 146 ---- Projectiles/Rogue/EclipseSpear.cs | 204 ----- Projectiles/Rogue/EclipseStealthBoom.cs | 48 -- Projectiles/Rogue/EclipsesFallSpear.cs | 148 ---- ...om.png => EclipsesFall_LightExplosion.png} | Bin ...ng => EclipsesFall_LightExplosionGlow.png} | Bin ...ent.png => EclipsesFall_LightFragment.png} | Bin ...pear.png => EclipsesFall_StealthSpear.png} | Bin ...=> EclipsesFall_StealthSpearExplosion.png} | Bin 17 files changed, 834 insertions(+), 845 deletions(-) create mode 100644 ChatTags/CustomColorEffectHandler.cs delete mode 100644 Projectiles/Rogue/EclipseExplosion.cs delete mode 100644 Projectiles/Rogue/EclipseFragment.cs delete mode 100644 Projectiles/Rogue/EclipseSpark.cs delete mode 100644 Projectiles/Rogue/EclipseSpear.cs delete mode 100644 Projectiles/Rogue/EclipseStealthBoom.cs delete mode 100644 Projectiles/Rogue/EclipsesFallSpear.cs rename Projectiles/Rogue/{EclipseStealthBoom.png => EclipsesFall_LightExplosion.png} (100%) rename Projectiles/Rogue/{EclipseStealthBoomGlow.png => EclipsesFall_LightExplosionGlow.png} (100%) rename Projectiles/Rogue/{EclipseFragment.png => EclipsesFall_LightFragment.png} (100%) rename Projectiles/Rogue/{EclipseSpear.png => EclipsesFall_StealthSpear.png} (100%) rename Projectiles/Rogue/{EclipseExplosion.png => EclipsesFall_StealthSpearExplosion.png} (100%) diff --git a/ChatTags/CustomColorEffectHandler.cs b/ChatTags/CustomColorEffectHandler.cs new file mode 100644 index 0000000000..5f63ba48fb --- /dev/null +++ b/ChatTags/CustomColorEffectHandler.cs @@ -0,0 +1,51 @@ +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Graphics; +using Terraria; +using Terraria.GameContent; +using Terraria.UI.Chat; + +namespace CalamityMod.ChatTags +{ + // This is a tag handler for storing custom color effects for text all within the "ceffect" tag; the parameter determining the actual effect in use. + // i.e [ceffect/darksun:Hello World] would apply darksun effect to "Hello World". + public sealed class CustomColorEffectHandler : AbstractTagHandler + { + protected override string[] TagNames { get; } = ["ceffect"]; + public override TextSnippet Parse(string text, Color baseColor = new(), string options = null) + { + if (options.Equals("darksun", StringComparison.OrdinalIgnoreCase)) + return new DarksunTextSnippet(text); + return new TextSnippet(text); + } + } + + public sealed class DarksunTextSnippet(string text) : TextSnippet + { + public override bool UniqueDraw(bool justCheckingString, out Vector2 size, SpriteBatch spriteBatch, Vector2 position = new Vector2(), Color color = new Color(), float scale = 1) + { + size = new Vector2(GetStringLength(FontAssets.MouseText.Value), FontAssets.MouseText.Value.MeasureString(" ").Y * scale); + + if (!justCheckingString && (color.R != 0 || color.G != 0 || color.B != 0)) + { + var font = FontAssets.MouseText.Value; + var BorderColor = new Color(255, 191, 73); + var HazeColor = new Color(238, 226, 153); + + for (float f = 0f; f < MathHelper.TwoPi; f += MathHelper.TwoPi * 0.05f) + { + ChatManager.DrawColorCodedString(spriteBatch, font, text, position + new Vector2(2, 0).RotatedBy(f + Main.GlobalTimeWrappedHourly), Color.Lerp(BorderColor, HazeColor, (Main.mouseTextColor - 190) / 65f * 0.1f), 0f, Vector2.Zero, new Vector2(scale)); + } + ChatManager.DrawColorCodedString(spriteBatch, font, text, position, Color.Black, 0f, Vector2.Zero, new Vector2(scale)); + } + return true; + } + + public override float GetStringLength(DynamicSpriteFont font) + { + float size = font.MeasureString(text).X; + return size * Scale; + } + } +} diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 864a04ef16..7513b6be7c 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -1,14 +1,33 @@ -using CalamityMod.Items.Materials; +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.DataStructures; +using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Rogue; +using CalamityMod.Items.Weapons.Summon; +using CalamityMod.NPCs; +using CalamityMod.Particles; using CalamityMod.Projectiles.Rogue; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Utilities.Daybreak; +using CalamityMod.Utilities.Daybreak.Buffers; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; +using Terraria.UI.Chat; +#region Item namespace CalamityMod.Items.Weapons.Rogue { public class EclipsesFall : RogueWeapon @@ -42,14 +61,13 @@ namespace CalamityMod.Items.Weapons.Rogue Item.autoReuse = true; Item.DamageType = RogueDamageClass.Instance; Item.shootSpeed = 32f; - Item.shoot = ModContent.ProjectileType(); - + Item.shoot = ModContent.ProjectileType(); Item.useStyle = ItemUseStyleID.Swing; Item.noMelee = true; Item.noUseGraphic = true; Item.UseSound = SoundID.Item1; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; - Item.rare = ModContent.RarityType(); + Item.rare = ModContent.RarityType(); } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) @@ -59,7 +77,6 @@ namespace CalamityMod.Items.Weapons.Rogue Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); return false; } - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) => Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request(Texture + "Glow").Value); public override void AddRecipes() @@ -73,3 +90,748 @@ namespace CalamityMod.Items.Weapons.Rogue } } } +#endregion + +namespace CalamityMod.Projectiles.Rogue +{ + #region Main Javelin + public class EclipsesFall_Javelin : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 50; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 2; + Projectile.penetrate = 1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; + Projectile.timeLeft = 150 * Projectile.MaxUpdates; + } + + public override void AI() + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + if (Main.rand.NextBool(5)) + { + Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); + float trailScale = Main.rand.NextFloat(0.8f, 1.2f); + Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; + Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); + GeneralParticleHandler.SpawnParticle(eclipseTrail); + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + int onHitCount = EclipsesFall.FragmentCount + 4; + float spread = 20f; + int projectileDamage = SplitProjDamage; + float kb = 5f; + int sparkID = ModContent.ProjectileType(); + int starID = ModContent.ProjectileType(); + for (int i = 0; i < onHitCount; i++) + { + int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; + Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; + float speed = Main.rand.NextFloat(1.5f, 2f); + float moveDuration = Main.rand.Next(5, 15); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); + } + + SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); + SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); + + + List frags = new(); + var p = -2; + foreach (var item in Main.ActiveProjectiles) + { + + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) + { + if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) + { + if (item.timeLeft < 1120 * item.MaxUpdates) + { + item.timeLeft = 60 * item.MaxUpdates; + item.ai[0] = target.whoAmI; + continue; + } + item.timeLeft = 1200 * item.MaxUpdates; + p = item.whoAmI; + } + item.ai[0] = target.whoAmI; + } + if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) + { + frags.Add(item); + } + } + if (Projectile.Calamity().stealthStrike && p < 0) + for (int i = 0; i < 1; i++) + { + int projID = ModContent.ProjectileType(); + Vector2 velocity = Vector2.Zero; + var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); + proj.rotation = Projectile.rotation; + p = proj.whoAmI; + } + + + frags = frags.OrderBy(x => x.timeLeft).ToList(); + int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; + foreach (var item in frags) + { + if (toRemove > 0 && item.ai[0] == 0) + { + item.ai[0] = -2; + item.timeLeft = EclipsesFall_LightFragment.lifetime; + toRemove--; + continue; + } + if (Projectile.Calamity().stealthStrike) + { + if (item.ai[0] == 0) + { + item.ai[1] = Main.rand.Next(5, 15); + item.ai[2] = 20; + } + item.ai[0] = p + 1; + item.timeLeft = EclipsesFall_LightFragment.lifetime; + item.damage = 0; + item.netUpdate = true; + } + } + + + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = TextureAssets.Projectile[Type].Value; + Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } + #endregion + + #region Stealth Projectiles + + [PierceResistException] + public class EclipsesFall_StealthSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + bool initialized = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 6; + ProjectileID.Sets.TrailingMode[Type] = 0; + } + + (Vector2 start, Vector2 end) LinePos = (new(), new()); + float LineWidth = 0; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 48; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.MaxUpdates = 1; + Projectile.penetrate = -1; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 1; + Projectile.timeLeft = 1200 * Projectile.MaxUpdates; + Projectile.ContinuouslyUpdateDamageStats = true; + } + public override void AI() + { + if (!initialized) + { + Projectile.ai[0] = -1; + Projectile.localAI[0] = Projectile.ai[2]; + Projectile.ai[2] = 0; + initialized = true; + } + + Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); + if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) + { + LinePos.end = Projectile.position; + Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; + Projectile.Damage(); + Projectile.ai[0] = -1; + LineWidth = 1f; + LinePos.start = Projectile.Center; + Projectile.localAI[1] = 0; + } + + + LineWidth -= 0.05f; + Projectile.localAI[1]++; + if (Projectile.localAI[1] > 60) + { + var dis = Projectile.Distance(Main.player[Projectile.owner].Center); + Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; + + } + Projectile.velocity *= 0.9f; + } + public override bool PreDraw(ref Color lightColor) + { + + if (LineWidth > 0) + { + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + + using (Main.spriteBatch.Scope()) + { + using (lease.Scope(clearColor: Color.Transparent)) + { + + List posList = []; + //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. + for (var i = 0; i <= 2; i++) + { + posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); + } + var pos = posList.ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); + PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); + } + + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + } + } + var tex = TextureAssets.Item[ModContent.ItemType()]; + if (Projectile.Opacity > 0.5f) + Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) + { + return true; + } + + return base.Colliding(projHitbox, targetHitbox); + } + + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < 0) + return false; + return null; + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + //Half damage to any NPC that isn't the primary target + if (Projectile.ai[0] != target.whoAmI) + modifiers.SourceDamage *= 0.5f; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + + if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) + { + Projectile.Opacity = 0; + Projectile.Center = target.Center; + Projectile.timeLeft = 60 * Projectile.MaxUpdates; + Projectile.velocity = new(0, 1E-05f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + } + Projectile.netUpdate = true; + if (Projectile.ai[0] == target.whoAmI) + SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); + } + + public override void OnKill(int timeLeft) + { + if (Projectile.Opacity > 0) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + return; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); + return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); + } + } + public class EclipsesFall_StealthSpearExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType + { + //Based on Terratomere explosion + public new string LocalizationCategory => "Projectiles.Rogue"; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 520; + Projectile.friendly = true; + Projectile.ignoreWater = false; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = 150; + Projectile.MaxUpdates = 3; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.scale = 0.2f; + Projectile.hide = true; + } + + public override void AI() + { + // Play an explosion sound on the first frame of this projectile's existence. + if (Projectile.localAI[0] == 0f) + { + SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); + Projectile.localAI[0] = 1f; + } + + // Emit a strong white light. + Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); + + // Determine frames. Once the maximum frame is reached the projectile dies. + Projectile.frameCounter++; + if (Projectile.frameCounter % 5 == 4) + Projectile.frame++; + if (Projectile.frame >= 17) + Projectile.Kill(); + + // Exponentially accelerate. + Projectile.scale *= 1.013f; + Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); + } + + public override bool PreDraw(ref Color lightColor) + { + return base.PreDraw(ref lightColor); + } + + public void AdditiveDraw(SpriteBatch spriteBatch) + { + Texture2D texture = TextureAssets.Projectile[Type].Value; + Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; + Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 origin = frame.Size() * 0.5f; + + for (int i = 0; i < 2; i++) + { + Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; + Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); + lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; + Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); + } + if (Projectile.timeLeft < 149) + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); + Main.spriteBatch.End(); + } + } + } + #endregion + + #region Shatter Projectiles + public class EclipsesFall_LightFragment : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public static int lifetime => 1200; + Color? color = null; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 40; + Projectile.height = 40; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 4; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.stopsDealingDamageAfterPenetrateHits = true; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * 0.02f; + if (Projectile.ai[0] < -1) + { + Projectile.penetrate = 1; + Projectile.damage = Projectile.originalDamage; + Projectile.stopsDealingDamageAfterPenetrateHits = false; + var target = Projectile.FindTargetWithinRange(4000); + if (target is not null) + { + Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; + Projectile.velocity *= 0.95f; + } + } + + if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) + { + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) + { + Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); + Projectile.velocity *= Projectile.ai[2]; + Projectile.ai[2]--; + } + } + else + { + if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) + { + var proj = Main.projectile[(int)Projectile.ai[0] - 1]; + if (Projectile.timeLeft > 100) + Projectile.timeLeft = 100; + Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); + Projectile.velocity = new(0, 1E-05f); + if (Projectile.Distance(proj.Center) < 16) + { + proj.ai[2]++; + proj.netUpdate = true; + if (proj.ai[2] == proj.localAI[0]) + SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); + Projectile.active = false; + + } + } + } + } + public override bool? CanHitNPC(NPC target) + { + if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) + return false; + return null; + } + + public override void OnKill(int timeLeft) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + } + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16).ToArray(); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + + using (Main.spriteBatch.Scope()) + { + Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); + Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); + Main.spriteBatch.End(); + } + return false; + } + + // Matches Saros Possesion sunfire with slight edits + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(238, 226, 153); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return mainColor; + } + } + public class EclipsesFall_LightExplosion : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + + public const int Lifetime = 35; // 7 animation frames, 12 FPS + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 7; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 102; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.penetrate = -1; + Projectile.timeLeft = Lifetime; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + Projectile.frameCounter++; + Projectile.frame = Projectile.frameCounter / 5; + + if (Projectile.frameCounter > Lifetime) + Projectile.Kill(); + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request(Texture + "Glow").Value; + Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); + } + } + public class EclipsesFall_LightSpark : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int lifetime = 150; + Color? color = null; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 32; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 6; + Projectile.height = 6; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 5; + Projectile.timeLeft = lifetime; + Projectile.DamageType = RogueDamageClass.Instance; + Projectile.localAI[0] = 20f; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; + Projectile.MaxUpdates = 2; + Projectile.tileCollide = false; + } + + public override void AI() + { + Projectile.rotation += Projectile.direction * Projectile.ai[0]; + + if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) + { + Projectile.velocity.Normalize(); + Projectile.velocity *= Projectile.localAI[0]; + Projectile.localAI[0]--; + Projectile.timeLeft++; + } + + if (Projectile.localAI[0] == 0) + { + Projectile.velocity = new(0, 1E-05f); + Projectile.damage = 0; + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); + if (dis < 0.1f) + Projectile.Kill(); + } + } + + public override bool PreDraw(ref Color lightColor) + { + color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); + + Main.spriteBatch.End(out var ss); + var device = Main.instance.GraphicsDevice; + using var lease = RenderTargetPool.Shared.Rent( + device, + Main.screenWidth / 2, + Main.screenHeight / 2, + RenderTargetDescriptor.Default + ); + using (lease.Scope(clearColor: Color.Transparent)) + { + var list = Projectile.oldPos.Take(16); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + + GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); + PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); + } + float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; + if (dis > 1) + { + dis = 1f; + } + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); + Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); + Main.spriteBatch.End(); + + Main.spriteBatch.Begin(ss); + + return false; + } + + public float FireWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = 24f * Projectile.scale; + float curveRatio = 0.2f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + if (completion < curveRatio) + width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + + // Pulse inwards and outwards over time. + float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; + float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); + return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = new Color(255, 191, 73); + return Color.Lerp(mainColor, Color.Transparent, completion); + } + + public float FireCoreWidthFunction(float completion, Vector2 vertexPos) + { + float width; + float maxBodyWidth = Projectile.scale * 16; + float curveRatio = 0.25f; + var positions = Projectile.oldPos.ToList(); + positions.RemoveAll(x => x == Vector2.Zero); + + if (completion < curveRatio) + width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; + else + width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); + return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; + } + + public Color FireCoreColorFunction(float completion, Vector2 vertexPos) + { + Color mainColor = color.Value; + return mainColor; + } + } + #endregion +} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 2cbc368d64..4253924887 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -360,9 +360,9 @@ EclipsesFall: { ''' Throws a javelin that shatters into fragments of primordial light upon enemy hits If more than 20 fragments exist, the oldest fragments will seek out enemies to attack - Stealth strikes coalsce fragments into an eclipse spear, gaining power based on the number of fragments - The eclipse spear will pierce though any enemy hit by Eclipse's Fall - 'When the sun goes dark, you will know judgement' + Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments + [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall + [ceffect/darksun:'When the sun goes dark, you will know judgement'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index b4cf866c6f..4e779544ce 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -679,8 +679,8 @@ SarosPossession: { ''' Summons a radiant aura harnessing the power of primordial light Repeated summons increase the power of the aura - with full summon slots to channel an eclipse beam that decays over time - This beam recharges when not in use + with full summon slots to channel [ceffect/darksun:Totality Ray] + [ceffect/darksun:Totality Ray] decays while in use and recharges when not in use ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 30e53d4f60..0506a934b0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -85,10 +85,13 @@ DynamicPursuerElectricity.DisplayName: Dynamic Electricity DynamicPursuerLaser.DisplayName: Dynamic Laser DynamicPursuerProjectile.DisplayName: Dynamic Pursuer EclipseMirrorBurst.DisplayName: Eclipse Mirror Flash -EclipsesFallMain.DisplayName: Eclipse's Fall -EclipsesSmol.DisplayName: Eclipse's Small -EclipsesStealth.DisplayName: Eclipse's Fall -EclipseStealthBoom.DisplayName: Eclipse Blast +EclipsesFall_Javelin.DisplayName: Eclipse's Fall +EclipsesFall_LightFragment.DisplayName: Fragment of Primordial Light +EclipsesFall_LightExplosion.DisplayName: Baily's Beads +EclipsesFall_LightSpark.DisplayName: Spark of Primodial Light +EclipsesFall_StealthSpear.DisplayName: Spear of Obscuration +EclipsesFall_StealthSpearExplosions.DisplayName: Third Contact +EclipsesFall_StealthSpearExplosion.DisplayName: Eclipses Fall_ Stealth Spear Explosion EGloveSpark.DisplayName: Electrician's Spark EnchantedAxe2.DisplayName: Enchanted Axe EnchantedAxeProj.DisplayName: Enchanted Axe @@ -208,7 +211,8 @@ PrismallineProj.DisplayName: Prismalline PrismRocket.DisplayName: Prism Rocket PrismShurikenBlade.DisplayName: Refraction Blade ProfanedPartisanProj.DisplayName: Profaned Partisan -ProfanedPartisanSpear.DisplayName: Profaned Spear +ProfanedPartisanSpear.DisplayName: Holy Spear +ProfanedPartisanFlare.DisplayName: Holy Light PumpkaboomSmall.DisplayName: Small Pumpkaboom PumpkaboomBoomSmall.DisplayName: Pump-kaboom! PumpkaboomBig.DisplayName: Big Pumpkaboom @@ -271,6 +275,7 @@ SpearofDestinyProjectile.DisplayName: Destiny Spear SpearofDestinyStealth.DisplayName: Empowered Holy Lance SpearofDestinyStealthExplosion.DisplayName: Strong Burst SpearofPaleolithProj.DisplayName: Paleolith Spear +PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion SpentFuelContainerProjectile.DisplayName: Spent Fuel Container SphereBladed.DisplayName: Bladed Sphere SphereBlue.DisplayName: Blue Thruster Sphere @@ -334,10 +339,3 @@ WrathwingFireball.DisplayName: Wrathwing Fireball WrathwingSpear.DisplayName: Wrathwing WulfrumKnifeProj.DisplayName: Wulfrum Knife NanoblackLightspeedCarveSlashVisual.DisplayName: Nanoblack Light-speed Carve Visuals -EclipseFragment.DisplayName: Eclipse Fragment -EclipsesFallSpear.DisplayName: Eclipses Fall Spear -EclipseSpark.DisplayName: Eclipse Spark -EclipseSpear.DisplayName: Eclipse Spear -ProfanedPartisanFlare.DisplayName: Profaned Partisan Flare -EclipseExplosion.DisplayName: Eclipse Explosion -PaleoShatterExplosion.DisplayName: Paleo Shatter Explosion diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson index 1d481724b0..cb32d297b4 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Summon.hjson @@ -246,7 +246,7 @@ SandnadoMinion.DisplayName: Sandnado SandTornado.DisplayName: Tornado SarosAura.DisplayName: Saros Aura SarosSunfire.DisplayName: Saros Sunfire -SarosEclipseBeam.DisplayName: Eclipse Beam +SarosEclipseBeam.DisplayName: Totality Ray SeashineSwordProj.DisplayName: Seashine Sword SeekerSummonProj.DisplayName: Soul Seeker SepulcherMinion.DisplayName: Sepulcher diff --git a/Projectiles/Rogue/EclipseExplosion.cs b/Projectiles/Rogue/EclipseExplosion.cs deleted file mode 100644 index 8ec802cdb2..0000000000 --- a/Projectiles/Rogue/EclipseExplosion.cs +++ /dev/null @@ -1,87 +0,0 @@ -using CalamityMod.DataStructures; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Utilities.Daybreak; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - //Based on Terratomere explosion - public class EclipseExplosion : ModProjectile, IAdditiveDrawer, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override void SetDefaults() - { - Projectile.width = Projectile.height = 520; - Projectile.friendly = true; - Projectile.ignoreWater = false; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.timeLeft = 150; - Projectile.MaxUpdates = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - Projectile.scale = 0.2f; - Projectile.hide = true; - } - - public override void AI() - { - // Play an explosion sound on the first frame of this projectile's existence. - if (Projectile.localAI[0] == 0f) - { - SoundEngine.PlaySound(SubsumingVortex.ExplosionSound with { Volume = 0.6f }, Projectile.Center); - Projectile.localAI[0] = 1f; - } - - // Emit a strong white light. - Lighting.AddLight(Projectile.Center, Color.White.ToVector3() * 1.5f); - - // Determine frames. Once the maximum frame is reached the projectile dies. - Projectile.frameCounter++; - if (Projectile.frameCounter % 5 == 4) - Projectile.frame++; - if (Projectile.frame >= 17) - Projectile.Kill(); - - // Exponentially accelerate. - Projectile.scale *= 1.013f; - Projectile.Opacity = Utils.GetLerpValue(5f, 36f, Projectile.timeLeft, true); - } - - public override bool PreDraw(ref Color lightColor) - { - return base.PreDraw(ref lightColor); - } - - public void AdditiveDraw(SpriteBatch spriteBatch) - { - Texture2D texture = TextureAssets.Projectile[Type].Value; - Texture2D lightTexture = ModContent.Request("CalamityMod/Skies/XerocLight").Value; - Rectangle frame = texture.Frame(3, 6, Projectile.frame / 6, Projectile.frame % 6); - Vector2 drawPosition = Projectile.Center - Main.screenPosition; - Vector2 origin = frame.Size() * 0.5f; - - for (int i = 0; i < 2; i++) - { - Vector2 lightDrawPosition = drawPosition + (MathHelper.TwoPi * i / 36f + Main.GlobalTimeWrappedHourly * 5f).ToRotationVector2() * Projectile.scale * 12f; - Color lightBurstColor = CalamityUtils.MulticolorLerp(Projectile.timeLeft / 144f, Terratomere.TerraColor1, Terratomere.TerraColor2); - lightBurstColor = Color.Lerp(lightBurstColor, Color.White, 0.4f) * Projectile.Opacity * 0.24f; - Main.spriteBatch.Draw(lightTexture, lightDrawPosition, null, lightBurstColor, 0f, lightTexture.Size() * 0.5f, Projectile.scale * 1.32f, SpriteEffects.None, 0); - } - if (Projectile.timeLeft < 149) - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(texture, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, 1.6f, 0); - Main.spriteBatch.End(); - } - } - } -} diff --git a/Projectiles/Rogue/EclipseFragment.cs b/Projectiles/Rogue/EclipseFragment.cs deleted file mode 100644 index c10b177f24..0000000000 --- a/Projectiles/Rogue/EclipseFragment.cs +++ /dev/null @@ -1,189 +0,0 @@ -using System; -using System.Linq; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseFragment : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public static int lifetime => 1200; - Color? color = null; - public override void SetStaticDefaults() - { - ProjectileID.Sets.CultistIsResistantTo[Type] = true; - ProjectileID.Sets.TrailCacheLength[Type] = 32; - ProjectileID.Sets.TrailingMode[Type] = 2; - } - public override void SetDefaults() - { - Projectile.width = 40; - Projectile.height = 40; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 4; - Projectile.timeLeft = lifetime; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - Projectile.MaxUpdates = 2; - Projectile.stopsDealingDamageAfterPenetrateHits = true; - Projectile.tileCollide = false; - } - - public override void AI() - { - Projectile.rotation += Projectile.direction * 0.02f; - if (Projectile.ai[0] < -1) - { - Projectile.penetrate = 1; - Projectile.damage = Projectile.originalDamage; - Projectile.stopsDealingDamageAfterPenetrateHits = false; - var target = Projectile.FindTargetWithinRange(4000); - if (target is not null) - { - Projectile.velocity += Projectile.DirectionTo(target.Center) * 2; - Projectile.velocity *= 0.95f; - } - } - - if (Projectile.ai[0] == 0f || Projectile.ai[2] > 0) - { - if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.ai[2] >= 0) - { - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.Zero); - Projectile.velocity *= Projectile.ai[2]; - Projectile.ai[2]--; - } - } - else - { - if (Main.projectile.IndexInRange((int)Projectile.ai[0] - 1) && Main.projectile[(int)Projectile.ai[0] - 1].active) - { - var proj = Main.projectile[(int)Projectile.ai[0] - 1]; - if (Projectile.timeLeft > 100) - Projectile.timeLeft = 100; - Projectile.Center = Vector2.Lerp(Projectile.Center, proj.Center, (1 - (Projectile.timeLeft / 100f))); - Projectile.velocity = new(0, 1E-05f); - if (Projectile.Distance(proj.Center) < 16) - { - proj.ai[2]++; - proj.netUpdate = true; - if (proj.ai[2] == proj.localAI[0]) - SoundEngine.PlaySound(SarosPossession.SpawnSound with { Pitch = 1f, Volume = 1f, }, Projectile.Center); - Projectile.active = false; - - } - } - } - } - public override bool? CanHitNPC(NPC target) - { - if (Projectile.ai[0] < -1 && target.Calamity().IsArmored()) - return false; - return null; - } - - public override void OnKill(int timeLeft) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(Projectile.GetSource_Death(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); - } - public override bool PreDraw(ref Color lightColor) - { - Main.spriteBatch.End(out var ss); - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(16).ToArray(); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - } - float dis = Projectile.position.Distance(Projectile.oldPos.Last()) / 32; - if (dis > 1) - { - dis = 1f; - } - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - Main.spriteBatch.Begin(ss); - - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); - Main.spriteBatch.End(); - } - return false; - } - - // Matches Saros Possesion sunfire with slight edits - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = 24f * Projectile.scale; - float curveRatio = 0.2f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - if (completion < curveRatio) - width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - - // Pulse inwards and outwards over time. - float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; - float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); - return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(238, 226, 153); - return Color.Lerp(mainColor, Color.Transparent, completion); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = Projectile.scale * 16; - float curveRatio = 0.25f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - - if (completion < curveRatio) - width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(255, 191, 73); - return mainColor; - } - } -} diff --git a/Projectiles/Rogue/EclipseSpark.cs b/Projectiles/Rogue/EclipseSpark.cs deleted file mode 100644 index 00b437d0a9..0000000000 --- a/Projectiles/Rogue/EclipseSpark.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Linq; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseSpark : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public static int lifetime = 150; - Color? color = null; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 32; - ProjectileID.Sets.TrailingMode[Type] = 2; - } - public override void SetDefaults() - { - Projectile.width = 6; - Projectile.height = 6; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.penetrate = 5; - Projectile.timeLeft = lifetime; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.localAI[0] = 20f; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; - Projectile.MaxUpdates = 2; - Projectile.tileCollide = false; - } - - public override void AI() - { - Projectile.rotation += Projectile.direction * Projectile.ai[0]; - - if (Projectile.timeLeft < (lifetime - Projectile.ai[1]) && Projectile.localAI[0] >= 0) - { - Projectile.velocity.Normalize(); - Projectile.velocity *= Projectile.localAI[0]; - Projectile.localAI[0]--; - Projectile.timeLeft++; - } - - if (Projectile.localAI[0] == 0) - { - Projectile.velocity = new(0, 1E-05f); - Projectile.damage = 0; - float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()); - if (dis < 0.1f) - Projectile.Kill(); - } - } - - public override bool PreDraw(ref Color lightColor) - { - color ??= Color.Lerp(Color.OrangeRed, new Color(255, 191, 73), Main.rand.NextFloat(0.25f, 0.5f)); - - Main.spriteBatch.End(out var ss); - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - using (lease.Scope(clearColor: Color.Transparent)) - { - var list = Projectile.oldPos.Take(16); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(list.ToArray(), new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), 32); - } - float dis = Projectile.position.Distance(Projectile.oldPos.Take(16).Last()) / 128f - 0.1f; - if (dis > 1) - { - dis = 1f; - } - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.Transform); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White * dis, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - Main.spriteBatch.Begin(ss); - - return false; - } - - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = 24f * Projectile.scale; - float curveRatio = 0.2f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - if (completion < curveRatio) - width = MathF.Pow(completion / curveRatio, 0.5f) * maxBodyWidth; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - - // Pulse inwards and outwards over time. - float pulseInterpolant = MathF.Cos(MathHelper.Pi * completion - Main.GlobalTimeWrappedHourly * 20f) * 0.5f + 0.5f; - float additionalPulseWidth = MathHelper.Lerp(0f, 12f, pulseInterpolant); - return (width + additionalPulseWidth) * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = new Color(255, 191, 73); - return Color.Lerp(mainColor, Color.Transparent, completion); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - float width; - float maxBodyWidth = Projectile.scale * 16; - float curveRatio = 0.25f; - var positions = Projectile.oldPos.ToList(); - positions.RemoveAll(x => x == Vector2.Zero); - - if (completion < curveRatio) - width = MathF.Sin(completion / curveRatio * MathHelper.PiOver2) * maxBodyWidth + curveRatio; - else - width = Utils.Remap(completion, curveRatio, 1f, maxBodyWidth, 0f); - return width * positions.Count() / (float)ProjectileID.Sets.TrailCacheLength[Type]; - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = color.Value; - return mainColor; - } - } -} diff --git a/Projectiles/Rogue/EclipseSpear.cs b/Projectiles/Rogue/EclipseSpear.cs deleted file mode 100644 index 6fc0cec0af..0000000000 --- a/Projectiles/Rogue/EclipseSpear.cs +++ /dev/null @@ -1,204 +0,0 @@ -using System; -using System.Collections.Generic; -using CalamityMod.Graphics.Primitives; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs; -using CalamityMod.Utilities.Daybreak; -using CalamityMod.Utilities.Daybreak.Buffers; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - [PierceResistException] - public class EclipseSpear : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - - bool initialized = false; - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Type] = 6; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - (Vector2 start, Vector2 end) LinePos = (new(), new()); - float LineWidth = 0; - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 48; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 1; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 1; - Projectile.timeLeft = 1200 * Projectile.MaxUpdates; - Projectile.ContinuouslyUpdateDamageStats = true; - } - public override void AI() - { - if (!initialized) - { - Projectile.ai[0] = -1; - Projectile.localAI[0] = Projectile.ai[2]; - Projectile.ai[2] = 0; - initialized = true; - } - - Projectile.originalDamage = (int)(EclipsesFall.EclipseSpearBaseDmg * (Projectile.ai[2] / (float)EclipsesFall.MaxFragmentCount)); - if (Projectile.ai[0] >= 0 && Projectile.ai[2] >= Projectile.localAI[0] && Projectile.Opacity > 0) - { - LinePos.end = Projectile.position; - Projectile.velocity = Projectile.DirectionTo(Main.npc[(int)Projectile.ai[0]].Center) * 64; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - Projectile.Center = Main.npc[(int)Projectile.ai[0]].Center + Projectile.velocity; - Projectile.Damage(); - Projectile.ai[0] = -1; - LineWidth = 1f; - LinePos.start = Projectile.Center; - Projectile.localAI[1] = 0; - } - - - LineWidth -= 0.05f; - Projectile.localAI[1]++; - if (Projectile.localAI[1] > 60) - { - var dis = Projectile.Distance(Main.player[Projectile.owner].Center); - Projectile.velocity += Projectile.DirectionTo(Main.player[Projectile.owner].Center) * dis / 320f; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - - } - Projectile.velocity *= 0.9f; - } - public override bool PreDraw(ref Color lightColor) - { - - if (LineWidth > 0) - { - var device = Main.instance.GraphicsDevice; - using var lease = RenderTargetPool.Shared.Rent( - device, - Main.screenWidth / 2, - Main.screenHeight / 2, - RenderTargetDescriptor.Default - ); - - using (Main.spriteBatch.Scope()) - { - using (lease.Scope(clearColor: Color.Transparent)) - { - - List posList = []; - //For the prim to render properly I need to divide the distance between the positions into a couple points. Just using start and end doesn't render. - for (var i = 0; i <= 2; i++) - { - posList.Add(Vector2.Lerp(Projectile.position, LinePos.end, i / 2f)); - } - var pos = posList.ToArray(); - - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/ScarletDevilStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireWidthFunction, FireColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); - GameShaders.Misc["CalamityMod:ImpFlameTrail"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - PrimitiveRenderer.RenderTrail(pos, new(FireCoreWidthFunction, FireCoreColorFunction, (_, _) => Projectile.Size * 0.5f, smoothen: true, pixelate: false, shader: GameShaders.Misc["CalamityMod:ImpFlameTrail"], useUnscaledMatrices: true), pos.Length); - } - - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - Main.spriteBatch.Draw(lease.Target, Vector2.Zero, null, Color.White, 0f, Vector2.Zero, 2f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - - } - } - var tex = TextureAssets.Item[ModContent.ItemType()]; - if (Projectile.Opacity > 0.5f) - Main.EntitySpriteDraw(tex.Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, 0); - using (Main.spriteBatch.Scope()) - { - Main.spriteBatch.Begin(default, BlendState.NonPremultiplied, null, null, null, null, Main.Transform); - Main.EntitySpriteDraw(TextureAssets.Projectile[Type].Value, Projectile.Center - Main.screenPosition, null, Color.White * Projectile.Opacity * (Projectile.localAI[0] > 0 ? Projectile.ai[2] / Projectile.localAI[0] : 1), Projectile.rotation, TextureAssets.Projectile[Type].Size() * 0.5f, Projectile.scale, 0); - Main.spriteBatch.End(); - } - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float _ = 0; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.oldPosition + new Vector2(Projectile.width, Projectile.height) * 0.5f, Projectile.Center, 48f, ref _)) - { - return true; - } - - return base.Colliding(projHitbox, targetHitbox); - } - - public override bool? CanHitNPC(NPC target) - { - if (Projectile.ai[0] < 0) - return false; - return null; - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - //Half damage to any NPC that isn't the primary target - if (Projectile.ai[0] != target.whoAmI) - modifiers.SourceDamage *= 0.5f; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - - if (Projectile.timeLeft < 600 * Projectile.MaxUpdates && Projectile.ai[0] == target.whoAmI) - { - Projectile.Opacity = 0; - Projectile.Center = target.Center; - Projectile.timeLeft = 60 * Projectile.MaxUpdates; - Projectile.velocity = new(0, 1E-05f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); - } - Projectile.netUpdate = true; - if (Projectile.ai[0] == target.whoAmI) - SoundEngine.PlaySound(SarosPossession.FiringSound with { Pitch = -1f, Volume = 0.75f, }, Projectile.Center); - } - - public override void OnKill(int timeLeft) - { - if (Projectile.Opacity > 0) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); - return; - } - - public float FireWidthFunction(float completion, Vector2 vertexPos) - { - return 96 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); - } - - public Color FireColorFunction(float completion, Vector2 vertexPos) - { - Color mainColor = Color.Lerp(new Color(238, 226, 153), new Color(255, 191, 73), (MathF.Sin(completion * MathHelper.TwoPi + Main.GlobalTimeWrappedHourly * 5) + 1) * 0.5f); - return mainColor * MathF.Pow(1 - completion * 1.1f, 0.5f); - } - - public float FireCoreWidthFunction(float completion, Vector2 vertexPos) - { - return 32 * LineWidth * MathHelper.Clamp((Projectile.ai[2] / 20f), 0.25f, 1f); - } - - public Color FireCoreColorFunction(float completion, Vector2 vertexPos) - { - return Color.Black * MathF.Pow(1 - completion * 1.1f, 0.5f); - } - } -} diff --git a/Projectiles/Rogue/EclipseStealthBoom.cs b/Projectiles/Rogue/EclipseStealthBoom.cs deleted file mode 100644 index d258de5353..0000000000 --- a/Projectiles/Rogue/EclipseStealthBoom.cs +++ /dev/null @@ -1,48 +0,0 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipseStealthBoom : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - - public const int Lifetime = 35; // 7 animation frames, 12 FPS - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 7; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 102; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.penetrate = -1; - Projectile.timeLeft = Lifetime; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - - public override void AI() - { - Projectile.frameCounter++; - Projectile.frame = Projectile.frameCounter / 5; - - if (Projectile.frameCounter > Lifetime) - Projectile.Kill(); - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Rectangle frame = glow.Frame(1, Main.projFrames[Type], 0, Projectile.frame); - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, Projectile.rotation, frame.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipsesFallSpear.cs b/Projectiles/Rogue/EclipsesFallSpear.cs deleted file mode 100644 index 82f3bb6bf6..0000000000 --- a/Projectiles/Rogue/EclipsesFallSpear.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Rogue -{ - public class EclipsesFallSpear : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; - private int SplitProjDamage => (int)(Projectile.damage * EclipsesFall.FragmentDmgMult); - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 50; - Projectile.friendly = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.DamageType = RogueDamageClass.Instance; - Projectile.MaxUpdates = 2; - Projectile.penetrate = 1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6 * Projectile.MaxUpdates; - Projectile.timeLeft = 150 * Projectile.MaxUpdates; - } - - public override void AI() - { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(5)) - { - Vector2 trailPos = Projectile.Center + Vector2.UnitY.RotatedBy(Projectile.rotation) * Main.rand.NextFloat(-16f, 16f); - float trailScale = Main.rand.NextFloat(0.8f, 1.2f); - Color trailColor = Main.rand.NextBool() ? Color.Indigo : Color.DarkOrange; - Particle eclipseTrail = new SparkParticle(trailPos, Projectile.velocity * 0.2f, false, 60, trailScale, trailColor); - GeneralParticleHandler.SpawnParticle(eclipseTrail); - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - int onHitCount = EclipsesFall.FragmentCount + 4; - float spread = 20f; - int projectileDamage = SplitProjDamage; - float kb = 5f; - int sparkID = ModContent.ProjectileType(); - int starID = ModContent.ProjectileType(); - for (int i = 0; i < onHitCount; i++) - { - int projID = i < EclipsesFall.FragmentCount ? starID : sparkID; - Vector2 velocity = Projectile.oldVelocity.RotateRandom(MathHelper.ToRadians(spread)) * 0.5f; - float speed = Main.rand.NextFloat(1.5f, 2f); - float moveDuration = Main.rand.Next(5, 15); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity * speed, projID, projectileDamage, kb, Projectile.owner, 0f, moveDuration, 20); - } - - SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * 0.6f }, Projectile.position); - SoundEngine.PlaySound(SoundID.Item68 with { Volume = SoundID.Item68.Volume * 0.2f }, Projectile.position); - SoundEngine.PlaySound(SoundID.Item122 with { Volume = SoundID.Item122.Volume * 0.4f }, Projectile.position); - - - List frags = new(); - var p = -2; - foreach (var item in Main.ActiveProjectiles) - { - - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.Opacity > 0.1f) - { - if (Projectile.Calamity().stealthStrike && item.timeLeft > 600 * item.MaxUpdates) - { - if (item.timeLeft < 1120 * item.MaxUpdates) - { - item.timeLeft = 60 * item.MaxUpdates; - item.ai[0] = target.whoAmI; - continue; - } - item.timeLeft = 1200 * item.MaxUpdates; - p = item.whoAmI; - } - item.ai[0] = target.whoAmI; - } - if (item.type == ModContent.ProjectileType() && item.owner == Projectile.owner && item.ai[0] > -2) - { - frags.Add(item); - } - } - if (Projectile.Calamity().stealthStrike && p < 0) - for (int i = 0; i < 1; i++) - { - int projID = ModContent.ProjectileType(); - Vector2 velocity = Vector2.Zero; - var proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(default) * 64f, projID, Projectile.damage, kb, Projectile.owner, target.whoAmI, 0, Math.Min(20, frags.Count(x => x.ai[0] == 0))); - proj.rotation = Projectile.rotation; - p = proj.whoAmI; - } - - - frags = frags.OrderBy(x => x.timeLeft).ToList(); - int toRemove = frags.Count(x => x.ai[0] == 0) - EclipsesFall.MaxFragmentCount; - foreach (var item in frags) - { - if (toRemove > 0 && item.ai[0] == 0) - { - item.ai[0] = -2; - item.timeLeft = EclipseFragment.lifetime; - toRemove--; - continue; - } - if (Projectile.Calamity().stealthStrike) - { - if (item.ai[0] == 0) - { - item.ai[1] = Main.rand.Next(5, 15); - item.ai[2] = 20; - } - item.ai[0] = p + 1; - item.timeLeft = EclipseFragment.lifetime; - item.damage = 0; - item.netUpdate = true; - } - } - - - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D tex = TextureAssets.Projectile[Type].Value; - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, lightColor, Projectile.rotation, tex.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - return false; - } - - public override void PostDraw(Color lightColor) - { - Texture2D glow = ModContent.Request(Texture + "Glow").Value; - Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, null, Color.White, Projectile.rotation, glow.Size() * 0.5f, Projectile.scale, SpriteEffects.None); - } - } -} diff --git a/Projectiles/Rogue/EclipseStealthBoom.png b/Projectiles/Rogue/EclipsesFall_LightExplosion.png similarity index 100% rename from Projectiles/Rogue/EclipseStealthBoom.png rename to Projectiles/Rogue/EclipsesFall_LightExplosion.png diff --git a/Projectiles/Rogue/EclipseStealthBoomGlow.png b/Projectiles/Rogue/EclipsesFall_LightExplosionGlow.png similarity index 100% rename from Projectiles/Rogue/EclipseStealthBoomGlow.png rename to Projectiles/Rogue/EclipsesFall_LightExplosionGlow.png diff --git a/Projectiles/Rogue/EclipseFragment.png b/Projectiles/Rogue/EclipsesFall_LightFragment.png similarity index 100% rename from Projectiles/Rogue/EclipseFragment.png rename to Projectiles/Rogue/EclipsesFall_LightFragment.png diff --git a/Projectiles/Rogue/EclipseSpear.png b/Projectiles/Rogue/EclipsesFall_StealthSpear.png similarity index 100% rename from Projectiles/Rogue/EclipseSpear.png rename to Projectiles/Rogue/EclipsesFall_StealthSpear.png diff --git a/Projectiles/Rogue/EclipseExplosion.png b/Projectiles/Rogue/EclipsesFall_StealthSpearExplosion.png similarity index 100% rename from Projectiles/Rogue/EclipseExplosion.png rename to Projectiles/Rogue/EclipsesFall_StealthSpearExplosion.png From 6eeccc5f66287c1f4550d9f9c8a7c2975b3e29f3 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 4 Apr 2026 22:10:37 -0500 Subject: [PATCH 056/126] loc fix --- Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson index 0506a934b0..0aee56e272 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Rogue.hjson @@ -90,8 +90,7 @@ EclipsesFall_LightFragment.DisplayName: Fragment of Primordial Light EclipsesFall_LightExplosion.DisplayName: Baily's Beads EclipsesFall_LightSpark.DisplayName: Spark of Primodial Light EclipsesFall_StealthSpear.DisplayName: Spear of Obscuration -EclipsesFall_StealthSpearExplosions.DisplayName: Third Contact -EclipsesFall_StealthSpearExplosion.DisplayName: Eclipses Fall_ Stealth Spear Explosion +EclipsesFall_StealthSpearExplosion.DisplayName: Third Contact EGloveSpark.DisplayName: Electrician's Spark EnchantedAxe2.DisplayName: Enchanted Axe EnchantedAxeProj.DisplayName: Enchanted Axe From ee422628e3ffe2e55a20a183e1bbc1681e61526d Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 6 Apr 2026 02:06:47 -0400 Subject: [PATCH 057/126] Proper Tinkerer's Voucher sell prices --- Items/Potions/TheConcoction.cs | 30 ++++++++++++++++++++++++++++++ Items/Potions/TheConcoction.png | Bin 0 -> 1118 bytes Items/Tools/TinkerersVoucher.cs | 10 +++++----- 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 Items/Potions/TheConcoction.cs create mode 100644 Items/Potions/TheConcoction.png diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs new file mode 100644 index 0000000000..94bf738d7f --- /dev/null +++ b/Items/Potions/TheConcoction.cs @@ -0,0 +1,30 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Rarities; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Potions +{ + public class TheConcoction : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Potions"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 30; + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + new Color(255, 190, 250), + new Color(255, 225, 183), + new Color(246, 34, 79) + }; + } + + public override void SetDefaults() + { + Item.DefaultToHealingPotion(50, 56, 500); + Item.value = Item.sellPrice(silver: 60); + Item.rare = ItemRarityID.Green; + } + } +} diff --git a/Items/Potions/TheConcoction.png b/Items/Potions/TheConcoction.png new file mode 100644 index 0000000000000000000000000000000000000000..1a78543c8eafd5c1b722377fc6d5069e6c23b92e GIT binary patch literal 1118 zcmV-k1flzhP)Px#1ZP1_K>z@;j|==^1poj92uVaiRA@u(np;RzQ51%!vLvF&N_yyGMMYs3!-|N| z?inRvNkSs{5Q3pm$V7Lf={^*pLj^()b^*IcB;AP_^(D+wBq<2;QW0Tg6cG_!JpVrb zU`sZ~ai)jPnI8_{%$%7yoN4hIw zjJ7qmFb}#2lgM%;MCMcuobXKbVh{BIN{SA4gatgkNOteH`IP7VJHP7o=nrYo$oXh^}g;dZ+Q(F7(;TFaYqcarKrYf3R zT3iUy8LGE6ne!Z>E)1UyXM#@T9#GsfUs2=4x7sJ*;7kt~l<7=+Q!JQUnFso7%0l{W zws9oTQyGy=A};P-E4nc$>t$_<}i#SB*<<@I&4zazRT_|B$5U{0+XIc8p0 zUOm8gXy|wY&WRrbR(@;+C;l7=PW`e4Y^}NivhS#@UIiX^zXq+UUdlO+us>jDCU=~y z`VYQeC)tBjCrXrK>|fabIM)&GKoxC0jptNS!*Wo@2%V$iO5?!ncZWglk5F>8M#hM& zx#*B?hs*wsa0QaF!FyGXpe{x@%kg!&V@1grkvm%Q`nnx1=VW&FAsi`P9?`|fqQFW} z#+p@(FpuI%`pKJxh*=XXrYd4>}{{+n)f+S*hSa z8z@C5*sIGs!fJiX{*K6XEK1JjbVf?%8D{z&-m##RTs7(K^(p6M_P$E@|69G?9S&7d kN30a;Jsz%X;)u)j2kDO+>gw`Qe*gdg07*qoM6N<$f&;S4c literal 0 HcmV?d00001 diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index 93ba974043..901f4e85c6 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -223,7 +223,7 @@ namespace CalamityMod.Items.Tools Item.width = 36; Item.height = 20; Item.rare = ItemRarityID.Green; - Item.value = 0; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.maxStack = 9999; } @@ -279,7 +279,7 @@ namespace CalamityMod.Items.Tools Item.width = 36; Item.height = 20; Item.rare = ItemRarityID.Green; - Item.value = 0; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.maxStack = 9999; } @@ -308,7 +308,7 @@ namespace CalamityMod.Items.Tools Item.width = 36; Item.height = 20; Item.rare = ItemRarityID.Green; - Item.value = 0; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.maxStack = 9999; } @@ -335,7 +335,7 @@ namespace CalamityMod.Items.Tools Item.width = 36; Item.height = 20; Item.rare = ItemRarityID.Green; - Item.value = 0; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.maxStack = 9999; } @@ -364,7 +364,7 @@ namespace CalamityMod.Items.Tools Item.width = 36; Item.height = 20; Item.rare = ItemRarityID.Green; - Item.value = 0; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; Item.maxStack = 9999; } From 36d10b493f6d616a023fd6333671ed2f211dab7e Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Mon, 6 Apr 2026 04:28:31 -0400 Subject: [PATCH 058/126] Silly tooltip easter egg --- Buffs/Potions/SwinesWrathBuff.cs | 17 ++++++++++ Buffs/Potions/SwinesWrathBuff.png | Bin 0 -> 522 bytes Items/Potions/TheConcoction.cs | 30 ++++++++++++++++-- .../en-US/Mods.CalamityMod.Buffs.hjson | 5 +++ .../Mods.CalamityMod.Items.Potions.hjson | 6 ++++ 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 Buffs/Potions/SwinesWrathBuff.cs create mode 100644 Buffs/Potions/SwinesWrathBuff.png diff --git a/Buffs/Potions/SwinesWrathBuff.cs b/Buffs/Potions/SwinesWrathBuff.cs new file mode 100644 index 0000000000..c7851f5a07 --- /dev/null +++ b/Buffs/Potions/SwinesWrathBuff.cs @@ -0,0 +1,17 @@ +using CalamityMod.Items.Potions; +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Buffs.Potions +{ + public class SwinesWrathBuff : ModBuff + { + public override void SetStaticDefaults() + { + Main.debuff[Type] = true; + Main.pvpBuff[Type] = true; + Main.buffNoSave[Type] = false; + } + } +} diff --git a/Buffs/Potions/SwinesWrathBuff.png b/Buffs/Potions/SwinesWrathBuff.png new file mode 100644 index 0000000000000000000000000000000000000000..53347dfda79b6ceb70ea619067eb01baf7571b13 GIT binary patch literal 522 zcmV+l0`>igP)Px#1ZP1_K>z@;j|==^1poj6v`IukR9HvVm$6C%K@f%~qLm>Qi57x|sGK%w6bz_M zY+~aRh!0@n1H`LB9>B&25TC%tG^SA@f;KjKs8|RV8Ve;>3K9O9KgGh47%^G@;=a3K zce3;E>>Wvn=}4q$w>{CC2!4A2PkmHkM^dP~^fHftWU5MPHmBTsRpxJ%ajMQJx6;a+ znv$yLfpGK^^vHqZF$5$#p-hy3D6ZhPIL*>;Y5UxIh9y&nP?tn@W zkV09>=Sf9N4@P$!pCvbKH!2Su2<8xwP2IcJirEu99oEI%%a+=WGe>1#dnt^rK@WSt z*?Wq6898xRfztz&+Y27{K=~a3uKY|=;D%_t+xNhMkbRsNj+`m)6?xYy6SVeRu zPOVDKvABHxodT|WSM)3PgsaH9e1aD;1fC?nz?H@zNV)L^n|EmQ#&H$d7X7NyNq-z* zg{=HOrczeM@l;%#&P-VzI>GV&I^c>c?^Nyb_~Sr9(r_Sd#q0%l598$a5a+pK9{(KR z%Ku8Pll^xfYYzOha(8dLo&SFw_^teLz$nAX5jfE+eKg*D_;)Pw4Z}XCzqX;$-v9sr M07*qoM6N<$g4>Pj-v9sr literal 0 HcmV?d00001 diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index 94bf738d7f..624f7342ce 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -1,4 +1,6 @@ -using CalamityMod.Items.Materials; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; @@ -9,11 +11,14 @@ namespace CalamityMod.Items.Potions { public class TheConcoction : ModItem, ILocalizedModType { + private static int hoverTimer = 0; public new string LocalizationCategory => "Items.Potions"; + public override void SetStaticDefaults() { Item.ResearchUnlockCount = 30; - ItemID.Sets.DrinkParticleColors[Type] = new Color[3] { + ItemID.Sets.DrinkParticleColors[Type] = new Color[3] + { new Color(255, 190, 250), new Color(255, 225, 183), new Color(246, 34, 79) @@ -26,5 +31,26 @@ namespace CalamityMod.Items.Potions Item.value = Item.sellPrice(silver: 60); Item.rare = ItemRarityID.Green; } + + // Display different text for the first 8 frames of hovering over the item's tooltip + public override void ModifyTooltips(List tooltips) + { + if (Main.HoverItem?.type != Type) + { + hoverTimer = 0; + return; + } + + hoverTimer++; + + if (hoverTimer <= 8) + { + TooltipLine healLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "HealLife"); + if (healLine != null) + { + healLine.Text = this.GetLocalization("EasterEggText").Value; + } + } + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 460fd1260b..ba30b46365 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -736,6 +736,11 @@ SulphurskinBuff: { Description: The sulphuric waters have a lesser effect on you } +SwinesWrathBuff: { + DisplayName: Swine's Wrath + Description: Divine essence is rejecting your body +} + WeaponImbueBrimstone: { DisplayName: Weapon Imbue: Brimstone Description: Melee, Whip, and Rogue attacks ignite enemies with brimstone flames diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index cd5ef17dae..70110871ce 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -156,6 +156,12 @@ SupremeManaPotion: { Tooltip: "" } +TheConcoction: { + DisplayName: The Concoction + EasterEggText: Removes 500 life + Tooltip: "" +} + ZenPotion: { DisplayName: Zen Potion Tooltip: Vastly decreases enemy spawn rate From c0420b823493587bbb14cc566bb15d2591b461ba Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 6 Apr 2026 14:40:41 -0400 Subject: [PATCH 059/126] Tavernkeep and Dryad --- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index a28547b66b..01db439850 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -451,9 +451,9 @@ TownNPCMood: { } DD2Bartender: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Had a lot of customers lately complaining about that big monument outside. I gotta say, they're right. + GiftPositive: The pint in that gift of yours reminded me of what I serve back in Etheria! Ahh, I really miss it... but that was quite thoughtful of you. + GiftNegative: What vile concoction of a drink was that? One sip of it and I had to wipe down the bar again! Were you conspiring with the Kobolds?! } Demolitionist: { @@ -463,9 +463,9 @@ TownNPCMood: { } Dryad: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: I don't like that monument. I can sense its ugly stain on nature. + GiftPositive: I have no need for material goods as a nature spirit... but I can at least sense your gift was given out of genuine compassion. + GiftNegative: It would be unwise for you to tread near me after "gifting" me an oozing mass of corruption. I question whether you are committed to purifying the world... } DyeTrader: { From 28c45ddf24edefe6b6236b3b992a1b465393e4d5 Mon Sep 17 00:00:00 2001 From: Done_22 Date: Thu, 9 Apr 2026 22:28:32 +0300 Subject: [PATCH 060/126] spear of paleolith buff --- Items/Weapons/Rogue/SpearofPaleolith.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/SpearofPaleolith.cs b/Items/Weapons/Rogue/SpearofPaleolith.cs index b8be3087ac..bad85a5962 100644 --- a/Items/Weapons/Rogue/SpearofPaleolith.cs +++ b/Items/Weapons/Rogue/SpearofPaleolith.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Rogue { public class SpearofPaleolith : RogueWeapon { - public static int ShardBaseDamage => 25; + public static int ShardBaseDamage => 40; public static int NormalShardCount => 3; public static int ImpaledShardCount => 5; @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Rogue { Item.width = 54; Item.height = 54; - Item.damage = 70; + Item.damage = 90; Item.noMelee = true; Item.noUseGraphic = true; Item.useAnimation = 27; From 3b74b6b7e3e2ae987a86da5ad8cdbf626d18b0ad Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 9 Apr 2026 16:24:39 -0500 Subject: [PATCH 061/126] saros/efall tooltip fix, cut spark and fragment pierce --- Items/Weapons/Rogue/EclipsesFall.cs | 4 ++-- Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- .../en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 7513b6be7c..3e6437c8e5 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -508,7 +508,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 40; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 4; + Projectile.penetrate = 3; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.usesIDStaticNPCImmunity = true; @@ -720,7 +720,7 @@ namespace CalamityMod.Projectiles.Rogue Projectile.height = 6; Projectile.friendly = true; Projectile.ignoreWater = true; - Projectile.penetrate = 5; + Projectile.penetrate = 3; Projectile.timeLeft = lifetime; Projectile.DamageType = RogueDamageClass.Instance; Projectile.localAI[0] = 20f; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 4253924887..842ac26def 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -362,7 +362,7 @@ EclipsesFall: { If more than 20 fragments exist, the oldest fragments will seek out enemies to attack Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall - [ceffect/darksun:'When the sun goes dark, you will know judgement'] + [ceffect/darksun:'When the sun goes dark, all will know terror'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index 4e779544ce..b1754ae9aa 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -681,6 +681,7 @@ SarosPossession: { Repeated summons increase the power of the aura with full summon slots to channel [ceffect/darksun:Totality Ray] [ceffect/darksun:Totality Ray] decays while in use and recharges when not in use + [ceffect/darksun:'A ballet of light and shadow, torn from the sky'] ''' } From caaae6af6052a4ec2515ec1c32148d37acbbc338 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 9 Apr 2026 22:32:21 -0400 Subject: [PATCH 062/126] Archmage, Sea King, Wizard And Brimstone Witch monument dialogue Archmage good Gift dialogue contains a placeholder for a name --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 14 +++++++------- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index e5ff0054da..8e75c37b7e 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -352,9 +352,9 @@ Archmage: { DislikeNPC: I dislike {NPCName}'s blatant disregard of magic. I cannot blame his functions, but he is quite ignorant. LikeNPC_Princess: "{NPCName} has some very quaint spells. I'm quite impressed, for someone of her age." Princess_LovesNPC: "{NPCName} makes the best ice cream I've ever tasted, it's so good!" - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: What a hideous statue! I always advocated for artistic community projects, but this... you really should have better quality control over what gets into your town! + GiftPositive: "How culture shaped magic" by [name]?! I thought this book was lost centuries ago! How did you find it, and how did you...?! Well, no matter! This is the perfect gift, thank you! + GiftNegative: Could you please explain what your last gift was? You made an attempt on my life by trying to freeze me!? You better have a good explanation about how a snowstorm made its way inside that box! } } @@ -481,7 +481,7 @@ BrimstoneWitch: { DislikeNPC: Such a racket! All {NPCName} does is make noise, day in and day out! I can't stand her! LikeNPC_Princess: What a strangely pleasant kid {NPCName} is to be around. Princess_LovesNPC: "{NPCName} is always lonely, it's why I want to hang out with her, no one should be left alone like that!" - Monument: placeholder + Monument: That monument is ugly as sin. GiftPositive: Hey, uh... thanks for the gift, really. I never thought you'd ever give me anything, for obvious reasons. But... thanks, really. It's lovely. GiftNegative: What the hell was that gift? You know what, I don't even want to think about it. Screw you. } @@ -567,9 +567,9 @@ SeaKing: { HateNPC: "{NPCName} is just a child, but his attitude towards marine life is unacceptable! Absolutely unacceptable!" LikeNPC_Princess: That child, {NPCName}. She is an innocent soul. Let us hope the horrors of war never reach her. Princess_LovesNPC: "{NPCName} always smiles when I'm nearby, I like being around him just for that!" - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Take that horrible statue out of my sight! It is a disgrace to art, and to so unabashedly extort your people...! I expected much more of you. + GiftPositive: It was quite the delight to see that you gifted me custom-made shoes. Few people seem to realize that "walking" tends to leave my tail quite sore. Thank you, sincerely! + GiftNegative: A dead fish?! You gifted me a dead fish?! You managed to cross every line with that "gift"! Leave, I don't want to see you any longer. } } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 01db439850..383b03f820 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -553,7 +553,7 @@ TownNPCMood: { } TaxCollector: { - Monument: HA! Yes! What a fantastic monument celebrating what I have accomplished! + Monument: Bah! You shouldn't be seeing this message, plebian! GiftPositive: What a steal, getting a gift full of the only thing worth a damn in this world -- money! GiftNegative: Bah! You think you're a jester with that lump of coal? Get out of my sight! } @@ -571,8 +571,8 @@ TownNPCMood: { } Wizard: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: If I was your age, I would've blasted that loathsome monument with a giant fireball! Alas, I can't recall the spell. + GiftPositive: An authentic tome of wisdom from the Archmage himself? What a prized possession!! ...uh, who is the Archmage again? + GiftNegative: Do you take me for a fool to place a hex on that gift? How about I place a hex on your wallet, and all of your money disappears when you buy from me!! } } From 9e12a541a998dc6e2124d13f226b98bb44855c4e Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Fri, 10 Apr 2026 05:17:51 -0400 Subject: [PATCH 063/126] more functionality --- Buffs/Potions/SwinesWrathBuff.cs | 11 +++++- CalPlayer/CalamityPlayerLifeRegen.cs | 2 + Items/Potions/TheConcoction.cs | 49 ++++++++++++++++++++---- Sounds/Item/SwinesWrathProc.ogg | Bin 0 -> 76984 bytes Systems/Collections/CalamityBuffSets.cs | 2 +- 5 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 Sounds/Item/SwinesWrathProc.ogg diff --git a/Buffs/Potions/SwinesWrathBuff.cs b/Buffs/Potions/SwinesWrathBuff.cs index c7851f5a07..3900c35273 100644 --- a/Buffs/Potions/SwinesWrathBuff.cs +++ b/Buffs/Potions/SwinesWrathBuff.cs @@ -1,6 +1,11 @@ -using CalamityMod.Items.Potions; +using CalamityMod.DataStructures; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; -using Terraria.Localization; +using Terraria.DataStructures; +using Terraria.Graphics.Shaders; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.Potions @@ -12,6 +17,8 @@ namespace CalamityMod.Buffs.Potions Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; + Main.persistentBuff[Type] = true; + BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } } } diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 7625a6fe18..9f9c25c01c 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using CalamityMod.Buffs.Alcohol; +using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.CalPlayer.Dashes; using CalamityMod.DataStructures; @@ -138,6 +139,7 @@ namespace CalamityMod.CalPlayer ApplyDoTDebuff(banishingFire, 60); // Never inflicted on the player int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 80 : 16) / (eleResist ? 2 : 1); ApplyDoTDebuff(auricRebuke, rebukeDoT); + ApplyDoTDebuff(Player.HasBuff(), 30); // Slowly increase the sulphuric water poisoning effect. Once it's high enough, the player takes damage and the meter resets. bool nearSafeZone = false; diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index 624f7342ce..d6ef4c1c8c 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; using System.Linq; +using CalamityMod.Buffs.Potions; using CalamityMod.Items.Materials; using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -12,6 +14,7 @@ namespace CalamityMod.Items.Potions public class TheConcoction : ModItem, ILocalizedModType { private static int hoverTimer = 0; + private static bool wasHovering = false; public new string LocalizationCategory => "Items.Potions"; public override void SetStaticDefaults() @@ -32,23 +35,53 @@ namespace CalamityMod.Items.Potions Item.rare = ItemRarityID.Green; } - // Display different text for the first 8 frames of hovering over the item's tooltip + + public override void OnConsumeItem(Player player) + { + TheConcoctionPlayer cocPlayer = player.GetModPlayer(); + cocPlayer.framesTilSwinesWrath = 600; + } + + + // Display different text for the first 10 frames of hovering over the item's tooltip. + // Only works once after loading the mod. public override void ModifyTooltips(List tooltips) { - if (Main.HoverItem?.type != Type) - { + bool isHovering = Main.HoverItem?.type == Type; + + if (isHovering && !wasHovering) hoverTimer = 0; - return; - } - hoverTimer++; + if (isHovering) + hoverTimer++; - if (hoverTimer <= 8) + wasHovering = isHovering; + + if (hoverTimer <= 10 && hoverTimer > 0) { TooltipLine healLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "HealLife"); + if (healLine != null) - { healLine.Text = this.GetLocalization("EasterEggText").Value; + } + } + } + + public class TheConcoctionPlayer : ModPlayer + { + public int framesTilSwinesWrath = -1; + + public override void PostUpdate() + { + if (framesTilSwinesWrath > 0) + { + framesTilSwinesWrath--; + + if (framesTilSwinesWrath == 0) + { + Player.AddBuff(ModContent.BuffType(), 3600); + + SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/SwinesWrathProc"), Player.Center); } } } diff --git a/Sounds/Item/SwinesWrathProc.ogg b/Sounds/Item/SwinesWrathProc.ogg new file mode 100644 index 0000000000000000000000000000000000000000..2afe99efa7feb01d370d7e9cddb1e06cbdfbd9d2 GIT binary patch literal 76984 zcmeFZcT`hP*C>1vS}0OOFNPi{XNh7eD8PHz291QegEBIGHYhj?o{6a|a*^cuhaTgo8%JCrm?Vd-(r zUF@>I8^YVe(fkhsgf2o-TvA;8qPR2yiE(iba`NzXLumR2d-z}V^>OhH6gp!AA^AIo zkea$V1b~4M2?N9+emWfs0JH#L&nHBk<*F-Gon4L$&Ck|3s||`L=4U4kvN)wk4E?J> zNINqE05O0^lBZR^(e<2?cViJu^DmS4Fp{f9kR_SClqc^$5^(aZ>8SDYof6`QowFhV z1puIRxZ~iMv%)cfJDvqBZgKdJaMu?5QwZ0UMN>$QAYu$8-&JK9DZHzzOjFoJc1){L zigwKE8AvRcJ2m%`+J*;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JrI8(aO`K@!5v$R3cS9%Zo4sY?SXZ@*TB%wp3%3D@AGVe$87(ql^}&%{x>|K4%!s6 KKVu0Drt&|1;TLTH literal 0 HcmV?d00001 diff --git a/Systems/Collections/CalamityBuffSets.cs b/Systems/Collections/CalamityBuffSets.cs index 03d2a977f1..451029c9e7 100644 --- a/Systems/Collections/CalamityBuffSets.cs +++ b/Systems/Collections/CalamityBuffSets.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Systems.Collections BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); /// /// If for a buff type, then that buff is considered to be a debuff.
From e29008d4006e80d6b1906e297ec2428c49411335 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 Apr 2026 20:06:10 -0400 Subject: [PATCH 064/126] Fixed malformed localization file --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 8e75c37b7e..9509266684 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -353,7 +353,7 @@ Archmage: { LikeNPC_Princess: "{NPCName} has some very quaint spells. I'm quite impressed, for someone of her age." Princess_LovesNPC: "{NPCName} makes the best ice cream I've ever tasted, it's so good!" Monument: What a hideous statue! I always advocated for artistic community projects, but this... you really should have better quality control over what gets into your town! - GiftPositive: "How culture shaped magic" by [name]?! I thought this book was lost centuries ago! How did you find it, and how did you...?! Well, no matter! This is the perfect gift, thank you! + GiftPositive: '''"How culture shaped magic" by [name]?! I thought this book was lost centuries ago! How did you find it, and how did you...?! Well, no matter! This is the perfect gift, thank you!''' GiftNegative: Could you please explain what your last gift was? You made an attempt on my life by trying to freeze me!? You better have a good explanation about how a snowstorm made its way inside that box! } } From bb75954abb702bbc88e3e3757335dcfe538c8713 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 10 Apr 2026 22:01:38 -0400 Subject: [PATCH 065/126] Goblin Tinkerer, Mechanic --- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 383b03f820..add3a4985d 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -475,9 +475,9 @@ TownNPCMood: { } GoblinTinkerer: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: You know, even the barbaric goblin camp I was once part of never considered the concept of a useless monument that just funnels funds. + GiftPositive: What a fascinating welding-cutting combo tool in that gift! I would love to reverse-engineer and tinker it for my own research. + GiftNegative: When I reached into your unassuming gift, my hands were lacerated by a handful of spiky balls! I'm afraid I will have to hike my prices to cover the medical costs. } Golfer: { @@ -493,9 +493,9 @@ TownNPCMood: { } Mechanic: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Any more money I have to fork over for this monument and I'm going to have to start charging an electric bill to these people! I would hate to do that. + GiftPositive: Thanks to your gift of signal extenders, I can connect more of this world than ever! That extra burst of motivation is just what I need to finish wiring up this town! + GiftNegative: What compelled you to be so reckless as to gift me an EMP device? Everyone is yelling at me like it's MY fault! Well, now it will be YOUR problem to pay it off when you buy all your wire. } Merchant: { From 0b2a3d877daffc7bf05423ee576345549c4331c7 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Fri, 10 Apr 2026 23:11:05 -0400 Subject: [PATCH 066/126] death messages --- Buffs/Potions/SwinesWrathBuff.cs | 2 +- CalPlayer/CalamityPlayerHitHurt.cs | 5 +++++ Localization/en-US/Mods.CalamityMod.Status.Death.hjson | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Buffs/Potions/SwinesWrathBuff.cs b/Buffs/Potions/SwinesWrathBuff.cs index 3900c35273..92edea91c7 100644 --- a/Buffs/Potions/SwinesWrathBuff.cs +++ b/Buffs/Potions/SwinesWrathBuff.cs @@ -4,6 +4,7 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.Graphics.Shaders; using Terraria.ID; using Terraria.ModLoader; @@ -17,7 +18,6 @@ namespace CalamityMod.Buffs.Potions Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; - Main.persistentBuff[Type] = true; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } } diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 2c8276d8ee..c97d08e536 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -4,6 +4,7 @@ using CalamityMod.Balancing; using CalamityMod.Buffs.Cooldowns; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Placeables; +using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; @@ -403,6 +404,10 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AstralInfection" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name)); } + if (Player.HasBuff()) + { + damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SwinesWrath" + Main.rand.Next(1, 7 + 1)).ToNetworkText(Player.name)); + } if (nightwither) { damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Nightwither").ToNetworkText(Player.name)); diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index 1e0d926ef4..599a16fc20 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -109,6 +109,13 @@ SulphurMeter: "{0} bathed too long in acidic waters." SulphuricPoisoning1: "{0} was melted by the toxic waste." SulphuricPoisoning2: "{0} ingested too many caustic chemicals." SulphuricPoisoning3: "{0} couldn't handle the industrial backwash." +SwinesWrath1:{0} was not ready to bask in divinity. +SwinesWrath2:{0} now resides in Pigatory. +SwinesWrath3:{0} was ground into a fine dust; a fibrous powder, by the wrath of Swine. +SwinesWrath4:{0} should be careful what they wish for. +SwinesWrath5:{0} had the last of their health swinedled out from under their nose. +SwinesWrath6:{0} did not read the label on The Concoction. +SwinesWrath7:{0}'s life was hogged to the bone. ThornBlossom: "{0} was violently pricked by a flower." UltracosmicMaelstrom1: "{0} was sublimated by the Ultracosmic Maelstrom." UltracosmicMaelstrom2: "{0} got cut down to size by the Ultracosmic Maelstrom." From c6c49ce461ba09052bf4d64b5233bc2115866c5d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 Apr 2026 16:42:08 -0400 Subject: [PATCH 067/126] Hi Gps, farewell math2 --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index f50c787909..9f03915994 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -68,10 +68,10 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Flowaria", "Fluffy", "fryzahh", + "Gpscorpion", "HaguriHat", "jasper", "LordMetarex", - "math2", "Moonburn", "Ozzatron", "Piky", @@ -147,6 +147,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Lompl Allimath", "Lucille Karma", "MarieArk", + "math2", "Mercutio 'Merkalto' Takle", "Mihaii", "Minecat", From 71443199869ac0190ef0e6e537bc32f524b91ac1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 11 Apr 2026 19:13:24 -0400 Subject: [PATCH 068/126] Princess, Steampunker, Stylist 5 to go (plus partial Clothier) --- .../en-US/Mods.CalamityMod.Vanilla.hjson | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index add3a4985d..014f918954 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -529,9 +529,9 @@ TownNPCMood: { } Princess: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Um... my people have been frequently complaining about that monument. May I request it be taken down, please? + GiftPositive: I do appreciate your thoughtfulness with this gift, my loyal subject! It's always so wonderful to see the many fantastic things inside one! + GiftNegative: Um... may I ask what you were implying with the contents of that gift? Perhaps I shouldn't worry so, but I do find myself concerned... } SantaClaus: { @@ -541,15 +541,15 @@ TownNPCMood: { } Steampunker: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Oi, that bloody big rock you got outside is a monumental mistake! Decommission it this very instant! + GiftPositive: Ahh, what a deeply inspiring jetpack engine! The breakthroughs in steampunk technology from this will be exquisite! Consider this sale a return of generosity. + GiftNegative: When I opened your gift, a sudden blast of cold air condensed all of my steam! Were it not for my backup systems, my machines would be unusable! You bloody better watch yourself! } Stylist: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: That statue has been the talk of the town! ...As in, everyone cannot stand the gross thing. + GiftPositive: Thanks hun, that gift of new exotic hair dyes was just what I was missin' in my life! I know just who else could use some of this style too! + GiftNegative: What were you pullin' on me with a fireball in a gift box? That could've singed me bald, and I could never be a stylist without hair! NEVER! } TaxCollector: { From 0ac6e6cb7af9c5da279fcc1ab37822d991182f80 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 12 Apr 2026 04:12:54 -0400 Subject: [PATCH 069/126] compiler and grammar fix --- .../en-US/Mods.CalamityMod.Status.Death.hjson | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson index 599a16fc20..8b54e2709c 100644 --- a/Localization/en-US/Mods.CalamityMod.Status.Death.hjson +++ b/Localization/en-US/Mods.CalamityMod.Status.Death.hjson @@ -109,13 +109,13 @@ SulphurMeter: "{0} bathed too long in acidic waters." SulphuricPoisoning1: "{0} was melted by the toxic waste." SulphuricPoisoning2: "{0} ingested too many caustic chemicals." SulphuricPoisoning3: "{0} couldn't handle the industrial backwash." -SwinesWrath1:{0} was not ready to bask in divinity. -SwinesWrath2:{0} now resides in Pigatory. -SwinesWrath3:{0} was ground into a fine dust; a fibrous powder, by the wrath of Swine. -SwinesWrath4:{0} should be careful what they wish for. -SwinesWrath5:{0} had the last of their health swinedled out from under their nose. -SwinesWrath6:{0} did not read the label on The Concoction. -SwinesWrath7:{0}'s life was hogged to the bone. +SwinesWrath1: "{0} was not ready to bask in divinity." +SwinesWrath2: "{0} now resides in Pigatory." +SwinesWrath3: "{0} was ground into a fine dust—a fibrous powder, by the wrath of Swine." +SwinesWrath4: "{0} should be careful what they wish for." +SwinesWrath5: "{0} had the last of their health swinedled out from under their nose." +SwinesWrath6: "{0} did not read the label on The Concoction." +SwinesWrath7: "{0}'s life was hogged to the bone." ThornBlossom: "{0} was violently pricked by a flower." UltracosmicMaelstrom1: "{0} was sublimated by the Ultracosmic Maelstrom." UltracosmicMaelstrom2: "{0} got cut down to size by the Ultracosmic Maelstrom." From 6c481e29576da8b76c0a28d2897f1062f5712bd7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 12 Apr 2026 11:38:04 -0400 Subject: [PATCH 070/126] Dye Trader, Pirate, + Clothier good Gift line 3 to go, + Clothier bad Gift line --- .../en-US/Mods.CalamityMod.Vanilla.hjson | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 014f918954..e8166bb527 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -440,7 +440,7 @@ TownNPCMood: { Clothier: { Monument: I think I am becoming too old to understand this... "modern art". - GiftPositive: placeholder + GiftPositive: There was a simple bell in that gift, but its ring was simply extraordinary. Perhaps this means I truly believe... GiftNegative: placeholder } @@ -469,9 +469,9 @@ TownNPCMood: { } DyeTrader: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Oh no no, that dull monument cannot be. Its mere presence makes me feel as though my dyes are less effective! + GiftPositive: What an extraordinary batch of rare flowers there was in that gift, friend! I must thank you for your help, browse my colors at reduced coin in exchange! + GiftNegative: You think you can pull such a drab gift prank on me, I don't think so! I want no business of yours after that attack on my precious palettes! } GoblinTinkerer: { @@ -493,7 +493,7 @@ TownNPCMood: { } Mechanic: { - Monument: Any more money I have to fork over for this monument and I'm going to have to start charging an electric bill to these people! I would hate to do that. + Monument: Any more money I have to fork over for this monument and I'm going to have to start charging an electric bill! I would hate to do that. GiftPositive: Thanks to your gift of signal extenders, I can connect more of this world than ever! That extra burst of motivation is just what I need to finish wiring up this town! GiftNegative: What compelled you to be so reckless as to gift me an EMP device? Everyone is yelling at me like it's MY fault! Well, now it will be YOUR problem to pay it off when you buy all your wire. } @@ -523,9 +523,9 @@ TownNPCMood: { } Pirate: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Arr, ye landlubbers have filthy tastes in decoration! That statue be askin' to be washed away! + GiftPositive: HAR HAR! Ye bring me the best bottle o' rum I ever taste in me life! Nothin' more for me to say, sea dog! + GiftNegative: Arr, ye scallywag! Ye be askin' to be sent to Davy Jones' locker with that foul concoction ye gave me earlier! } Princess: { From b9eeb72260d94a2592b9038bd9eb8b4e725a5244 Mon Sep 17 00:00:00 2001 From: Big E Date: Mon, 13 Apr 2026 16:44:10 -0400 Subject: [PATCH 071/126] + Basic Greed Pot Implementation --- Items/Placeables/GreedPot.cs | 18 ++ Items/Placeables/GreedPot.png | Bin 0 -> 457 bytes Tiles/GreedPotTile.cs | 303 ++++++++++++++++++++++++++++++++++ Tiles/GreedPotTile.png | Bin 0 -> 2409 bytes 4 files changed, 321 insertions(+) create mode 100644 Items/Placeables/GreedPot.cs create mode 100644 Items/Placeables/GreedPot.png create mode 100644 Tiles/GreedPotTile.cs create mode 100644 Tiles/GreedPotTile.png diff --git a/Items/Placeables/GreedPot.cs b/Items/Placeables/GreedPot.cs new file mode 100644 index 0000000000..9ae76a3736 --- /dev/null +++ b/Items/Placeables/GreedPot.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Tiles; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class GreedPot : ModItem + { + public new string LocalizationCategory => "Items.Placeables"; + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + } +} diff --git a/Items/Placeables/GreedPot.png b/Items/Placeables/GreedPot.png new file mode 100644 index 0000000000000000000000000000000000000000..9b89cb64059ea82b168a6706dd7cc02aef4d2f21 GIT binary patch literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^3P7yH!3-ohbF|L_DaPU;cPEB*=VV?2ISBziA+A80 zkB{GmK}JtXPf5YVM$I&nRo2(Q-dH&_m?5~DA*8@NXcdFhM?QEak-(K~l?VBcW_4wvQ* zS6)TEuy^&>uIhw}u6(&kSH4VW-l2*Er$6!79W4@Nbx1LLK1Wb#mCJl)2bVK0Rr`JZ zb2^9#ZjKa-2;Vbzi5P?Nk%!L(1#g4~e_+;RSaNp8L_dS1`_=pJG8kTG2xL*2wK8vZ z*1F$(GX-5t8xD608PCtfONnEQzN0lUW&G0D*R%%I3(@O1TaS?83{1OWAyuj>E+ literal 0 HcmV?d00001 diff --git a/Tiles/GreedPotTile.cs b/Tiles/GreedPotTile.cs new file mode 100644 index 0000000000..a7f59c16a1 --- /dev/null +++ b/Tiles/GreedPotTile.cs @@ -0,0 +1,303 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.DataStructures; +using CalamityMod.Items.Placeables.Ores; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles +{ + public class GreedPotTile : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + + ModTileEntity te = ModContent.GetInstance(); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(te.Hook_AfterPlacement, -1, 0, true); + + TileObjectData.addTile(Type); + + DustType = DustID.Iron; + + AddMapEntry(new Color(250, 142, 4)); + } + + public override void MouseOver(int i, int j) + { + List availableOres = GreedTransmutation.GreedChain.Where(p => p.Value.Availability.Invoke()).Select(p => p.Key).ToList(); + + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = availableOres[(int)((Main.GlobalTimeWrappedHourly * 2) % availableOres.Count)]; + } + + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) + { + if (TileEntity.TryGet(new(i, j), out var greedPotTE)) + { + frameXOffset = 18 * 3 * greedPotTE.MyFrame; + } + } + } + + public class GreedPotTE : ModTileEntity + { + internal bool Activated = false; + internal ushort TimeSinceActivation = 0; + private ushort FrameTime = 0; + private byte CurrentFrame = 0; + public int MyFrame => (int)CurrentFrame; + + private const byte FullActiveFrame = 4; + private const byte FrameRate = 3; + private const byte FrameTotal = 8; + + public override bool IsTileValidForEntity(int x, int y) + { + Tile tile = Main.tile[x, y]; + + int style = 0, alt = 0; + TileObjectData.GetTileInfo(tile, ref style, ref alt); + TileObjectData data = TileObjectData.GetTileData(tile.TileType, style, alt); + + int sheetSquare = 16 + data.CoordinatePadding; + int FrameX = tile.TileFrameX / sheetSquare % data.Width; + int FrameY = tile.TileFrameY / sheetSquare % data.Height; + + return tile.HasTile && tile.TileType == ModContent.TileType() && FrameX == 0 && FrameY == 0; + } + + public override int Hook_AfterPlacement(int i, int j, int type, int style, int direction, int alternate) + { + if (Main.netMode == NetmodeID.MultiplayerClient) + { + NetMessage.SendTileSquare(Main.myPlayer, i, j, 3, 3); + NetMessage.SendData(MessageID.TileEntityPlacement, -1, -1, null, i, j, Type); + return -1; + } + return Place(i, j); + } + + public override void OnNetPlace() => NetMessage.SendData(MessageID.TileEntitySharing, -1, -1, null, ID, Position.X, Position.Y); + + public override void Update() + { + if(Activated) + { + if(CurrentFrame != 3) + { + FrameTime++; + if(FrameTime % FrameRate == 0) + { + FrameTime = 0; + CurrentFrame = (byte)((CurrentFrame + 1) % FrameTotal); + } + } + + if (TimeSinceActivation >= 150) + { + Activated = false; + TimeSinceActivation = 0; + return; + } + + TimeSinceActivation++; + } + else + { + if (CurrentFrame != 0) + { + FrameTime++; + if (FrameTime % FrameRate == 0) + { + FrameTime = 0; + CurrentFrame = (byte)((CurrentFrame + 1) % FrameTotal); + } + } + } + } + + public override void NetSend(BinaryWriter writer) + { + writer.Write(Activated); + writer.Write(FrameTime); + writer.Write(TimeSinceActivation); + writer.Write(CurrentFrame); + } + public override void NetReceive(BinaryReader reader) + { + Activated = reader.ReadBoolean(); + FrameTime = reader.ReadUInt16(); + TimeSinceActivation = reader.ReadUInt16(); + CurrentFrame = reader.ReadByte(); + } + } + + public class GreedTransmutation : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetStaticDefaults() + { + static bool twoMechsDowned() => + NPC.downedMechBoss1 && NPC.downedMechBoss2 && !NPC.downedMechBoss3 || + NPC.downedMechBoss2 && NPC.downedMechBoss3 && !NPC.downedMechBoss1 || + NPC.downedMechBoss3 && NPC.downedMechBoss1 && !NPC.downedMechBoss2 || + NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3; + + GreedChain = new() + { + { ItemID.CopperOre, (ItemID.IronOre, () => true) }, + { ItemID.IronOre, (ItemID.SilverOre, () => true) }, + { ItemID.SilverOre, (ItemID.GoldOre, () => true) }, + { ItemID.TinOre, (ItemID.LeadOre, () => true) }, + { ItemID.LeadOre, (ItemID.TungstenOre, () => true) }, + { ItemID.TungstenOre, (ItemID.PlatinumOre, () => true) }, + { ItemID.GoldOre, (ModContent.ItemType(), () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator) }, + { ItemID.PlatinumOre, (ModContent.ItemType(), () => DownedBossSystem.downedHiveMind || DownedBossSystem.downedPerforator) }, + { ModContent.ItemType(), (ItemID.PalladiumOre, () => Main.hardMode) }, + { ItemID.CobaltOre, (ItemID.MythrilOre, () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? NPC.downedMechBossAny : Main.hardMode) }, + { ItemID.MythrilOre, (ItemID.AdamantiteOre, () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? twoMechsDowned() : Main.hardMode) }, + { ItemID.PalladiumOre, (ItemID.OrichalcumOre, () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? NPC.downedMechBossAny : Main.hardMode) }, + { ItemID.OrichalcumOre, (ItemID.TitaniumOre, () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? twoMechsDowned() : Main.hardMode) }, + { ItemID.AdamantiteOre, (ModContent.ItemType(), () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 : NPC.downedMechBossAny) }, + { ItemID.TitaniumOre, (ModContent.ItemType(), () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 : NPC.downedMechBossAny) }, + { ModContent.ItemType(), (ItemID.ChlorophyteOre, () => NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) }, + { ItemID.ChlorophyteOre, (ModContent.ItemType(), () => NPC.downedPlantBoss) }, + { ModContent.ItemType(), (ModContent.ItemType(), () => NPC.downedGolemBoss) }, + { ModContent.ItemType(), (ItemID.LunarOre, () => NPC.downedMoonlord) }, + { ItemID.LunarOre, (ModContent.ItemType(), () => NPC.downedMoonlord) }, + { ModContent.ItemType(), (ModContent.ItemType(), () => DownedBossSystem.downedProvidence) }, + { ModContent.ItemType(), (ModContent.ItemType(), () => DownedBossSystem.downedYharon) }, + }; + } + + internal static Dictionary Availability)> GreedChain; + + private int InputItemType => (int)Projectile.ai[0]; + private int SuccessOutputItemType => (int)Projectile.ai[1]; + + private Vector2 PotPosition = Vector2.Zero; + private Vector2 StartPosition = Vector2.Zero; + + BezierCurve path = null; + + public override void SetDefaults() + { + Projectile.width = 24; + Projectile.height = 24; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.penetrate = 1; + Projectile.timeLeft = 120; + } + + public override void OnSpawn(IEntitySource source) + { + StartPosition = Projectile.Center; + PotPosition = Projectile.velocity; + Projectile.velocity = Vector2.Zero; + Projectile.netUpdate = true; + } + + + public override void AI() + { + if(path == null) + { + Vector2 startPoint = StartPosition; + Vector2 endPoint = PotPosition - Vector2.UnitY * 64; + + Vector2 direction = endPoint - startPoint; + float curveIntensity = Main.rand.NextFloat(0.2f, 0.4f); + Vector2 perpindicular = direction.RotatedBy(MathHelper.PiOver2); + if (direction.X > 0) + curveIntensity *= -1; + + Vector2 controlPoint1 = startPoint + (direction * 0.25f) + (perpindicular * curveIntensity); + Vector2 controlPoint2 = startPoint + (direction * 0.75f) + (perpindicular * curveIntensity); + + path = new BezierCurve(startPoint, controlPoint1, controlPoint2, endPoint); + } + + float lerp = 1 - MathHelper.Clamp(((Projectile.timeLeft - 60) / 60f), 0f, 1f); + + Projectile.Center = path.Evaluate(CalamityUtils.CircOutEasing(lerp, 1)); + + if (Projectile.timeLeft == 1) + { + int i = Item.NewItem(Projectile.GetItemSource_DropAsItem(), Projectile.Center, Main.rand.NextBool(3) ? SuccessOutputItemType : ItemID.StoneBlock); + Main.item[i].GetGlobalItem().FromGreedPot = true; + } + } + + public override bool PreDraw(ref Color lightColor) + { + //Anim Plan + //Moving to Pos: 0 -> 60 + //Darken: 70 -> 80 + //Transform: 90 -> 100 + //Undarken: 110 -> 120 + Texture2D tex = TextureAssets.Item[InputItemType].Value; + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, lightColor, Projectile.rotation, tex.Size() * 0.5f, 1f, 0, 0); + return false; + } + } + + public class GreedTransmutationGlobalItem : GlobalItem + { + public override bool InstancePerEntity => true; + + internal bool FromGreedPot = false; + + public override bool? UseItem(Item item, Player player) + { + if (Main.LocalPlayer.whoAmI != player.whoAmI) + return null; + + if (!GreedTransmutation.GreedChain.TryGetValue(item.type, out var transmutation)) + return null; + + if (!transmutation.Availability()) + return null; + + Point mouseTile = Main.MouseWorld.ToTileCoordinates(); + + GreedPotTE greedPotTE = CalamityUtils.FindTileEntity(mouseTile.X, mouseTile.Y, 3, 3, 18); + if (greedPotTE == null) + return null; + + if (!player.IsInTileInteractionRange(mouseTile.X, mouseTile.Y, TileReachCheckSettings.Simple)) + return null; + + Projectile.NewProjectile(Projectile.GetSource_NaturalSpawn(), Main.LocalPlayer.Center, greedPotTE.Position.ToWorldCoordinates(24, 24) + Main.rand.NextVector2Circular(12, 32), ModContent.ProjectileType(), 0, 0, Main.LocalPlayer.whoAmI, item.type, transmutation.Result, Main.rand.Next(120)); + greedPotTE.Activated = true; + greedPotTE.TimeSinceActivation = 0; + + return true; + } + + public override bool CanStackInWorld(Item destination, Item source) + { + return !destination.GetGlobalItem().FromGreedPot || !source.GetGlobalItem().FromGreedPot; + } + } +} diff --git a/Tiles/GreedPotTile.png b/Tiles/GreedPotTile.png new file mode 100644 index 0000000000000000000000000000000000000000..1e8745c33afd518362afbac516fbf85d64b733ab GIT binary patch literal 2409 zcmZWrdmz(mAOA5Sp;V4Tsix$0YZ0l0jtJFT!Wz+%%jAB|jK(@i7ok-wghTGMwJ>6a zEwEzI~E0mBE=%4Z+F#5r@D}71iwCJm|aj(8s$c z#ro_tqBLEp2Tw~Sc@30$gcX9wt8=*}!;9aChcn{Lgf0Zr>>ks6mY?N%j z?KP2}`_z8uiI!nO{0oW#rXeFiZ*0zPWXTKwp(mxj@x)s&c?NEZ&Gmha>U2XBK}6db zI1Ge3%1+-6@%5D4>E+O;XmGr5!03|^qOkgITxn;@^$bYedwM9g4jCqoajUZ0)Z8@K zYF2pc^D4VS6V)DQywVOc7d-0s`T3X-T`*Ckcvc>4W1yaX(@kcGGH)3w>f;vLC*Nfe zKVH70421DDLmpH|v3BxrBzI7gLe#D`rN=OW?PVeP(XI464@p9TM>ujZ4rhE&QWDW; zU%8vi@;HPd)%?+1IZp0UA)~RDK@Y(aDbvH-{k;n~eUL<>awplY&Rf;;D+W!5S}%?j z1*KM8B9^O}kHpNhLxCHSU(Ud--uwz(@+&kVW@hfh7F2NM7cKVa>Q?*YCl_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2%EgsJf&@jsJt>$mPmvK`{BZVhd)P(y^zKFjpL4j^LvynPT0G9sLW zIrX;*vRuWlBnA482K=Jr2>d%0s+KpO`OxgtYjKSwkULZ-jmghz$Q;rvIo2rD4@C-< zrvn(YYtY$5kGE7Co%(u#4;Dx6!NTI#T>HP8^hW)u$}Z8&nw&o8*XcwZu7t}rlg9NM z$AW4`chE1(;4PvD>3P9ts~shx)5a;6WP-K()nipZPnMoaoOH?6ZmjyZ$Yg{Y8y}Rn z31cx|R6pbN$#WulQwo`#UdFKAD=8qL_LB|c%s-HMwD>LLQ0WVW_jO?d7R>j#pf4_c zplz-esB%eu1sF10bwk1Ex&Xf(72mu~yh|pA1XEWSE4P51ttlzHj*bo2*H Date: Mon, 13 Apr 2026 18:31:28 -0400 Subject: [PATCH 072/126] Demolitionist, Party Girl, Witch Doctor 1 line left, plus filling in name for an Archmage line --- .../en-US/Mods.CalamityMod.Vanilla.hjson | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index e8166bb527..51d314629e 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -457,9 +457,9 @@ TownNPCMood: { } Demolitionist: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: You know, there is a use for that monument - it'll make for a good demolition test for my biggest dynamite yet! + GiftPositive: Hey, is that a shipment of ale? That's the only thing us dwarves love more than blowing things up! You're da' bomb! + GiftNegative: ARGH! You see yourself as a joker, giving me a water gun? That's an affront to my craft in two ways! Now I'm itching to turn you into a firework! } Dryad: { @@ -517,9 +517,9 @@ TownNPCMood: { } PartyGirl: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: Yeeesh, we're gonna have an ugly statue of that grump around? That like, totally kills the party mood around here. + GiftPositive: PARTY GIFTS? FOR ME? Oh just you wait, I'm gonna throw the BIGGEST party this town has ever seen, forever and always! + GiftNegative: I knew you were trouble when you walked in that suspicious looking box! It's too late now to say sorry! } Pirate: { @@ -565,9 +565,9 @@ TownNPCMood: { } WitchDoctor: { - Monument: placeholder - GiftPositive: placeholder - GiftNegative: placeholder + Monument: A vile disruption of nature, that monument is. My soul is filled with contempt in its existence. + GiftPositive: A kind offering to my people, this gift is. May you be blessed by kindred spirits in trying times. + GiftNegative: Sacrilegious defilement against my arts - I speak of your false gift. May your woes be many, and your days few. } Wizard: { From dbb7643f8a4ce7f31655a85457f9ece2e0ec1a85 Mon Sep 17 00:00:00 2001 From: Big E Date: Mon, 13 Apr 2026 19:11:29 -0400 Subject: [PATCH 073/126] + Visuals --- Items/Placeables/GreedPot.cs | 2 +- .../Mods.CalamityMod.Items.Placeables.hjson | 5 + .../Mods.CalamityMod.Projectiles.Misc.hjson | 2 + Tiles/GreedPotTile.cs | 94 ++++++++++++++++++- 4 files changed, 97 insertions(+), 6 deletions(-) diff --git a/Items/Placeables/GreedPot.cs b/Items/Placeables/GreedPot.cs index 9ae76a3736..0ad723196e 100644 --- a/Items/Placeables/GreedPot.cs +++ b/Items/Placeables/GreedPot.cs @@ -8,7 +8,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables { - public class GreedPot : ModItem + public class GreedPot : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Placeables"; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 4a8f1cc711..9a1d0c9ad1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -4695,3 +4695,8 @@ MossyStone: { DisplayName: Mossy Stone Tooltip: "" } + +GreedPot: { + DisplayName: Greed Pot + Tooltip: "" +} diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson index 303e04c84f..5ab80e38b0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson @@ -78,3 +78,5 @@ PlagueShot.DisplayName: Plague Shot PlagueShotBuffer.DisplayName: Plague Shot WaterShot.DisplayName: Water Shot WaterShotBuffer.DisplayName: Water Shot +// Animation +GreedTransmutation.DisplayName: Greed Transmutation diff --git a/Tiles/GreedPotTile.cs b/Tiles/GreedPotTile.cs index a7f59c16a1..4e215b0d37 100644 --- a/Tiles/GreedPotTile.cs +++ b/Tiles/GreedPotTile.cs @@ -7,6 +7,8 @@ using System.Text; using System.Threading.Tasks; using CalamityMod.DataStructures; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.Particles; +using CalamityMod.Utilities.Daybreak; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -118,6 +120,12 @@ namespace CalamityMod.Tiles return; } + if(TimeSinceActivation % 5 == 0) + { + HeavySmokeParticle p = new(Position.ToWorldCoordinates(24 + Main.rand.Next(-10, 11), 2), Vector2.UnitY * -2, Color.Crimson, 90, Main.rand.NextFloat(0.2f, 0.3f), 0.75f, Main.rand.NextFloat(-0.05f, 0.05f), true); + GeneralParticleHandler.SpawnParticle(p); + } + TimeSinceActivation++; } else @@ -150,8 +158,10 @@ namespace CalamityMod.Tiles } } - public class GreedTransmutation : ModProjectile + public class GreedTransmutation : ModProjectile, ILocalizedModType { + public new string LocalizationCategory => "Projectiles.Misc"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public override void SetStaticDefaults() @@ -198,6 +208,7 @@ namespace CalamityMod.Tiles private Vector2 StartPosition = Vector2.Zero; BezierCurve path = null; + private bool Success = false; public override void SetDefaults() { @@ -215,6 +226,7 @@ namespace CalamityMod.Tiles StartPosition = Projectile.Center; PotPosition = Projectile.velocity; Projectile.velocity = Vector2.Zero; + Success = Main.rand.NextBool(3); Projectile.netUpdate = true; } @@ -244,7 +256,7 @@ namespace CalamityMod.Tiles if (Projectile.timeLeft == 1) { - int i = Item.NewItem(Projectile.GetItemSource_DropAsItem(), Projectile.Center, Main.rand.NextBool(3) ? SuccessOutputItemType : ItemID.StoneBlock); + int i = Item.NewItem(Projectile.GetItemSource_DropAsItem(), Projectile.Center, Success ? SuccessOutputItemType : ItemID.StoneBlock); Main.item[i].GetGlobalItem().FromGreedPot = true; } } @@ -256,8 +268,79 @@ namespace CalamityMod.Tiles //Darken: 70 -> 80 //Transform: 90 -> 100 //Undarken: 110 -> 120 - Texture2D tex = TextureAssets.Item[InputItemType].Value; - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, lightColor, Projectile.rotation, tex.Size() * 0.5f, 1f, 0, 0); + + int animTime = 120 - Projectile.timeLeft; + bool beforeDarken = animTime < 50; + bool darken = animTime < 90; + bool transform = animTime < 110; + + if(beforeDarken) + { + Texture2D tex = TextureAssets.Item[InputItemType].Value; + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, lightColor, Projectile.rotation, tex.Size() * 0.5f, 1f, 0, 0); + } + else if (darken) + { + Main.spriteBatch.End(out var snap); + + var newSnap = snap with { BlendState = BlendState.Additive }; + Main.spriteBatch.Begin(newSnap); + + float glowLerp = MathHelper.Clamp((animTime - 45) / 10f, 0f, 1f); + glowLerp = CalamityUtils.SineInEasing(glowLerp, 1); + + Texture2D glow = ModContent.Request("CalamityMod/Particles/SmallBloom").Value; + Main.spriteBatch.Draw(glow, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Crimson * glowLerp, Projectile.rotation, glow.Size() * 0.5f, MathHelper.Lerp(0.05f, 0.15f, glowLerp), 0, 0); + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(snap); + + float darkenLerp = MathHelper.Clamp((animTime - 50) / 10f, 0f, 1f); + darkenLerp = CalamityUtils.CircInEasing(darkenLerp, 1); + + Texture2D tex = TextureAssets.Item[InputItemType].Value; + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Lerp(lightColor, Color.Black, darkenLerp), Projectile.rotation, tex.Size() * 0.5f, 1f, 0, 0); + } + else if(transform) + { + Main.spriteBatch.End(out var snap); + + var newSnap = snap with { BlendState = BlendState.Additive }; + Main.spriteBatch.Begin(newSnap); + + Texture2D glow = ModContent.Request("CalamityMod/Particles/SmallBloom").Value; + Main.spriteBatch.Draw(glow, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Crimson, Projectile.rotation, glow.Size() * 0.5f, 0.15f, 0, 0); + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(snap); + + Texture2D inputTex = TextureAssets.Item[InputItemType].Value; + Texture2D outputTex = TextureAssets.Item[Success ? SuccessOutputItemType : ItemID.StoneBlock].Value; + float transformLerp = MathHelper.Clamp((animTime - 90) / 10f, 0f, 1f); + //transformLerp = CalamityUtils.SineInOutEasing(transformLerp, 1); + + Main.spriteBatch.Draw(inputTex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Black, Projectile.rotation, inputTex.Size() * 0.5f, 1 - transformLerp, 0, 0); + Main.spriteBatch.Draw(outputTex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Black, Projectile.rotation, inputTex.Size() * 0.5f, transformLerp, 0, 0); + } + else + { + float undarkenLerp = MathHelper.Clamp((animTime - 110) / 10f, 0f, 1f); + undarkenLerp = CalamityUtils.SineOutEasing(undarkenLerp, 1); + + Main.spriteBatch.End(out var snap); + + var newSnap = snap with { BlendState = BlendState.Additive }; + Main.spriteBatch.Begin(newSnap); + + Texture2D glow = ModContent.Request("CalamityMod/Particles/SmallBloom").Value; + Main.spriteBatch.Draw(glow, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Crimson * (1 - undarkenLerp), Projectile.rotation, glow.Size() * 0.5f, MathHelper.Lerp(0.05f, 0.15f, (1 - undarkenLerp)), 0, 0); + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(snap); + + Texture2D tex = TextureAssets.Item[Success ? SuccessOutputItemType : ItemID.StoneBlock].Value; + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Vector2.UnitY * MathF.Sin(Main.GlobalTimeWrappedHourly + Projectile.ai[2]) * 8), null, Color.Lerp(Color.Black, lightColor, undarkenLerp), Projectile.rotation, tex.Size() * 0.5f, 1f, 0, 0); + } return false; } } @@ -291,8 +374,9 @@ namespace CalamityMod.Tiles Projectile.NewProjectile(Projectile.GetSource_NaturalSpawn(), Main.LocalPlayer.Center, greedPotTE.Position.ToWorldCoordinates(24, 24) + Main.rand.NextVector2Circular(12, 32), ModContent.ProjectileType(), 0, 0, Main.LocalPlayer.whoAmI, item.type, transmutation.Result, Main.rand.Next(120)); greedPotTE.Activated = true; greedPotTE.TimeSinceActivation = 0; + player.ApplyItemTime(item, 0.5f, false); - return true; + return false; } public override bool CanStackInWorld(Item destination, Item source) From fa65440d3e9b3215aaa2542b5a153eb57ba55c43 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 18:34:26 -0700 Subject: [PATCH 074/126] start town pggiy --- Items/SummonItems/TownPets/PiggyLicense.cs | 67 ++++++++ .../en-US/Mods.CalamityMod.Misc.hjson | 1 + .../en-US/Mods.CalamityMod.NPCs.hjson | 30 ++++ NPCs/TownNPCs/TownPiggy.cs | 146 ++++++++++++++++++ NPCs/TownNPCs/TownPiggy.png | Bin 0 -> 3071 bytes NPCs/TownNPCs/TownPiggy_Head.png | Bin 0 -> 275 bytes Packets/Entities/SyncTownPigLicensePacket.cs | 20 +++ Systems/World/MiscWorldStateSystem.cs | 6 + World/CalamityWorld.cs | 2 + 9 files changed, 272 insertions(+) create mode 100644 Items/SummonItems/TownPets/PiggyLicense.cs create mode 100644 NPCs/TownNPCs/TownPiggy.cs create mode 100644 NPCs/TownNPCs/TownPiggy.png create mode 100644 NPCs/TownNPCs/TownPiggy_Head.png create mode 100644 Packets/Entities/SyncTownPigLicensePacket.cs diff --git a/Items/SummonItems/TownPets/PiggyLicense.cs b/Items/SummonItems/TownPets/PiggyLicense.cs new file mode 100644 index 0000000000..6d0ca49cad --- /dev/null +++ b/Items/SummonItems/TownPets/PiggyLicense.cs @@ -0,0 +1,67 @@ +using CalamityMod.NPCs.TownNPCs; +using CalamityMod.Packets; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Chat; +using Terraria.Enums; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Items.SummonItems.TownPets +{ + public class PiggyLicense : ModItem + { + public override string Texture => "Terraria/Images/Item_" + ItemID.LicenseBunny; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 5; + } + + public override void SetDefaults() + { + Item.useStyle = ItemUseStyleID.HoldUp; + Item.consumable = true; + Item.useAnimation = 45; + Item.useTime = 45; + Item.UseSound = SoundID.Item92; + Item.width = 28; + Item.height = 28; + Item.maxStack = Item.CommonMaxStack; + Item.SetShopValues(ItemRarityColor.Green2, Item.buyPrice(0, 5)); + } + + public override bool? UseItem(Player player) + { + int npcType = ModContent.NPCType(); + if (player.ItemAnimationJustStarted && (!CalamityWorld.unlockedTownPig || NPC.AnyNPCs(npcType))) + { + if (player.whoAmI == Main.myPlayer) + { + SpawnPiggy(); + } + return true; + } + return false; + } + + public static void SpawnPiggy() + { + Color color = new(50, 255, 130); + if (Main.netMode == NetmodeID.MultiplayerClient) + { + if (!CalamityWorld.unlockedTownPig) + { + SyncTownPigLicensePacket.Send(); + } + } + else if (!CalamityWorld.unlockedTownPig) + { + CalamityWorld.unlockedTownPig = true; + ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Mods.CalamityMod.Misc.PiggyLicense"), color); + CalamityNetcode.SyncWorld(); + } + } + } +} diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 8d617226ec..2006538ff2 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -57,6 +57,7 @@ SevensBust: Bust! SevensDoubles: Doubles! SevensTriples: Triples! StylishHammerHit: Stylish! +PiggyLicense: The license teleports away to the Piggy delivery service... GenericConsumedText: "[c/8A8A8A:You have already consumed this item]" CelestialOnionText: You have already consumed a Celestial Onion. Consuming another would distort you. SanguineTangerineText: You have already consumed a Sanguine Tangerine. Eating any more would make your blood too thick to flow. diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index ac7691f508..b22cd0f65e 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -561,6 +561,36 @@ SeaKing: { } } +TownPiggy: { + DisplayName: Town Pig + Census.SpawnCondition: Use a Pig License + + Name: { + Oolong: Oolong + Napoleon: Napoleon + Waddles: Waddles + Crenando: Crenando + Olivia: Olivia + Wilbur: Wilbur + Pumbaa: Pumbaa + Peppa: Peppa + Conan: Conan + Reuben: Reuben + Porky: Porky + Hamm: Hamm + Runt: Runt + Roko: Roko + RichardHam: Richard Ham + Curly: Curly + } + + Chat: { + 0: Oink! + 1: Squeal... + 2: Snort! + } +} + DraconicSwarmer.DisplayName: Draconic Swarmer Dragonfolly.DisplayName: Dragonfolly Shoreskipper.DisplayName: Shoreskipper diff --git a/NPCs/TownNPCs/TownPiggy.cs b/NPCs/TownNPCs/TownPiggy.cs new file mode 100644 index 0000000000..5bcaa0b61f --- /dev/null +++ b/NPCs/TownNPCs/TownPiggy.cs @@ -0,0 +1,146 @@ +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using System.Collections.Generic; +using System.Linq; +using Terraria; +using Terraria.GameContent; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.Utilities; + +namespace CalamityMod.NPCs.TownNPCs +{ + [AutoloadHead] + public class TownPiggy : ModNPC + { + public override void SetStaticDefaults() + { + Main.npcFrameCount[Type] = 8; + NPCID.Sets.ExtraFramesCount[Type] = 0; + NPCID.Sets.AttackFrameCount[Type] = 0; + NPCID.Sets.DangerDetectRange[Type] = 250; + NPCID.Sets.HatOffsetY[Type] = 6; + NPCID.Sets.ShimmerTownTransform[Type] = false; + NPCID.Sets.SpecificDebuffImmunity[Type][BuffID.Shimmer] = true; + NPCID.Sets.SpecificDebuffImmunity[Type][BuffID.Confused] = true; + NPCID.Sets.NPCFramingGroup[Type] = 8; + + NPCID.Sets.IsTownPet[Type] = true; + NPCID.Sets.CannotSitOnFurniture[Type] = false; + NPCID.Sets.TownNPCBestiaryPriority.Add(Type); + NPCID.Sets.PlayerDistanceWhilePetting[Type] = 32; + NPCID.Sets.IsPetSmallForPetting[Type] = true; + + NPCID.Sets.NPCBestiaryDrawModifiers drawModifiers = new() + { + Velocity = 0.25f, + }; + + NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, drawModifiers); + } + + public override void SetDefaults() + { + NPC.townNPC = true; + NPC.friendly = true; + NPC.width = 20; + NPC.height = 20; + NPC.aiStyle = NPCAIStyleID.Passive; + NPC.damage = 0; + NPC.defense = 0; + NPC.lifeMax = 50; + NPC.HitSound = SoundID.NPCHit1; + NPC.DeathSound = SoundID.NPCDeath1; + NPC.knockBackResist = 0.5f; + NPC.housingCategory = 1; + //AnimationType = NPCID.TownBunny; + } + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange( + [ + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Surface, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.TownPiggy") + ]); + } + + public override bool CanTownNPCSpawn(int numTownNPCs) + { + if (CalamityWorld.unlockedTownPig) + { + return true; + } + return false; + } + + public override void AI() + { + NPC.spriteDirection = NPC.direction; + } + + public override void FindFrame(int frameHeight) + { + if (NPC.velocity.X == 0) + NPC.frame.Y = 0; + else + { + if (NPC.frameCounter++ % 6 == 0) + { + NPC.frame.Y += frameHeight; + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) + { + NPC.frame.Y = frameHeight; + } + } + if (NPC.frame.Y < frameHeight) + NPC.frame.Y = frameHeight; + } + } + + public override List SetNPCNameList() => new List() + { + // Original names + this.GetLocalizedValue("Name.Curly"), + + // Reference names + this.GetLocalizedValue("Name.Oolong"), // Dragon Ball + this.GetLocalizedValue("Name.Napoleon"), // Animal Farm + this.GetLocalizedValue("Name.Waddles"), // Gravity Falls + this.GetLocalizedValue("Name.Crenando"), // Ganondorf + this.GetLocalizedValue("Name.Olivia"), // Olivia + this.GetLocalizedValue("Name.Wilbur"), // Charlotte's Web + this.GetLocalizedValue("Name.Pumbaa"), // The Lion King + this.GetLocalizedValue("Name.Peppa"), // Peppa Pig + this.GetLocalizedValue("Name.Conan"), // Conan the mighty pig + this.GetLocalizedValue("Name.Reuben"), // Minecraft: Story Mode + this.GetLocalizedValue("Name.Porky"), // Looney Tunes + this.GetLocalizedValue("Name.Hamm"), // Toy Story + this.GetLocalizedValue("Name.Runt"), // Chicken Little + this.GetLocalizedValue("Name.Roko"), // Roko's Basilisk + this.GetLocalizedValue("Name.RichardHamm"), // Pig from Clarkson's Farm named after Richard Hammond + + // Dedicated names + }; + + public override string GetChat() + { + WeightedRandom chat = new(); + + for (int i = 0; i <= 2; i++) + { + chat.Add(CalamityUtils.GetText("NPCs.TownPiggy.Chat." + i).Value); + } + + return chat; + } + + public override void SetChatButtons(ref string button, ref string button2) + { + button = Language.GetTextValue("UI.PetTheAnimal"); + } + } +} diff --git a/NPCs/TownNPCs/TownPiggy.png b/NPCs/TownNPCs/TownPiggy.png new file mode 100644 index 0000000000000000000000000000000000000000..7255ad1ca49045a640837fa8c23776dfa1129b48 GIT binary patch literal 3071 zcmXw*eLT~98^?dY{n`|>C<#qE$LUTYb0XV3txiS7h>fV2PBnTQGb~}tDejbX@{|@b zGbWl_hY)_}NDtV^tW=)0txe$&?mTtxKIgt)*B{sS_5JJndVjCi`*Z!%m+YahYo-eT zfc}2ZJ$~A50|4Nrl_>40)BcuJ+d!tD$8Mlfid6%EUfupZyC`ws=RW&%o4v9t!*5q^ zT(fZ-9A;<(3|Ap-Tmm?e<~D}`V+`hxG7)_mf>0vQA9@=!JIbmshc6dE087M*g8tdcc$o=x%Qd;kXlp!G1%32wrs@_A6 zCI7hH0#qFgxsNh}#qdt>(_8Q?x2KUjc4mBJDCyfFMGpP&@00M(>F{1&FsUO|<@=UxLkL!J~_(&d6Er1t^o!*pnmCsnu?gsnwP7XaPad1Cwlh}{_% zN4r1<{D;(~y>(YiyN(H=0ZlluJ#3EP-9R|E37{pGKBbtmEUa9yy?o#ogf|QGsQc&; zZc@#ay*horg1mr>@3s7u)Ph*(`WQ620x8{}$L?h0xBD~k-cIiCWe}5N$y4$cL*$*< zo5zW^0kxNOy2Fqhv1nW={YJ1lrJ%FvbRRpiWk4d(1gLTZpy;6`h zzL(PoRwYxJEj=TeGPY0oRl>>)rnL{Z`_t%vtk5hxe3Jp2Ri^11n{~Q@MR(9PO$FHn zs0Jcn0Py>oEfQADw@CGik8CIx9+_}Gs*3&h>$Jq&n%5Q~PWm|C<~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NFpn7rZN^^m<{1G{I`sgK-1dl@`k{an^L HB{Ts50VQAl literal 0 HcmV?d00001 diff --git a/Packets/Entities/SyncTownPigLicensePacket.cs b/Packets/Entities/SyncTownPigLicensePacket.cs new file mode 100644 index 0000000000..0b9cff6f95 --- /dev/null +++ b/Packets/Entities/SyncTownPigLicensePacket.cs @@ -0,0 +1,20 @@ +using System.IO; +using CalamityMod.Items.SummonItems.TownPets; +using CalamityMod.NPCs.Abyss; +using Terraria; + +namespace CalamityMod.Packets +{ + internal sealed class SyncTownPigLicensePacket : CalamityPacket + { + public static SyncTownPigLicensePacket Instance { get; private set; } + + public static void Send(int toClient = -1, int ignoreClient = -1) + { + var packet = Instance.CreateBasePacket(); + packet.Send(toClient, ignoreClient); + } + + public override void HandlePacket(BinaryReader packet, int sender) => PiggyLicense.SpawnPiggy(); + } +} diff --git a/Systems/World/MiscWorldStateSystem.cs b/Systems/World/MiscWorldStateSystem.cs index ba62fb4ff6..e56491b6d0 100644 --- a/Systems/World/MiscWorldStateSystem.cs +++ b/Systems/World/MiscWorldStateSystem.cs @@ -56,6 +56,7 @@ namespace CalamityMod spawnedBandit = false; foundHomePermafrost = false; + unlockedTownPig = false; catName = false; dogName = false; @@ -92,6 +93,8 @@ namespace CalamityMod downed.Add("bandit"); if (foundHomePermafrost) downed.Add("archmageHome"); + if (unlockedTownPig) + downed.Add("townPig"); #region Save Pet Names if (catName) @@ -143,6 +146,7 @@ namespace CalamityMod AcidRainEvent.AcidRainEventIsOngoing = downed.Contains("acidRain"); spawnedBandit = downed.Contains("bandit"); foundHomePermafrost = downed.Contains("archmageHome"); + unlockedTownPig = downed.Contains("townPig"); #region Load Pet Names catName = downed.Contains("catName"); @@ -295,6 +299,7 @@ namespace CalamityMod flags12[2] = downedNuclearTerror; flags12[3] = downedBossRush; flags12[4] = DraedonMechdusa; + flags12[5] = unlockedTownPig; writer.Write(flags); writer.Write(flags2); @@ -449,6 +454,7 @@ namespace CalamityMod downedNuclearTerror = flags12[2]; downedBossRush = flags12[3]; DraedonMechdusa = flags12[4]; + unlockedTownPig = flags12[5]; RecipeUnlockHandler.ReceiveData(reader); diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 8a789c3fd0..3ffb533837 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -79,6 +79,8 @@ namespace CalamityMod.World public static bool spawnedBandit = false; /// If true, the Archmage has lived in a house in this world. Solely used as a condition for dialogue. public static bool foundHomePermafrost = false; + /// If true, the Town Pig is able to move in. + public static bool unlockedTownPig = false; /// Used for allowing custom Town Cat patreon names. public static bool catName = false; From 862060864cb7dd18d7ff462826751a826c672a90 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:56:07 -0700 Subject: [PATCH 075/126] more names + text and draw fixes --- Items/SummonItems/TownPets/PiggyLicense.cs | 3 +- .../Mods.CalamityMod.Items.SummonItems.hjson | 5 +++ .../en-US/Mods.CalamityMod.NPCs.hjson | 7 ++- NPCs/TownNPCs/TownPiggy.cs | 45 ++++++++++++++++--- 4 files changed, 52 insertions(+), 8 deletions(-) diff --git a/Items/SummonItems/TownPets/PiggyLicense.cs b/Items/SummonItems/TownPets/PiggyLicense.cs index 6d0ca49cad..424e1ba178 100644 --- a/Items/SummonItems/TownPets/PiggyLicense.cs +++ b/Items/SummonItems/TownPets/PiggyLicense.cs @@ -11,8 +11,9 @@ using Terraria.ModLoader; namespace CalamityMod.Items.SummonItems.TownPets { - public class PiggyLicense : ModItem + public class PiggyLicense : ModItem, ILocalizedModType { + public new string LocalizationCategory => "Items.SummonItems"; public override string Texture => "Terraria/Images/Item_" + ItemID.LicenseBunny; public override void SetStaticDefaults() { diff --git a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson index 8423bc9f44..741ab4c05c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.SummonItems.hjson @@ -212,6 +212,11 @@ OverloadedSludge: { ''' } +PiggyLicense: { + DisplayName: Piggy License + Tooltip: Use to adopt a piggy for your town +} + Portabulb: { DisplayName: Portabulb Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index b22cd0f65e..27c092734c 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -562,8 +562,8 @@ SeaKing: { } TownPiggy: { - DisplayName: Town Pig - Census.SpawnCondition: Use a Pig License + DisplayName: Town Piggy + Census.SpawnCondition: Use a Piggy License Name: { Oolong: Oolong @@ -582,6 +582,9 @@ TownPiggy: { Roko: Roko RichardHam: Richard Ham Curly: Curly + Techno: Techo + JohnPork: John Pork + Piglet: Piglet } Chat: { diff --git a/NPCs/TownNPCs/TownPiggy.cs b/NPCs/TownNPCs/TownPiggy.cs index 5bcaa0b61f..10ef196321 100644 --- a/NPCs/TownNPCs/TownPiggy.cs +++ b/NPCs/TownNPCs/TownPiggy.cs @@ -7,6 +7,7 @@ using System.Linq; using Terraria; using Terraria.GameContent; using Terraria.GameContent.Bestiary; +using Terraria.GameContent.Events; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -23,7 +24,7 @@ namespace CalamityMod.NPCs.TownNPCs NPCID.Sets.ExtraFramesCount[Type] = 0; NPCID.Sets.AttackFrameCount[Type] = 0; NPCID.Sets.DangerDetectRange[Type] = 250; - NPCID.Sets.HatOffsetY[Type] = 6; + NPCID.Sets.HatOffsetY[Type] = -4; NPCID.Sets.ShimmerTownTransform[Type] = false; NPCID.Sets.SpecificDebuffImmunity[Type][BuffID.Shimmer] = true; NPCID.Sets.SpecificDebuffImmunity[Type][BuffID.Confused] = true; @@ -57,6 +58,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.DeathSound = SoundID.NPCDeath1; NPC.knockBackResist = 0.5f; NPC.housingCategory = 1; + DrawOffsetY = -4; //AnimationType = NPCID.TownBunny; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) @@ -82,18 +84,48 @@ namespace CalamityMod.NPCs.TownNPCs NPC.spriteDirection = NPC.direction; } + public override void PostDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + // Put a gold crown on Techno + if (NPC.GivenName == this.GetLocalizedValue("Name.Techno") && !BirthdayParty.PartyIsUp) + { + int equipID = ArmorIDs.Head.GoldCrown; + Main.instance.LoadArmorHead(equipID); + Texture2D crown = TextureAssets.ArmorHead[equipID].Value; + Rectangle crownFrame = crown.Frame(1, 20, 0, 0); + int frameHeight = TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type]; + int curFrame = NPC.frame.Y / frameHeight; + int sheetOff = curFrame switch + { + 0 => 0, + 1 => -2, + 2 => -6, + 3 => -6, + 4 => -2, + 5 => -4, + 6 => -6, + 7 => -2, + _ => 0 + }; + spriteBatch.Draw(crown, NPC.Center - screenPos + new Vector2(8 * NPC.spriteDirection, -2 + NPC.gfxOffY + sheetOff).RotatedBy(NPC.rotation), crownFrame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(crown.Width / 2, crown.Height / 40), NPC.scale, NPC.spriteDirection == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None, 0); + } + } + public override void FindFrame(int frameHeight) { if (NPC.velocity.X == 0) NPC.frame.Y = 0; else { - if (NPC.frameCounter++ % 6 == 0) + if (NPC.velocity.Y == 0) { - NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) + if (NPC.frameCounter++ % 6 == 0) { - NPC.frame.Y = frameHeight; + NPC.frame.Y += frameHeight; + if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) + { + NPC.frame.Y = frameHeight; + } } } if (NPC.frame.Y < frameHeight) @@ -122,6 +154,9 @@ namespace CalamityMod.NPCs.TownNPCs this.GetLocalizedValue("Name.Runt"), // Chicken Little this.GetLocalizedValue("Name.Roko"), // Roko's Basilisk this.GetLocalizedValue("Name.RichardHamm"), // Pig from Clarkson's Farm named after Richard Hammond + this.GetLocalizedValue("Name.Techno"), // Technoblade + this.GetLocalizedValue("Name.JohnPork"), // John Pork + this.GetLocalizedValue("Name.Piglet"), // Winnie-the-Pooh // Dedicated names }; From 4de07e33bfee4b81e071665021ba0162d759dc93 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:58:41 -0700 Subject: [PATCH 076/126] no town in name --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 27c092734c..5a6ff836fb 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -562,7 +562,7 @@ SeaKing: { } TownPiggy: { - DisplayName: Town Piggy + DisplayName: Piggy Census.SpawnCondition: Use a Piggy License Name: { From 8e8aa01d6597079c2dc309cf16539e052be82078 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 20:00:55 -0700 Subject: [PATCH 077/126] this should be lowercase --- Localization/en-US/Mods.CalamityMod.Misc.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Misc.hjson index 2006538ff2..e5222495cb 100644 --- a/Localization/en-US/Mods.CalamityMod.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Misc.hjson @@ -57,7 +57,7 @@ SevensBust: Bust! SevensDoubles: Doubles! SevensTriples: Triples! StylishHammerHit: Stylish! -PiggyLicense: The license teleports away to the Piggy delivery service... +PiggyLicense: The license teleports away to the piggy delivery service... GenericConsumedText: "[c/8A8A8A:You have already consumed this item]" CelestialOnionText: You have already consumed a Celestial Onion. Consuming another would distort you. SanguineTangerineText: You have already consumed a Sanguine Tangerine. Eating any more would make your blood too thick to flow. From f7eb74e8b00022cf17dc5b6cb31c989d93662ea7 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 20:01:39 -0700 Subject: [PATCH 078/126] techo --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 5a6ff836fb..7be074b811 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -582,7 +582,7 @@ TownPiggy: { Roko: Roko RichardHam: Richard Ham Curly: Curly - Techno: Techo + Techno: Techno JohnPork: John Pork Piglet: Piglet } From f767bacbfc82d21db644fe30a397fa2eb8eae396 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 15 Apr 2026 20:07:14 -0700 Subject: [PATCH 079/126] the minor text fixes never end --- NPCs/TownNPCs/TownPiggy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/TownNPCs/TownPiggy.cs b/NPCs/TownNPCs/TownPiggy.cs index 10ef196321..2d46b1852f 100644 --- a/NPCs/TownNPCs/TownPiggy.cs +++ b/NPCs/TownNPCs/TownPiggy.cs @@ -153,7 +153,7 @@ namespace CalamityMod.NPCs.TownNPCs this.GetLocalizedValue("Name.Hamm"), // Toy Story this.GetLocalizedValue("Name.Runt"), // Chicken Little this.GetLocalizedValue("Name.Roko"), // Roko's Basilisk - this.GetLocalizedValue("Name.RichardHamm"), // Pig from Clarkson's Farm named after Richard Hammond + this.GetLocalizedValue("Name.RichardHam"), // Pig from Clarkson's Farm named after Richard Hammond this.GetLocalizedValue("Name.Techno"), // Technoblade this.GetLocalizedValue("Name.JohnPork"), // John Pork this.GetLocalizedValue("Name.Piglet"), // Winnie-the-Pooh From 70883341cbd522dbdc7d1fa92c5faffaaf567ece Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Thu, 16 Apr 2026 01:00:46 -0400 Subject: [PATCH 080/126] Rusty Beacon Prototype 1 damage nerf To compensate for summon damage bugfix --- Items/Weapons/Summon/RustyBeaconPrototype.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/RustyBeaconPrototype.cs b/Items/Weapons/Summon/RustyBeaconPrototype.cs index b70e451dc8..992fcc965a 100644 --- a/Items/Weapons/Summon/RustyBeaconPrototype.cs +++ b/Items/Weapons/Summon/RustyBeaconPrototype.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Summon Item.width = 28; Item.height = 20; Item.mana = 10; - Item.damage = 8; + Item.damage = 7; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.HoldUp; Item.noMelee = true; From fc4f1fa36d7266cf8d49f541f88825238e5df3b0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 16 Apr 2026 18:38:55 -0400 Subject: [PATCH 081/126] Burning Sea rebalance Because I forgot about it on heldProj pierce resist exemption branch --- Items/Weapons/Magic/BurningSea.cs | 2 +- Projectiles/Magic/IncineratingFireball.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Magic/BurningSea.cs b/Items/Weapons/Magic/BurningSea.cs index 91257ae1d1..606e5db6e8 100644 --- a/Items/Weapons/Magic/BurningSea.cs +++ b/Items/Weapons/Magic/BurningSea.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 28; Item.height = 30; - Item.damage = 69; + Item.damage = 56; Item.DamageType = DamageClass.Magic; Item.mana = 8; Item.useTime = 20; diff --git a/Projectiles/Magic/IncineratingFireball.cs b/Projectiles/Magic/IncineratingFireball.cs index eee796c453..30bdd882b4 100644 --- a/Projectiles/Magic/IncineratingFireball.cs +++ b/Projectiles/Magic/IncineratingFireball.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 12; + Projectile.localNPCHitCooldown = 10; Projectile.hide = true; } @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Magic } // Can only deal damage while not fizzling out. - public override bool? CanDamage() => !Released; + public override bool? CanDamage() => !Released && Timer % Projectile.localNPCHitCooldown == 0; public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { @@ -160,6 +160,9 @@ namespace CalamityMod.Projectiles.Magic SoundEngine.PlaySound(Burn, target.Center); target.AddBuff(ModContent.BuffType(), 180); + if (damageDone > 2 && !target.Calamity().IsArmored()) + Projectile.damage = (int)(Projectile.damage * 0.7f); + // Whoa buddy no smoking allowed for (int i = 0; i < 4; i++) { From 90f9725161d9f19198cc6eda3d909478146b7a3d Mon Sep 17 00:00:00 2001 From: Big E Date: Thu, 16 Apr 2026 23:56:53 -0400 Subject: [PATCH 082/126] + Updated Scoria and Auric conditions for Greed Pot --- Tiles/GreedPotTile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tiles/GreedPotTile.cs b/Tiles/GreedPotTile.cs index 4e215b0d37..59e4550dea 100644 --- a/Tiles/GreedPotTile.cs +++ b/Tiles/GreedPotTile.cs @@ -191,11 +191,11 @@ namespace CalamityMod.Tiles { ItemID.TitaniumOre, (ModContent.ItemType(), () => CalamityServerConfig.Instance.EarlyHardmodeProgressionRework ? NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3 : NPC.downedMechBossAny) }, { ModContent.ItemType(), (ItemID.ChlorophyteOre, () => NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3) }, { ItemID.ChlorophyteOre, (ModContent.ItemType(), () => NPC.downedPlantBoss) }, - { ModContent.ItemType(), (ModContent.ItemType(), () => NPC.downedGolemBoss) }, + { ModContent.ItemType(), (ModContent.ItemType(), () => NPC.downedAncientCultist) }, { ModContent.ItemType(), (ItemID.LunarOre, () => NPC.downedMoonlord) }, { ItemID.LunarOre, (ModContent.ItemType(), () => NPC.downedMoonlord) }, { ModContent.ItemType(), (ModContent.ItemType(), () => DownedBossSystem.downedProvidence) }, - { ModContent.ItemType(), (ModContent.ItemType(), () => DownedBossSystem.downedYharon) }, + { ModContent.ItemType(), (ModContent.ItemType(), () => DownedBossSystem.downedCalamitas || DownedBossSystem.downedExoMechs) }, }; } From 5b7602d1184931d3c53b4dafdb9fa24e65ee59ad Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Thu, 16 Apr 2026 22:45:14 -0700 Subject: [PATCH 083/126] omnigun tooltip update --- .../en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson | 10 +++++----- Projectiles/Ranged/OmniGunHoldout.cs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index b8096ec320..2cf68d3d02 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -845,11 +845,11 @@ OmniGun: { DisplayName: The Omnigun Tooltip: ''' - A flexible weapon, for any occasion - The first bullet is a sniper shot that gains damage as it travels and always critically strikes - Then, unleashes a volley of 10 rapid rifle shots - After which it fires a point blank shotgun spread of bullets with extreme damage - Before reloading, the gun fires a powerful grenade that blows up everything, including you + A multipurpose weapon with several modes which are used in sequence + The first shot is a sniper round which gains damage over time and always critically strikes + The second shot is a burst of 10 standard bullets + The third shot is a devastating point blank spread + The fourth shot is a dangerous but powerful grenade which destroys everything, including you 'What kind of gun is it?' 'Yes' ''' diff --git a/Projectiles/Ranged/OmniGunHoldout.cs b/Projectiles/Ranged/OmniGunHoldout.cs index c4f6aa0401..8a36f1a7e2 100644 --- a/Projectiles/Ranged/OmniGunHoldout.cs +++ b/Projectiles/Ranged/OmniGunHoldout.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; @@ -168,8 +168,8 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * 30; #region Visuals and Sounds - SoundStyle fire = new SoundStyle("CalamityMod/Sounds/Item/GunShotHeavy"); - SoundEngine.PlaySound(fire with { Volume = 0.7f, PitchVariance = 0.1f }, Projectile.Center); + SoundStyle fire = new("CalamityMod/Sounds/Item/LauncherHeavyShot"); + SoundEngine.PlaySound(fire with { Volume = 0.8f, PitchVariance = 0.1f }, Projectile.Center); if (Main.netMode != NetmodeID.Server) { string goreType = "OmniGrenadeShell"; From ecf3e57ead7233312aeb248ae067dedea53bb8f7 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Fri, 17 Apr 2026 10:36:28 -0400 Subject: [PATCH 084/126] The name --- Localization/en-US/Mods.CalamityMod.NPCs.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 67ad331ec6..b03a5b26cf 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -353,7 +353,7 @@ Archmage: { LikeNPC_Princess: "{NPCName} has some very quaint spells. I'm quite impressed, for someone of her age." Princess_LovesNPC: "{NPCName} makes the best ice cream I've ever tasted, it's so good!" Monument: What a hideous statue! I always advocated for artistic community projects, but this... you really should have better quality control over what gets into your town! - GiftPositive: '''"How culture shaped magic" by [name]?! I thought this book was lost centuries ago! How did you find it, and how did you...?! Well, no matter! This is the perfect gift, thank you!''' + GiftPositive: '''"How culture shaped magic" by Medomaion of Stratia?! I thought this book was lost centuries ago! How did you find it, and how did you...?! Well, no matter! This is the perfect gift, thank you!''' GiftNegative: Could you please explain what your last gift was? You made an attempt on my life by trying to freeze me!? You better have a good explanation about how a snowstorm made its way inside that box! } } From e985468e6d637774c3acc76f9813e2176b2793fc Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 20:41:33 -0400 Subject: [PATCH 085/126] Bananarang, Flower of Frost, Laser Rifle balance --- Items/CalamityGlobalItemTweaks.cs | 6 +++--- Projectiles/CalamityGlobalProjectileTweaks.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 14b50af115..634199d82a 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items { ItemID.Anchor, Do(DamageExact(107), UseExact(30)) }, // VANILLA: 70 DMG, 20 UT { ItemID.AntlionClaw, Do(UseExact(10)) }, // Mandible Blade. VANILLA: 18 UT { ItemID.AquaScepter, Do(DamageRatio(0.9f)) }, // VANILLA: 27 DMG. Uses ratios due to remix seed - { ItemID.Bananarang, Do(DamageExact(76), UseExact(14)) }, // VANILLA: 45 DMG, 11 UT + { ItemID.Bananarang, Do(DamageExact(60)) }, // VANILLA: 45 DMG { ItemID.BatScepter, Do(DamageExact(50)) }, // VANILLA: 45 DMG { ItemID.BeamSword, Do(UseMeleeSpeed, DamageExact(131), UseAnimationExact(40), KnockbackExact(8)) }, // VANILLA: 52 DMG, 20 UT, 6.5 KB { ItemID.BeeGun, Do(DamageExact(11), ManaExact(4)) }, // VANILLA: 9 DMG, 5 MANA @@ -117,7 +117,7 @@ namespace CalamityMod.Items { ItemID.Flamelash, Do(DamageExact(36), ManaExact(18)) }, // VANILLA: 32 DMG, 21 MANA { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL { ItemID.FlowerofFire, Do(DamageRatio(0.78f), ManaExact(7)) }, // VANILLA: 48 DMG, 12 MANA. Uses ratios due to remix seed - { ItemID.FlowerofFrost, Do(DamageExact(70), UseExact(22), ManaExact(7), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 12 UT, 11 MANA, 9 VEL + { ItemID.FlowerofFrost, Do(DamageExact(49), ManaExact(7), ShootSpeedExact(14)) }, // VANILLA: 60 DMG, 11 MANA, 9 VEL { ItemID.FlyingKnife, Do(DamageExact(53)) }, // VANILLA: 40 DMG { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) }, // VANILLA: 49 DMG { ItemID.Gatligator, Do(UseExact(6)) }, // VANILLA: 7 UT @@ -147,7 +147,7 @@ namespace CalamityMod.Items { ItemID.KOCannon, Do(DamageRatio(2.65f)) }, // VANILLA: 40 DMG. Uses ratios due to remix seed { ItemID.Kraken, Do(DamageExact(65)) }, // VANILLA: 95 DMG { ItemID.LaserMachinegun, Do(DamageExact(49)) }, // VANILLA: 60 DMG - { ItemID.LaserRifle, Do(DamageExact(46), UseExact(10), ManaExact(4)) }, // VANILLA: 29 DMG, 12 UT, 8 MANA + { ItemID.LaserRifle, Do(DamageExact(41), UseExact(10), ManaExact(4)) }, // VANILLA: 29 DMG, 12 UT, 8 MANA { ItemID.LastPrism, Do(DamageExact(57), ManaExact(10)) }, // VANILLA: 100 DMG, 12 MANA { ItemID.LeadShortsword, Do(TrueMelee, DamageExact(11)) }, // VANILLA: 9 DMG { ItemID.LeafBlower, Do(DamageExact(61)) }, // VANILLA: 48 DMG diff --git a/Projectiles/CalamityGlobalProjectileTweaks.cs b/Projectiles/CalamityGlobalProjectileTweaks.cs index 2559da088c..951a42a51b 100644 --- a/Projectiles/CalamityGlobalProjectileTweaks.cs +++ b/Projectiles/CalamityGlobalProjectileTweaks.cs @@ -188,6 +188,7 @@ namespace CalamityMod.Projectiles { ProjectileID.PalladiumDrill, standardDrillTweaks }, { ProjectileID.PartyBullet, Do(ExtraUpdatesDelta(+2), DefaultIDStaticIFrames) }, { ProjectileID.PurpleCounterweight, counterweightTweaks }, + { ProjectileID.PurpleLaser, Do(LocalIFrames(10 * 5)) }, // Laser Rifle, accounting for extra updates { ProjectileID.QueenSlimeGelAttack, Do(NoPiercing) }, { ProjectileID.QueenSlimeMinionPinkBall, Do(NoPiercing) }, { ProjectileID.RedCounterweight, counterweightTweaks }, @@ -491,7 +492,6 @@ namespace CalamityMod.Projectiles { ProjectileID.PulseBolt, defaultIFrames }, { ProjectileID.PureSpray, defaultIFrames }, { ProjectileID.PurificationPowder, defaultIFrames }, - { ProjectileID.PurpleLaser, defaultIFrames }, { ProjectileID.PygmySpear, defaultIFrames }, { ProjectileID.QuarterNote, defaultIFrames }, { ProjectileID.RainbowFlare, defaultIFrames }, From edb2db3d55512332b4760104d341de56e053e21d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 21:42:11 -0400 Subject: [PATCH 086/126] Meteor Staff nerf --- Items/CalamityGlobalItemTweaks.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 634199d82a..b93e7c0cd2 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -158,7 +158,7 @@ namespace CalamityMod.Items { ItemID.Marrow, Do(DamageExact(60)) }, // VANILLA: 53 DMG { ItemID.MedusaHead, Do(DamageExact(75), ManaExact(6)) }, // VANILLA: 40 DMG, 15 MANA { ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) }, // VANILLA: 200 DMG - { ItemID.MeteorStaff, Do(DamageExact(58), ManaExact(7), ShootSpeedExact(13f)) }, // VANILLA: 50 DMG, 9 MANA, 10 VEL + { ItemID.MeteorStaff, Do(ManaExact(7), ShootSpeedExact(13f)) }, // VANILLA: 9 MANA, 10 VEL { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG From 163b1bb473a935379b0f6d4ff0e3256853c892b5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 17 Apr 2026 22:04:02 -0400 Subject: [PATCH 087/126] A few boss changes around mech tier * Decreased health and DR of Cryogen's Shield * Increased delay between Retinazer's charges, and decreased velocity of Spazmatism's charges, in phase 1 * Twins no longer fire projectiles during phase 2 transition in Death * Spazmatism no longer gains speed when its target is farther away during flamethrower attack * Retinazer is much slower in the time before it charges * Skeletron Prime skull spins have a smaller radius, and are now forced to trigger if it hasn't triggered for 4.5 seconds to prevent stalling the AI * Skeletron Prime missile attack now occurs after spinning charges instead of before --- NPCs/Cryogen/CryogenShield.cs | 4 +- .../Bosses/SkeletronPrimeAI.cs | 21 +++++----- NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 41 +++---------------- 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index a2befaa003..fc2faaee99 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -32,8 +32,8 @@ namespace CalamityMod.NPCs.Cryogen NPC.width = 216; NPC.height = 216; NPC.scale *= (CalamityWorld.death || BossRushEvent.BossRushActive || Main.getGoodWorld) ? 0.8f : 1f; - NPC.DR_NERD(0.4f); - NPC.LifeMaxNERB(2800, 3360, 33600); + NPC.DR_NERD(0.25f); + NPC.LifeMaxNERB(2500, 3000, 30000); NPC.Opacity = 0f; NPC.HitSound = Cryogen.HitSound; NPC.DeathSound = BreakSound; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 870dd18391..972bc16f13 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -155,18 +155,19 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Start other phases; if arms are dead, start with spin phase if (phase2 || Main.getGoodWorld || allArmsDead) { - // Start spin phase after 1.5 seconds + // Start spin phase after 1.5 seconds if close enough; forced after 4.5 seconds NPC.ai[2] += phase3 ? 1.5f : 1f; if (NPC.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f))) { - bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[NPC.target].position.Y - 320f && - Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 400f; + bool shouldSpinAround = NPC.ai[1] == 4f && ((NPC.position.Y < Main.player[NPC.target].position.Y - 320f && + Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[NPC.target].Center, NPC.Center) > 400f) || + NPC.ai[2] >= (270f - (death ? 15f * (1f - lifeRatio) : 0f))); if (shouldSpinAround || NPC.ai[1] != 4f) { if (shouldSpinAround) { - NPC.localAI[3] = 300f; + NPC.localAI[3] = 200f; NPC.localAI[1] = 0; NPC.SyncVanillaLocalAI(); } @@ -309,7 +310,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { CalamityUtils.CalamityTargeting(NPC, CalamityTargetingParameters.BossDefaults); NPC.ai[2] = 0f; - NPC.ai[1] = 4f; + // Fly overhead and spit missiles if on low health + NPC.ai[1] = phase3 ? 6f : 4f; NPC.localAI[0] = 0f; } @@ -475,7 +477,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Spin for about 3 seconds // Decreasing this number will INCREASE how fast he moves while spinning - float spinVelocity = 30f; + float spinVelocity = 25f; if (NPC.ai[2] == 2f) { // Play angry noise @@ -540,8 +542,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); - // Fly overhead and spit missiles if on low health - NPC.ai[1] = phase3 ? 6f : 1f; + NPC.ai[1] = 1f; NPC.ai[2] = 0f; NPC.localAI[3] = 0f; NPC.localAI[0] = 0f; @@ -590,8 +591,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (NPC.localAI[0] >= totalMissiles) { - NPC.ai[1] = 0f; - NPC.ai[2] = 0f; + NPC.ai[1] = 4f; + NPC.ai[2] = -60f; NPC.localAI[3] = 0f; calamityGlobalNPC.newAI[0] = 0f; NPC.localAI[0] = 0f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index f30880b7a5..227077741e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else NPC.rotation = NPC.velocity.ToRotation() - MathHelper.PiOver2; - float delayBeforeChargingAgain = death ? 48f : 56f; + float delayBeforeChargingAgain = death ? 50f : 60f; if (NPC.ai[2] >= delayBeforeChargingAgain) { NPC.ai[3] += 1f; @@ -314,21 +314,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.rotation += NPC.ai[2]; NPC.ai[1] += 1f; - if (death && NPC.ai[2] >= 0.2f) - { - if (NPC.ai[1] % 10f == 0f) - { - SoundEngine.PlaySound(SoundID.Item33, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ProjectileID.DeathLaser; - - Vector2 projectileVelocity = NPC.rotation.ToRotationVector2() * 7f; - float offset = 90f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.Normalize(projectileVelocity) * offset, projectileVelocity, type, LaserDamage.CalculateMechDamage(), 0f, Main.myPlayer); - } - } - } if (NPC.ai[1] == 100f) { @@ -620,7 +605,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else if (NPC.ai[1] == 4f) { float chargeLineUpDistance = spazAlive ? 600f : 500f; - float chargeSpeed = (death ? 20f : 18f) + (death ? 1.5f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float chargeSpeed = death ? 5f : 3f; float chargeAcceleration = death ? 0.495f : 0.45f; if (spazAlive) @@ -844,7 +829,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Rotation and velocity NPC.rotation = hoverRotation; - float chargeSpeed = death ? 19.25f + (phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))) : 18f; + float chargeSpeed = 16f; + if (death) + chargeSpeed += (phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))); if (Main.getGoodWorld) chargeSpeed *= 1.2f; @@ -935,20 +922,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses NPC.rotation += NPC.ai[2]; NPC.ai[1] += 1f; - if (death && NPC.ai[2] >= 0.2f) - { - if (NPC.ai[1] % 10f == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = NPC.ai[1] % 20f == 0f ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); - - Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * 16f + Main.rand.NextVector2CircularEdge(3f, 3f); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 50f, projectileVelocity, type, FireballDamage.CalculateMechDamage(), 0f, Main.myPlayer, 0f, 1f); - Main.projectile[proj].tileCollide = false; - } - } - } if (NPC.ai[1] == 100f) { @@ -1025,10 +998,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!NPC.IsMechQueenUp) { - // Boost speed if too far from target - if (distanceFromDestination > distanceFromTarget) - maxVelocity += MathHelper.Lerp(0f, 6f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); - if (Main.getGoodWorld) { maxVelocity *= 1.15f; From 9b61912513a4ace6c3e9a072d048bf96e50e7162 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Sat, 18 Apr 2026 22:53:17 -0400 Subject: [PATCH 088/126] May as well remove Meteor Staff's shot speed boost too --- Items/CalamityGlobalItemTweaks.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 926751fd9f..6c3f6d090c 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -156,7 +156,6 @@ namespace CalamityMod.Items { ItemID.Marrow, Do(DamageExact(60)) }, // VANILLA: 53 DMG { ItemID.MedusaHead, Do(DamageExact(75)) }, // VANILLA: 40 DMG { ItemID.Meowmere, Do(UseMeleeSpeed, DamageExact(240)) }, // VANILLA: 200 DMG - { ItemID.MeteorStaff, Do(ShootSpeedExact(13f)) }, // VANILLA: 10 VEL { ItemID.MiniNukeI, Do(DamageExact(90)) }, // VANILLA: 75 DMG { ItemID.MiniNukeII, Do(DamageExact(90)) }, { ItemID.Minishark, Do(DamageExact(4)) }, // VANILLA: 6 DMG From 59c579ed874f2369092ee6729046a3eb63b3b3f9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 10:45:16 -0400 Subject: [PATCH 089/126] Clothier bad Gift dialogue That should be every happiness report dialogue line done --- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 129040f31a..19a6f0fa3a 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -440,7 +440,7 @@ TownNPCMood: { Clothier: { Monument: I think I am becoming too old to understand this... "modern art". GiftPositive: There was a simple bell in that gift, but its ring was simply extraordinary. Perhaps this means I truly believe... - GiftNegative: placeholder + GiftNegative: Can we get serious now? No one warned me! No one said "You are about to receive the most wretched gift in history". No one could train for that! } Cyborg: { From 08af8c2344e5b8d80ff62758b60e55f2c12d0f02 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 11:13:44 -0400 Subject: [PATCH 090/126] Monument dialogue overrides content dialogue --- Items/Tools/TheGift.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 62071ed9e9..f37aa319be 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -78,6 +78,7 @@ namespace CalamityMod.Items.Tools // The Monument lowers happiness by a fixed amount. This is not applied to the Tax Collector. if (npc.type != NPCID.TaxCollector && gtnpc.SearchForTheMonument(npc)) { + float oldHappiness = self._currentPriceAdjustment; self._currentPriceAdjustment += TheMonument.MonumentHappinessReduction; self.LimitAndRoundMultiplier(self._currentPriceAdjustment); string dialogueKey; @@ -93,7 +94,12 @@ namespace CalamityMod.Items.Tools var modNPC = NPCLoader.GetNPC(npc.type); dialogueKey = $"Mods.{modNPC.Mod.Name}.NPCs.{modNPC.Name}.TownNPCMood.Monument"; } - self._currentHappiness += Language.Exists(dialogueKey) ? Language.GetTextValue(dialogueKey) : CalamityUtils.GetTextValue("Vanilla.TownNPCMood.DefaultMonument") + " "; + + // If the NPC is content, it should override that text because they are no longer content + if (oldHappiness == 1f) + self._currentHappiness = Language.Exists(dialogueKey) ? Language.GetTextValue(dialogueKey) : CalamityUtils.GetTextValue("Vanilla.TownNPCMood.DefaultMonument") + " "; + else + self._currentHappiness += Language.Exists(dialogueKey) ? Language.GetTextValue(dialogueKey) : CalamityUtils.GetTextValue("Vanilla.TownNPCMood.DefaultMonument") + " "; } // The Gift sets happiness to a fixed either extremely high or extremely low value, depending on its random state. From 39699346fcce767b5d0f5c2c85225f0c32473c4b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 16:01:59 -0400 Subject: [PATCH 091/126] Concoction's easter egg tooltip functions repeatedly --- Items/Potions/TheConcoction.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index d6ef4c1c8c..2a47600a27 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -43,26 +43,25 @@ namespace CalamityMod.Items.Potions } + public override void UpdateInventory(Player player) + { + wasHovering = Main.HoverItem?.type == Type; + } + // Display different text for the first 10 frames of hovering over the item's tooltip. - // Only works once after loading the mod. public override void ModifyTooltips(List tooltips) { bool isHovering = Main.HoverItem?.type == Type; if (isHovering && !wasHovering) hoverTimer = 0; - if (isHovering) hoverTimer++; - wasHovering = isHovering; - if (hoverTimer <= 10 && hoverTimer > 0) { TooltipLine healLine = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "HealLife"); - - if (healLine != null) - healLine.Text = this.GetLocalization("EasterEggText").Value; + healLine?.Text = this.GetLocalization("EasterEggText").Value; } } } From 3963ea99ddcf6a93349c1a20b8544fc6e3ca8adb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 17:32:30 -0400 Subject: [PATCH 092/126] Rev FTW Brain inherits flipped gravity in phase 2 Also fixed blood scythes not drawing in reverse gravity --- .../Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs | 2 ++ Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs index a41c9c6511..f011ff78bd 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhu/BrainOfCthulhuAI.cs @@ -352,6 +352,8 @@ public class BrainOfCthulhuAI : VanillaAIOverride NPC.defense = NPC.defDefense; NPC.chaseable = (AIState != BrainAIState.IllusionDash && AIState != BrainAIState.IllusionTrick); + if (Main.getGoodWorld && AIState >= BrainAIState.Phase2TransitionOpen) + NPC.brainOfGravity = NPC.whoAmI; } else NPC.defense = (int)(NPC.defDefense * Phase1DefenseMultiplier); diff --git a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs index 93eef1ad99..083822adac 100644 --- a/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs +++ b/Projectiles/Boss/BrainOfCthulhu/BloodScythe.cs @@ -91,12 +91,9 @@ public class BloodScythe : ModProjectile, ILocalizedModType public override bool PreDraw(ref Color lightColor) { - Main.spriteBatch.SetBlendState(BlendState.Additive); Texture2D tex = TextureAssets.Projectile[Type].Value; Vector2 drawPos = Projectile.Center - Main.screenPosition; - Color drawColor = Color.Red; - if (!ChildSafety.Disabled) - drawColor = Main.DiscoColor; + Color drawColor = (ChildSafety.Disabled ? Color.Red : Main.DiscoColor) with { A = 0 }; for (int i = 0; i < (CalamityClientConfig.Instance.Afterimages ? Projectile.oldPos.Length : 1); ++i) { @@ -107,11 +104,9 @@ public class BloodScythe : ModProjectile, ILocalizedModType // DO NOT REMOVE THESE "UNNECESSARY" FLOAT CASTS. THIS WILL BREAK THE AFTERIMAGES. float interpolant = ((float)(Projectile.oldPos.Length - i) / (float)Projectile.oldPos.Length); - Main.spriteBatch.Draw(tex, drawPos, null, drawColor, afterimageRot, tex.Size() * 0.5f, Projectile.scale * interpolant, SpriteEffects.None, 0f); + Main.EntitySpriteDraw(tex, drawPos, null, drawColor, afterimageRot, tex.Size() * 0.5f, Projectile.scale * interpolant, SpriteEffects.None); } - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - return false; } } From 597242f299a99c611c16afe377848266f4600708 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 19 Apr 2026 17:45:01 -0400 Subject: [PATCH 093/126] full functionality --- Buffs/Potions/SwinesWrathBuff.cs | 18 ++++++++++++++++++ CalPlayer/CalamityPlayerHitHurt.cs | 4 ---- CalPlayer/CalamityPlayerLifeRegen.cs | 1 - Items/Potions/TheConcoction.cs | 15 ++++++++------- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/Buffs/Potions/SwinesWrathBuff.cs b/Buffs/Potions/SwinesWrathBuff.cs index 92edea91c7..873555d6c3 100644 --- a/Buffs/Potions/SwinesWrathBuff.cs +++ b/Buffs/Potions/SwinesWrathBuff.cs @@ -1,8 +1,10 @@ using CalamityMod.DataStructures; +using CalamityMod.Items.Potions; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent; using Terraria.Graphics.Shaders; @@ -13,6 +15,8 @@ namespace CalamityMod.Buffs.Potions { public class SwinesWrathBuff : ModBuff { + public static readonly SoundStyle TimerSound = new("CalamityMod/Sounds/Custom/TickingTimer"); + public override void SetStaticDefaults() { Main.debuff[Type] = true; @@ -20,5 +24,19 @@ namespace CalamityMod.Buffs.Potions Main.buffNoSave[Type] = false; BuffID.Sets.NurseCannotRemoveDebuff[Type] = true; } + + public override void Update(Player player, ref int buffIndex) + { + TheConcoctionPlayer concoctionPlayer = player.GetModPlayer(); + + if (concoctionPlayer.swinesWrathCounter < 2 && concoctionPlayer.swinesWrathCounter != -1) + { + player.KillMe(PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SwinesWrath" + Main.rand.Next(1, 7 + 1)).ToNetworkText(player.name)), 1000, -1); + concoctionPlayer.swinesWrathCounter = -1; + } + + else if (concoctionPlayer.swinesWrathCounter % 60 == 59) + SoundEngine.PlaySound(TimerSound with { Volume = ((600f - concoctionPlayer.swinesWrathCounter) / 600f) }, player.Center); // Gets louder as time progresses + } } } diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index ac6286e34b..033c481b03 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -404,10 +404,6 @@ namespace CalamityMod.CalPlayer { damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.AstralInfection" + Main.rand.Next(1, 3 + 1)).ToNetworkText(Player.name)); } - if (Player.HasBuff()) - { - damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.SwinesWrath" + Main.rand.Next(1, 7 + 1)).ToNetworkText(Player.name)); - } if (nightwither) { damageSource = PlayerDeathReason.ByCustomReason(CalamityUtils.GetText("Status.Death.Nightwither").ToNetworkText(Player.name)); diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 3773def38e..92dc2c7a96 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -139,7 +139,6 @@ namespace CalamityMod.CalPlayer ApplyDoTDebuff(banishingFire, 60); // Never inflicted on the player int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 80 : 16) / (eleResist ? 2 : 1); ApplyDoTDebuff(auricRebuke, rebukeDoT); - ApplyDoTDebuff(Player.HasBuff(), 30); // Slowly increase the sulphuric water poisoning effect. Once it's high enough, the player takes damage and the meter resets. bool nearSafeZone = false; diff --git a/Items/Potions/TheConcoction.cs b/Items/Potions/TheConcoction.cs index 2a47600a27..0c9ebf0c0c 100644 --- a/Items/Potions/TheConcoction.cs +++ b/Items/Potions/TheConcoction.cs @@ -6,6 +6,7 @@ using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -39,7 +40,7 @@ namespace CalamityMod.Items.Potions public override void OnConsumeItem(Player player) { TheConcoctionPlayer cocPlayer = player.GetModPlayer(); - cocPlayer.framesTilSwinesWrath = 600; + cocPlayer.swinesWrathCounter = 1200; // Creates a 10 second delay before the buff is visible (triggers at 600) } @@ -68,17 +69,17 @@ namespace CalamityMod.Items.Potions public class TheConcoctionPlayer : ModPlayer { - public int framesTilSwinesWrath = -1; - + public int swinesWrathCounter = -1; + public override void PostUpdate() { - if (framesTilSwinesWrath > 0) + if (swinesWrathCounter > 0) { - framesTilSwinesWrath--; + swinesWrathCounter--; - if (framesTilSwinesWrath == 0) + if (swinesWrathCounter <= 600 && !Player.HasBuff()) // When there is 10 seconds left { - Player.AddBuff(ModContent.BuffType(), 3600); + Player.AddBuff(ModContent.BuffType(), 600); SoundEngine.PlaySound(new SoundStyle("CalamityMod/Sounds/Item/SwinesWrathProc"), Player.Center); } From da72984a5c28dd0419001b051dcb691dcaa1a14e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 20:05:59 -0400 Subject: [PATCH 094/126] Removed unused Trasher kill condition --- Localization/en-US/Mods.CalamityMod.Condition.hjson | 1 - 1 file changed, 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Condition.hjson b/Localization/en-US/Mods.CalamityMod.Condition.hjson index 7655748378..b757a152d4 100644 --- a/Localization/en-US/Mods.CalamityMod.Condition.hjson +++ b/Localization/en-US/Mods.CalamityMod.Condition.hjson @@ -47,7 +47,6 @@ Drops: { Drops if Providence was defeated only with the [i:CalamityMod/ProfanedSoulArtifact] Profaned Soul Artifact {$Bestiary_ItemDropConditions.IsExpert} ''' - TrasherKill: Mods.CalamityMod.Condition.Drops.TrasherKill } // Other conditions From e0f4d907c0cd1b57176e42c7cbdce52fadaf216a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 20:17:11 -0400 Subject: [PATCH 095/126] Removed unused using --- CalPlayer/CalamityPlayerHitHurt.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 033c481b03..d00a4d970a 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -4,7 +4,6 @@ using CalamityMod.Balancing; using CalamityMod.Buffs.Cooldowns; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.Placeables; -using CalamityMod.Buffs.Potions; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.CalPlayer.Dashes; From dc3eaf84d8d538ad352b35e42f518e2463506b0e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 19 Apr 2026 22:23:31 -0400 Subject: [PATCH 096/126] Vouchers use Item.CommonMaxStack instead of 9999 Fixed a typo in The Sandwich's tooltip and clarified one of its lines Swine's Wrath is not a persistent buff --- Items/Tools/TinkerersVoucher.cs | 10 +++++----- .../en-US/Mods.CalamityMod.Items.Potions.hjson | 4 ++-- Systems/Collections/CalamityBuffSets.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index 901f4e85c6..c61afcffee 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -224,7 +224,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; - Item.maxStack = 9999; + Item.maxStack = Item.CommonMaxStack; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -280,7 +280,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; - Item.maxStack = 9999; + Item.maxStack = Item.CommonMaxStack; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -309,7 +309,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; - Item.maxStack = 9999; + Item.maxStack = Item.CommonMaxStack; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -336,7 +336,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; - Item.maxStack = 9999; + Item.maxStack = Item.CommonMaxStack; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) @@ -365,7 +365,7 @@ namespace CalamityMod.Items.Tools Item.height = 20; Item.rare = ItemRarityID.Green; Item.value = CalamityGlobalItem.RarityGreenBuyPrice; - Item.maxStack = 9999; + Item.maxStack = Item.CommonMaxStack; } public override bool CanApply(Player player, Item itemBeingReforged, bool isAccessory) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index a17ff8bec2..4d9c10c876 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -471,9 +471,9 @@ TheSandwich: { ''' A sandwich made of the finest bread, cheese, and fish in the land! Minor reductions to all stats - {0}% increased damage for every alcohol you are effected by + {0}% increased damage for every alcohol you are affected by Allows you to drink 2 more alcohols than normal - Alcohol effects don't deteriorate while under the effects of The Sandwich + Alcohol effects will not expire while under the effects of The Sandwich 'Might actually taste good if it was the only thing you'd ever eaten...' ''' } diff --git a/Systems/Collections/CalamityBuffSets.cs b/Systems/Collections/CalamityBuffSets.cs index 451029c9e7..03d2a977f1 100644 --- a/Systems/Collections/CalamityBuffSets.cs +++ b/Systems/Collections/CalamityBuffSets.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Systems.Collections BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), - BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); + BuffType(), BuffType(), BuffType(), BuffType(), BuffType(), BuffType()); /// /// If for a buff type, then that buff is considered to be a debuff.
From 95ff066a8a92a5c73df16b13d5f35401f610296c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 20 Apr 2026 11:29:34 -0400 Subject: [PATCH 097/126] 1 - The Monument sprites 2 - Small edit to Party Girl's Monument dialogue 3 - Properly made Gift and Monument not affect NPCs that don't use happiness 4 - The Monument appears on the minimap and creates gold dust when broken --- Items/Placeables/Furniture/TheMonument.cs | 3 ++- Items/Placeables/Furniture/TheMonument.png | Bin 0 -> 1382 bytes Items/Tools/TheGift.cs | 8 +++++-- .../en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- Tiles/Furniture/TheMonumentTile.cs | 22 ++++++++++++------ Tiles/Furniture/TheMonumentTile.png | Bin 0 -> 4606 bytes 6 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 Items/Placeables/Furniture/TheMonument.png create mode 100644 Tiles/Furniture/TheMonumentTile.png diff --git a/Items/Placeables/Furniture/TheMonument.cs b/Items/Placeables/Furniture/TheMonument.cs index 4643b7b48d..4f57836dea 100644 --- a/Items/Placeables/Furniture/TheMonument.cs +++ b/Items/Placeables/Furniture/TheMonument.cs @@ -9,7 +9,6 @@ namespace CalamityMod.Items.Placeables.Furniture public class TheMonument : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Placeables"; - public override string Texture => "Terraria/Images/Item_1177"; //Placeholder public const float MonumentTaxIncrease = 0.5f; public const float MonumentHappinessReduction = 0.15f; @@ -17,6 +16,8 @@ namespace CalamityMod.Items.Placeables.Furniture public override void SetDefaults() { Item.DefaultToPlaceableTile(ModContent.TileType()); + Item.width = 40; + Item.height = 50; Item.rare = ItemRarityID.Pink; Item.value = Item.buyPrice(gold: 5); } diff --git a/Items/Placeables/Furniture/TheMonument.png b/Items/Placeables/Furniture/TheMonument.png new file mode 100644 index 0000000000000000000000000000000000000000..ba34a00847c6b9ac6c8e7de66b11c5506c34ec89 GIT binary patch literal 1382 zcmV-s1)2JZP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1p7%uK~!i%<(ge+ z990;GpQ@;!BKQ|t#WgfWj9!$GZW|(1kS#*MNG(<&Hi$PW(V!^kVrU_<3Kk_8%$3Nt z!KPA+6>`%>sI9?f8v{bkMNEn7PbK(AQK1TUy%=9}=Ic4Tp(wZ~&(+TCnc2zvp6}yj2M)tn<%5x5@pQS6)5h9VgD$q4*qlq4%nk zGB1z)bj}z&N=soKcWmwlV9)A@0l2le!8^`6W2yH%@jB3-e-eO^!W-cE%R6qqunN%k z;Pvil4uA9`06ixz0ieCJ6M!AR90uU7JFj*|Lvj3D0H(kAGj;#vK1X~GNZHZXHmA-% z{>&k8l+rknS$!#ZVnCcaSq9*#$9AR8SH3#~p8MAOeG#t%n%f(*w}D3ijg#`7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a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -42,9 +42,9 @@ namespace CalamityMod.Items.Tools { foreach (NPC n in Main.ActiveNPCs) { - // Don't run this code for the Traveling Merchant and Skeleton Merchant because they aren't affected by happiness + // Don't run this code for NPCs that aren't affected by happiness // Also don't run this if The Gift has already been used on this NPC; they all will hold grudges against you :) - if (!n.isLikeATownNPC || n.type == NPCID.TravellingMerchant || n.type == NPCID.SkeletonMerchant || + if (!n.isLikeATownNPC || NPCID.Sets.NoTownNPCHappiness[n.type] || NPCID.Sets.IsTownPet[n.type] || n.GetGlobalNPC().TheGiftStatus.HasValue) continue; @@ -74,6 +74,10 @@ namespace CalamityMod.Items.Tools { orig(self, player, npc); + // Immediately exit early if it's Remix world, or if it's an NPC that should not be affected by happiness + if (Main.remixWorld || NPCID.Sets.NoTownNPCHappiness[npc.type] || NPCID.Sets.IsTownPet[npc.type]) + return; + var gtnpc = npc.GetGlobalNPC(); // The Monument lowers happiness by a fixed amount. This is not applied to the Tax Collector. if (npc.type != NPCID.TaxCollector && gtnpc.SearchForTheMonument(npc)) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 19a6f0fa3a..6112f7085b 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -516,7 +516,7 @@ TownNPCMood: { } PartyGirl: { - Monument: Yeeesh, we're gonna have an ugly statue of that grump around? That like, totally kills the party mood around here. + Monument: Yeeesh, we're gonna have an ugly statue of big money around? That like, totally kills the party mood around here. GiftPositive: PARTY GIFTS? FOR ME? Oh just you wait, I'm gonna throw the BIGGEST party this town has ever seen, forever and always! GiftNegative: I knew you were trouble when you walked in that suspicious looking box! It's too late now to say sorry! } diff --git a/Tiles/Furniture/TheMonumentTile.cs b/Tiles/Furniture/TheMonumentTile.cs index a5510f44ff..79a9999633 100644 --- a/Tiles/Furniture/TheMonumentTile.cs +++ b/Tiles/Furniture/TheMonumentTile.cs @@ -1,7 +1,9 @@ using CalamityMod.Items.Placeables.Furniture; +using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; using Terraria.Enums; +using Terraria.ID; using Terraria.ModLoader; using Terraria.ObjectData; @@ -9,21 +11,27 @@ namespace CalamityMod.Tiles.Furniture { public class TheMonumentTile : ModTile { - public override string Texture => "CalamityMod/Tiles/Furniture/Monoliths/BlueDistortedMonolithTile"; //Placeholder public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); - TileObjectData.newTile.Width = 5; - TileObjectData.newTile.Height = 5; - TileObjectData.newTile.Origin = new Point16(2, 4); - TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16, 16, 18 }; + TileObjectData.newTile.Width = 7; + TileObjectData.newTile.Height = 8; + TileObjectData.newTile.Origin = new Point16(3, 7); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16, 16, 16, 16, 16, 16 }; + TileObjectData.newTile.DrawYOffset = 2; TileObjectData.newTile.LavaDeath = false; TileObjectData.newTile.UsesCustomCanPlace = true; - TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, 5, 0); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop, TileObjectData.newTile.Width, 0); - AnimationFrameHeight = TileObjectData.newTile.CoordinateFullHeight; TileObjectData.addTile(Type); + AddMapEntry(new Color(239, 205, 54), CalamityUtils.GetItemName()); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Gold); + return false; } } } diff --git a/Tiles/Furniture/TheMonumentTile.png b/Tiles/Furniture/TheMonumentTile.png new file mode 100644 index 0000000000000000000000000000000000000000..79c67d6ac4c830080d6581d562d6d2e755152a1b GIT binary patch literal 4606 zcmXX~dpr~R`*%*K8_JRUB}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K~S`SYR(4aKp zL;kBeMUzg_n_*k_a32a+3iAvC^)ETZiBho@_-Ub(Yp<;e6~B?yah6D)l@fOxn9_aH zFUc(R8fD6t|8*-NrTX?n#pH7AfTyY5jDKUAP^nVq2bh!$H3qJoyF?CfS3{H$GI-%d zMa2fML**~lBN98A1I^~QBn)r-JCoPIQcDb9lt2~m$X%L2qxv=oKdTIk`rq_sG+_=+ zZM0?0@GrIU@zTVir{uDKlGeLL%Q0)Am-j3sxu4V_KAEHC*I3n}&ZMxR-lCB( zjYAjc-Pg@oB}XcH`0!{STlS}-$)Ws>Uu0eP4Io-K6T_C~AFZ+dy4vvjV~f9{3!mus z3⋘UKtqKK6S}>Qtg^h?Fa2h_Guzdggq4}30ih%jh(Suv8w#L{kwm4ue|{s9dG%U z465)WZOyewf|mpLE`K;Ess~umdJg`rQ4g}X2kO28VV_TdD62P+O7 zv=pmKC(uTD%cHrWtm1#YfG@oWl%{@5_1-rdup|7S*! Date: Mon, 20 Apr 2026 11:33:01 -0500 Subject: [PATCH 098/126] Requested Fixes --- .../en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- Projectiles/Rogue/ProfanedPartisanFlare.cs | 7 ------- Projectiles/Rogue/ProfanedPartisanProj.cs | 3 +-- Projectiles/Rogue/ProfanedPartisanSpear.cs | 1 - 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index 3896c3f79d..12aebc932d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -360,7 +360,7 @@ EclipsesFall: { ''' Throws a javelin that shatters into fragments of primordial light upon enemy hits If more than 20 fragments exist, the oldest fragments will seek out enemies to attack - Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration,] gaining power based on the number of fragments + Stealth strikes coalesce fragments into [ceffect/darksun:Spear of Obscuration], gaining power based on the number of fragments [ceffect/darksun:Spear of Obscuration] will pierce though any enemy hit by Eclipse's Fall [ceffect/darksun:'When the sun goes dark, all will know terror'] ''' diff --git a/Projectiles/Rogue/ProfanedPartisanFlare.cs b/Projectiles/Rogue/ProfanedPartisanFlare.cs index 0d30035773..67c7ae2fd4 100644 --- a/Projectiles/Rogue/ProfanedPartisanFlare.cs +++ b/Projectiles/Rogue/ProfanedPartisanFlare.cs @@ -37,17 +37,10 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 3; - Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 30; Projectile.timeLeft = 600; Projectile.tileCollide = false; - Projectile.scale = 1f; - } - - public override bool? CanHitNPC(NPC target) - { - return true; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index cdf91a2dd2..9566169f98 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -162,11 +162,10 @@ namespace CalamityMod.Projectiles.Rogue Projectile.timeLeft = ExplodeTime; } bool strongSplit = Main.projectile.Any(x => x.active && x.owner == Projectile.owner && x.type == Projectile.type && x.ai[0] == (target.whoAmI + 1)); - int splitType = strongSplit ? ModContent.ProjectileType() : ModContent.ProjectileType(); if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, splitType, 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); diff --git a/Projectiles/Rogue/ProfanedPartisanSpear.cs b/Projectiles/Rogue/ProfanedPartisanSpear.cs index 76b9fae7af..ae6f980748 100644 --- a/Projectiles/Rogue/ProfanedPartisanSpear.cs +++ b/Projectiles/Rogue/ProfanedPartisanSpear.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.ignoreWater = true; Projectile.DamageType = RogueDamageClass.Instance; Projectile.penetrate = 5; - Projectile.extraUpdates = 0; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.timeLeft = 600; From 8fc95ed775b7b331e746fbe73ba0633ac8360aa0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 20 Apr 2026 15:49:57 -0400 Subject: [PATCH 099/126] The Gift updated visual effect Fixed it being able to affect multiple NPCs at once Fixed HealingPlus particle drawing position and cleaned up its code --- Items/Tools/TheGift.cs | 41 ++++++++++++++++++++++---------- Particles/HealingPlus.cs | 12 ++-------- Sounds/Custom/BadGiftBuzzer.ogg | Bin 0 -> 10222 bytes 3 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 Sounds/Custom/BadGiftBuzzer.ogg diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 6a24c27213..0b77753bfb 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -3,6 +3,7 @@ using CalamityMod.NPCs; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; @@ -14,7 +15,7 @@ namespace CalamityMod.Items.Tools { public new string LocalizationCategory => "Items.Tools"; public override string Texture => "Terraria/Images/Item_601"; //Placeholder - + public static readonly SoundStyle BadBuzzer = new SoundStyle("CalamityMod/Sounds/Custom/BadGiftBuzzer") with { Volume = 0.85f }; public override void SetDefaults() { Item.width = Item.height = 20; @@ -44,26 +45,42 @@ namespace CalamityMod.Items.Tools { // Don't run this code for NPCs that aren't affected by happiness // Also don't run this if The Gift has already been used on this NPC; they all will hold grudges against you :) - if (!n.isLikeATownNPC || NPCID.Sets.NoTownNPCHappiness[n.type] || NPCID.Sets.IsTownPet[n.type] || - n.GetGlobalNPC().TheGiftStatus.HasValue) + if (!n.isLikeATownNPC || NPCID.Sets.NoTownNPCHappiness[n.type] || NPCID.Sets.IsTownPet[n.type] || n.GetGlobalNPC().TheGiftStatus.HasValue) continue; if (Item.Hitbox.Intersects(n.Hitbox)) { + bool positive = Main.rand.NextBool(); + Color c = positive ? Color.Green : Color.Red; + SoundEngine.PlaySound(positive ? SoundID.ResearchComplete : BadBuzzer, n.Center); + n.GetGlobalNPC().TheGiftStatus = positive; + n.GetGlobalNPC().TheGiftReset = 0.0; + + // Visual effect to demonstrate that something happened + for (int i = 0; i < 6; i++) + { + Vector2 spawnPos = n.Center + Main.rand.NextVector2Circular(30f, 30f); + HealingPlus s = new(spawnPos, 0.5f, (spawnPos - n.Center).SafeNormalize(Vector2.Zero) * 0.65f, c, c * 0.2f, 25) + { + Rotation = positive ? 0f : MathHelper.PiOver4 + }; + GeneralParticleHandler.SpawnParticle(s); + } + for (int j = 0; j < 4; j++) + { + Vector2 spawnPos = n.Center + Main.rand.NextVector2Circular(50f, 50f); + Vector2 arrVel = -Vector2.UnitY * 0.6f * positive.ToDirectionInt(); + StatChangeArrow arr = new(spawnPos, arrVel, -MathHelper.PiOver2 * positive.ToDirectionInt(), c, c * 0.1f, 0.7f, 40); + GeneralParticleHandler.SpawnParticle(arr); + } + Item.active = false; Item.type = ItemID.None; Item.stack = 0; if (Main.dedServ) NetMessage.SendData(MessageID.SyncItem, -1, -1, null, Item.whoAmI); - - bool positive = Main.rand.NextBool(); - Color c = positive ? Color.Green : Color.Red; - n.GetGlobalNPC().TheGiftStatus = positive; - n.GetGlobalNPC().TheGiftReset = 0.0; - - // Placeholder visual effect - HealingPlus s = new(n.Center, 2f, Vector2.Zero, c, c, 40); - GeneralParticleHandler.SpawnParticle(s); + // Make sure it can't apply to multiple NPCs at once + break; } } } diff --git a/Particles/HealingPlus.cs b/Particles/HealingPlus.cs index 4a4de6232b..fbb88cf9f1 100644 --- a/Particles/HealingPlus.cs +++ b/Particles/HealingPlus.cs @@ -12,11 +12,8 @@ namespace CalamityMod.Particles public override bool UseCustomDraw => true; public override bool SetLifetime => true; - public Player Owner; public Color StartColor; public Color EndColor; - public Vector2 OverridePosition; - public float Opacity; public HealingPlus(Vector2 position, float scale, Vector2 velocity, Color colorStart, Color colorEnd, int lifetime) { @@ -34,20 +31,15 @@ namespace CalamityMod.Particles { Color = Color.Lerp(StartColor, EndColor, LifetimeCompletion); Lighting.AddLight(Position, Color.ToVector3() * 0.2f); - Opacity -= 0.5f; } public override void CustomDraw(SpriteBatch spriteBatch) { Texture2D tex = ModContent.Request(Texture).Value; - Vector2 Size = new Vector2(Scale); + Vector2 origin = new Vector2(tex.Width, tex.Height) * 0.5f; - Vector2 origin = new Vector2(tex.Width, tex.Height); - - Vector2 PositionAdjust = new Vector2(-16, -40); - - spriteBatch.Draw(tex, Position - Main.screenPosition - PositionAdjust, null, Color, Rotation, origin, Size, SpriteEffects.None, 0); + spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, origin, Size, SpriteEffects.None, 0); } } diff --git a/Sounds/Custom/BadGiftBuzzer.ogg b/Sounds/Custom/BadGiftBuzzer.ogg new file mode 100644 index 0000000000000000000000000000000000000000..16cb4134e443147f1a5394429f5c2ba87e097173 GIT binary patch literal 10222 zcmd6Lc|4Te`~PjHh!Co=RK!@bM_Eg@B*SEDQkbM^NMjOZiP0ik8cP~m4U#Rg?=7f= zkdcr|j3tJ`D9ilLjO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?_+LyoUo*SD2QDly~~#DY97z82R7y7yC- zE*VPqe^KPqJ@Dt!(o&Vw1?;LVBTvlC zwvPBjA=;7gW|H|SuQRjkzd(=WfOMc_$ma8fzY6QBXB^&Wx}G-3*a*4-(DTu?90%ih zAxhTf!%R;3kq1^IbOxwWze5LTHUl9a(r*2ciZK+QD`sbY9H7-E{{X0GEqitK&+5tg z3!41*XSx?BryQ?EeYcsmjrvyCGE>^%H2l9F_JB=6?WJ}!i<13O4JEME=NQBG$+%A0 z%;RZiXS)4wpG~+onR7w$wlKJ&Y@eu=I$Op?PR(eHXFR9dXRGe?r_4WZe0}wyujrn> z4#dw|r^C#^dFS|A;`Dd^mQ_m*R^+(4zZV|Pef8|YO2${0B8AN8YU1ty>HYg< z_utt>Z(={qtv|NxLcHmpT#uoi Date: Mon, 20 Apr 2026 14:55:46 -0500 Subject: [PATCH 100/126] Profaned Partisan fix oops --- Projectiles/Rogue/ProfanedPartisanProj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index 9566169f98..c223a5504f 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -165,7 +165,7 @@ namespace CalamityMod.Projectiles.Rogue if (!strongSplit) for (var i = 0; i < 3; i++) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2().RotatedBy((i-1)*0.25f + Main.rand.NextFloat(-0.1f,0.1f)) * 10, ModContent.ProjectileType(), 0, Projectile.knockBack, Projectile.owner, 0f, 0f); p.localNPCImmunity[target.whoAmI] = 60; } target.AddBuff(ModContent.BuffType(), 180); From 54279b77e0cd8736fee14b669e846e08ee54cf8f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 21 Apr 2026 15:02:58 -0400 Subject: [PATCH 101/126] Dao of Pow and Flower Pow stuff --- ILEditing/BalancingILChanges.cs | 26 ++++++++++++++++++++ ILEditing/ILChangesLoading.cs | 3 ++- ILEditing/VanillaStupidityFixingILChanges.cs | 9 ------- Items/CalamityGlobalItemTweaks.cs | 3 ++- Projectiles/CalamityGlobalProjectile.cs | 21 ++++------------ 5 files changed, 35 insertions(+), 27 deletions(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 2e0e15714d..79d59de031 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -401,6 +401,32 @@ namespace CalamityMod.ILEditing } #endregion + #region Flail Balance Changes + // Make flails be unaffected by player velocity + private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self) + { + orig(self); + if (self.ai[0] == 1f && self.ai[1] == 0f) + self.velocity -= Main.player[self.owner].velocity; + } + + // Increase Flower Pow's return speed + private static void IncreaseFlowerPowRetSpeed(ILContext il) + { + var cursor = new ILCursor(il); + // Move to where Flower Pow receives its specific flail stat changes. This moves it after num2 = 23f + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdcR4(23f), i => i.MatchStloc(6))) + { + LogFailure("Flower Pow Buff", "Could not move to Flower Pow's specific flail stat changes."); + return; + } + + // Emit an instruction setting num5 (the return speed) to 21. Vanilla is 16 + cursor.Emit(OpCodes.Ldc_R4, 21f); + cursor.Emit(OpCodes.Stloc, 9); + } + #endregion + #region Terrarian Projectile Limitation for Extra Updates private static void LimitTerrarianProjectiles(ILContext il) { diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index d5fb8e25e0..91b569a05b 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -106,6 +106,8 @@ namespace CalamityMod.ILEditing IL_NPC.ScaleStats_ApplyExpertTweaks += RemoveExpertHardmodeScaling; IL_Projectile.Damage += VanillaBossResistChanges; IL_Projectile.AI_099_2 += LimitTerrarianProjectiles; + On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity; + IL_Projectile.AI_015_Flails += IncreaseFlowerPowRetSpeed; IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs; On_Player.ConsumeSolarFlare += SolarWingsDashChange; On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable; @@ -150,7 +152,6 @@ namespace CalamityMod.ILEditing IL_Item.TryGetPrefixStatMultipliersForItem += RelaxPrefixRequirements; On_NPC.SlimeRainSpawns += PreventBossSlimeRainSpawns; On_ShimmerTransforms.IsItemTransformLocked += AdjustShimmerRequirements; - On_Projectile.AI_015_Flails += FlailsNoLongerAffectedByPlayerVelocity; IL_Projectile.AI_061_FishingBobber += WhitelistVictideBobber; On_Player.ItemCheck_CheckFishingBobbers += PreventVictideBobberFromJamming; diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 8b11dcb9e3..3c04413d31 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -318,15 +318,6 @@ namespace CalamityMod.ILEditing } #endregion - #region Remove Flail Throw Velocity Being Affected By Player Velocity - private static void FlailsNoLongerAffectedByPlayerVelocity(On_Projectile.orig_AI_015_Flails orig, Projectile self) - { - orig(self); - if (self.ai[0] == 1f && self.ai[1] == 0f) - self.velocity -= Main.player[self.owner].velocity; - } - #endregion - #region Allow Victide Bobber to Exist private static void WhitelistVictideBobber(ILContext il) { diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6c3f6d090c..a9f8fbccc5 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -95,7 +95,7 @@ namespace CalamityMod.Items { ItemID.DarkLance, Do(TrueMelee, DamageExact(40)) }, // VANILLA: 34 DMG { ItemID.DartRifle, Do(DamageExact(58)) }, // VANILLA: 52 DMG { ItemID.DayBreak, Do(DamageExact(125), UseExact(22)) }, // VANILLA: 150 DMG, 16 UT - { ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // VANILLA: 39 DMG. Compensation for removing aerial multiplier + { ItemID.DD2BetsyBow, Do(DamageExact(42)) }, // Aerial Bane. VANILLA: 39 DMG. Compensation for removing aerial multiplier { ItemID.DD2SquireBetsySword, Do(UseMeleeSpeed, DamageExact(150)) }, // Flying Dragon. VANILLA: 180 DMG { ItemID.DeadlySphereStaff, Do(DamageExact(50)) }, // VANILLA: 40 DMG { ItemID.DeathSickle, Do(UseMeleeSpeed, DamageExact(65), ShootSpeedExact(15f)) }, // VANILLA: 57 DMG, 9 VEL @@ -116,6 +116,7 @@ namespace CalamityMod.Items { ItemID.Flamelash, Do(DamageExact(36)) }, // VANILLA: 32 DMG { ItemID.Flamethrower, Do(DamageExact(21), ShootSpeedDelta(+3f)) }, // VANILLA: 35 DMG, 7 VEL { ItemID.FlowerofFire, Do(DamageRatio(0.78f)) }, // VANILLA: 48 DMG. Uses ratios due to remix seed + { ItemID.FlowerPow, Do(DamageExact(80)) }, // Displays as 160 damage. VANILLA: 65 DMG (displays as 130) { ItemID.FlyingKnife, Do(DamageExact(53)) }, // VANILLA: 40 DMG { ItemID.Frostbrand, Do(UseMeleeSpeed, DamageExact(88)) }, // VANILLA: 49 DMG { ItemID.Gatligator, Do(UseExact(6)) }, // VANILLA: 7 UT diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 27cf467b25..ae36681da7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -3876,20 +3876,14 @@ namespace CalamityMod.Projectiles } #region Flail Extendo Hacks - // Very hacky solution for making Dao of Pow's flail throw travel farther and faster + // Very hacky solution for making Dao of Pow's flail throw travel faster if (projectile.type == ProjectileID.TheDaoofPow) { // Guide to ai[0]: // 0: Spinning. 1: Being thrown. 2: Return after throw. 6: Dropped on ground. 4: Return after being dropped. if (projectile.ai[0] == 1f) { - if (projectile.ai[1] > 0f) - { - projectile.ai[2]++; - if (projectile.ai[2] <= 11f) // When ai[1] reaches 14, it starts returning, so this makes it take an extra 11 frames to return - projectile.ai[1]--; - } - else + if (projectile.ai[1] == 0f) projectile.velocity *= 1.33f; } } @@ -3911,15 +3905,10 @@ namespace CalamityMod.Projectiles { if (projectile.ai[0] == 1f) { - if (projectile.ai[1] > 0f) - { - projectile.ai[2]++; - if (projectile.ai[2] <= 5f) // When ai[1] reaches 12, it starts returning, so this makes it take an extra 5 frames to return - projectile.ai[1]--; - } - else - projectile.velocity *= 1.33f; + if (projectile.ai[1] == 0f) + projectile.velocity *= 1.25f; } + // Return speed is also increased using an IL edit, because why does it have a slower return speed than Dao of Pow??? } #endregion From 03c85b47c293b3aba6009f956edb6d6c4bebf4e8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 21 Apr 2026 18:48:35 -0400 Subject: [PATCH 102/126] A very Critiqual operation --- Items/Placeables/Furniture/Paintings/ThankYouPainting.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs index 7c80aef75f..99b52e7168 100644 --- a/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/Paintings/ThankYouPainting.cs @@ -61,6 +61,7 @@ namespace CalamityMod.Items.Placeables.Furniture.Paintings "Cooper", "CosmaticMango", "CrabBar", + "Critaquil", "Dandy", "Dia", "Done", From 0ee961fe28c4c22de43224eae9a3aa7a65eeaf5d Mon Sep 17 00:00:00 2001 From: Karina Date: Wed, 22 Apr 2026 01:40:36 -0500 Subject: [PATCH 103/126] Nerfs to auric tier true melee --- Items/Weapons/Melee/Orderbringer.cs | 2 +- Items/Weapons/Melee/PhotonRipper.cs | 2 +- Projectiles/Melee/PhotonRipperProjectile.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 50a43e3b0f..99fbf3df9e 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -154,7 +154,7 @@ namespace CalamityMod.Items.Weapons.Melee { if (spawnTrueMeleeProj) { - int beamDamage = player.CalcIntDamage(Item.damage * 0.35f); + int beamDamage = player.CalcIntDamage(Item.damage * 0.10f); Vector2 mouseClamped = player.ClampedMouseWorld(); SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f) }, player.Center); for (int i = 0; i < 2; i++) diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index ca5701977f..2eba6a7244 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 134; Item.height = 54; - Item.damage = 3725; + Item.damage = 1400; Item.crit = 18; Item.knockBack = 12f; Item.useTime = 5; diff --git a/Projectiles/Melee/PhotonRipperProjectile.cs b/Projectiles/Melee/PhotonRipperProjectile.cs index 9f2f91ffb2..e50e1eeff4 100644 --- a/Projectiles/Melee/PhotonRipperProjectile.cs +++ b/Projectiles/Melee/PhotonRipperProjectile.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public Player Owner => Main.player[Projectile.owner]; public const float ZeroChargeDamageRatio = 0.36f; - public const float ToothDamageRatio = 0.1666667f; + public const float ToothDamageRatio = 0.5f; public const int ToothShootRate = 5; // One chainsaw tooth is emitted every this many frames. public const int ChargeUpTime = 150; public ref float Time => ref Projectile.ai[0]; From ed3ed60c532d4b2e52a56e17c8a0453c5ca11e26 Mon Sep 17 00:00:00 2001 From: Big E Date: Wed, 22 Apr 2026 10:05:13 -0400 Subject: [PATCH 104/126] + Rename + Tooltip --- Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 9a1d0c9ad1..80b21975f0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -4697,6 +4697,6 @@ MossyStone: { } GreedPot: { - DisplayName: Greed Pot - Tooltip: "" + DisplayName: Urn of Avarice + Tooltip: Offer your treasures to the Urn, and your avarice may at last be satiated } From c2071380f25013f0b5da01977849a74c4d37858f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 22 Apr 2026 20:37:45 -0500 Subject: [PATCH 105/126] Finished! --- Gores/LemonNadePin.png | Bin 420 -> 410 bytes Items/Weapons/Rogue/LemonNade.cs | 14 +++++-------- Items/Weapons/Rogue/LemonNade.png | Bin 540 -> 556 bytes Projectiles/Rogue/LemonNadeHoldout.cs | 23 ++++++++++------------ Projectiles/Rogue/LemonNadeProjectile.cs | 7 ++++--- Projectiles/Rogue/LemonNadeProjectile.png | Bin 533 -> 0 bytes 6 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 Projectiles/Rogue/LemonNadeProjectile.png diff --git a/Gores/LemonNadePin.png b/Gores/LemonNadePin.png index ce1c8c583cebdcd82131fe94d74501ed45960047..bf59dbedf1ffa908a214b8e6ed033073f10473a6 100644 GIT binary patch delta 143 zcmZ3&Jd0VeGr-TCmrII^fq{Y7)59eQNOOQN2Q!fTe9>>`L`5I2LktXjhZsdQyc#B! zm+^fnV`O*%l!nj~e@D4$D}GnEablkW)S~L?;uszopr0BXf3;s5{u delta 153 zcmbQmyo6b?Gr-TCmrII^fq{Y7)59eQNQ(in3)NY8il-#VFZe$KFbLg0cMd4d zS>O>_%)r2R2!t6$HM|-o&M)KpRL02g0%#qCo~+CmRj;l1UERiseF{*|WKS2z5DWjQ zm%RB{6ggM|q<(S~|Nrf`D)aK@ptd8e`<66m)XrP9``SA@OQDOUhX36g438-Yy%ZAM zthIUO?wj4#N>a|Er)&LmHp>Zy&bT>8aAs?D(9sSqW94T$cLYO1SrXr6C@U@UcPL16 zoyXCy*kmTK!$fbxaxIr@D~tqhF1~+4s;FOU%ZHss-3?dy_BqZMlYhaz<%rnZm5Qq$ Q0o}*o>FVdQ&MBb@047a>IRF3v delta 319 zcmZ3(GKWR6Gr-TCmrII^fq{Y7)59eQNQ(in6bCbqY*`UgG*M9@PCdXU#8oQBA?!}B zW>0u;q7b*P=8bKN&u_T&OG@dY|(LJXHIyF93?xd%8G=Xax6O zxXs0E$iWhD{o|}J|Mzd-k(bH6_RSuaa}AzLj)!-w`^+XR>n{F%#>|~vGZ`J0OpHuP za=3ct%-z_QjHClPN{3=YkJLUp!*R7^Ye?vIAxrrmlYj5x*u3air}63)j57~xZQFlm wM*6pTJNE@I;M${5@M!PsdlrSF^G!Yocg6{&PS_<92y_dBr>mdKI;Vst0AR;|H~;_u diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 25385d1b39..97d11361fc 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -1,13 +1,10 @@ using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Terraria; using Terraria.Audio; -using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -16,7 +13,7 @@ namespace CalamityMod.Projectiles.Rogue public class LemonNadeHoldout : BaseSwordHoldoutProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; - public override string Texture => "CalamityMod/Projectiles/Rogue/LemonNadeProjectile"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/LemonNade"; public override bool useMeleeSpeed => false; public override bool useMeleeSize => false; public override int swingWidth => 180; @@ -26,13 +23,11 @@ namespace CalamityMod.Projectiles.Rogue public override int StartupTime { get; set; } public override int CooldownTime { get; set; } - bool isChannelable = false; - int explodeTimer = 0; public override void Defaults() { - Projectile.width = 22; Projectile.height = 28; + Projectile.width = 22; Projectile.height = 28; Projectile.MaxUpdates = 4; Projectile.noEnchantmentVisuals = true; Projectile.DamageType = RogueDamageClass.Instance; @@ -69,12 +64,13 @@ namespace CalamityMod.Projectiles.Rogue explodeTimer++; else { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal).hostile = true; + if (Main.myPlayer == Projectile.owner) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal).hostile = true; Projectile.Opacity = 0; return; } - cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); + cplayer.rogueStealth = Projectile.Opacity <= 0 ? 0 : Math.Max(cplayer.temporaryStealthMax, cplayer.rogueStealthMax) * MathHelper.Clamp(explodeTimer / stealthTime, 0f, 1f); if (timer == 1) { @@ -83,7 +79,7 @@ namespace CalamityMod.Projectiles.Rogue if (!Main.dedServ) { SoundEngine.PlaySound(SoundID.DD2_JavelinThrowersAttack with { pitch = 1f }); - Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.position, Vector2.UnitY * -8 + angle, Mod.Find("LemonNadePin").Type, 1); + Gore.NewGore(Projectile.GetSource_FromAI(), Projectile.Center, Vector2.UnitY * -8 + angle, Mod.Find("LemonNadePin").Type, 1); } } @@ -97,7 +93,7 @@ namespace CalamityMod.Projectiles.Rogue } // Code copied from Violence / Chalice. float bloodVelMult = 1; - if (Main.rand.NextFloat() < explodeTimer/explodeTimeGoal && Projectile.Opacity > 0 && Projectile.FinalExtraUpdate()) + if (Main.rand.NextFloat() < explodeTimer / explodeTimeGoal && Projectile.Opacity > 0 && Projectile.FinalExtraUpdate()) { int bloodLifetime = Main.rand.Next(5, 15); float bloodScale = Main.rand.NextFloat(0.6f, 0.8f); @@ -121,7 +117,7 @@ namespace CalamityMod.Projectiles.Rogue { if (Projectile.owner == Main.myPlayer && Projectile.Opacity > 0) { - var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10 * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer-30, explodeTimeGoal); + var p = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10 * cplayer.rogueVelocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer - 25, explodeTimeGoal); if (player.Calamity().StealthStrikeAvailable()) { p.Calamity().stealthStrike = true; @@ -129,7 +125,8 @@ namespace CalamityMod.Projectiles.Rogue } Projectile.Opacity = 0; } - } + } + Projectile.rotation += MathHelper.PiOver2 * Projectile.spriteDirection; } public override float SwingFunction() diff --git a/Projectiles/Rogue/LemonNadeProjectile.cs b/Projectiles/Rogue/LemonNadeProjectile.cs index a6e8c07c41..b34e7dceb8 100644 --- a/Projectiles/Rogue/LemonNadeProjectile.cs +++ b/Projectiles/Rogue/LemonNadeProjectile.cs @@ -12,6 +12,7 @@ namespace CalamityMod.Projectiles.Rogue public class LemonNadeProjectile : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/LemonNade"; public override void SetStaticDefaults() { @@ -71,11 +72,11 @@ namespace CalamityMod.Projectiles.Rogue { if (AIState == 1) Projectile.damage = Projectile.originalDamage; - if (Projectile.Calamity().stealthStrike) + if (Projectile.Calamity().stealthStrike && Main.myPlayer == Projectile.owner) { var frags = 6f; for (var i = 0; i < frags; i++) - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitY.RotatedBy(i / frags * MathHelper.TwoPi) * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 0, 20, 1); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.UnitY.RotatedBy(i / frags * MathHelper.TwoPi) * -10, ModContent.ProjectileType(), Projectile.damage/2, Projectile.knockBack, Projectile.owner, 0, 20, 1); } Projectile.Resize(360, 360); Projectile.ResetLocalNPCHitImmunity(); @@ -130,7 +131,7 @@ namespace CalamityMod.Projectiles.Rogue public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.width < 100) - modifiers.SetMaxDamage(1); + modifiers.SourceDamage *= 0.1f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) diff --git a/Projectiles/Rogue/LemonNadeProjectile.png b/Projectiles/Rogue/LemonNadeProjectile.png deleted file mode 100644 index 7a95d74f7930f4d67973b7f4d85fdfda1b4883c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 533 zcmeAS@N?(olHy`uVBq!ia0vp^Vn8gz!3-pWKJL#4QjEnx?oJHr&dIz4a#+$GeH|GX zHuiJ>Nn{1`6$5-iT%}?h!tUg1_JsE)3UTXd-q@!2{D#Y?Z|Pe)C6moTX7l*oeg>qt zOM?7@|HA=;mp|htpfG2FM`SSr1K(i~W;~w1A_XWYQQ{g=5}cn_Ql40p$`Fv4nOCCc z=Nh75s%NNYnUi7PJ2av3CK2N zWMU8i(osO1+0FtM&jPYRAOVO$`e8Jhr3}C@nZVA#0#spOWNg5=0Aeag2kQceNmGDq z5MTnD!vt0tWN86pL3J4#7=UDb&L8kl?Z3VN$ZYU*aSYK2?!Dm6*KEMU67cw={@(wM zs}C*+N{s6Yzjk{S+^^`6W{Z6-RYhJ_EjCio4a1bvC7>4aH4l>`r4U4Wth1A=Txj+ gChvFVs6Fo=*3#vIj%&`@yMf&0>FVdQ&MBb@07~tVbN~PV From 8bec4d458e33388b4f163f99b9c528e5c26f02af Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 22 Apr 2026 20:41:43 -0500 Subject: [PATCH 106/126] Tooltip update --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index cb3588e998..bf1fc2fda9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -343,6 +343,7 @@ DuststormInABottle: { Throws a bottle filled with high-pressure dust that shatters on impact with a target or after a short delay Hold to generate stealth, but cause the bottle to shatter sooner Stealth strikes cause the bottle to leak dust clouds around it for a few seconds instead of shattering + Will shatter in your hand if charge it for too long ''' } @@ -1006,6 +1007,7 @@ SealedSingularity: { Hold to generate stealth, but burn through the bomb's fuse After the field collapses, the singularity seeks out the strongest target that it hit and explodes Stealth strikes increase the size and duration of the damaging field + Will explode in your hand if you hold the fuse too long ''' } @@ -1414,6 +1416,7 @@ LemonNade: { Disables normal stealth generation Hold to pull the pin and generate stealth, and release to throw The longer it is held, the shorter the fuse once the 'nade is thrown + Will explode in your hand if the fuse is held too long Stealth strikes explode into exploding lemon seeds 'Burn their house down!' ''' From 010ae531312a727c1728b1040be5050c9a7bbbd8 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 22 Apr 2026 20:45:18 -0500 Subject: [PATCH 107/126] hey buddy, you forgot to check... --- Projectiles/Rogue/DuststormInABottleHoldout.cs | 3 ++- Projectiles/Rogue/DuststormInABottleProj.cs | 7 +++---- Projectiles/Rogue/SealedSingularityHoldout.cs | 3 ++- Projectiles/Rogue/SealedSingularityProjectile.cs | 15 ++++++++------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index 29abfd2e10..c4a3b37fcc 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -63,7 +63,8 @@ namespace CalamityMod.Projectiles.Rogue explodeTimer++; else { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, -1).hostile = true; + if (Main.myPlayer == Projectile.owner) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, -1).hostile = true; Projectile.Opacity = 0; return; } diff --git a/Projectiles/Rogue/DuststormInABottleProj.cs b/Projectiles/Rogue/DuststormInABottleProj.cs index f75cba91c7..4b3f248cf1 100644 --- a/Projectiles/Rogue/DuststormInABottleProj.cs +++ b/Projectiles/Rogue/DuststormInABottleProj.cs @@ -30,8 +30,6 @@ namespace CalamityMod.Projectiles.Rogue Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } - - int targetID = -1; ref float Timer => ref Projectile.ai[0]; ref float TimerMax => ref Projectile.ai[1]; ref float AIState => ref Projectile.ai[2]; @@ -52,7 +50,7 @@ namespace CalamityMod.Projectiles.Rogue if (AIState == 1) { - if (Timer % 10 == 0) + if (Timer % 10 == 0 && Main.myPlayer == Projectile.owner) { Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Main.rand.NextVector2Circular(5, 5), ModContent.ProjectileType(), (int)(Projectile.damage * 0.5f), Projectile.knockBack, Projectile.owner); } @@ -61,7 +59,8 @@ namespace CalamityMod.Projectiles.Rogue { if (!Stealth) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); + if (Main.myPlayer == Projectile.owner) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner); Projectile.Kill(); return; } diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index f46343d2a1..3cd095f28c 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -61,7 +61,8 @@ namespace CalamityMod.Projectiles.Rogue explodeTimer++; else { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, 1).hostile = true; + if (Main.myPlayer == Projectile.owner) + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, angle * -10, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, explodeTimer, explodeTimeGoal, 1).hostile = true; Projectile.Opacity = 0; return; } diff --git a/Projectiles/Rogue/SealedSingularityProjectile.cs b/Projectiles/Rogue/SealedSingularityProjectile.cs index 553e7c166d..a3d2e00f8f 100644 --- a/Projectiles/Rogue/SealedSingularityProjectile.cs +++ b/Projectiles/Rogue/SealedSingularityProjectile.cs @@ -150,12 +150,13 @@ namespace CalamityMod.Projectiles.Rogue Timer = 0; TimerMax = 300; Projectile.ResetLocalNPCHitImmunity(); - for (int index = 0; index < 3; ++index) - { - float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); - } + if (Main.myPlayer == Projectile.owner) + for (int index = 0; index < 3; ++index) + { + float SpeedX = -Projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + float SpeedY = -Projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center.X + SpeedX, Projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), 20, 0f, Projectile.owner, index, 0f); + } Projectile.velocity = Vector2.Zero; SoundEngine.PlaySound(CeaselessVoid.DeathSound with { pitch = 1f, Volume = Stealth ? 0.5f : 0.2f }, Projectile.Center); } @@ -214,7 +215,7 @@ namespace CalamityMod.Projectiles.Rogue { if (field == null) { - var texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole",AssetRequestMode.ImmediateLoad).Value; + var texture = ModContent.Request("CalamityMod/Projectiles/Rogue/SealedSingularityBlackhole", AssetRequestMode.ImmediateLoad).Value; field = new Texture2D(Main.graphics.GraphicsDevice, texture.Width, texture.Height); var BaseArray = new Color[field.Width * field.Height]; From e19260f935ede1677d547816cb5cdc8b64484354 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 22 Apr 2026 21:29:55 -0500 Subject: [PATCH 108/126] fixes --- Items/Weapons/Rogue/LemonNade.cs | 4 ++-- Items/Weapons/Rogue/SealedSingularity.cs | 5 +++-- .../en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Rogue/LemonNade.cs b/Items/Weapons/Rogue/LemonNade.cs index e9d323f2c9..478b7623da 100644 --- a/Items/Weapons/Rogue/LemonNade.cs +++ b/Items/Weapons/Rogue/LemonNade.cs @@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityGreenBuyPrice; + Item.rare = ItemRarityID.Green; Item.UseSound = SoundID.Item1; Item.channel = true; Item.shootSpeed = 13f; diff --git a/Items/Weapons/Rogue/SealedSingularity.cs b/Items/Weapons/Rogue/SealedSingularity.cs index 7bf4dd94dd..74846f81a0 100644 --- a/Items/Weapons/Rogue/SealedSingularity.cs +++ b/Items/Weapons/Rogue/SealedSingularity.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Melee.Spears; using CalamityMod.Projectiles.Rogue; +using CalamityMod.Rarities; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; @@ -24,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Rogue Item.useAnimation = 30; Item.useStyle = ItemUseStyleID.Swing; Item.knockBack = 3; - Item.value = CalamityGlobalItem.RarityLightRedBuyPrice; - Item.rare = ItemRarityID.LightRed; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); Item.UseSound = SoundID.Item1; Item.channel = true; Item.shootSpeed = 13f; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson index bf1fc2fda9..f048628a44 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Rogue.hjson @@ -343,7 +343,7 @@ DuststormInABottle: { Throws a bottle filled with high-pressure dust that shatters on impact with a target or after a short delay Hold to generate stealth, but cause the bottle to shatter sooner Stealth strikes cause the bottle to leak dust clouds around it for a few seconds instead of shattering - Will shatter in your hand if charge it for too long + Will shatter in your hand if charged for too long ''' } From 480bef68566dbff53de97b929b409beb143ed00b Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:08:58 -0700 Subject: [PATCH 109/126] final assets --- ...{PiggyLicense.cs => TheHousingContract.cs} | 3 +- .../TownPets/TheHousingContract.png | Bin 0 -> 445 bytes .../en-US/Mods.CalamityMod.Bestiary.hjson | 1 + .../Mods.CalamityMod.Items.SummonItems.hjson | 10 ++--- .../en-US/Mods.CalamityMod.NPCs.hjson | 6 +-- NPCs/TownNPCs/TownPiggy.cs | 38 ++++++++++++++---- NPCs/TownNPCs/TownPiggy.png | Bin 3071 -> 3797 bytes NPCs/TownNPCs/TownPiggy_Head.png | Bin 275 -> 426 bytes Packets/Entities/SyncTownPigLicensePacket.cs | 2 +- 9 files changed, 42 insertions(+), 18 deletions(-) rename Items/SummonItems/TownPets/{PiggyLicense.cs => TheHousingContract.cs} (93%) create mode 100644 Items/SummonItems/TownPets/TheHousingContract.png diff --git a/Items/SummonItems/TownPets/PiggyLicense.cs b/Items/SummonItems/TownPets/TheHousingContract.cs similarity index 93% rename from Items/SummonItems/TownPets/PiggyLicense.cs rename to Items/SummonItems/TownPets/TheHousingContract.cs index 424e1ba178..c646795033 100644 --- a/Items/SummonItems/TownPets/PiggyLicense.cs +++ b/Items/SummonItems/TownPets/TheHousingContract.cs @@ -11,10 +11,9 @@ using Terraria.ModLoader; namespace CalamityMod.Items.SummonItems.TownPets { - public class PiggyLicense : ModItem, ILocalizedModType + public class TheHousingContract : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.SummonItems"; - public override string Texture => "Terraria/Images/Item_" + ItemID.LicenseBunny; public override void SetStaticDefaults() { Item.ResearchUnlockCount = 5; diff --git a/Items/SummonItems/TownPets/TheHousingContract.png b/Items/SummonItems/TownPets/TheHousingContract.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b10b4af807de10d808b112904b782eaf8de479 GIT binary patch literal 445 zcmV;u0Yd(XP)Px#1ZP1_K>z@;j|==^1poj6XGugsR7gwBm9Z}aVHn1LC;ozV5CbMv5>g~hFsQT! zql92+qG=*AF*O!8ix^B6DJJQ~XfRZxq9hgsp<-jGL~1hFYB;Za-<4}3;_lg=_kAz9 z-}k(CpTQp~*fCI1eJI?gS~A|7y9k~n z{w85?FAvdxV+Qqb}vLS|Grt!`etbdfVorxfS2btX;ttPv5?7j|Kx@EVc8;! z4n_fJXtB2YI12zbXO95nj&k6IjH|XfHJ=1vWi72weoFe~@+&AA3wcvxGXQ}=D*)?z z8vw-GA^;rR=fO?ls*FYU?|IkU2O!)V)8?jqR@OrLRI)M^ZCxG8A4|InTqFL to start or end the Boss Rush } +TheHousingContract: { + DisplayName: The Housing Contract + Tooltip: Use to adopt a piggy for your town +} + YharonEgg: { DisplayName: Blessed Phoenix Egg Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 7be074b811..e7a73eee94 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -562,8 +562,8 @@ SeaKing: { } TownPiggy: { - DisplayName: Piggy - Census.SpawnCondition: Use a Piggy License + DisplayName: Town Piggy + Census.SpawnCondition: Use The Housing Contract Name: { Oolong: Oolong @@ -584,7 +584,7 @@ TownPiggy: { Curly: Curly Techno: Techno JohnPork: John Pork - Piglet: Piglet + Piglet: Piglet } Chat: { diff --git a/NPCs/TownNPCs/TownPiggy.cs b/NPCs/TownNPCs/TownPiggy.cs index 2d46b1852f..3c15194e38 100644 --- a/NPCs/TownNPCs/TownPiggy.cs +++ b/NPCs/TownNPCs/TownPiggy.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.TownNPCs { public override void SetStaticDefaults() { - Main.npcFrameCount[Type] = 8; + Main.npcFrameCount[Type] = 13; NPCID.Sets.ExtraFramesCount[Type] = 0; NPCID.Sets.AttackFrameCount[Type] = 0; NPCID.Sets.DangerDetectRange[Type] = 250; @@ -51,6 +51,7 @@ namespace CalamityMod.NPCs.TownNPCs NPC.width = 20; NPC.height = 20; NPC.aiStyle = NPCAIStyleID.Passive; + AIType = NPCID.TownBunny; NPC.damage = 0; NPC.defense = 0; NPC.lifeMax = 50; @@ -59,7 +60,6 @@ namespace CalamityMod.NPCs.TownNPCs NPC.knockBackResist = 0.5f; NPC.housingCategory = 1; DrawOffsetY = -4; - //AnimationType = NPCID.TownBunny; } public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) { @@ -113,8 +113,34 @@ namespace CalamityMod.NPCs.TownNPCs public override void FindFrame(int frameHeight) { - if (NPC.velocity.X == 0) + // Sleep animation + if (NPC.ai[0] >= 20f && NPC.ai[0] <= 22f) + { + if (NPC.velocity.Y == 0) + { + if (NPC.ai[1] > 30f && (NPC.frame.Y < frameHeight * 8)) + { + NPC.frame.Y = frameHeight * 8; + } + if (NPC.frame.Y > 0) + { + NPC.frameCounter++; + } + if (NPC.frameCounter > 6) + { + NPC.frameCounter = 0; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y > 12 * frameHeight) + { + NPC.frame.Y = frameHeight * 8; + } + } + } + else if (NPC.velocity.X == 0) + { NPC.frame.Y = 0; + } else { if (NPC.velocity.Y == 0) @@ -122,14 +148,12 @@ namespace CalamityMod.NPCs.TownNPCs if (NPC.frameCounter++ % 6 == 0) { NPC.frame.Y += frameHeight; - if (NPC.frame.Y >= frameHeight * Main.npcFrameCount[Type]) - { - NPC.frame.Y = frameHeight; - } } } if (NPC.frame.Y < frameHeight) NPC.frame.Y = frameHeight; + if (NPC.frame.Y > frameHeight * 7) + NPC.frame.Y = frameHeight; } } diff --git a/NPCs/TownNPCs/TownPiggy.png b/NPCs/TownNPCs/TownPiggy.png index 7255ad1ca49045a640837fa8c23776dfa1129b48..ae68308cdf9fe5d5ebab05fae41cea63aa0eb36d 100644 GIT binary patch literal 3797 zcmZXXdpMNa+s73-mLmv|mkV>$# zvAT{!tvtW>&^u6(*!EhoLMX`Edi=5Dw~XN5tot9!Xs7GAo+yS{>%H9a(>_*i&C`@0 z7tcvwJx@tRT$+IX%vfH|vXqGLdrNmBZzk+- zW0{iiK-faOG zjC&RJ&V`!{l0zKL5WnsKbh+SmNlx5}X~yEyi(0d83uE#ql6YBoa$d z$iFiKvM`Fi0sQ&Lz#<5g^4^>hFAc^2(^~`_^Qw&>PdV-H-35MGxQ z2TbFFB1ahvl?jtT4Ca9a?|(eqh@E?TR#0ej^Ebt}{P@_SQN+gT>riU;Xy+_e(BEs0 zqcoJ;Z;>>|e4uLPhrvKiA22~6N=g2ZY4p}i6(YfJXo`UIrdgLcTSmoA{pf|cGj=i3 zd2_*k8|?GjA}17A!6&t8>QwY}Y7n#fFVEI9iA>pijYXB>@BSX4grT_d{hP%#XDPAI zJm9-^_o{5!HRsliD?B;n;rh9Gqag%dMqVBpwYWTKL6~`^YEixl?l&WB?J8m7E$2DX z`#>xR2Y&M-Ri`xb&4na+G2dWcvK`i9v^x~_emS0O5OeTPCYB*efadJ*)`T2|>F6$$VVK%Y^mr`A5@k?Vj;fOnj zkG6@&SoWu7K`fPEUMrooCVlwtBTrvpI_KhwI~}Im;>qcTA^bhxug!#nNbNP}wBXs7 z-W<``IVEpYSyMJ@gAoe%k5W>ms0Fxv$9hnRe-sVmvQR}5uoa^#1Y+{A=gV8WW~5M} z&th5jiEVp*dzg|Ai+R9(fOQM7mE( z#b{z6!h*OoM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Z3*Jef(cGr-TCmrII^fq{Y7)59eQNQ(fm7zZ PiggyLicense.SpawnPiggy(); + public override void HandlePacket(BinaryReader packet, int sender) => TheHousingContract.SpawnPiggy(); } } From d26497cdf5139021f55f6d1b557c7a98dafc4007 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 23 Apr 2026 00:12:58 -0400 Subject: [PATCH 110/126] The Gift sprite --- Items/Tools/TheGift.cs | 1 - Items/Tools/TheGift.png | Bin 0 -> 601 bytes 2 files changed, 1 deletion(-) create mode 100644 Items/Tools/TheGift.png diff --git a/Items/Tools/TheGift.cs b/Items/Tools/TheGift.cs index 0b77753bfb..f0a6018f58 100644 --- a/Items/Tools/TheGift.cs +++ b/Items/Tools/TheGift.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Items.Tools public class TheGift : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Tools"; - public override string Texture => "Terraria/Images/Item_601"; //Placeholder public static readonly SoundStyle BadBuzzer = new SoundStyle("CalamityMod/Sounds/Custom/BadGiftBuzzer") with { Volume = 0.85f }; public override void SetDefaults() { diff --git a/Items/Tools/TheGift.png b/Items/Tools/TheGift.png new file mode 100644 index 0000000000000000000000000000000000000000..c3a8480e602817a8f6aaeef5dcb6b40dd219ec02 GIT binary patch literal 601 zcmV-f0;c_mP)Px#1ZP1_K>z@;j|==^1poj714%?dR7gwBmN7_MQ51$hMQk&LK1`^M7-A%Zgf@cF zfGA`Lg;Khxi&NunSHXf)hJvfz3nGZ14wf#(!9f&@f-SV55JIF?(Kf{~Lb)B@JJx$m ztRnc{zr1(PIk|b?`_H)vTvN*hpIR>Xlo=OIPqwS+$@aQ=Q;lZeuGC-#ObO+S@dW_h zPYnZ5J_~4dgCnB=EX}tDLf6ab}S5rAKR?t>?YWq#wGomzo-E!ru4(AFaH)a()QR^FV)$+uA@<+Tw00000NkvXXu0mjfqVy6W literal 0 HcmV?d00001 From df62bd01b89e1819949e3bf48f7a58c69670b395 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:28:09 -0700 Subject: [PATCH 111/126] Added Shroomble Cage (!!!) --- Items/Placeables/Furniture/ShroombleCage.cs | 24 +++++ Items/Placeables/Furniture/ShroombleCage.png | Bin 0 -> 565 bytes .../Mods.CalamityMod.Items.Placeables.hjson | 5 + Tiles/Furniture/ShroombleCageTile.cs | 98 ++++++++++++++++++ Tiles/Furniture/ShroombleCageTile.png | Bin 0 -> 10045 bytes 5 files changed, 127 insertions(+) create mode 100644 Items/Placeables/Furniture/ShroombleCage.cs create mode 100644 Items/Placeables/Furniture/ShroombleCage.png create mode 100644 Tiles/Furniture/ShroombleCageTile.cs create mode 100644 Tiles/Furniture/ShroombleCageTile.png diff --git a/Items/Placeables/Furniture/ShroombleCage.cs b/Items/Placeables/Furniture/ShroombleCage.cs new file mode 100644 index 0000000000..d8a02e2f78 --- /dev/null +++ b/Items/Placeables/Furniture/ShroombleCage.cs @@ -0,0 +1,24 @@ +using CalamityMod.Items.Critters; +using CalamityMod.Tiles.Furniture; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.Furniture +{ + public class ShroombleCage : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.DefaultToPlaceableTile(ModContent.TileType()); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.Terrarium). + AddIngredient(). + Register(); + } + } +} diff --git a/Items/Placeables/Furniture/ShroombleCage.png b/Items/Placeables/Furniture/ShroombleCage.png new file mode 100644 index 0000000000000000000000000000000000000000..f794638982faa0727fffe73c9210f01ca43ba3a3 GIT binary patch literal 565 zcmV-50?Pe~P)SGT4C%it1q6(#i>I031KI4@DeZ9Zdeg z{hKK29zDDZ=EFh)9s&dA09pq*q4dKzXdJNY@+Cr!#VX&weLq?HPM76_^}$16&^W+? ziwPxb=K33g%LP+eZm^5Zf=p3-%(NAI05Cs!1eTca;~tp4`1~7~mMotJrg4VApm6}q z=SjiZU>9@Bh~kZF^pN3#D&0sIbdm|G1!IZK1cWAKX2>-^8E>_ z&ta-ApLzgh&f$#!(@$2-0Mi(`V9+=qJKq89LUf?YKe!mKI9CK(Y_PTrgk` zfEC4dX6h(yLw!juu*+c%!(Iv?L{C5dilPKo7ce;I;tzoVbAV~rM6kL#J+n&9$qX0uEV>G%#cwfbMf#X@O=TKywFNNpi#L zDPeULuy~3Yq+Osc$qS}SH$qxGFaVQ>ES7qa1*xfdO-Xor4$Hg~axR zU_OSa$JJ9p7l-LPbYL5p32zS!xC3ydW?G96c+Us`Qh&g3FR@ja00000NkvXXu0mjf DVZ-^G literal 0 HcmV?d00001 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 80b21975f0..19a52e2df7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -964,6 +964,11 @@ SeaMinnowJar: { Tooltip: "" } +ShroombleCage: { + DisplayName: Shroomble Cage + Tooltip: "" +} + SpitefulCandle: { DisplayName: Spiteful Candle Tooltip: diff --git a/Tiles/Furniture/ShroombleCageTile.cs b/Tiles/Furniture/ShroombleCageTile.cs new file mode 100644 index 0000000000..52c6d36633 --- /dev/null +++ b/Tiles/Furniture/ShroombleCageTile.cs @@ -0,0 +1,98 @@ +using CalamityMod.Items.Placeables.Furniture; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.Furniture +{ + public class ShroombleCageTile : ModTile + { + public static Asset topTexture; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + { + topTexture = ModContent.Request("CalamityMod/Tiles/Furniture/TransparentCageTile_Top"); + } + Main.tileFrameImportant[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileSolidTop[Type] = true; + Main.tileTable[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.addTile(Type); + AnimationFrameHeight = 54; + AddMapEntry(new Color(122, 217, 232), CalamityUtils.GetItemName()); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Glass, 0f, 0f, 0, new Color(), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => offsetY = 2; + + public override void AnimateTile(ref int frame, ref int frameCounter) + { + int frameAmt = 39; + frameCounter++; + if (frameCounter >= 6) + { + frame++; + frameCounter = 0; + } + if (frame >= frameAmt) + { + frame = 0; + } + } + + // Since this uses a custom top sprite, all drawing must be redone + public override bool PreDraw(int i, int j, SpriteBatch spriteBatch) + { + if (Main.tile[i, j].IsTileActuallyInvisible()) + return false; + + Tile tile = Main.tile[i, j]; + var zero = Main.drawToScreen ? Vector2.Zero : new(Main.offScreenRange, Main.offScreenRange); + var drawPos = new Vector2(i * 16, j * 16) - Main.screenPosition + zero + CalamityUtils.TileDrawOffset + Vector2.UnitY * 2; + var animateFrameOffset = Main.tileFrame[Type] * AnimationFrameHeight; + var height = 16; + var finalColor = CalamityUtils.ApplyPaint(tile.TileColor, Lighting.GetColor(i, j), false); + + var rect = new Rectangle(tile.TileFrameX, tile.TileFrameY + animateFrameOffset, 16, height); + + if (rect.Y % 54 == 0) + { + Vector2 position = drawPos; + position.Y += 8f; + Rectangle drawRectangle = rect; + drawRectangle.Y += 8; + drawRectangle.Height -= 8; + Main.spriteBatch.Draw(TextureAssets.Tile[Type].Value, position, drawRectangle, finalColor, 0f, zero, 1f, SpriteEffects.None, 0f); + position = drawPos; + position.Y -= 2f; + drawRectangle = rect; + drawRectangle.Y = 0; + drawRectangle.Height = 10; + spriteBatch.Draw(topTexture.Value, position, drawRectangle, finalColor, 0f, zero, 1f, SpriteEffects.None, 0f); + } + else + { + spriteBatch.Draw(TextureAssets.Tile[Type].Value, drawPos, rect, finalColor, 0f, zero, 1f, SpriteEffects.None, 0f); + } + return false; + } + } +} diff --git a/Tiles/Furniture/ShroombleCageTile.png b/Tiles/Furniture/ShroombleCageTile.png new file mode 100644 index 0000000000000000000000000000000000000000..a826b6f0999462cb9c48b160bf49dede0767016f GIT binary patch literal 10045 zcmcI~c{r5)_rE<%5@U}@8PjA*p%O97*q0g2gotbrQqm(OWJ=5+rD0GQBN`LgvX!Mr zgQBNVh%9-sB%;D&-+u2gJ)iIQ`dq)?b^ZQ`>vqjO+dc1d&g;C+>zwyZ#MqjN2+Ij` zadC-Qn4|2$qaPQSpq?NvICIIor~@9jgYC_Xxt_e09|KSLe2_LsF0PV9$cj5Zcy5ca z#-TMewT+DJPJ4!=WmLVITXQI^J!hwNPWuooK)<^#s3$n6-{JT%T~!v%<=7SS>u3wr ztEa^97FsXv@4p{xk38gMd&KDYX>CpT@)$(`v2>XOG25e2YgEC zg1J*L7uU9z?0@d&^K>sRE||Rq3W*DKoy-uq*Lye#<>T|CCv$A>O6^ca`P#Z-Ej$;& zg+m4q=$27pZ(?QR&YH8h?=FRUN*YvNg z%&e|XP7ax@eW{^WR-PZ=<4dL1g)h&E6t6GW2h+Hc@_8phply}s-RgxWYT(yD4fuD= z|8T31SiKrTCe(#L@BcI~FrXFfWBU20WIPHxP_H^6l|`F4HQj(h+x$H_H#If2t39?a z@Z!&w;pqDPlg6*5$-R?q>!p`x7pGq8>Q28XJ^t#Y=OMFoxsLkp?_wC|J(rtB7a#qd z)y~sui2csLJtTzs)4a&&HSg;3K;){*jS-Ei=yj`{%1dPJDwTP1?^5FG!ot$*^5qHP z(B&6&2WrIH3M+DLCM(Nugw;Da%2G6JGmjC-SW&I+zf|+-cpg4*ePyrASaICSLez2% z&+Po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 From c251836e6932d9b3c16ea4e099a1b5a3e8a2eb99 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:32:02 -0700 Subject: [PATCH 112/126] fix coins not drawing in scal ui if unloaded --- UI/CalamitasEnchantments/CalamitasEnchantUI.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs index 297c26c2bd..c55a2abf39 100644 --- a/UI/CalamitasEnchantments/CalamitasEnchantUI.cs +++ b/UI/CalamitasEnchantments/CalamitasEnchantUI.cs @@ -198,6 +198,7 @@ namespace CalamityMod.UI.CalamitasEnchants float y = costDrawPositionTopLeft.Y + 54f * Main.UIScale; for (int i = 0; i < 4; i++) { + Main.instance.LoadItem(ItemID.PlatinumCoin - i); Vector2 drawPosition = new Vector2(costDrawPositionTopLeft.X + (ChatManager.GetStringSize(FontAssets.MouseText.Value, costText, Vector2.One, -1f).X + ((24 * i) - 24f)) * Main.UIScale, y); spriteBatch.Draw(TextureAssets.Item[ItemID.PlatinumCoin - i].Value, drawPosition, null, Color.White, 0f, TextureAssets.Item[ItemID.PlatinumCoin - i].Size() * 0.5f, Main.UIScale, SpriteEffects.None, 0f); Utils.DrawBorderStringFourWay(spriteBatch, FontAssets.ItemStack.Value, coinsArray[3 - i].ToString(), drawPosition.X - 11f, drawPosition.Y, Color.White, Color.Black, new Vector2(0.3f), 0.75f * Main.UIScale); From 1b5db5bc4f22680154a384342d3dfc09b0f2781f Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Thu, 23 Apr 2026 07:27:45 -0700 Subject: [PATCH 113/126] bestiary --- Localization/en-US/Mods.CalamityMod.Bestiary.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson index d025bca61a..4704e2f28c 100644 --- a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson +++ b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson @@ -154,7 +154,7 @@ Archmage: One of the world's foremost experts on magical theory, he is renowned Bandit: The bandit may have a bad habit of looting battlefields and taking what isn't theirs, but their actions are mostly motivated by their hatred of the obscenely rich who haven't truly earned the wealth they possess. Their methods are somewhat shady, but can always be relied upon to get a job done. BrimstoneWitch: Recruited to Yharim's forces late into the war, her magic overflows with such power that she is largely incapable of casting normal spells. Yet despite her great power, Calamitas prefers not to use it, as it takes a heavy toll on her psyche. SeaKing: The seventeenth ruler of the constitutional monarchy of Ilmeris since the tribes of the Ilmeran Sea unified, under the Electric Goddess, Otonilou, and the elusive God of the Seas. Alas, one cannot be a ruler without subjects, and while he remains respected by those who opposed Godseeker Yharim, his kingdom is no more. -TownPiggy: Oink +TownPiggy: Waddles its little legs around with little purpose. Rumored to be a clever and obsessive hoarder. //Boss Minions Brimling: Extensions of the Brimstone Elemental herself, and part of her very being. Both she and her Brimlings are of a single mind, so she naturally cares for them just as she cares for herself. When heavily wounded, they withdraw into a cocoon to protect themselves from further harm. SoulSeeker: The Clone's attempt at wielding the souls of the damned as weapons, these retain slightly more autonomy than their Azafurian brethren. And yet given the striking resemblance the bear to the Clone's shell, it's arguable that they might be further from Calamitas' current soul seekers than those found in Azafure's ruins. From f05daf409ceb9dbedb8d4a7a5cff7bf9ed3e5565 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 23 Apr 2026 09:36:03 -0500 Subject: [PATCH 114/126] Ambergris & Pauldron nerf, Saros charge bar --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- Items/Accessories/LeviathanAmbergris.cs | 3 ++- Items/Accessories/SlagsplitterPauldron.cs | 2 +- Items/Weapons/Summon/SarosPossession.cs | 26 +++++++++++++++++++ .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 1650cbdd85..323091fbf1 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -430,7 +430,7 @@ namespace CalamityMod.CalPlayer { if (dashStart) { - Player.velocity.X *= 2.2f; // +120% dash speed + Player.velocity.X *= 1 + LeviathanAmbergris.DashSpeedIncrease; int damage = (int)Player.GetBestClassDamage().ApplyTo(LeviathanAmbergris.ambergrisDashDamage); Projectile.NewProjectile(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), damage, 0f, Player.whoAmI); } diff --git a/Items/Accessories/LeviathanAmbergris.cs b/Items/Accessories/LeviathanAmbergris.cs index 50ae2b6ba1..8f9a198dee 100644 --- a/Items/Accessories/LeviathanAmbergris.cs +++ b/Items/Accessories/LeviathanAmbergris.cs @@ -8,7 +8,8 @@ namespace CalamityMod.Items.Accessories public class LeviathanAmbergris : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public static int ambergrisDashDamage = 650; + public static int ambergrisDashDamage => 350; + public static float DashSpeedIncrease => 1f; public override void SetDefaults() { Item.width = 20; diff --git a/Items/Accessories/SlagsplitterPauldron.cs b/Items/Accessories/SlagsplitterPauldron.cs index 62ca8e1c6d..497c71082d 100644 --- a/Items/Accessories/SlagsplitterPauldron.cs +++ b/Items/Accessories/SlagsplitterPauldron.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Accessories public class SlagsplitterPauldron : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Accessories"; - public static int PauldronSlamDamage = 330; + public static int PauldronSlamDamage => 250; public override void SetDefaults() { Item.width = 42; diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs index d1d6cfef1f..85e6139d53 100644 --- a/Items/Weapons/Summon/SarosPossession.cs +++ b/Items/Weapons/Summon/SarosPossession.cs @@ -5,9 +5,11 @@ using CalamityMod.Projectiles.Summon; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.ID; using Terraria.ModLoader; @@ -73,5 +75,29 @@ namespace CalamityMod.Items.Weapons.Summon AddTile(). Register(); } + public override void PostDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale) + { + int currentCooldown = Main.LocalPlayer.Calamity().sarosEclipseBeamUsage; + float fill = 1 - currentCooldown / 300f; + + if (fill >= 1) + return; + + + var barBG = ModContent.Request("CalamityMod/UI/MiscTextures/GenericBarBack").Value; + var barFG = ModContent.Request("CalamityMod/UI/MiscTextures/GenericBarFront").Value; + + float barScale = 1/(32f/TextureAssets.Item[Type].Width()) * 0.9f; + + Vector2 barOrigin = barBG.Size() * 0.5f; + float yOffset = 0f; + Vector2 drawPos = position + new Vector2(0, (float)TextureAssets.Item[Type].Height() * 0.5f) * scale; + Rectangle frameCrop = new Rectangle(0, 0, (int)((fill) * barFG.Width), barFG.Height); + Color colorBG = Color.Black; + Color colorFG = Color.Lerp(Color.OrangeRed, new Color(238, 226, 153), fill); + + spriteBatch.Draw(barBG, drawPos, null, colorBG, 0f, barOrigin, scale * barScale, 0f, 0f); + spriteBatch.Draw(barFG, drawPos, frameCrop, colorFG, 0f, barOrigin, scale * barScale, 0f, 0f); + } } } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index be97b0875c..eeb0ffc7cd 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1067,7 +1067,7 @@ LeviathanAmbergris: { DisplayName: Leviathan Ambergris Tooltip: ''' - 120% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration + 100% increased initial dash velocity, 33% faster dash cooldown, and greatly increased dash deceleration Your dashes are empowered by water, knocking back and damaging enemies with vicious currents that inflict [cbuff:CalamityMod/RiptideDebuff] Visual effects are reduced if visibility is disabled ''' From 48318452e395b609907bd6b6cd0d5a4e3569c7ea Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 23 Apr 2026 23:56:04 +0700 Subject: [PATCH 115/126] +1 character --- Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs index 1637fc380c..5b90e55e62 100644 --- a/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs +++ b/Projectiles/Summon/SmallAresArms/ExoskeletonPanel.cs @@ -251,7 +251,7 @@ namespace CalamityMod.Projectiles.Summon.SmallAresArms bool hoveringOverAnySlot = false; bool clickedAnIconOnPanel = false; - bool sufficientSlots = Main.LocalPlayer.maxMinions > AresExoskeleton.MinionSlotsPerCannon; + bool sufficientSlots = Main.LocalPlayer.maxMinions >= AresExoskeleton.MinionSlotsPerCannon; // Draw icon and handle hover behaviors. // If an arm needs to be destroyed or spawned, it will happen on the next frame in the AI update loop. From ea481ce4741927bc490654813b2efe0796de5824 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Thu, 23 Apr 2026 12:31:56 -0500 Subject: [PATCH 116/126] see commit description - Crushing Ego 1.2x to 1.3x dealt, but 1.15x to 1.2x taken - Faded Idolatry now reduces minion slot cost from 5 to 4 - Shellfish now checks for SuperArmor property, is marked as a tag buff, and no longer sets immunity (means it now dynamically supports changing super armor, and supports crossmod better) - Shellfish 75 -> 85 DPS - Fixed many multi-slot summons having redundant tooltips saying how many slots they costed - Fixed Ares Exoskeleton not marking itself as costing 3 slots --- Buffs/DamageOverTime/ShellfishClaps.cs | 12 ++++++-- CalPlayer/CalamityPlayerHitHurt.cs | 4 +-- CalPlayer/CalamityPlayerMiscEffects.cs | 5 +--- Items/CalamityGlobalItemTooltip.cs | 5 +++- Items/Weapons/Summon/AresExoskeleton.cs | 5 ++++ .../Mods.CalamityMod.Items.Accessories.hjson | 4 +-- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 28 ++++++------------- Projectiles/Summon/FieryDraconid.cs | 11 +++++++- Projectiles/Summon/Shellfish.cs | 1 - 9 files changed, 41 insertions(+), 34 deletions(-) diff --git a/Buffs/DamageOverTime/ShellfishClaps.cs b/Buffs/DamageOverTime/ShellfishClaps.cs index c70408473c..45797d83fe 100644 --- a/Buffs/DamageOverTime/ShellfishClaps.cs +++ b/Buffs/DamageOverTime/ShellfishClaps.cs @@ -1,7 +1,9 @@ -using CalamityMod.Balancing; +using System; +using CalamityMod.Balancing; using CalamityMod.DataStructures; using CalamityMod.Projectiles.Summon; using Terraria; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Buffs.DamageOverTime @@ -10,11 +12,14 @@ namespace CalamityMod.Buffs.DamageOverTime { public static DebuffData debuffData = new DebuffData() { - EnemyLostRegen = 150, //Damage per shellfish + EnemyLostRegen = 170, //Damage per shellfish NPCLifeRegenMethod = ShellfishStacking }; public static void ShellfishStacking(NPC npc, int buffType, ref int buffIndex, ref int damage) { + if (npc.SuperArmor) + return; + int projectileCount = 0; int owner = 255; foreach (Projectile p in Main.ActiveProjectiles) @@ -38,7 +43,7 @@ namespace CalamityMod.Buffs.DamageOverTime if (CalamityUtils.ShouldTriggerSummonPenalty(Main.player[owner], heldItem)) totalDamage = (int)(totalDamage * BalancingConstants.SummonerCrossClassNerf); - int totalDisplayedDamage = totalDamage / 5; + int totalDisplayedDamage = (int)Math.Max(totalDamage * debuffData.MultiplierDamageTickSize, debuffData.MinimumDamageTickSize); npc.Calamity().ApplyDPSDebuff(projectileCount * totalDamage, projectileCount * totalDisplayedDamage, ref npc.lifeRegen, ref damage); } public override void SetStaticDefaults() @@ -47,6 +52,7 @@ namespace CalamityMod.Buffs.DamageOverTime Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; BuffDatasets.DebuffDataset[Type] = debuffData; + BuffID.Sets.IsATagBuff[Type] = true; } public override void Update(NPC npc, ref int buffIndex) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 696a0eaee5..0c6d477f4b 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1636,8 +1636,8 @@ namespace CalamityMod.CalPlayer #region Player Incoming Damage Multiplier (Increases) double damageMult = 1D; - if (crushingEgo) // Dimensional Soul Artifact increases incoming damage by 15%. - damageMult += 0.15; + if (crushingEgo) + damageMult += 0.2; if (enraged) // Demonshade Enrage damageMult += DemonshadeHelm.MultDamageTakenBoost; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 323091fbf1..e7846913a8 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3961,9 +3961,6 @@ namespace CalamityMod.CalPlayer Player.npcTypeNoAggro[ModContent.NPCType()] = true; } - if (fadedIdolatry && Player.FindBuffIndex(ModContent.BuffType()) != -1) - Player.maxMinions += Player.ownedProjectileCounts[ModContent.ProjectileType()]; - if (pSoulArtifact) { if (Player.whoAmI == Main.myPlayer) @@ -4397,7 +4394,7 @@ namespace CalamityMod.CalPlayer // Add any multiplicative damage bonuses here float multiplicativeDamage = 1; if (crushingEgo) - multiplicativeDamage += 0.2f; + multiplicativeDamage += 0.3f; if (WarbanneroftheRighteous) multiplicativeDamage += warbannerDamageMult; if (multiplicativeDamage != 1) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 60d2b7438a..ee62c4b95a 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -173,7 +173,10 @@ namespace CalamityMod.Items //Add "Uses X Minion Slots right above "Uses X Mana" if (ItemID.Sets.StaffMinionSlotsRequired[item.type] > 1 || ContentSamples.ProjectilesByType[item.shoot].minionSlots > 0) { - tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback") + 1, new(Mod, "Minions", CalamityUtils.GetText(ItemID.Sets.StaffMinionSlotsRequired[item.type] > 1 ? "Common.MinionSlotCost" : "Common.MinionSlotCostSingle").Format(ItemID.Sets.StaffMinionSlotsRequired[item.type]))); + float cost = ItemID.Sets.StaffMinionSlotsRequired[item.type]; + if (item.type == ModContent.ItemType() && Main.LocalPlayer.Calamity().fadedIdolatry) + cost--; + tooltips.Insert(tooltips.FindIndex(0, (x) => x.Name == "Knockback") + 1, new(Mod, "Minions", CalamityUtils.GetText(cost > 1 ? "Common.MinionSlotCost" : "Common.MinionSlotCostSingle").Format(cost))); } diff --git a/Items/Weapons/Summon/AresExoskeleton.cs b/Items/Weapons/Summon/AresExoskeleton.cs index 309102e5a2..dee0622c01 100644 --- a/Items/Weapons/Summon/AresExoskeleton.cs +++ b/Items/Weapons/Summon/AresExoskeleton.cs @@ -66,6 +66,11 @@ namespace CalamityMod.Items.Weapons.Summon EquipLoader.AddEquipTexture(Mod, $"{Texture}_{EquipType.Body}", EquipType.Body, this); } + public override void SetStaticDefaults() + { + ItemID.Sets.StaffMinionSlotsRequired[Type] = 3; + } + public override void SetDefaults() { Item.width = Item.height = 36; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index eeb0ffc7cd..4e9ba6b01c 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -251,7 +251,7 @@ FadedIdolatry: { DisplayName: Faded Idolatry Tooltip: ''' - For each Fiery Draconid you have summoned, you gain 1 minion slot + Summoned [i:CalamityMod/YharonsKindleStaff] Fiery Draconid cost one less minion slot [c/ffe100:'Once everything has crumbled to dust, what will be left of the world you created?'] ''' } @@ -592,7 +592,7 @@ CrushingEgo: { DisplayName: Crushing Ego Tooltip: ''' - Multiplies all damage by 1.2x, but at the cost of taking 15% increased damage + Multiplies all damage by 1.3x, but at the cost of taking 20% increased damage [c/ff00ff:'Don the mask of arrogance, and dance by your lonesome. Once the ball has gone quiet, you'll be the last man standing.'] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index d9d34f5463..ff140ef3a8 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -48,7 +48,6 @@ AresExoskeleton: { Creates a panel with four slots and four choices above it: Plasma, Tesla, Laser, and Gauss Clicking one of the choices and then clicking one of the slots summons a cannon of that type Clicking on a slot that's already occupied destroys its associated cannon and clears the slot - Cannons take 3 minion slots each ''' } @@ -206,7 +205,7 @@ CosmicImmaterializer: { ''' Summons a cosmic energy spiral to fight for you The orb will fire swarms of homing energy bolts that cause [cbuff:CalamityMod/MiracleBlight] - Requires 10 minion slots to use and there can only be one energy spiral + There can only be one energy spiral ''' } @@ -227,7 +226,6 @@ Cosmilamp: { Tooltip: ''' Summons a cosmic lantern above your head to fight for you - Each lantern takes up 2 minion slots ''' } @@ -305,7 +303,6 @@ DragonbloodDisgorger: { Summons a skeletal dragon and her two children Baby spits burst into blood orbs upon hitting an enemy Picking up these blood orbs reduces the duration of [cbuffplr:PotionSickness] - Requires 6 minion slots to be summoned There can only be one family at a time ''' } @@ -338,8 +335,7 @@ Endogenesis: { The first mode makes it shoot sweeping lasers aimed at the enemy The second mode sacrifices its limbs to shoot out homing projectiles The third mode allows it to aggressively tackle its enemies - The fourth mode makes the limbs function as endothermic flamethrowers - Requires 10 minion slots to be summoned + The fourth mode makes the limbs function as endothermic flamethrowers There can only be one construct at a time [c/B0FBFF:'Ice puns not included'] ''' @@ -359,7 +355,6 @@ EntropysVigil: { Tooltip: ''' Summons a mini Calamitas Clone and her brothers to protect you - One minion trio takes two minion slots ''' } @@ -402,7 +397,6 @@ FlowersOfMortality: { Tooltip: ''' Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] - The combined flowers consume three minion slots ''' } @@ -512,7 +506,7 @@ InfectedRemote: { Tooltip: ''' Summons a humanoid-hybrid Plaguebringer, codenamed 'Virili', to aid you in battle - Virili requires 3 minion slots to summon, and can only be summoned once + Virili can only be summoned once Virili uses a variety of attacks which she cycles through on a timer All attacks spread the [cbuff:CalamityMod/Plague], as was her original design intention 'There's a single label on the back: @@ -524,7 +518,7 @@ KingofConstellationsTenryu: { DisplayName: King of Constellations, Tenryū Tooltip: ''' - Uses 4 minion slots to summon a pair of celestial dragons to fight for you + Summons a pair of celestial dragons to fight for you There can only be one pair of dragons at a time 'The ones who will devour the Unmoving Star' ''' @@ -539,7 +533,6 @@ LiliesOfFinality: { DisplayName: Lilies of Finality Tooltip: ''' - Requires 2 minion slots to use Can only be summoned once 'Wake up' ''' @@ -553,7 +546,7 @@ Metastasis: { While the Sepulcher is active, brimstone hearts will begin to appear and orbit you When too many hearts are present, it will interrupt attacking to attack the hearts instead This happens more frequently depending on how many hearts are present - Requires 4 minion slots to use and can only be summoned once + Can only be summoned once ''' Calamitas: ''' @@ -589,7 +582,6 @@ MutatedTruffle: { ''' Summons a younger fishron to irradiate your foes The fishron will cycle between charging, projectiles, and a typhoon - Requires 3 minion slots to be used There can only be one minion ''' } @@ -610,7 +602,7 @@ Perdition: { {$CommonItemTooltip.Sentry} Summons a beacon at the position of the mouse When a target is manually selected via it releases torrents of souls from below onto the target - Requires one sentry slot to summon, and only one beacon may exist at a time + Only one beacon may exist at a time ''' } @@ -619,7 +611,7 @@ PlantationStaff: { Tooltip: ''' Summons a miniature Plantera to devastate enemies with floral fury - Occupies 3 minion slots and there can only be one Mini Plantera at a time + There can only be one Mini Plantera at a time ''' } @@ -706,7 +698,6 @@ ShellfishStaff: { Tooltip: ''' Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] - Each shellfish takes 2 minion slots ''' } @@ -814,7 +805,7 @@ TemporalUmbrella: { - A cyan umbrella to beat down your foes with grace - A lavender rifle to snipe those who stand in your way Best of all, you get to wear a top hat - Requires 5 minion slots to use and there can only be one set of tools at a time + There can only be one set of tools at a time 'Surprisingly sturdy, I reckon this could defeat the Mafia in a single blow' ''' } @@ -913,7 +904,6 @@ WarloksMoonFist: { Tooltip: ''' Summons a celestial fist to punch enemies for you - Requires 4 minion slots to use ''' } @@ -922,7 +912,6 @@ WitherBlossomsStaff: { Tooltip: ''' Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head - The combined flowers consume two minion slots ''' } @@ -943,6 +932,5 @@ YharonsKindleStaff: { Tooltip: ''' Summons a fiery draconid to fight for you - Requires 5 minion slots to use ''' } diff --git a/Projectiles/Summon/FieryDraconid.cs b/Projectiles/Summon/FieryDraconid.cs index 2574c58132..ed411b6930 100644 --- a/Projectiles/Summon/FieryDraconid.cs +++ b/Projectiles/Summon/FieryDraconid.cs @@ -37,7 +37,10 @@ namespace CalamityMod.Projectiles.Summon Projectile.ignoreWater = true; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = Projectile.MaxUpdates * 9; - Projectile.minionSlots = 5f; + if (!Main.gameMenu && Main.player[Projectile.owner].Calamity().fadedIdolatry) + Projectile.minionSlots = 4f; + else + Projectile.minionSlots = 5f; Projectile.timeLeft = 90000; Projectile.penetrate = -1; Projectile.tileCollide = false; @@ -64,6 +67,12 @@ namespace CalamityMod.Projectiles.Summon // Perform minion checks. PerformMinionChecks(); + //Update slots to match Faded Idolatry equip state + if (Main.player[Projectile.owner].Calamity().fadedIdolatry) + Projectile.minionSlots = 4f; + else + Projectile.minionSlots = 5f; + // Handle frame logic. if (Projectile.FinalExtraUpdate()) Projectile.frameCounter++; diff --git a/Projectiles/Summon/Shellfish.cs b/Projectiles/Summon/Shellfish.cs index be18d29396..3e3ef793e6 100644 --- a/Projectiles/Summon/Shellfish.cs +++ b/Projectiles/Summon/Shellfish.cs @@ -428,7 +428,6 @@ namespace CalamityMod.Projectiles.Summon public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.buffImmune[ModContent.BuffType()] = target.Calamity().DR >= 0.99f; target.AddBuff(ModContent.BuffType(), 600000); } From 9d0df7dad09a587a52d0c40ec3808c7feea03c11 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <142704082+CongratsIsTrash@users.noreply.github.com> Date: Thu, 23 Apr 2026 14:29:17 -0400 Subject: [PATCH 117/126] Fiery Draconids --- 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 4e9ba6b01c..492d117468 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -251,7 +251,7 @@ FadedIdolatry: { DisplayName: Faded Idolatry Tooltip: ''' - Summoned [i:CalamityMod/YharonsKindleStaff] Fiery Draconid cost one less minion slot + Summoned [i:CalamityMod/YharonsKindleStaff] Fiery Draconids cost one less minion slot [c/ffe100:'Once everything has crumbled to dust, what will be left of the world you created?'] ''' } From 776c3d80d548be41abc882956a0d14841387a121 Mon Sep 17 00:00:00 2001 From: Karina Date: Thu, 23 Apr 2026 23:16:54 -0500 Subject: [PATCH 118/126] Why is every xyk rework overpowered --- Items/Weapons/DraedonsArsenal/Auger.cs | 2 +- Items/Weapons/Melee/Basher.cs | 2 +- Items/Weapons/Melee/GrandDad.cs | 2 +- Items/Weapons/Melee/GrandGuardian.cs | 2 +- Items/Weapons/Melee/GreatswordofJudgement.cs | 4 ++-- Items/Weapons/Melee/OldLordClaymore.cs | 2 +- Projectiles/Melee/GrandDadHoldout.cs | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Items/Weapons/DraedonsArsenal/Auger.cs b/Items/Weapons/DraedonsArsenal/Auger.cs index 6f20e1189a..f7ce73b68d 100644 --- a/Items/Weapons/DraedonsArsenal/Auger.cs +++ b/Items/Weapons/DraedonsArsenal/Auger.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal { Item.width = 26; Item.height = 26; - Item.damage = 68; + Item.damage = 60; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useTime = Item.useAnimation = 12; Item.knockBack = 12f; diff --git a/Items/Weapons/Melee/Basher.cs b/Items/Weapons/Melee/Basher.cs index 99890c2b25..37450611ee 100644 --- a/Items/Weapons/Melee/Basher.cs +++ b/Items/Weapons/Melee/Basher.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 56; Item.height = 60; - Item.damage = 85; + Item.damage = 65; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = Item.useTime = 30; Item.useStyle = ItemUseStyleID.Swing; diff --git a/Items/Weapons/Melee/GrandDad.cs b/Items/Weapons/Melee/GrandDad.cs index c22652b727..2adf365c8e 100644 --- a/Items/Weapons/Melee/GrandDad.cs +++ b/Items/Weapons/Melee/GrandDad.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 124; Item.height = 124; - Item.damage = 3777; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( + Item.damage = 5777; // Feel free to change these 7s as balance requires. The other 7s should stay - Update: no more 2777... :( Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 77; Item.useTime = 77; diff --git a/Items/Weapons/Melee/GrandGuardian.cs b/Items/Weapons/Melee/GrandGuardian.cs index 3b5ced3498..38d7b0ff16 100644 --- a/Items/Weapons/Melee/GrandGuardian.cs +++ b/Items/Weapons/Melee/GrandGuardian.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 130; Item.height = 130; - Item.damage = 515; + Item.damage = 360; Item.DamageType = TrueMeleeDamageClass.Instance; Item.useAnimation = 35; Item.useTime = 35; diff --git a/Items/Weapons/Melee/GreatswordofJudgement.cs b/Items/Weapons/Melee/GreatswordofJudgement.cs index c463e7fd21..2cd125a2a6 100644 --- a/Items/Weapons/Melee/GreatswordofJudgement.cs +++ b/Items/Weapons/Melee/GreatswordofJudgement.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 78; Item.height = 78; - Item.damage = 310; + Item.damage = 280; Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Swing; Item.useAnimation = Item.useTime = 20; @@ -144,7 +144,7 @@ namespace CalamityMod.Items.Weapons.Melee { if (spawnTrueMeleeProj) { - int beamDamage = player.CalcIntDamage(Item.damage * 0.35f); + int beamDamage = player.CalcIntDamage(Item.damage * 0.2f); Vector2 mouseClamped = player.ClampedMouseWorld(); SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f) }, player.Center); for (int i = 0; i < 2; i++) diff --git a/Items/Weapons/Melee/OldLordClaymore.cs b/Items/Weapons/Melee/OldLordClaymore.cs index d3673b326a..5afd75b448 100644 --- a/Items/Weapons/Melee/OldLordClaymore.cs +++ b/Items/Weapons/Melee/OldLordClaymore.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 76; Item.height = 76; - Item.damage = 144; + Item.damage = 100; Item.DamageType = TrueMeleeDamageClass.Instance; Item.crit = 11; Item.useAnimation = Item.useTime = 90; // Yes it's actually supposed to be this slow diff --git a/Projectiles/Melee/GrandDadHoldout.cs b/Projectiles/Melee/GrandDadHoldout.cs index 630fa6b82b..217b45ba44 100644 --- a/Projectiles/Melee/GrandDadHoldout.cs +++ b/Projectiles/Melee/GrandDadHoldout.cs @@ -256,7 +256,7 @@ namespace CalamityMod.Projectiles.Melee float distanceToTiles = -100; bool canBeLaunched = false; - bool lowEnoughToExecute = target.life <= Projectile.damage * 15; + bool lowEnoughToExecute = target.life <= Projectile.damage * 5; bool jared = target.type == ModContent.NPCType(); Vector2 toMouse = Utils.DirectionTo(Owner.Center, Owner.Calamity().mouseWorld); Vector2 launchVel = lowEnoughToExecute ? toMouse : Utils.DirectionTo(Owner.Center, target.Center); @@ -274,7 +274,7 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fire2 = new("CalamityMod/Sounds/Item/FinalDawnSlash"); SoundEngine.PlaySound(fire2 with { Volume = 0.65f, Pitch = Main.rand.NextFloat(-0.2f, -0.3f) }, Projectile.Center); } - int heal = (int)(MathHelper.Clamp(18 - Projectile.numHits * 13, 1, 20)); + int heal = Projectile.numHits == 0 ? 14 : 0; if (Projectile.numHits < 10) { Owner.Calamity().grandDadHealPool += heal; From af0e822cfa71e68c87a1883f03ff1ca9d8d8b1bf Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Sun, 26 Apr 2026 12:35:52 -0400 Subject: [PATCH 119/126] Improve Hog Wild NPC dialogue Co-authored-by: Cameron Ewell --- Localization/en-US/Mods.CalamityMod.Vanilla.hjson | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 6112f7085b..4ef15e5896 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -468,7 +468,7 @@ TownNPCMood: { } DyeTrader: { - Monument: Oh no no, that dull monument cannot be. Its mere presence makes me feel as though my dyes are less effective! + Monument: Oh no no, that dull monument cannot be. Its mere presence is sucking the color and vibrancy out of life itself! GiftPositive: What an extraordinary batch of rare flowers there was in that gift, friend! I must thank you for your help, browse my colors at reduced coin in exchange! GiftNegative: You think you can pull such a drab gift prank on me, I don't think so! I want no business of yours after that attack on my precious palettes! } @@ -510,7 +510,7 @@ TownNPCMood: { } Painter: { - Monument: Oh, no no no, that statue has gotta be the dullest artpiece I have ever seen. + Monument: That statue certainly is thought provoking. I'm awestruck by how bleak, dull, and hopeless it makes its environs feel. GiftPositive: How did ya know exactly the paint color I have been looking for? My newest mural greatly appreciates dat! GiftNegative: You must be sick and cruel, because that water bomb prank of yours washed all over my latest work! Aye, you oughta be covered in red, and not paint! } @@ -564,7 +564,7 @@ TownNPCMood: { } WitchDoctor: { - Monument: A vile disruption of nature, that monument is. My soul is filled with contempt in its existence. + Monument: A vile disruption of nature, that monument is. My soul is wracked with contempt for this unsightly edifice. GiftPositive: A kind offering to my people, this gift is. May you be blessed by kindred spirits in trying times. GiftNegative: Sacrilegious defilement against my arts - I speak of your false gift. May your woes be many, and your days few. } From 8a7cff95941713505b666900f8538f3e7f061d72 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 26 Apr 2026 14:05:17 -0400 Subject: [PATCH 120/126] Replaced AlcoholStrength buff ID set with using DebuffData AlcoholLevel Also changed AlcoholLevel to an int instead of a float --- CalPlayer/CalamityPlayerLifeRegen.cs | 11 +++------ DataStructures/DebuffData.cs | 2 +- Systems/Collections/CalamityBuffSets.cs | 31 ------------------------- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 92dc2c7a96..fcbf9daa02 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -193,8 +193,8 @@ namespace CalamityMod.CalPlayer for (int l = 0; l < Player.MaxBuffs; l++) { int buff = Player.buffType[l]; - if (CalamityBuffSets.AlcoholStrength.TryGetValue(buff, out int level)) - alcoholPoisonLevel += level; + if (BuffDatasets.DebuffDataset[buff] is not null && BuffDatasets.DebuffDataset[buff].AlcoholLevel > 0) + alcoholPoisonLevel += BuffDatasets.DebuffDataset[buff].AlcoholLevel; } if (Player.Calamity().ivDrip) // +1 stack of poisoning while IV Drip is equipped alcoholPoisonLevel++; @@ -557,12 +557,7 @@ namespace CalamityMod.CalPlayer if (community) { int regenBoost = 1 + (int)(TheCommunity.CalculatePower() * TheCommunity.RegenMultiplier); - bool lesserEffect = false; - for (int l = 0; l < Player.MaxBuffs; l++) - { - int hasBuff = Player.buffType[l]; - lesserEffect = CalamityBuffSets.AlcoholStrength.TryGetValue(hasBuff, out var a); - } + bool lesserEffect = Player.buffType.Any(i => BuffDatasets.DebuffDataset[i] is not null && BuffDatasets.DebuffDataset[i].AlcoholLevel > 0); if (Player.lifeRegen < 0) Player.lifeRegen += lesserEffect ? 1 : regenBoost; } diff --git a/DataStructures/DebuffData.cs b/DataStructures/DebuffData.cs index acec5f8f4a..d76bf10843 100644 --- a/DataStructures/DebuffData.cs +++ b/DataStructures/DebuffData.cs @@ -116,7 +116,7 @@ namespace CalamityMod.DataStructures /// How much alcohol this counts as. /// Default is 0, most alcohol is 1, and Everclear is 2 ///
- public float AlcoholLevel = 0f; + public int AlcoholLevel = 0; /// /// UNIMPLEMENTED. WILL BE DONE IN A FUTURE PR diff --git a/Systems/Collections/CalamityBuffSets.cs b/Systems/Collections/CalamityBuffSets.cs index 03d2a977f1..c6a3d2bdb2 100644 --- a/Systems/Collections/CalamityBuffSets.cs +++ b/Systems/Collections/CalamityBuffSets.cs @@ -93,36 +93,5 @@ namespace CalamityMod.Systems.Collections { BuffID.ThornWhipNPCDebuff, SummonTag.Snapthorn }, { BuffType(), ProfanedSoulCrystal.SummonTag } }; - - /// - /// Associates a buff type with its alcohol poison level. Used for the Alcohol Poisoning mechanic.
- /// If a buff type is not a key in this dictionary, then it does not increase alcohol poison level. - ///
- public static Dictionary AlcoholStrength = new Dictionary - { - { BuffID.Tipsy, 1 }, - { BuffType(), 3 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 2 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 }, - { BuffType(), 1 } - }; } } From 8715f73868df71e5d966139c8ed8e12870f047b7 Mon Sep 17 00:00:00 2001 From: Habble53 <87115317+Habble53@users.noreply.github.com> Date: Sun, 26 Apr 2026 21:39:58 +0300 Subject: [PATCH 121/126] Pygmy Staff now checks for aggro distance based on closest points in hitboxes rather than the centers --- ILEditing/BalancingILChanges.cs | 68 +++++++++++++++++++++++++++++++++ ILEditing/ILChangesLoading.cs | 3 ++ 2 files changed, 71 insertions(+) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 2e0e15714d..b9918f5a9b 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -748,5 +748,73 @@ namespace CalamityMod.ILEditing } } #endregion + + #region Tweak Pygmy Staff aggro distance logic + + private static void PygmyAggroOnClosestPointInHitbox(ILContext context) + { + ILCursor cursor = new(context); + if (!cursor.TryGotoNext(i => i.MatchStloc(131))) + {// Go to the latest newly set variable near the point we wanna be, as that is an easy unique instruction to jump to + // 131 is the number assigned to that variable in ILview + LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate unique Stloc(131) instruction nearest to aggro distance check."); + return; + } + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdloc(126))) + {// Before the minion range variable emission so as to receive the value being targetted at it + LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate the minion range variable."); + return; + } + cursor.Emit(OpCodes.Ldarg_0); // Emit the Projectile entity as we are in Projectile.cs::AI_026 + cursor.Emit(OpCodes.Ldloc, 129); // Emit the NPC index via the incremented loop variable + cursor.Emit(OpCodes.Ldloc, 6); // Emit the bool containing type check for pygmies + cursor.EmitDelegate((float distance, Projectile projectile, int npcIndex, bool pygmy) => + {// Replace the distance with a different value calculated off of closest point in hitboxes + if (!pygmy) + return distance; + + NPC npc = Main.npc[npcIndex]; + Player player = Main.player[projectile.owner]; + float finalDistance = npc.Hitbox.ClosestPointInRect(player.Center).Distance(player.Hitbox.ClosestPointInRect(npc.Center)); + return finalDistance; + }); + // That was part 1, time for part 2. + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchStloc(185))) + {// Go directly before the instruction that's meant to receive the distance value of this tagged NPC + LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate first unique Stloc(185) instruction."); + return; + } + cursor.Emit(OpCodes.Ldarg_0); + cursor.Emit(OpCodes.Ldloc, 181); // Emit the tagged NPC + cursor.Emit(OpCodes.Ldloc, 6); + cursor.EmitDelegate((float distance, Projectile projectile, NPC npc, bool pygmy) => + {// Replace the distance with a different value calculated off of closest point in hitboxes + if (!pygmy) + return distance; + + float finalDistance = npc.Hitbox.ClosestPointInRect(projectile.Center).Distance(projectile.Hitbox.ClosestPointInRect(npc.Center)); + return finalDistance; + }); + + if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchStloc(189))) + {// Go directly before the instruction that's meant to receive the distance value of this NPC currently being iterated over + LogFailure("Tweaking Pygmy Staff aggro distance logic", "Could not locate first unique Stloc(189) instruction."); + return; + } + cursor.Emit(OpCodes.Ldarg_0); + cursor.Emit(OpCodes.Ldloc, 186); // Emit the NPC index via the incremented loop variable + cursor.Emit(OpCodes.Ldloc, 6); + cursor.EmitDelegate((float distance, Projectile projectile, int npcIndex, bool pygmy) => + {// Replace the distance with a different value calculated off of closest point in hitboxes + if (!pygmy) + return distance; + + NPC npc = Main.npc[npcIndex]; + float finalDistance = npc.Hitbox.ClosestPointInRect(projectile.Center).Distance(projectile.Hitbox.ClosestPointInRect(npc.Center)); + return finalDistance; + }); + } + + #endregion Tweak Pygmy Staff aggro distance logic } } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index d5fb8e25e0..454d0141fb 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -187,6 +187,9 @@ namespace CalamityMod.ILEditing // Fix vanilla behaviour of not calling CheckDead for NPCs that realLife is set IL_NPC.StrikeNPC_HitInfo_bool_bool += EnsureCheckDeadOnSegments; + // Change Pygmy Staff minion AI to check distance based on closest points in hitboxes + IL_Projectile.AI_026 += PygmyAggroOnClosestPointInHitbox; + //Additional detours that are in their own item files given they are only relevant to these specific items: //Rover drive detours on Player.DrawInfernoRings to draw its shield //Wulfrum armor hooks on Player.KeyDoubleTap and DrawPendingMouseText to activate its set bonus and spoof the mouse text to display the stats of the activated weapon if shift is held From 027d1e03c8225d2a9d8100d2cfbdcc19aaaab97a Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 26 Apr 2026 17:20:21 -0400 Subject: [PATCH 122/126] horrible can't be applied normally --- Prefixes/HorribleWeaponPrefix.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Prefixes/HorribleWeaponPrefix.cs b/Prefixes/HorribleWeaponPrefix.cs index a4cb2c4fab..bb77ea8798 100644 --- a/Prefixes/HorribleWeaponPrefix.cs +++ b/Prefixes/HorribleWeaponPrefix.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Prefixes public virtual float sizeMult => 1f; public override PrefixCategory Category => PrefixCategory.AnyWeapon; - public override float RollChance(Item item) => 10; // Is manually applied by an item, can't be rerolled normally + public override float RollChance(Item item) => 0; // Is manually applied by an item, can't be rerolled normally public override bool CanRoll(Item item) { return item.DamageType != null && item.DamageType != DamageClass.Default; From ed67e85563c0113589ca6ca74e61215369c5aa18 Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 26 Apr 2026 19:10:19 -0400 Subject: [PATCH 123/126] Combat Voucher fixes --- Items/Tools/TinkerersVoucher.cs | 37 +++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/Items/Tools/TinkerersVoucher.cs b/Items/Tools/TinkerersVoucher.cs index c61afcffee..27802ea587 100644 --- a/Items/Tools/TinkerersVoucher.cs +++ b/Items/Tools/TinkerersVoucher.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Prefixes; using CalamityMod.Projectiles.Environment; @@ -234,22 +236,39 @@ namespace CalamityMod.Items.Tools public override int GetPrefixForItem(Player player, Item itemBeingReforged, bool isAccessory) { - int prefix; + int prefix = -1; + var category = itemBeingReforged.GetPrefixCategories(); - if (itemBeingReforged.DamageType == DamageClass.Melee) - prefix = PrefixID.Legendary; - else if (itemBeingReforged.DamageType == DamageClass.Ranged) + if (!category.Any()) + return -1; + + if ((itemBeingReforged).knockBack == 0f) // Weapons which do not apply knockback universally have demonic as their best reforge + prefix = PrefixID.Demonic; + + else if (itemBeingReforged.CountsAsClass() && itemBeingReforged.type != ModContent.ItemType()) + { + bool weirdMelee = !category.Contains(PrefixCategory.Melee); // Weapons which deal melee damage but cannot recieve melee prefixes because Item.noUseGraphic is true + + if (weirdMelee || itemBeingReforged.CountsAsClass()) + prefix = PrefixID.Godly; + else + prefix = PrefixID.Legendary; + } + else if (itemBeingReforged.CountsAsClass() || itemBeingReforged.type == ModContent.ItemType()) prefix = PrefixID.Unreal; - else if (itemBeingReforged.DamageType == DamageClass.Magic) + else if (itemBeingReforged.CountsAsClass()) prefix = PrefixID.Mythical; - else if (itemBeingReforged.DamageType == DamageClass.Summon) - prefix = PrefixID.Ruthless; - else + else if (itemBeingReforged.CountsAsClass()) + prefix = ModContent.PrefixType(); + else if (itemBeingReforged.CountsAsClass()) + prefix = itemBeingReforged.IsWhip() ? PrefixID.Legendary : PrefixID.Ruthless; + + else // Fallback case prefix = PrefixID.Godly; if (Main.rand.NextBool()) { - VoucherReforgeSystem.RollWon = true; + VoucherReforgeSystem.RollWon = true; return prefix; } else From aee8bd61784dc772ded71ee7f9e64b05c4b69471 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 26 Apr 2026 23:11:26 -0700 Subject: [PATCH 124/126] Removed Meld Constructs, made Meld Blobs fragment adjacent --- CalPlayer/CalamityPlayerOnHit.cs | 7 ---- Items/Accessories/DarkMatterSheath.cs | 2 +- Items/Accessories/TheAbsorber.cs | 2 +- Items/Accessories/Wings/ExodusWings.cs | 2 +- Items/Armor/Empyrean/EmpyreanCloak.cs | 2 +- Items/Armor/Empyrean/EmpyreanCuisses.cs | 2 +- Items/Armor/Empyrean/EmpyreanMask.cs | 2 +- Items/Materials/MeldBlob.cs | 16 ++++++-- Items/Materials/MeldBlob.png | Bin 1224 -> 462 bytes Items/Materials/MeldConstruct.cs | 33 ----------------- Items/Materials/MeldConstruct.png | Bin 1066 -> 0 bytes Items/Tools/GenesisPickaxe.cs | 2 +- Items/Weapons/Magic/Apathanull.cs | 2 +- Items/Weapons/Melee/EntropicClaymore.cs | 2 +- Items/Weapons/Ranged/DeadSunsWind.cs | 2 +- Items/Weapons/Rogue/ReboundingRainbow.cs | 2 +- Items/Weapons/Rogue/ShardofAntumbra.cs | 2 +- Items/Weapons/Rogue/StarofDestruction.cs | 2 +- .../Mods.CalamityMod.Items.Materials.hjson | 7 +--- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 35 ++++-------------- ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 - Projectiles/Typeless/EmpyreanGlob.cs | 34 ----------------- Projectiles/Typeless/EmpyreanGlob.png | Bin 462 -> 0 bytes 23 files changed, 33 insertions(+), 126 deletions(-) delete mode 100644 Items/Materials/MeldConstruct.cs delete mode 100644 Items/Materials/MeldConstruct.png delete mode 100644 Projectiles/Typeless/EmpyreanGlob.cs delete mode 100644 Projectiles/Typeless/EmpyreanGlob.png diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 21b30df04d..5f5b435220 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -1030,13 +1030,6 @@ namespace CalamityMod.CalPlayer Projectile.NewProjectile(spawnSource, proj.Center, Vector2.Zero, ProjectileType(), blastDamage, 0f, proj.owner, 0f, 0f); break; - case 4: - // Exodus Rogue Bubble: 60% - int bubbleDamage = (int)(proj.damage * 0.6f); - CalamityUtils.SpawnOrb(proj, bubbleDamage, ProjectileType(), 800f, 15f); - xerocDmg += (int)(bubbleDamage * 0.5); - break; - default: break; } diff --git a/Items/Accessories/DarkMatterSheath.cs b/Items/Accessories/DarkMatterSheath.cs index c77de6db38..c84de1d85c 100644 --- a/Items/Accessories/DarkMatterSheath.cs +++ b/Items/Accessories/DarkMatterSheath.cs @@ -34,7 +34,7 @@ namespace CalamityMod.Items.Accessories CreateRecipe(). AddIngredient(). AddIngredient(). - AddIngredient(5). + AddIngredient(14). //Consistent with Vanilla lunar wing costs AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Accessories/TheAbsorber.cs b/Items/Accessories/TheAbsorber.cs index 08416580fe..91bac3cf1e 100644 --- a/Items/Accessories/TheAbsorber.cs +++ b/Items/Accessories/TheAbsorber.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Accessories AddIngredient(). AddIngredient(). AddIngredient(5). - AddIngredient(6). + AddIngredient(14). //Consistent with Vanilla lunar wing costs AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Accessories/Wings/ExodusWings.cs b/Items/Accessories/Wings/ExodusWings.cs index 015f195b2d..2c7bd99117 100644 --- a/Items/Accessories/Wings/ExodusWings.cs +++ b/Items/Accessories/Wings/ExodusWings.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Items.Accessories.Wings { CreateRecipe(). AddIngredient(ItemID.SoulofFlight, 20). - AddIngredient(14). + AddIngredient(14). AddIngredient(ItemID.LunarBar, 10). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Armor/Empyrean/EmpyreanCloak.cs b/Items/Armor/Empyrean/EmpyreanCloak.cs index 4d16ffe959..0e0afa9361 100644 --- a/Items/Armor/Empyrean/EmpyreanCloak.cs +++ b/Items/Armor/Empyrean/EmpyreanCloak.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Armor.Empyrean public override void AddRecipes() { CreateRecipe(). - AddIngredient(20). + AddIngredient(20). AddIngredient(ItemID.LunarBar, 16). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Armor/Empyrean/EmpyreanCuisses.cs b/Items/Armor/Empyrean/EmpyreanCuisses.cs index ff7916ea14..54044dfcdd 100644 --- a/Items/Armor/Empyrean/EmpyreanCuisses.cs +++ b/Items/Armor/Empyrean/EmpyreanCuisses.cs @@ -36,7 +36,7 @@ namespace CalamityMod.Items.Armor.Empyrean public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(15). AddIngredient(ItemID.LunarBar, 12). AddTile(TileID.LunarCraftingStation). Register(); diff --git a/Items/Armor/Empyrean/EmpyreanMask.cs b/Items/Armor/Empyrean/EmpyreanMask.cs index 08759c2a23..8c9505f16a 100644 --- a/Items/Armor/Empyrean/EmpyreanMask.cs +++ b/Items/Armor/Empyrean/EmpyreanMask.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Items.Armor.Empyrean public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). + AddIngredient(10). AddIngredient(ItemID.LunarBar, 8). AddTile(TileID.LunarCraftingStation). SortBeforeFirstRecipesOf(ModContent.ItemType()). diff --git a/Items/Materials/MeldBlob.cs b/Items/Materials/MeldBlob.cs index c7bb47de1b..3b87947858 100644 --- a/Items/Materials/MeldBlob.cs +++ b/Items/Materials/MeldBlob.cs @@ -7,18 +7,26 @@ namespace CalamityMod.Items.Materials public class MeldBlob : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Materials"; + public override void SetStaticDefaults() { - Item.ResearchUnlockCount = 100; + Item.ResearchUnlockCount = 25; + ItemID.Sets.ItemIconPulse[Type] = true; } public override void SetDefaults() { - Item.width = 16; - Item.height = 14; + Item.width = 24; + Item.height = 22; Item.maxStack = Item.CommonMaxStack; Item.value = Item.sellPrice(silver: 20); - Item.rare = ItemRarityID.Red; + Item.rare = ItemRarityID.Cyan; + ItemID.Sets.ItemNoGravity[Type] = true; + } + public override void Update(ref float gravity, ref float maxFallSpeed) + { + float brightness = Main.essScale * Main.rand.NextFloat(0.9f, 1.1f); + Lighting.AddLight(Item.Center, 0.5f * brightness, 0.5f * brightness, 0.5f * brightness); } } } diff --git a/Items/Materials/MeldBlob.png b/Items/Materials/MeldBlob.png index a24387680f6d1f4341a71f40bad7853995edf36d..1c0aafc145911e1f1960c1be7985d757f2d75088 100644 GIT binary patch literal 462 zcmV;<0WtoGP)Px$h)G02R7i=vlut_nK^Vq=WBy@7gWWJ9Nl1*qYX%a20K0eUUZ=i8^bxxH0qi3L zeSi>@?jaZyk{wz}g+)-O!}uaDyU`){ciCZ>nSGx3nRnEIbIJk@kg-w|iinf- zI}oKpY9UyZ<(#cw52%z+0BE*b8lYUtDu7(S21MaN2GiMG0epUs18tg`wjgAH=nfQ2--vqJtC)GB1jo z?G^w%*L=^vF3rN5=aqfy&%pl{h1FOPXMUfy* z!)}|f{tRRwSva;0fIApySk_b!C;lw_wcmAgM4jxP5GUnQ7J!ew=@02p!JmmB%KNT4 zI(i2}wP@b+LOu;Z_bvF96}ETw6u@RW1Hk>`9T0(oAMS8_B@`b-qyPW_07*qoM6N<$ Ef}C~6?f?J) literal 1224 zcmV;(1ULJMP)Px(f=NU{R9J=8nBQ*{RTRfRvz>0+ErpfswuLQpX-b2Trdf^nfT9vGh$O}rQivfW zCMG^;eD*=3?-Z}Tz=bm%t>{{HTo*3GzkB(bf0N-biFKe90y)NW_$@(XQJ9cbHcO3LS$UaEn zC*rfyyZV5SuK;jut!)9!#ag8P&F8-Jg@%azFKi4FLF(x20-!u!1R&erwygduiin{g z?~l1ex_j3HP%K}w0H#_hj&BE#!cU~ITD-h!TgKV;J^cdE?EQlqS4n$8>gl);nkrTR zNJe7vK489;K&0`?IO9D7Yb=00Z@p&N=WmHwW?0H|m!*GfAq_wzJ_o>fz{Q!hCHnQgrmz`;bD1MugO%|_qBk1iPGiX|DlD<(uQOp32%C#Bn`Cq6Ld3k{Jb zANkll`!kmo0GPef13+xOY$jtpI}d*rEm-AVpLu8})M0I}lt^?co zg0H={?|SBy#u^|*MC|@*mwX*hod6)SWysesh(u>{#HcTpu8N&baA`uyfCWs~=Vkom zt^2{LX`!i2TL3ur)lp!Hgvv`mRla;y22At;5bf*+?jYm(hPC5a0KTr~09aRz$~^yV z{r6viIqSaX_5*PIS2^R>*g62J3CS~}`31wi-Y!GwebKQ&@)q@}T0*{2w(E;ZrgOUJ zK!}J~4|j`CB;sj_o{QfCFzQCncuCf(M7&bpP$H^^k9eX?+v{#LZ60_E2oVvxx>y31 zNURyws3-%?J5nDAlI~dTbf=N|Tk_z(*J%8G_N-y|zssI0&G^3XW?WtpUY}^RyJt`5 zYTx%dj@~z_@DS05)>ZPG_U6R60}yr3P0SWN95eHq@I{S2OfAa2(X%LL zXSK(KRz>~|@Dfmsdh(Z3e_RBXvV7H;OXRVAV(%prJ|Ze7DnuMNtG7M*h(?i;(ELS7 zs77LSqpsQf*z->UFx@86ruR{3h&26Ik&O51qY*XUo6x)CTwS6r9Vz?PRZ38$`Ob3)%Cwj-w0ArzM={*5wDa`Ylr-EyjU)oz7uV;0BY3*Z&v`Eh)m(M mNEwN?OKG>6<#Jd4p!7FZ5_F#^k%W@~0000| diff --git a/Items/Materials/MeldConstruct.cs b/Items/Materials/MeldConstruct.cs deleted file mode 100644 index 3fe527e5cc..0000000000 --- a/Items/Materials/MeldConstruct.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Materials -{ - [LegacyName("MeldiateBar")] - public class MeldConstruct : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Materials"; - public override void SetStaticDefaults() - { - Item.ResearchUnlockCount = 25; - } - - public override void SetDefaults() - { - Item.width = 15; - Item.height = 12; - Item.maxStack = Item.CommonMaxStack; - Item.value = Item.sellPrice(silver: 42); - Item.rare = ItemRarityID.Red; - } - public override void AddRecipes() - { - CreateRecipe(3). - AddIngredient(6). - AddIngredient(3). - AddTile(TileID.LunarCraftingStation). - Register(); - } - } -} diff --git a/Items/Materials/MeldConstruct.png b/Items/Materials/MeldConstruct.png deleted file mode 100644 index 1150c8db8f431919f46e5221548d679d84c8f19d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1066 zcmV+_1l9YAP)Px&1FkiERUs7>%}yw1~z-JO~QnK|Od7 z>A{OAco4k!2RwKvUOb41^yEPVi=r0)^&q*+77_U>~8=xUDp6OwHk2!(->Xw{ktMdF$J%9|dMd0e(tovZ8i1IeolYWU0Gj0jurayrBeqfYsTP_N zKd^fgfFpCq0T@V4S^cWnV?gKRB1^1oRz9-#b^yMfKWk;*LQ~>OXyN?DmgDP{JOI7@ zBLKuF9t5D8J?8mc{@35#M=ZT90l=YyPXO@J`=46zoFm>C^B-+yIt{>AXNIkQ>MhmQ zvAbj~jSIN+aN3G5{_q*ljl`yR-D;gHxzn%T1HgwPuUYZQWg*bK^sCkW&a2M@@a0d! zAoo`efO22m!)30dRzPY!tiue|+1%L$&Xy$8Ty_XVq6y%iq!@XSE~PL?kifKuF8-?hkR zWh-LVJ3o5r6ChY4=L;ok0`;1D%pI`5W2)UoR)BLC<-2AM%v$ljYSRE@3UwgL#L^Ev z4!~%&2Y_9PogM_FX779wfMWhT05Z2t0KqPzos?W+OB{gmdKG9-ZqFapYxe|ECYHM6 zUI2QAcX$Bx>@PrjQthM!gBrlrN=itX%L@Q_JICbs<52*{M`ia>SznGgvGJ(~04NoH z_aGppQeu-c@6>;KfN$nLmdbgHY&agfZ$A)t zDojpEDY?6cWDz;+$CXr=oYn%`zIOQp0M6=)9Q`UPvcybkNW9_2hf2})Ww65B^E0zU$GiYLkdSP<`{tC z0jZXb%pLb2@WxY*w$4_Su8C*=mh5xZ8#2Em^Lo9qhMGzlfUBX3JhH?({@c^j+Yi9a z$w2_}i+PLS{G0a!F!l21KtQN3E*`4p!U_}Iw(12) + .AddIngredient(12) .AddIngredient(ItemID.LunarBar, 10) .AddTile(TileID.LunarCraftingStation) .Register(); diff --git a/Items/Weapons/Magic/Apathanull.cs b/Items/Weapons/Magic/Apathanull.cs index be57d1a227..71c021eeaa 100644 --- a/Items/Weapons/Magic/Apathanull.cs +++ b/Items/Weapons/Magic/Apathanull.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Items.Weapons.Magic { CreateRecipe(). AddIngredient(ItemID.SpellTome). - AddIngredient(9). + AddIngredient(18). AddTile(TileID.Bookcases). Register(); } diff --git a/Items/Weapons/Melee/EntropicClaymore.cs b/Items/Weapons/Melee/EntropicClaymore.cs index d1978f29e1..6fa77ead69 100644 --- a/Items/Weapons/Melee/EntropicClaymore.cs +++ b/Items/Weapons/Melee/EntropicClaymore.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void AddRecipes() { CreateRecipe(). - AddIngredient(15). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Ranged/DeadSunsWind.cs b/Items/Weapons/Ranged/DeadSunsWind.cs index ac6a849c6c..75de902a0f 100644 --- a/Items/Weapons/Ranged/DeadSunsWind.cs +++ b/Items/Weapons/Ranged/DeadSunsWind.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/ReboundingRainbow.cs b/Items/Weapons/Rogue/ReboundingRainbow.cs index e006335ca7..eef227ac32 100644 --- a/Items/Weapons/Rogue/ReboundingRainbow.cs +++ b/Items/Weapons/Rogue/ReboundingRainbow.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Items.Weapons.Rogue AddIngredient(). AddIngredient(ItemID.LunarBar, 5). AddIngredient(5). - AddIngredient(5). + AddIngredient(5). AddTile(TileID.MythrilAnvil). Register(); } diff --git a/Items/Weapons/Rogue/ShardofAntumbra.cs b/Items/Weapons/Rogue/ShardofAntumbra.cs index 40adf3c663..25dbb66d20 100644 --- a/Items/Weapons/Rogue/ShardofAntumbra.cs +++ b/Items/Weapons/Rogue/ShardofAntumbra.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(12). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Rogue/StarofDestruction.cs b/Items/Weapons/Rogue/StarofDestruction.cs index 3c9d4d3ddf..e80d3a6b99 100644 --- a/Items/Weapons/Rogue/StarofDestruction.cs +++ b/Items/Weapons/Rogue/StarofDestruction.cs @@ -68,7 +68,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { CreateRecipe(). - AddIngredient(18). + AddIngredient(18). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson index ba2ebe56aa..4191c43316 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Materials.hjson @@ -175,12 +175,7 @@ Lumenyl: { MeldBlob: { DisplayName: Meld Blob - Tooltip: "" -} - -MeldConstruct: { - DisplayName: Meld Construct - Tooltip: "" + Tooltip: "'Shrieks of distorted memories echo within this mass' " } MiracleMatter: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index ff140ef3a8..a3f4cfa7b6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -223,10 +223,7 @@ CosmicViperEngine: { Cosmilamp: { DisplayName: Cosmilamp - Tooltip: - ''' - Summons a cosmic lantern above your head to fight for you - ''' + Tooltip: Summons a cosmic lantern above your head to fight for you } CrimslimeStaff: { @@ -352,10 +349,7 @@ EndoHydraStaff: { EntropysVigil: { DisplayName: Entropy's Vigil - Tooltip: - ''' - Summons a mini Calamitas Clone and her brothers to protect you - ''' + Tooltip: Summons a mini Calamitas Clone and her brothers to protect you } EtherealSubjugator: { @@ -394,10 +388,7 @@ FleshOfInfidelity: { FlowersOfMortality: { DisplayName: Flowers of Mortality - Tooltip: - ''' - Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] - ''' + Tooltip: Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] } ForgottenApexWand: { @@ -695,10 +686,7 @@ SeashineHilt: { ShellfishStaff: { DisplayName: Shellfish Staff - Tooltip: - ''' - Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] - ''' + Tooltip: Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] } Sirius: { @@ -901,18 +889,12 @@ VoidEaterMarionette: { WarloksMoonFist: { DisplayName: Warloks' Moon Fist - Tooltip: - ''' - Summons a celestial fist to punch enemies for you - ''' + Tooltip: Summons a celestial fist to punch enemies for you } WitherBlossomsStaff: { DisplayName: Wither Blossoms Staff - Tooltip: - ''' - Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head - ''' + Tooltip: Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head } WulfrumController: { @@ -929,8 +911,5 @@ WulfrumController: { YharonsKindleStaff: { DisplayName: Yharon's Kindle Staff - Tooltip: - ''' - Summons a fiery draconid to fight for you - ''' + Tooltip: Summons a fiery draconid to fight for you } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 109eb101f0..394c1b335c 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -51,7 +51,6 @@ DuneSandBallGun.DisplayName: Dunesand Ball EarlyBloomBobber.DisplayName: Early Bloom Bobber EmpyreanBlast.DisplayName: Empyrean Blast EmpyreanEmber.DisplayName: Empyrean Ember -EmpyreanGlob.DisplayName: Empyeran Glob EmpyreanMarble.DisplayName: Empyrean Marble EmpyreanStellarDetritus.DisplayName: Empyrean Stellar Detritus EnergyShell.DisplayName: Energy Shell diff --git a/Projectiles/Typeless/EmpyreanGlob.cs b/Projectiles/Typeless/EmpyreanGlob.cs deleted file mode 100644 index 56e03ac2c9..0000000000 --- a/Projectiles/Typeless/EmpyreanGlob.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class EmpyreanGlob : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - public override void SetStaticDefaults() => ProjectileID.Sets.CultistIsResistantTo[Type] = true; - public override void SetDefaults() - { - Projectile.width = 20; - Projectile.height = 20; - Projectile.alpha = 100; - Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.tileCollide = false; - Projectile.timeLeft = 200; - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - if (Projectile.localAI[0] > 4f) - { - int ourpleDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.PurpleTorch, 0f, 0f, 100, default, 1f); - Main.dust[ourpleDust].noGravity = true; - Main.dust[ourpleDust].velocity *= 0f; - } - CalamityUtils.HomeInOnNPC(Projectile, true, 200f, 8f, 20f); - } - } -} diff --git a/Projectiles/Typeless/EmpyreanGlob.png b/Projectiles/Typeless/EmpyreanGlob.png deleted file mode 100644 index 1c0aafc145911e1f1960c1be7985d757f2d75088..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 462 zcmV;<0WtoGP)Px$h)G02R7i=vlut_nK^Vq=WBy@7gWWJ9Nl1*qYX%a20K0eUUZ=i8^bxxH0qi3L zeSi>@?jaZyk{wz}g+)-O!}uaDyU`){ciCZ>nSGx3nRnEIbIJk@kg-w|iinf- zI}oKpY9UyZ<(#cw52%z+0BE*b8lYUtDu7(S21MaN2GiMG0epUs18tg`wjgAH=nfQ2--vqJtC)GB1jo z?G^w%*L=^vF3rN5=aqfy&%pl{h1FOPXMUfy* z!)}|f{tRRwSva;0fIApySk_b!C;lw_wcmAgM4jxP5GUnQ7J!ew=@02p!JmmB%KNT4 zI(i2}wP@b+LOu;Z_bvF96}ETw6u@RW1Hk>`9T0(oAMS8_B@`b-qyPW_07*qoM6N<$ Ef}C~6?f?J) From 2dd9daac55cdca448f1d788de1d9e93ce5d1b3a4 Mon Sep 17 00:00:00 2001 From: Critaquil Date: Mon, 27 Apr 2026 02:35:51 -0400 Subject: [PATCH 125/126] Omni Gun Changes - Granade self damage from 100 scaling to 120 scaling - damage from 75 to 57 and shotgun damage mult from 2.6 to 3 - rarity from pure green to yellow --- Items/Weapons/Ranged/OmniGun.cs | 6 +++--- Projectiles/Ranged/OmniGrenade.cs | 6 +++--- Projectiles/Ranged/OmniGunHoldout.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Items/Weapons/Ranged/OmniGun.cs b/Items/Weapons/Ranged/OmniGun.cs index 2ee1c77800..8711433e00 100644 --- a/Items/Weapons/Ranged/OmniGun.cs +++ b/Items/Weapons/Ranged/OmniGun.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 118; Item.height = 32; - Item.damage = 72; + Item.damage = 57; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = 6; Item.useStyle = ItemUseStyleID.Shoot; @@ -33,8 +33,8 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shootSpeed = 16f; Item.useAmmo = AmmoID.Bullet; - Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.rare = ModContent.RarityType(); + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; } public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; public override bool CanConsumeAmmo(Item ammo, Player player) => player.ownedProjectileCounts[Item.shoot] > 0 && Main.rand.Next(100) >= AmmoSavedPercent; diff --git a/Projectiles/Ranged/OmniGrenade.cs b/Projectiles/Ranged/OmniGrenade.cs index b6f1f8979b..3433fc25f1 100644 --- a/Projectiles/Ranged/OmniGrenade.cs +++ b/Projectiles/Ranged/OmniGrenade.cs @@ -88,9 +88,9 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitPlayer(Player target, ref Player.HurtModifiers modifiers) { modifiers.SourceDamage *= 0f; - if (Main.masterMode) modifiers.SourceDamage.Flat += 200f; - else if (Main.expertMode) modifiers.SourceDamage.Flat += 150f; - else modifiers.SourceDamage.Flat += 100f; + if (Main.masterMode) modifiers.SourceDamage.Flat += 240f; + else if (Main.expertMode) modifiers.SourceDamage.Flat += 180f; + else modifiers.SourceDamage.Flat += 120f; } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Ranged/OmniGunHoldout.cs b/Projectiles/Ranged/OmniGunHoldout.cs index 8a36f1a7e2..6a5c6f65a4 100644 --- a/Projectiles/Ranged/OmniGunHoldout.cs +++ b/Projectiles/Ranged/OmniGunHoldout.cs @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Ranged Owner.velocity += -Projectile.velocity * 7f; for (int i = 0; i < 8; i++) - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 1.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 2.6f), Projectile.knockBack, Projectile.owner); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, shootVelocity.RotatedByRandom(MathHelper.ToRadians(15f)) * Main.rand.NextFloat(0.5f, 1.5f), ModContent.ProjectileType(), (int)(Projectile.damage * 3f), Projectile.knockBack, Projectile.owner); shotCounter++; if (shotCounter > 11) framesBetweenShots = 30; From f63915f300f2f6d221c33cfedc6d46b29bc42de4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 27 Apr 2026 18:17:57 -0400 Subject: [PATCH 126/126] Several mundane fixes --- Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs | 1 - Projectiles/Melee/BurningHolyBlast.cs | 1 - Projectiles/Melee/HolyColliderHoldout.cs | 1 - Projectiles/Melee/SkytideDragoonHoldout.cs | 6 +++--- Projectiles/Melee/StarofOrder.cs | 1 - 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs index 520ae1e5c4..caf3411e63 100644 --- a/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseCustomUseStyleProjectile.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using rail; using ReLogic.Content; using Terraria; using Terraria.DataStructures; diff --git a/Projectiles/Melee/BurningHolyBlast.cs b/Projectiles/Melee/BurningHolyBlast.cs index 15f81199ae..5837114826 100644 --- a/Projectiles/Melee/BurningHolyBlast.cs +++ b/Projectiles/Melee/BurningHolyBlast.cs @@ -1,5 +1,4 @@ using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Build.Construction; using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index e790d631b5..3b7847423b 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -165,7 +165,6 @@ namespace CalamityMod.Projectiles.Melee SoundStyle fullCharge = new("CalamityMod/Sounds/Custom/Providence/ProvidenceBurn"); SoundEngine.PlaySound(fullCharge with { Volume = 0.7f, Pitch = 0.5f }, Projectile.Center); - chargedSwing = true; chargedSwing = true; useAnim = storedUseAnim / 2; chargeTimer++; diff --git a/Projectiles/Melee/SkytideDragoonHoldout.cs b/Projectiles/Melee/SkytideDragoonHoldout.cs index fe9c672a73..43171a0be7 100644 --- a/Projectiles/Melee/SkytideDragoonHoldout.cs +++ b/Projectiles/Melee/SkytideDragoonHoldout.cs @@ -272,11 +272,11 @@ namespace CalamityMod.Projectiles.Melee float bonus = (1 - (7 / (attackPower + 1))) * 0.3f; Vector2 pos = Owner.Center + (new Vector2(160 * Projectile.scale, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45)).RotatedByRandom(0.05f)); Vector2 vel = Projectile.rotation.ToRotationVector2().RotatedBy(MathHelper.ToRadians(-45)).RotatedByRandom(0.5f) * Main.rand.NextFloat(6f, 10f); - Dust dust = Dust.NewDustPerfect(pos, Main.rand.NextBool(3) ? 278 : ModContent.DustType(), vel * (1 + bonus), 0, default, Main.rand.NextFloat(1.05f, 1.4f)); - dust.noGravity = !(dust.type == 278); + Dust dust = Dust.NewDustPerfect(pos, Main.rand.NextBool(3) ? DustID.FireworksRGB : ModContent.DustType(), vel * (1 + bonus), 0, default, Main.rand.NextFloat(1.05f, 1.4f)); + dust.noGravity = dust.type != DustID.FireworksRGB; dust.color = color; dust.scale += bonus; - if (dust.type != 278) + if (dust.type != DustID.FireworksRGB) { dust.scale *= Projectile.scale; dust.fadeIn = Projectile.scale - 1; diff --git a/Projectiles/Melee/StarofOrder.cs b/Projectiles/Melee/StarofOrder.cs index 70ea4ffbad..8a794b9401 100644 --- a/Projectiles/Melee/StarofOrder.cs +++ b/Projectiles/Melee/StarofOrder.cs @@ -2,7 +2,6 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; using CalamityMod.Particles; -using Microsoft.Build.Construction; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria;