From 6be98366b547ee2e9db060cef24db8cc5ff761bf Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:58:03 +0700 Subject: [PATCH] crystal leaf --- Buffs/CalamityGlobalBuff.cs | 4 - .../ChlorophyteArmorSetChange.cs | 30 ------ ...ods.CalamityMod.Projectiles.Typeless.hjson | 1 - .../Mods.CalamityMod.Vanilla.Armor.hjson | 9 -- .../en-US/Mods.CalamityMod.Vanilla.hjson | 1 - Projectiles/CalamityGlobalProjectile.cs | 11 --- Projectiles/Typeless/ChlorophyteLifePulse.cs | 90 ------------------ Projectiles/Typeless/ChlorophyteLifePulse.png | Bin 4689 -> 0 bytes .../ChlorophyteCrystalAI.cs | 85 ----------------- 9 files changed, 231 deletions(-) delete mode 100644 Items/VanillaArmorChanges/ChlorophyteArmorSetChange.cs delete mode 100644 Projectiles/Typeless/ChlorophyteLifePulse.cs delete mode 100644 Projectiles/Typeless/ChlorophyteLifePulse.png delete mode 100644 Projectiles/VanillaProjectileOverrides/ChlorophyteCrystalAI.cs diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 28c7af8b79..c1ecb0779f 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -200,10 +200,6 @@ namespace CalamityMod.Buffs tip = tip.Replace("25", "15"); break; - case BuffID.LeafCrystal: - tip = CalamityUtils.GetTextValue("Vanilla.BuffDescription.LeafCrystal"); - break; - case BuffID.MagicPower: tip = tip.Replace("20", "10"); break; diff --git a/Items/VanillaArmorChanges/ChlorophyteArmorSetChange.cs b/Items/VanillaArmorChanges/ChlorophyteArmorSetChange.cs deleted file mode 100644 index f284793d44..0000000000 --- a/Items/VanillaArmorChanges/ChlorophyteArmorSetChange.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Terraria.ID; - -namespace CalamityMod.Items.VanillaArmorChanges -{ - public class ChlorophyteArmorSetChange : VanillaArmorChange - { - public override int? HeadPieceID => ItemID.ChlorophyteHeadgear; - - public override int? BodyPieceID => ItemID.ChlorophytePlateMail; - - public override int? LegPieceID => ItemID.ChlorophyteGreaves; - - public override int[] AlternativeHeadPieceIDs => new int[] { ItemID.ChlorophyteMask, ItemID.ChlorophyteHelmet }; - - public override string ArmorSetName => "Chlorophyte"; - - public const int AmountToHealPerPulse = 5; - - public const int PulseReleaseRate = 300; - - public const int DelayBetweenHeals = 270; - - public const int BaseDamageToEnemies = 220; - - public override void UpdateSetBonusText(ref string setBonusText) - { - setBonusText = $"{CalamityUtils.GetText($"Vanilla.Armor.SetBonus.{ArmorSetName}").Format(PulseReleaseRate / 60f, BaseDamageToEnemies, AmountToHealPerPulse, DelayBetweenHeals / 60f)}"; - } - } -} diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson index 27ff772d95..fe21625893 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Typeless.hjson @@ -31,7 +31,6 @@ BossRushEndEffectThing.DisplayName: Boss Rush End Effect Thing BossRushFailureEffectThing.DisplayName: Boss Rush Failure Effect Thing BossRushTierAnimation.DisplayName: Boss Rush Tier Animation ChaoticGeyser.DisplayName: Chaotic Geyser -ChlorophyteLifePulse.DisplayName: Life Pulse ChronoClock.DisplayName: Chrono Clock ClaretCannonProj.DisplayName: Claret Round CoralBubble.DisplayName: Bubble diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson index 30f140caee..3ea54b5b73 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.Armor.hjson @@ -10,15 +10,6 @@ SetBonus: { Melee: 15% increased melee speed and 20% increased movement speed } - Chlorophyte: - ''' - Summons a powerful leaf crystal to shoot pulses of life every {0} seconds - The pulses do a base damage of {1} to enemies within its range - The pulses also provide a {2} health boost to you and all players on your team - Players healed by pulses cannot be healed by another pulse until {3} seconds have passed - Both the health boost and the damage scale based on your strongest class - ''' - Cobalt: { $parentVal: ''' diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index 6ee2e522b3..befd463aaa 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -255,7 +255,6 @@ BuffDescription: { Banner: You have increased damage and defense against the following: BeetleMight: Melee damage and speed increase by {0}% and {1}% respectively ChaosState: Rod of Discord teleports are disabled - LeafCrystal: Emits powerful life pulses at nearby enemies Rabies: Decreased life regen, Causes status effects WarmthExtra: Reduced durations of Chilled and Frozen WeaponImbueConfetti: All attacks cause confetti to appear diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 6fe1f34c6c..4a119a31f7 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -431,10 +431,6 @@ namespace CalamityMod.Projectiles projectile.Kill(); } - // Chlorophyte Crystal AI rework. - if (projectile.type == ProjectileID.CrystalLeaf) - return ChlorophyteCrystalAI.DoChlorophyteCrystalAI(projectile); - if (projectile.minion && ExplosiveEnchantCountdown > 0) { ExplosiveEnchantCountdown--; @@ -4200,13 +4196,6 @@ namespace CalamityMod.Projectiles shouldDrawBool = false; } - // Chlorophyte Crystal AI rework. - if (projectile.type == ProjectileID.CrystalLeaf) - { - ChlorophyteCrystalAI.DoChlorophyteCrystalDrawing(projectile); - shouldDrawBool = false; - } - if (Main.LocalPlayer.Calamity().trippy) OddMushroomProjectileDrawing(projectile); diff --git a/Projectiles/Typeless/ChlorophyteLifePulse.cs b/Projectiles/Typeless/ChlorophyteLifePulse.cs deleted file mode 100644 index 98e98e702e..0000000000 --- a/Projectiles/Typeless/ChlorophyteLifePulse.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CalamityMod.Items.VanillaArmorChanges; -using CalamityMod.Projectiles.VanillaProjectileOverrides; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Typeless -{ - public class ChlorophyteLifePulse : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Typeless"; - - public const int Lifetime = 60; - - public float LifetimeCompletion => 1f - Projectile.timeLeft / (float)Lifetime; - - public override void SetDefaults() - { - Projectile.width = 96; - Projectile.height = 96; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 30; - Projectile.timeLeft = Lifetime; - } - - public override bool? CanHitNPC(NPC target) => !target.CountsAsACritter && !target.friendly && target.chaseable; - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => Projectile.damage = (int)(Projectile.damage * 0.8f); - - public override void AI() - { - Projectile.Opacity = 1f - (float)Math.Pow(LifetimeCompletion, 1.56); - Projectile.scale = MathHelper.Lerp(0.5f, 6f, LifetimeCompletion); - - // Heal all members of the same team. - if (Projectile.timeLeft == (int)(Lifetime * 0.925f)) - { - Player owner = Main.player[Projectile.owner]; - List membersOfSameTeam = new List() - { - owner - }; - if (owner.team != 0) - membersOfSameTeam.AddRange(Main.player.Where(p => p.team == owner.team && p.active && !p.dead)); - - foreach (Player player in membersOfSameTeam) - { - if (player.Calamity().ChlorophyteHealDelay > 0) - continue; - - int healQuantity = (int)owner.GetBestClassDamage().ApplyTo(ChlorophyteArmorSetChange.AmountToHealPerPulse); - player.HealPlayer(healQuantity); - player.Calamity().ChlorophyteHealDelay = ChlorophyteArmorSetChange.DelayBetweenHeals; - } - } - } - - public override Color? GetAlpha(Color lightColor) - { - Color c1 = new Color(142, 255, 155, 0); - Color c2 = new Color(0, 142, 113, 92); - return Color.Lerp(c1, c2, 1f - Projectile.Opacity) * Projectile.Opacity * 0.67f; - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Color drawColor = Projectile.GetAlpha(lightColor) * 0.4f; - for (int i = 0; i < 8; i++) - { - Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 4f; - Vector2 drawPosition = Projectile.Center - Main.screenPosition + drawOffset; - Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, 0f, texture.Size() * 0.5f, Projectile.scale, 0, 0); - } - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.scale * 48f, targetHitbox); - - public override bool OnTileCollide(Vector2 oldVelocity) => false; - } -} diff --git a/Projectiles/Typeless/ChlorophyteLifePulse.png b/Projectiles/Typeless/ChlorophyteLifePulse.png deleted file mode 100644 index f51029ba2170a62d1cec2b0d0502768b3ea64a79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4689 zcmZ8lc|6qH`=2pmi!r%kvJK*nvZQ1X*_tA0DB1U{GqwoXnIT&xBoWy{mN52xnXIL( zS%(-DnZnrj`i<(|+wc3w`JC5zea`m0pZ9sr^FC46wKX6|c#Z%70Ep(5OS-h$>aZ{| z(7rQC-tx2x=%K4|5m4O2w?J!v9n{cj06=LB%l<8TTASJJim?X(z}9+LfStGVYyklF zIn7IIdOjA5A2-THG}#%c#uFfK??fWB-sU_V%YJNoDiP^M$1FdAq+<%X%;p`XI%g@Y z()etRvXL^$KRzaRdw1{MQp!?S*K&11Sy_RTAEG|epK)nCw0Cti(#yS-XhSE()SyBw zA})hI&`(>~J+TXwl>M+Dsa(wAqeq6|Z-aF^qeET1^0ZQo55CW+;kUrw|GE;*HXV!) zrZ@Y6B3I*`=$cvgFSyB0|4{bmR$9_m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gsOS;SC4;pj&0CUk#x?{uY>$1aH1LL(KFix$tV}?do4HSRIf=8RQF0ga z4Qo=M*`}NIXjKCo+~rPeR=8s~vvkDO8&0JR*xkp%9~Zcc0}A!xmpRw80)F4cF9M4i z8P8z-Jji-VND%L}y1rX@zmO_Xjl!-=Edvg8Nh zh4x&oBnwNSh(G6e=)bq?N3uo2VDQ=@P`D!))z9!mQ`25hDPGt#Pht(kmah|0=<1SP z%Z6$(B+Lt2Mg$Ro8fK;|She^_`%YP2|EmpzY`Y}%+A1cQBRQR03ZcdLf_VQGJ4?=0Fim1As6rpr5lk^YNq z60j9v`oO2Facu8=PUC|VFj_f8|rwL zycNmwPCgoi_**1{HHXI@Zsrl=pK#+Tr0P(XQgn0cc8GtPpPMb$&N-hQe8I}6`T?@! z)J7I=(U^q`D%PMjEUZ|nZ{qNn<2J-jCxJ4tT&0&g%Tq?|*2nfLUS7orz7q=WbfboxFbLKjxiNAFN0Ac<733 zNO#IUPj$y>Lf2QFPNmC#vpriXyWvswulPARz0=XD&}uxIpI+{A3scPj+cv$HaO3#g zOyLI`zl_V;d!aoDl%-p2922MCQdm&m*e~@zYF!@GXZ%~9=K40x#CqQ4K&Z!jB2BaQ zbiK*7gCP`D&Mh5%6)nM$LGb!Z%WT+`852^$^Y_Woc>KP{X8hdGSA_qNL8XqLqSA2D z;i-pmGoN+j&9V}j&3S3?6pRfXOgCx?ouml$iK$R}8BCprV|HI@rBbxz6b?lVx>^Um zF80pvgvc^?gW=8n%2Dg-W|$wr2dy`y0Q|A_>oob>*ZEqEgd{(Uq#8SpyN@4vT>F%n?`l}dRkl%u%EB5q{-AgO5nr8+O;&sT%; zUG_jG`pv0EyGv3D48ySJF#InvZJus0yEa<-Jffiim2~Yp)UgyI>M6M-O?w6cXkOO7 KRD97Y(), pulseDamage, 0f, projectile.owner); - } - } - - return false; - } - - public static void DoChlorophyteCrystalDrawing(Projectile projectile) - { - // Why doesn't this work? How does one access the texture path of a vanilla projectile? Left bugged for someone else to figure out :) - // It's me. I was that someone - Dominic - // TextureAssets is the answer, along with Main.instance.LoadProjectile(projID), to ensure that the texture is loaded into memory. - // In this instance, however, that should happen already on vanilla's end. - Texture2D texture = TextureAssets.Projectile[projectile.type].Value; - Vector2 drawPosition = projectile.Center - Main.screenPosition; - Vector2 origin = texture.Size() * 0.5f; - - float backglowColorInterpolant = MathHelper.Lerp(0.44f, 0.88f, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 1.1f) * 0.5f + 0.5f); - Color backglowColor = Color.Lerp(Color.Cyan, Color.Lime, backglowColorInterpolant) * 0.37f; - backglowColor.A = 0; - for (int i = 0; i < 8; i++) - { - Vector2 drawOffset = (MathHelper.TwoPi * i / 8f).ToRotationVector2() * 3f; - Main.EntitySpriteDraw(texture, drawPosition + drawOffset, null, projectile.GetAlpha(backglowColor), projectile.rotation, origin, projectile.scale, 0, 0); - } - - Main.EntitySpriteDraw(texture, drawPosition, null, projectile.GetAlpha(Color.White * 0.75f), projectile.rotation, origin, projectile.scale, 0, 0); - } - } -}