From 9e13fdbd374237b57f57eb39da6edaf5c9dca970 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 14 Jul 2024 18:55:53 -0400 Subject: [PATCH 01/35] Grovetender's Touch changes * Slightly widened range * No longer pulls the player if it hits a tile * Fixed BBB not consistently triggering the tip hit crit --- .../en-US/Mods.CalamityMod.Attunement.hjson | 6 ++--- .../BrokenBiomeBlade_GrovetendersTouch.cs | 27 +++++-------------- .../MendedBiomeBlade_TrueGrovetendersTouch.cs | 21 +++------------ 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 78bb05cad3..1eb0e27c48 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -24,7 +24,6 @@ TropicalAttunement: { ''' Throw out the blade using a vine whip Striking enemies with the tip of the whip as it cracks guarantees a critical hit - The whip will also propel you towards struck tiles ''' } @@ -70,10 +69,9 @@ TrueTropicalAttunement: { Name: Grovetender's Touch Function: ''' - Throw out the blade using a vine whip. + Throw out the blade using a vine whip Striking enemies with the tip of the whip as it cracks guarantees a critical hit - The whip will also propel you towards struck tiles - Spreading vines sprout from critical strikes. These vines can hit up to three targets + Spreading vines sprout from critical strikes, which can hit up to three targets ''' } diff --git a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs index ce446cb580..0490a4ad6e 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs @@ -27,10 +27,9 @@ namespace CalamityMod.Projectiles.Melee const float MaxTime = 90; const int coyoteTimeFrames = 15; //How many frames does the whip stay extended - const int MaxReach = 400; - const int MinReach = 300; - const float SnappingPoint = 0.7f; //When does the snap occur. - const float ReelBackStrenght = 14f; + const int MaxReach = 450; + const int MinReach = 250; + const float SnappingPoint = 0.65f; //When does the snap occur. public BezierCurve curve; private Vector2 controlPoint1; @@ -43,7 +42,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 36; + Projectile.width = Projectile.height = 40; Projectile.tileCollide = false; Projectile.friendly = true; Projectile.penetrate = -1; @@ -97,7 +96,7 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (!initialized) //Initialization. create control points & shit) + if (!initialized) //Initialization. create control points & shit { Projectile.velocity = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); Reach = MathHelper.Clamp((Owner.Center - Owner.Calamity().mouseWorld).Length(), MinReach, MaxReach); @@ -117,10 +116,9 @@ namespace CalamityMod.Projectiles.Melee SnapCoyoteTime = coyoteTimeFrames; } - if (SnapCoyoteTime > 0) //keep checking for the tile hook + if (SnapCoyoteTime > 0) { Lighting.AddLight(Projectile.Center, 0.8f, 1f, 0.35f); - HookToTile(); SnapCoyoteTime--; } @@ -133,19 +131,6 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); } - public void HookToTile() - { - if (Main.myPlayer == Owner.whoAmI) - { - //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) - if (Collision.SolidCollision(Projectile.position, 32, 32) && (Owner.velocity.Y != 0 || Projectile.position.Y < Owner.position.Y)) - { - Owner.velocity = Owner.SafeDirectionTo(Projectile.Center, Vector2.Zero) * ReelBackStrenght; - SnapCoyoteTime = 0f; - } - SoundEngine.PlaySound(SoundID.Item65, Projectile.position); - } - } internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs index c689dd82ff..f85d83704d 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs @@ -30,10 +30,9 @@ namespace CalamityMod.Projectiles.Melee const float MaxTime = 90; const int coyoteTimeFrames = 15; //How many frames does the whip stay extended - const int MaxReach = 400; - const int MinReach = 300; + const int MaxReach = 450; + const int MinReach = 250; const float SnappingPoint = 0.55f; //When does the snap occur. - const float ReelBackStrenght = 14f; const float MaxTangleReach = 400f; //How long can tangling vines from crits be @@ -171,10 +170,9 @@ namespace CalamityMod.Projectiles.Melee SnapCoyoteTime = coyoteTimeFrames; } - if (SnapCoyoteTime > 0) //keep checking for the tile hook + if (SnapCoyoteTime > 0) { Lighting.AddLight(Projectile.Center, 0.8f, 1f, 0.35f); - HookToTile(); SnapCoyoteTime--; } @@ -189,19 +187,6 @@ namespace CalamityMod.Projectiles.Melee Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); } - public void HookToTile() - { - if (Main.myPlayer == Owner.whoAmI) - { - //Shmoove the player if a tile is hit. This movement always happens if the owner isnt on the ground, but will only happen if the projectile is above the player if they are standing on the ground) - if (Collision.SolidCollision(Projectile.position, 32, 32) && (Owner.velocity.Y != 0 || Projectile.position.Y < Owner.position.Y)) - { - Owner.velocity = Owner.SafeDirectionTo(Projectile.Center, Vector2.Zero) * ReelBackStrenght; - SnapCoyoteTime = 0f; - } - SoundEngine.PlaySound(SoundID.Item65, Projectile.position); - } - } internal static float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns From 549a837a212b6395743386b42278ecb939103638 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 14 Jul 2024 19:28:55 -0400 Subject: [PATCH 02/35] Removed Gesture for the Drowned Sunken Sea gives Arid Grandeur, Abyss gives Grovetender's Touch --- DataStructures/Attunement.cs | 29 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 16 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 9 - Projectiles/Melee/BiomeBladeHoldout.cs | 7 +- .../MendedBiomeBlade_GestureForTheDrowned.cs | 78 ----- .../MendedBiomeBlade_GestureForTheDrowned.png | Bin 546 -> 0 bytes ...iomeBlade_GestureForTheDrownedAquaWave.png | Bin 1160 -> 0 bytes ...endedBiomeBlade_GestureForTheDrownedOrb.cs | 302 ------------------ ...dedBiomeBlade_GestureForTheDrownedWave.png | Bin 3842 -> 0 bytes 9 files changed, 7 insertions(+), 434 deletions(-) delete mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs delete mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png delete mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png delete mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedOrb.cs delete mode 100644 Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 10b5087a54..b83f20b88c 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -14,7 +14,7 @@ namespace CalamityMod.DataStructures public enum AttunementID : byte { Default, Hot, Cold, Tropical, Evil, //Broken biome blade - TrueDefault, TrueHot, TrueCold, TrueTropical, TrueEvil, Holy, Astral, Marine, //Biome blade + TrueDefault, TrueHot, TrueCold, TrueTropical, TrueEvil, Holy, Astral, //Biome blade Whirlwind, FlailBlade, SuperPogo, Shockwave, //True biome blade Phoenix, Aries, Polaris, Andromeda //Galaxia } @@ -28,7 +28,7 @@ namespace CalamityMod.DataStructures { attunementArray = new Attunement[] { new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new TropicalAttunement(), new EvilAttunement(), - new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new AstralAttunement(), new MarineAttunement(), + new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new AstralAttunement(), new WhirlwindAttunement(), new FlailBladeAttunement(), new SuperPogoAttunement(), new ShockwaveAttunement(), new PhoenixAttunement(), new AriesAttunement(), new PolarisAttunement(), new AndromedaAttunement(), null @@ -456,31 +456,6 @@ namespace CalamityMod.DataStructures item.noMelee = true; } } - - public class MarineAttunement : Attunement - { - public MarineAttunement() - { - id = AttunementID.Marine; - tooltipColor = new Color(61, 103, 209); - - energyParticleEdgeColor = new Color(27, 59, 101); - energyParticleCenterColor = new Color(27, 112643, 255); - } - - public override float DamageMultiplier => TrueBiomeBlade.MarineAttunement_BaseDamage / (float)TrueBiomeBlade.BaseDamage; - - public override void ApplyStats(Item item) - { - item.channel = false; - item.noUseGraphic = true; - item.useStyle = ItemUseStyleID.Thrust; - item.shoot = ProjectileType(); - item.shootSpeed = 12f; - item.UseSound = null; - item.noMelee = true; - } - } #endregion #region True Biome Blade Attunements diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index d465084ed8..72334dba07 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -74,17 +74,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float AstralAttunement_MonolithDamageBoost = 1.25f; public static float AstralAttunement_MonolithDamageFalloff = 0.25f; //Damage multiplier for all subsequent hits after the first one. - public static int MarineAttunement_BaseDamage = 300; - public static float MarineAttunement_InWaterDamageMultiplier = 1.5f; - #endregion - - public override void SetStaticDefaults() - { - //Theres potential for flavor text as well but im not a writer - } - #region tooltip editing public override void ModifyTooltips(List list) @@ -226,10 +217,10 @@ namespace CalamityMod.Items.Weapons.Melee public void SafeCheckAttunements() { if (mainAttunement != null) - mainAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)mainAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Marine)]; + mainAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)mainAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Astral)]; if (secondaryAttunement != null) - secondaryAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)secondaryAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Marine)]; + secondaryAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)secondaryAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Astral)]; } public override void HoldItem(Player player) @@ -297,8 +288,7 @@ namespace CalamityMod.Items.Weapons.Melee n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || - n.type == ProjectileType() || - n.type == ProjectileType())); + n.type == ProjectileType())); } // 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged. diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 1eb0e27c48..17ae194e6b 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -102,15 +102,6 @@ AstralAttunement: { ''' } -MarineAttunement: { - Name: Gesture for the Drowned - Function: - ''' - Shoot out two water balls at your sides. On ground contact the water balls will turn into small waves that ride along the ground - Waves fired while underwater or that touch water will become much larger and faster - ''' -} - // True Biome Blade WhirlwindAttunement: { Name: Swordsmith's Pride diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index c87f35d666..59f462ffbe 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -120,12 +120,11 @@ namespace CalamityMod.Projectiles.Melee bool jungle = Owner.ZoneJungle; bool snow = Owner.ZoneSnow; bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert; + bool desert = Owner.ZoneDesert || Owner.Calamity().ZoneSunkenSea; bool hell = Owner.ZoneUnderworldHeight; - bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur; + bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur || Owner.Calamity().ZoneAbyss; bool hallow = Owner.ZoneHallow; bool astral = Owner.Calamity().ZoneAstral; - bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; Attunement attunement = Attunement.attunementArray[(int)AttunementID.TrueDefault]; @@ -141,8 +140,6 @@ namespace CalamityMod.Projectiles.Melee attunement = Attunement.attunementArray[(int)AttunementID.Holy]; if (astral) attunement = Attunement.attunementArray[(int)AttunementID.Astral]; - if (marine) - attunement = Attunement.attunementArray[(int)AttunementID.Marine]; //If the owner already had the attunement , break out of it (And unswap) if (item.secondaryAttunement == attunement) diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs deleted file mode 100644 index 1f8259d861..0000000000 --- a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -using static Terraria.ModLoader.ModContent; - -namespace CalamityMod.Projectiles.Melee -{ - public class GestureForTheDrowned : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; - Vector2 direction = Vector2.Zero; - public Player Owner => Main.player[Projectile.owner]; - public float Timer => 40 - Projectile.timeLeft; - public float HalfTimer => (Timer % 20); - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 32; - Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.timeLeft = 40; - Projectile.DamageType = DamageClass.Melee; - Projectile.tileCollide = false; - } - - public override bool? CanDamage() => false; - - public override void AI() - { - if (Math.Abs(HalfTimer / 20f) == 0.5f) - { - SoundEngine.PlaySound(SoundID.Splash with { PitchVariance = 2f }, Projectile.Center); - - if (Owner.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, direction * 0.1f + Owner.velocity, ProjectileType(), Projectile.damage, 0, Owner.whoAmI); - } - - Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.CornflowerBlue : Color.DodgerBlue, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); - GeneralParticleHandler.SpawnParticle(Sparkle); - - } - - - direction = Vector2.UnitY.RotatedBy((MathHelper.PiOver4 + Utils.AngleLerp(0f, MathHelper.PiOver4 * 1.5f, HalfTimer / 20f)) * Math.Sign(Timer - 1 - 20f)) * (float)Math.Sin(HalfTimer / 20f * MathHelper.Pi) * 30; - Owner.ChangeDir(Math.Sign(direction.X)); - Owner.itemRotation = direction.ToRotation(); - if (Owner.direction != 1) - { - Owner.itemRotation -= MathHelper.Pi; - } - - Projectile.Center = Owner.Center + direction; - Projectile.rotation = direction.ToRotation() + MathHelper.PiOver2; - Projectile.spriteDirection = Math.Sign(Timer - 20f); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D blade = Request("CalamityMod/Items/Weapons/Melee/TrueBiomeBlade").Value; - - float drawAngle = direction.ToRotation(); - float drawRotation = drawAngle + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, blade.Height); - Vector2 drawOffset = Projectile.Center - Main.screenPosition; - - Main.EntitySpriteDraw(blade, drawOffset, null, lightColor, drawRotation, drawOrigin, Projectile.scale, 0f, 0); - return false; - } - - } -} diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned.png deleted file mode 100644 index 0454d6961e3de6d93b969c521ea77c7fd6441c7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 546 zcmV+-0^R+IP)Px$+(|@1R7i=<);~y#mUEt$a~{t3{hf236G?UT z&LdDh*#}Pa9s%`2DYgq0TB{L!S*wH9Uu)p`-D{v_H%b15qCj${uLR~6R${m?G73gd z{oGZe=}!m2{Q44T+gFHSyJz zhLgB|CTZu_mtq*~X^qH}D0Di9&Z7BW7Z<-}CQPR7xho^!;o#wH#=#*lHT?>Ft`(6d zQFSr#rg*FynQ)N~SmommFm!(CgB&#xX` zfABQv^>oBEpQpy%7tU3q#x`o1xYAkxM}OCHzP+pU4N!ga0n86&S6JDGAdm*aKoGQ= z=BuXlF4x-|9O!J1(v`$eN$XQkqX$Y!oe{`WqCgVzh5Y&Ly3h%)q40(X3iWCy9q%ng kuoAU|dEn)f`^b^#4?ww{E3J-RHvj+t07*qoM6N<$f}Yd?AOHXW diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave.png deleted file mode 100644 index 30a5b3e99ecf1f834b4e8b8c9fa557bd0eec1b9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1160 zcmV;31b6$1P)Px(LP~M#n|MNCX#3lz@Lg5V8{&LN+pkgFj-x zg)q!&Rx>+6#)Z1l>;j@oH$sz0T2K;i0dK9?ZA|y%Vw{@A>2G>YbyfOyDs@WpLLfV*KUIpSv+(Jz?uTPiH01*;*xBJ4(zz_hXN>L;Ak?(&sJ~bZyWgdW@ z#CrffuV=N%6qI7At;qfw3+Yg18GvF*k)D{y18_fgM0>0O;-0`_@#NMbQ(BdU@_bt#3uSx@B@_vWM8K>qY%%pEHEE z6dkclstwen>g72AQ`Jdz`{{K6o*3$1QS>$LT284nk52hMF{rk!_OB>S(U5CiPvLP8A*Tp<#72S}0Vs2fPzYBzqoj{yf!@adgBBg^CMs`P|lL2C~Od zURyC@Y)`61drJN@I@OmpVjLOqw`bh_anwJ}Z{M7(epk?b-=9nvF^-P7*`v|OfnfkD zt7}G#?dxNakc#$H_e46CeZ)(zRGNi&-~PJ*tgY@fVr(C=x3;3b2?8rI;LVUUskC$)z9{& zdMxWW0Q2Qd7tHswJ;YL@%x|jJi|VFgCeI!QV4@s2yIYby#3Jv?wf_qp?%f{>MHC20000 "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned"; - public Player Owner => Main.player[Projectile.owner]; - public ref float HasLanded => ref Projectile.ai[0]; //Is the orb in the air or is it on the ground? - public ref float TimeSinceLanding => ref Projectile.ai[1]; //How long has it been on the ground for - public float Timer => MaxTime - Projectile.timeLeft; - public const float MaxTime = 160f; - public float groundOffset; - public bool BounceX => Projectile.oldPosition.X == Projectile.position.X; - - public bool WaterMode = false; - - public float scaleX => 1 + 0.2f * (1f + -(float)Math.Sin((TimeSinceLanding - 10f) * 0.1f)) * 0.5f; - public float scaleY => (1 + 0.4f * (1f + (float)Math.Sin((TimeSinceLanding - 10f) * 0.1f)) * 0.5f) * MathHelper.Clamp((TimeSinceLanding - 10) / 30f, 0f, 1f) * MathHelper.Clamp(Projectile.timeLeft / 30f, 0f, 1f); - - public override void SetStaticDefaults() - { - - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - Main.projFrames[Projectile.type] = 3; - } - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 26; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.timeLeft = (int)MaxTime; - Projectile.DamageType = DamageClass.Melee; - Projectile.alpha = 90; - Projectile.ignoreWater = true; - Projectile.hide = true; - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (WaterMode) - { - return true; - } - HasLanded = 1f; - Projectile.velocity.Y = -4f; - return false; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (TimeSinceLanding < 10 && !WaterMode) - return base.Colliding(projHitbox, targetHitbox); - float collisionPoint = 0f; - if (!WaterMode) - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Bottom, Projectile.Bottom - (Vector2.UnitY * scaleY * 110), scaleX * 40, ref collisionPoint); - - float halfLength = 66f * Projectile.scale; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center + Utils.SafeNormalize(Projectile.velocity.RotatedBy(MathHelper.PiOver2), Vector2.Zero) * halfLength, Projectile.Center - Utils.SafeNormalize(Projectile.velocity.RotatedBy(MathHelper.PiOver2), Vector2.Zero) * halfLength, 40f, ref collisionPoint); - } - - public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) - { - behindNPCsAndTiles.Add(index); - } - - public override void AI() - { - if (Collision.WetCollision(Projectile.position, Projectile.width, Projectile.height)) - { - WaterMode = true; - Projectile.velocity.Y *= 0.33f; - } - else if (WaterMode) - { - Projectile.Kill(); - } - - if (WaterMode) - { - Projectile.velocity *= 1.02f; - Projectile.scale *= 1.01f; - Projectile.timeLeft--; - - for (int i = 0; i <= 4; i++) - { - Dust waterTrail = Main.dust[Dust.NewDust(Projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 23, 0, DustID.Water, -3.7f * Math.Sign(Projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; - waterTrail.fadeIn = 3f; - } - - Dust foamDust = Main.dust[Dust.NewDust(Projectile.Center + Main.rand.NextVector2Circular(10f, 10f), 9, 0, DustID.Cloud, 2.7f * Math.Sign(Projectile.velocity.X), -3f, 0, new Color(255, 255, 255), 1.4f)]; - foamDust.noGravity = true; - - if (Main.rand.NextBool()) - { - float angle = Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2); - float distance = 10f + 50 * Math.Abs(angle) / MathHelper.PiOver2 * Projectile.scale; - Vector2 sparkSpeed = -Projectile.velocity; - Particle Spark = new CritSpark(Projectile.Center + Vector2.Normalize(Projectile.velocity.RotatedBy(angle)) * distance, sparkSpeed, Color.SkyBlue, Color.CornflowerBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); - GeneralParticleHandler.SpawnParticle(Spark); - } - return; - } - - if (HasLanded == 1f) - { - TimeSinceLanding++; - - groundOffset = -1; - //Check 7 tiles under the projectile for solid ground - for (float i = 0; i < 7; i += 0.5f) - { - Vector2 positionToCheck = Projectile.position; - if (Main.tile[(int)(positionToCheck.X / 16), (int)((positionToCheck.Y / 16) + 1 * i)].IsTileSolidGround() && groundOffset == -1) - { - groundOffset = i * 16; - break; - } - } - //If no ground has been found, go back to the airborne state - if (groundOffset == -1) - { - HasLanded = 0f; - TimeSinceLanding = 0f; - } - - if (TimeSinceLanding > 10) - { - //Trailing water!! Dust spam!!! - Dust waterTrail = Main.dust[Dust.NewDust(Projectile.Top + Vector2.UnitY * groundOffset, 23, 0, DustID.Water, -3.7f * Math.Sign(Projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; - waterTrail.fadeIn = 3f; - waterTrail = Main.dust[Dust.NewDust(Projectile.TopRight + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * Projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(Projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; - waterTrail.fadeIn = 3f; - waterTrail = Main.dust[Dust.NewDust(Projectile.TopLeft + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(16f, 16f) + Vector2.UnitX * Projectile.velocity.X * 4f, 23, 0, DustID.Water, -3.7f * Math.Sign(Projectile.velocity.X), -6f, 0, new Color(255, 255, 255), Main.rand.NextFloat(1f, 3f))]; - waterTrail.fadeIn = 3f; - - - Dust foamDust = Main.dust[Dust.NewDust(Projectile.Top + Vector2.UnitY * groundOffset + Vector2.UnitX * 16 * Math.Sign(Projectile.velocity.X), 9, 0, DustID.Cloud, 2.7f * Math.Sign(Projectile.velocity.X), -3f, 0, new Color(255, 255, 255), 1.4f)]; - foamDust.noGravity = true; - - //Foam - float height = scaleY * 100f; - Vector2 origin = Projectile.Top + Vector2.UnitY * groundOffset + Main.rand.NextVector2Circular(Projectile.width / 4f, Projectile.height / 4f) - (Vector2.UnitY * height); - Particle foamSmall = new FakeGlowDust(origin, Projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(1f, 2f), 25, 0.1f, bigSize: true, gravity: (-Projectile.velocity + Vector2.UnitY) * 0.1f); - GeneralParticleHandler.SpawnParticle(foamSmall); - - if (Main.rand.NextBool(5)) - { - Particle foamLarge = new MediumMistParticle(origin, Projectile.velocity / 2f, Color.LightSlateGray, Color.LightBlue, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); - GeneralParticleHandler.SpawnParticle(foamLarge); - } - } - } - - else - { - Particle foamSmall = new FakeGlowDust(Projectile.Center + Main.rand.NextVector2Circular(Projectile.width / 2f, Projectile.height / 2f), Projectile.velocity / 2f, Color.LightSlateGray, Main.rand.NextFloat(0.2f, 2f), 25, 0.1f, gravity: (-Projectile.velocity + Vector2.UnitY) * 0.1f); - GeneralParticleHandler.SpawnParticle(foamSmall); - - if (Main.rand.NextBool()) - { - Particle blob = new WaterGlobParticle(Projectile.Center + Main.rand.NextVector2Circular(Projectile.width / 2f, Projectile.height / 2f), Projectile.velocity / 2f, Main.rand.NextFloat(0.2f, 2f), 0.1f); - GeneralParticleHandler.SpawnParticle(blob); - } - - } - - Projectile.rotation += 0.1f * ((Projectile.velocity.X > 0) ? 1f : -1f); - - - if (Projectile.velocity.Y < 15f) - { - Projectile.velocity.Y += 0.3f; - } - - if (Math.Abs(Projectile.velocity.X) < 8) - { - Projectile.velocity.X += 0.3f * ((Projectile.velocity.X > 0) ? 1f : -1f); - } - else - { - Projectile.velocity.X = Math.Sign(Projectile.velocity.X) * 8; - } - - if (BounceX) - { - //Die lmao - Projectile.Kill(); - } - - Projectile.frameCounter++; - if (Projectile.frameCounter % 6 == 0) - Projectile.frame = (Projectile.frame + 1) % 3; - } - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.Splash with { PitchVariance = 2f }, Projectile.Center); - - for (int i = 0; i < 4; i++) - { - Particle foamLarge = new MediumMistParticle(Projectile.Center + Main.rand.NextVector2Circular(Projectile.width, Projectile.height), Projectile.oldVelocity / 2f, Color.LightSlateGray, Color.LightBlue, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); - GeneralParticleHandler.SpawnParticle(foamLarge); - } - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (WaterMode) - modifiers.SourceDamage *= TrueBiomeBlade.MarineAttunement_InWaterDamageMultiplier; - } - - public override bool PreDraw(ref Color lightColor) - { - if (BounceX) - return false; - - if (WaterMode) - { - Texture2D wave = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedAquaWave").Value; - float drawRotation = Projectile.velocity.ToRotation() + MathHelper.Pi; - Vector2 drawOrigin = new Vector2(wave.Width / 2f, wave.Height / 2f); - Vector2 drawOffset = Projectile.Center - Main.screenPosition; - - Main.EntitySpriteDraw(wave, drawOffset - Projectile.velocity, null, Color.Lerp(lightColor, Color.White, 0.5f) * 0.2f, drawRotation, drawOrigin, Projectile.scale - 0.2f, 0f, 0); - Main.EntitySpriteDraw(wave, drawOffset, null, Color.Lerp(lightColor, Color.White, 0.5f) * 0.5f, drawRotation, drawOrigin, Projectile.scale, 0f, 0); - return false; - } - - - if (HasLanded == 1f && TimeSinceLanding > 10f) - { - Texture2D wave = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave").Value; - Rectangle frame = new Rectangle(0, 0 + 110 * Projectile.frame, 40, 110); - - float drawRotation = 0f; - Vector2 drawOrigin = new Vector2(0f, frame.Height); - - - Vector2 drawOffset; - - //Wobble - Vector2 Scale; - - SpriteEffects flip = Projectile.velocity.X > 0 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - - for (int i = 2; i >= 0; i--) - { - drawOffset = Projectile.position + Vector2.UnitY * groundOffset + Vector2.UnitY / 2f - Main.screenPosition; - drawOffset -= Vector2.UnitX * 10f * i * Math.Sign(Projectile.velocity.X); - float ScaleYAlter = (1 + 0.4f * (1f + (float)Math.Sin((TimeSinceLanding - 10f) * 0.1f + 0.2 * i)) * 0.5f) * MathHelper.Clamp((TimeSinceLanding - 10) / 30f, 0f, 1f) * MathHelper.Clamp(Projectile.timeLeft / 30f, 0f, 1f); - Scale = new Vector2(scaleX, ScaleYAlter - 0.05f * i); - float slightfade = 1f - 0.24f * i; - Color darkenedColor = Color.Lerp(lightColor, Color.Black, i * 0.15f); - - Main.EntitySpriteDraw(wave, drawOffset, frame, darkenedColor * MathHelper.Clamp(TimeSinceLanding / 30f, 0f, 1f) * slightfade, drawRotation, drawOrigin, Scale, flip, 0); - } - - - - return false; - } - - else - { - Texture2D ball = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrowned").Value; - float drawRotation = Projectile.rotation; - Vector2 drawOrigin = Projectile.Size / 2f; - Vector2 drawOffset = Projectile.Center - Main.screenPosition; - - Main.EntitySpriteDraw(ball, drawOffset, null, lightColor * MathHelper.Clamp(1 - TimeSinceLanding / 10f, 0f, 1f), drawRotation, drawOrigin, Projectile.scale, 0f, 0); - - return false; - } - - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(WaterMode); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - WaterMode = reader.ReadBoolean(); - } - - } -} diff --git a/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png b/Projectiles/Melee/MendedBiomeBlade_GestureForTheDrownedWave.png deleted file mode 100644 index db336bf69b2723e165690518e97e2f61c2873cd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3842 zcmV+d5B>0oP)Px@yh%hsRCt{2ol9(7)fvbC6Wg)J$@mpN5<7{LCg6~gKuRg4MFI*HDjP^?7mZqh zXxUI9RqCRPN?jnTcEh4nYAZFB$|hZu7G*<)ibz2q3Is|+2skFhF?A9@V#l#PerLM) z?%($LW{&S`oSZwJ|7PyoxidNbICkSlcEOYeUO z0NC76p8|l>19E<5p(Y0aoz2xL0JvvQJpka_`=w~>;udhVRT=e*HgaFyX8XoI0KiM{ zf0zS+s)}?90A?0y008&wsV8~kf3Ns~R*wYboj0@@*Od-I z#$0=yyq{f=*WpQdJ^s0Qy(YT!exGrkF}b&0YBy^;m3)G^oRI4ullSlRnK8GcDcC|kOF}Bdk2lr4?niw zc<(&H(0wtses8LNcpvUl#LwK)giIh-7oL2{PB@U z1xy}6n{=)9BRJ>H`l7}j^cMhc=^l`0LzJ88@W%A2Y-0@knsU$Wt^?Od`4bLRL|nR``YRhFgXOZY-=uI z*J9$zeS*8c84L+y&rem8WBwO~koyFApjV-S#u~rZ&?^VCwe>|Q809{}lkdF^0622n z9RPqs-bnc2-%HO@wbxv8Iq36)>$7V$2B{+>=KHx*CQ036@PFX0P2PIqe05O^m^^}1 z_taScKv#MvfF+VVufy?faAQdJ;~>@7jpoxsj@-t6Qe&?0o^BP`ygr`%+b;K!eq1(DJ7R+XNSzv zY~w^~@qCAQzQX(4S(~p!EMRg7>RPMkAbz!4&!btJ5i?)Fd4kpgcBOYN(zu>-o?s>K zki%OSWUMXS4>o6gVSAYLI$3Gh^X$I?0H6HytDy?$K0zMn`LUlgN!=bU`@LATIXMJ% z%mFL!i?KIftQ#iH{B7fa8*tnmIa z?gr5W?^dDm$}w}#7s>MOXqYkp`LXCc!Ms}B+P)zL01ds8YkA8Z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F^_EDP*fu4fU{rsFVktQUN$Q-sK(E%v_X*Zlj}**pk1Oo~S68y0N9!xhXI$&r%)H{R ztgN82HtSeiEe|;N3EDo0>JF-XW-2@eQT?})N6_X#5q1rSitFf@Jc1M*DD*BsJwCL> zs?GB#>`2>rf~g<*J~^$hBz5d&D&(1p>}hP?N6r&mti|&=IlPjUB&4ds*Dv`dpl}~e zX=1uo)BC7>z2ud2S)6;4LohohTQS$QYzQN`3IJ zvYGYjkhF)|?Ifu4L;#4_9smFU07*qoM6N<$ Ef&z|lvH$=8 From c39df38a5398fdc915398edc5d24d4b3d93e12a4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 15 Jul 2024 01:12:58 -0400 Subject: [PATCH 03/35] Merged Extant Abhorrence into Heaven's Might * Astral Infection gives Heaven's Might * Still uses sword spinning functionality of Heaven's Might, though the smear uses purple instead of cyan * Now uses charge sounds from Extant Abhorrence; once at 50% (when sword throw can be done), and once at max charge * Sword throws at max charge spawn a monolith on the struck enemy which deals 50% damage --- CalamityLists.cs | 1 - DataStructures/Attunement.cs | 28 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 15 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 14 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 2 +- Projectiles/Melee/BiomeBladeHoldout.cs | 9 +- .../MendedBiomeBlade_ExtantAbhorrence.cs | 313 ------------------ .../MendedBiomeBlade_ExtantAbhorrence.png | Bin 1218 -> 0 bytes .../Melee/MendedBiomeBlade_HeavensMight.cs | 39 ++- ...cs => MendedBiomeBlade_HeavensMonolith.cs} | 78 +---- ...g => MendedBiomeBlade_HeavensMonolith.png} | Bin ...MendedBiomeBlade_HeavensMonolith_Glow.png} | Bin 12 files changed, 58 insertions(+), 441 deletions(-) delete mode 100644 Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs delete mode 100644 Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.png rename Projectiles/Melee/{MendedBiomeBlade_ExtantAbhorrenceMonolith.cs => MendedBiomeBlade_HeavensMonolith.cs} (70%) rename Projectiles/Melee/{MendedBiomeBlade_ExtantAbhorrenceMonolith.png => MendedBiomeBlade_HeavensMonolith.png} (100%) rename Projectiles/Melee/{MendedBiomeBlade_ExtantAbhorrenceMonolith_Glow.png => MendedBiomeBlade_HeavensMonolith_Glow.png} (100%) diff --git a/CalamityLists.cs b/CalamityLists.cs index 45e4b359df..c25fef9094 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -819,7 +819,6 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index b83f20b88c..79990458d4 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -14,7 +14,7 @@ namespace CalamityMod.DataStructures public enum AttunementID : byte { Default, Hot, Cold, Tropical, Evil, //Broken biome blade - TrueDefault, TrueHot, TrueCold, TrueTropical, TrueEvil, Holy, Astral, //Biome blade + TrueDefault, TrueHot, TrueCold, TrueTropical, TrueEvil, Holy, //Biome blade Whirlwind, FlailBlade, SuperPogo, Shockwave, //True biome blade Phoenix, Aries, Polaris, Andromeda //Galaxia } @@ -28,7 +28,7 @@ namespace CalamityMod.DataStructures { attunementArray = new Attunement[] { new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new TropicalAttunement(), new EvilAttunement(), - new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new AstralAttunement(), + new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new WhirlwindAttunement(), new FlailBladeAttunement(), new SuperPogoAttunement(), new ShockwaveAttunement(), new PhoenixAttunement(), new AriesAttunement(), new PolarisAttunement(), new AndromedaAttunement(), null @@ -432,30 +432,6 @@ namespace CalamityMod.DataStructures item.noMelee = true; } } - - public class AstralAttunement : Attunement - { - public AstralAttunement() - { - id = AttunementID.Astral; - tooltipColor = new Color(91, 73, 196); - - energyParticleEdgeColor = new Color(58, 56, 165); - energyParticleCenterColor = new Color(153, 120, 255); - } - - public override float DamageMultiplier => TrueBiomeBlade.AstralAttunement_BaseDamage / (float)TrueBiomeBlade.BaseDamage; - public override void ApplyStats(Item item) - { - item.channel = true; - item.noUseGraphic = true; - item.useStyle = ItemUseStyleID.Thrust; - item.shoot = ProjectileType(); - item.shootSpeed = 12f; - item.UseSound = null; - item.noMelee = true; - } - } #endregion #region True Biome Blade Attunements diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 72334dba07..eff49af8c8 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -67,13 +67,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float HolyAttunement_FullChargeDamageBoost = 2f; public static float HolyAttunement_ThrowDamageBoost = 3.8f; public static int HolyAttunement_LocalIFrames = 16; //Be warned its got 1 extra update yadda yadda - - public static int AstralAttunement_BaseDamage = 250; - public static int AstralAttunement_DashHitIFrames = 20; - public static float AstralAttunement_FullChargeBoost = 4f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. - public static float AstralAttunement_MonolithDamageBoost = 1.25f; - public static float AstralAttunement_MonolithDamageFalloff = 0.25f; //Damage multiplier for all subsequent hits after the first one. - + public static float HolyAttunement_MonolithDamage = 0.5f; #endregion #region tooltip editing @@ -217,10 +211,10 @@ namespace CalamityMod.Items.Weapons.Melee public void SafeCheckAttunements() { if (mainAttunement != null) - mainAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)mainAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Astral)]; + mainAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)mainAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Holy)]; if (secondaryAttunement != null) - secondaryAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)secondaryAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Astral)]; + secondaryAttunement = Attunement.attunementArray[(int)MathHelper.Clamp((float)secondaryAttunement.id, (float)AttunementID.TrueDefault, (float)AttunementID.Holy)]; } public override void HoldItem(Player player) @@ -287,8 +281,7 @@ namespace CalamityMod.Items.Weapons.Melee (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || - n.type == ProjectileType() || - n.type == ProjectileType())); + n.type == ProjectileType())); } // 03FEB2024: Ozzatron: added so the Iban Blades don't break Overhaul compatibility. Weapons are functionally unchanged. diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 17ae194e6b..e8794a869c 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -88,17 +88,9 @@ HolyAttunement: { Name: Heaven's Might Function: ''' - Hold to swing the sword around you, accelerating over time - Releasing hurls the sword towards your cursor. The sword then quickly returns to your hand - ''' -} - -AstralAttunement: { - Name: Extant Abhorrence - Function: - ''' - Hold to charge a star-piercing lunge, release to unleash the devastating blow - Striking the earth with the lunge will cause a massive impact which raises otherworldly monoliths + Hold to swing the sword around you, accelerating and dealing more damage over time + Once swung for long enough, releasing hurls the sword towards your cursor before quickly returning to your hand + Striking an enemy with the hurled sword at maximum power causes an astral monolith to erupt from them ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 435f7da56d..48fcd55f4e 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -115,7 +115,6 @@ ExobeamSlash.DisplayName: Exobeam Slash ExobeamSlashCreator.DisplayName: Anime Sword Effect Exoboom.DisplayName: Exoplasma Explosion ExtantAbhorrence.DisplayName: Extant Abhorrence -ExtantAbhorrenceMonolith.DisplayName: Abhorrent Monolith FallenBlast.DisplayName: Fallen Paladin's Wrath FallenPaladinsHammerEcho.DisplayName: Fallen Paladin's Hammer Echo FallenPaladinsHammerProj.DisplayName: Fallen Paladin's Hammer @@ -153,6 +152,7 @@ GreenWater.DisplayName: Greentide Tooth GrovetendersEntanglingVines.DisplayName: Entangling Growth GrovetendersTouch.DisplayName: Grovetender's Touch HeavensMight.DisplayName: Heaven's Might +HeavensMonolith.DisplayName: Heaven's Monolith HellionSpike.DisplayName: Hellion Spike HolyColliderHolyFire.DisplayName: Holy Collider Fire IceBombFriendly.DisplayName: Ice Bomb diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index 59f462ffbe..4bfba69445 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -123,8 +123,7 @@ namespace CalamityMod.Projectiles.Melee bool desert = Owner.ZoneDesert || Owner.Calamity().ZoneSunkenSea; bool hell = Owner.ZoneUnderworldHeight; bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur || Owner.Calamity().ZoneAbyss; - bool hallow = Owner.ZoneHallow; - bool astral = Owner.Calamity().ZoneAstral; + bool heavenly = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; Attunement attunement = Attunement.attunementArray[(int)AttunementID.TrueDefault]; @@ -136,12 +135,10 @@ namespace CalamityMod.Projectiles.Melee attunement = Attunement.attunementArray[(int)AttunementID.TrueTropical]; if (evil) attunement = Attunement.attunementArray[(int)AttunementID.TrueEvil]; - if (hallow) + if (heavenly) attunement = Attunement.attunementArray[(int)AttunementID.Holy]; - if (astral) - attunement = Attunement.attunementArray[(int)AttunementID.Astral]; - //If the owner already had the attunement , break out of it (And unswap) + //If the owner already had the attunement, break out of it (And unswap) if (item.secondaryAttunement == attunement) { SoundEngine.PlaySound(SoundID.DD2_LightningBugZap, Projectile.Center); diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs deleted file mode 100644 index 54251e3ace..0000000000 --- a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.cs +++ /dev/null @@ -1,313 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Particles; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Tiles.Astral; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; -using static CalamityMod.CalamityUtils; -using static Terraria.ModLoader.ModContent; - -namespace CalamityMod.Projectiles.Melee -{ - public class ExtantAbhorrence : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence"; - private bool initialized = false; - Vector2 direction = Vector2.Zero; - public Player Owner => Main.player[Projectile.owner]; - public ref float Charge => ref Projectile.ai[0]; //Charge - public ref float State => ref Projectile.ai[1]; //State 0 is "charging", State 1 is "thrusting" - public ref float CurrentIndicator => ref Projectile.localAI[0]; //What "indicator" stage are you on. - public ref float OverCharge => ref Projectile.localAI[1]; - - const float MaxCharge = 500; - - public Vector2 lastDisplacement; - public float dashDuration; - - public override void SetDefaults() - { - Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 70; - Projectile.tileCollide = false; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.extraUpdates = 1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 16; - } - - public override bool? CanDamage() - { - return (State == 1); - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - float bladeLength = 120 * Projectile.scale; - float bladeWidth = 20 * Projectile.scale; - - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center, Owner.Center + (direction * bladeLength), bladeWidth, ref collisionPoint); - } - - public CurveSegment QuickOut = new CurveSegment(EasingType.PolyIn, 0f, 0f, 0.2f, 3); - public CurveSegment Bump = new CurveSegment(EasingType.SineBump, 0.06f, 0.2f, 0.1f); - public CurveSegment QuickDraw = new CurveSegment(EasingType.Linear, 0.25f, 0.2f, -0.45f); - public CurveSegment SlowDrawOut = new CurveSegment(EasingType.PolyIn, 0.50f, -0.25f, -0.2f, 3); - public CurveSegment OverShoot = new CurveSegment(EasingType.SineBump, 0.93f, -0.45f, -0.1f); - - internal float ChargeDisplacement() => PiecewiseAnimation(Charge / MaxCharge, new CurveSegment[] { QuickOut, Bump, QuickDraw, SlowDrawOut, OverShoot }); - - public override void AI() - { - if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao - { - Projectile.velocity = Vector2.Zero; - SoundEngine.PlaySound(SoundID.Item101, Projectile.Center); - initialized = true; - } - - if (Owner.CantUseHoldout()) - { - if (State == 0f) - { - if (Charge / MaxCharge < 0.25f) - { - SoundEngine.PlaySound(SoundID.Item109, Projectile.Center); - Projectile.Kill(); - return; - } - else - { - - SoundEngine.PlaySound(SoundID.Item120 with { Volume = SoundID.Item120.Volume * 0.5f }, Projectile.Center); - State = 1f; - Projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death - dashDuration = Projectile.timeLeft; - lastDisplacement = Projectile.Center - Owner.Center; - Projectile.netUpdate = true; - Projectile.netSpam = 0; - } - } - } - - if (State == 0f) - { - direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - direction.Normalize(); - Projectile.Center = Owner.Center + (direction * 70f * ChargeDisplacement()); - - Charge++; - OverCharge--; - Projectile.timeLeft = 2; - - if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f)) - { - SoundEngine.PlaySound(DeusRitualDrama.PulseSound with { Pitch = DeusRitualDrama.PulseSound.Pitch - 0.2f + 0.1f * CurrentIndicator }, Projectile.Center); - CurrentIndicator++; - OverCharge = 20f; - } - - if (Charge >= MaxCharge) - { - Charge = MaxCharge; - if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) - { - OverCharge = 20f; - SoundEngine.PlaySound(AstralBeacon.UseSound, Projectile.Center); - CurrentIndicator++; - } - } - } - - if (State == 1f) - { - Projectile.Center = Owner.Center + Vector2.Lerp(lastDisplacement, direction * 40f, MathHelper.Clamp(((dashDuration - Projectile.timeLeft) / dashDuration) * 2f, 0f, 1f)); - Owner.fallStart = (int)(Owner.position.Y / 16f); - - Owner.Calamity().LungingDown = true; - - if (Collision.SolidCollision(Owner.Center + (direction * 120 * Projectile.scale) - Vector2.One * 5f, 10, 10)) - { - SlamDown(); - Projectile.timeLeft = 0; - Owner.Calamity().LungingDown = false; - Projectile.active = false; - Projectile.netUpdate = true; - Projectile.netSpam = 0; - } - - Owner.velocity = direction * 30f; - - float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); - float strength = (float)Math.Sin(variation * 2f + MathHelper.PiOver2); - Particle Sparkle = new CritSpark(Projectile.Center, Owner.velocity - direction.RotatedBy(variation) * (1 + strength) * 2f * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); - GeneralParticleHandler.SpawnParticle(Sparkle); - } - - Lighting.AddLight(Projectile.Center, new Vector3(1f, 0.56f, 0.56f) * Charge / MaxCharge); - - //Manage position and rotation - Projectile.rotation = direction.ToRotation(); - - //Scaling based on charge - Projectile.scale = 1f + (Charge / MaxCharge * 0.3f); - - Owner.ChangeDir(Math.Sign(direction.X)); - Owner.itemRotation = direction.ToRotation(); - - if (Owner.direction != 1) - { - Owner.itemRotation -= MathHelper.Pi; - } - - Owner.itemRotation = MathHelper.WrapAngle(Owner.itemRotation); - Owner.itemTime = 2; - Owner.itemAnimation = 2; - } - - public void SlamDown() - { - var slamSound = SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = SoundID.DD2_MonkStaffGroundImpact.Volume * 1.5f }, Projectile.Center); - - if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) - return; - - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 5) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 5; - - //Only create the central monolith if over half charge - if (Charge / MaxCharge < 0.5f) - return; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center + (direction * 120 * Projectile.scale), -direction, ProjectileType(), (int)(Projectile.damage * TrueBiomeBlade.AstralAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); - - //Only create the side monoliths if over 3/4th charge - if (Charge / MaxCharge < 0.75f) - return; - - if (SideSprouts(1, 150f, 0.8f) && Charge >= MaxCharge) - SideSprouts(1, 250f, 0.5f); - - if (SideSprouts(-1, 150f, 0.8f) && Charge >= MaxCharge) - SideSprouts(-1, 250f, 0.5f); - - } - - public bool SideSprouts(float facing, float distance, float projSize) - { - float widestAngle = 0f; - float widestSurfaceAngle = 0f; - bool validPositionFound = false; - for (float i = 0f; i < 1; i += 1 / distance) - { - Vector2 positionToCheck = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - widestAngle = i; - - else if (widestAngle != 0) - { - validPositionFound = true; - widestSurfaceAngle = widestAngle; - } - } - - if (validPositionFound) - { - Vector2 projPosition = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), (int)(Projectile.damage * TrueBiomeBlade.AstralAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is ExtantAbhorrenceMonolith monolith) - monolith.WaitTimer = (1 - projSize) * 34f; - } - - return validPositionFound; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - // 17APR2024: Ozzatron: Biome Blade's astral slam gives iframes when striking enemies in a similar manner to a ram dash. - // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. - Owner.GiveUniversalIFrames(TrueBiomeBlade.AstralAttunement_DashHitIFrames); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.SourceDamage *= 1f + TrueBiomeBlade.AstralAttunement_FullChargeBoost * (float)Math.Pow(Charge / MaxCharge, 2); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D handle = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade").Value; - Texture2D blade = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence").Value; - - float drawAngle = direction.ToRotation(); - float drawRotation = drawAngle + MathHelper.PiOver4; - - Vector2 drawOrigin = new Vector2(0f, handle.Height); - Vector2 drawOffset = Projectile.Center - Main.screenPosition; - - Main.EntitySpriteDraw(handle, drawOffset, null, lightColor, drawRotation, drawOrigin, Projectile.scale, 0f, 0); - - //Turn on additive blending - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - //Just in case - if (OverCharge < 0) - OverCharge = 0f; - //When the blink is - GameShaders.Misc["CalamityMod:BasicTint"].UseOpacity(OverCharge / 20f); - GameShaders.Misc["CalamityMod:BasicTint"].UseColor(new Color(154, 244, 240)); - GameShaders.Misc["CalamityMod:BasicTint"].Apply(); - - //Update the parameters - drawOrigin = new Vector2(0f, blade.Height); - - Main.EntitySpriteDraw(blade, drawOffset, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, Projectile.scale, 0f, 0); - - //Back to normal - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - public override void OnKill(int timeLeft) - { - //Cut the velocity short if dashing - if (State == 1f) - Owner.velocity *= 0.33f; - - Owner.Calamity().LungingDown = false; - - Projectile.active = false; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(initialized); - writer.WriteVector2(direction); - writer.Write(CurrentIndicator); - writer.WriteVector2(lastDisplacement); - writer.Write(dashDuration); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - initialized = reader.ReadBoolean(); - direction = reader.ReadVector2(); - CurrentIndicator = reader.ReadSingle(); - lastDisplacement = reader.ReadVector2(); - dashDuration = reader.ReadSingle(); - } - } -} diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.png b/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrence.png deleted file mode 100644 index 4ec0fdebc3e4f1cd55dbbaa1a96a83e5e55570b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1218 zcmV;z1U>tSP)Px(d`Uz>RCt{2oXd+GMI6UJ)zdxu$Zqfj0g+@cK3ODqkl+J71P?*cKVTyP!Go7v zBjUl6;>lacL0EDT#8X5NSw&$_o`UEisG#BlG$!iC>`YH}kB48??(}4`Gqck*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float rotation = direction.ToRotation(); if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) hasMadeSound = 0f; @@ -137,6 +134,22 @@ namespace CalamityMod.Projectiles.Melee } } + if (Empowerment / maxEmpowerment >= 0.5f && hasMadeChargeSound == 0f) + { + SoundEngine.PlaySound(DeusRitualDrama.PulseSound with { Pitch = -0.05f }, Projectile.Center); + hasMadeChargeSound++; + } + + if (Empowerment >= maxEmpowerment) + { + Empowerment = Empowerment; + if (Owner.whoAmI == Main.myPlayer && hasMadeChargeSound < 2f) + { + SoundEngine.PlaySound(AstralBeacon.UseSound, Projectile.Center); + hasMadeChargeSound++; + } + } + if (Empowerment / maxEmpowerment >= 0.75) { if (smear == null) @@ -151,7 +164,7 @@ namespace CalamityMod.Projectiles.Melee smear.Time = 0; smear.Position = Owner.Center; smear.Scale = Projectile.scale * 1.5f; - smear.Color = Color.Lerp(Color.HotPink, Color.Cyan, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + smear.Color = Color.Lerp(Color.HotPink, Color.Purple, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); } } @@ -189,6 +202,16 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + // Spawn a monolith on max power sword throws + if (!(CurrentState == 1f && Projectile.numHits <= 0)) + return; + + if (Empowerment >= maxEmpowerment) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 10), ProjectileType(), (int)(Projectile.damage * TrueBiomeBlade.HolyAttunement_MonolithDamage), 10f, Owner.whoAmI, Main.rand.Next(4)); + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (CurrentState == 1f) @@ -224,7 +247,7 @@ namespace CalamityMod.Projectiles.Melee Main.spriteBatch.Draw(handle, drawOffset, null, color * MathHelper.Lerp(0f, 0.5f, MathHelper.Clamp(Empowerment / maxEmpowerment - 0.4f / 0.1f, 0f, 1f)), afterimageRotation, drawOrigin, Projectile.scale - 0.2f * ((i / (float)Projectile.oldRot.Length)), 0f, 0f); } - Main.spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + Main.spriteBatch.End(); //Yippee spritebatch resetting wahoo Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); Vector2 afterimageDrawOrigin = new Vector2(0f, blade.Height); diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs similarity index 70% rename from Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs rename to Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs index 03e90f0a94..dee46f1586 100644 --- a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs @@ -13,15 +13,14 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class ExtantAbhorrenceMonolith : ModProjectile, ILocalizedModType + public class HeavensMonolith : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith"; + public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith"; public Player Owner => Main.player[Projectile.owner]; public float Timer => (100f - Projectile.timeLeft) / 100f; public ref float Variant => ref Projectile.ai[0]; //Yes - public ref float Size => ref Projectile.ai[1]; //Yes - public float WaitTimer; //How long till it appears fr. GOtta remember to sync that one + public ref float WaitTimer => ref Projectile.ai[1]; //How long till it appears fr public const float BaseWidth = 90f; public const float BaseHeight = 420f; @@ -30,13 +29,13 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment GoNormal = new CurveSegment(EasingType.CircIn, 0.4f, 1.2f, -0.2f); public CurveSegment StayNormal = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); - internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth * Size; + internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth; public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f, 1.15f, -0.15f); public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); - internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; + internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight; public override void SetStaticDefaults() { @@ -49,11 +48,11 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.timeLeft = 102; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 10; Projectile.hide = true; } - public override bool? CanDamage() => WaitTimer <= 0; - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; @@ -67,26 +66,15 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (WaitTimer > 0) - { - Projectile.timeLeft = 102; - WaitTimer--; - } - if (Projectile.timeLeft == 100) { - SurfaceUp(); Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity = Vector2.Zero; - if (Size >= 1) //Big monoliths create sparkles even before sprouting up + for (int i = 0; i < 20; i++) { - - for (int i = 0; i < 20; i++) - { - Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); - GeneralParticleHandler.SpawnParticle(Sparkle); - } + Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); } } @@ -99,7 +87,7 @@ namespace CalamityMod.Projectiles.Melee { Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); - Particle smoke = new SmallSmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); + Particle smoke = new SmallSmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f), 165 - Main.rand.Next(30), 0.1f); GeneralParticleHandler.SpawnParticle(smoke); } for (int i = 0; i < 6; i++) @@ -107,39 +95,15 @@ namespace CalamityMod.Projectiles.Melee Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 30f); Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); - Particle Rock = new StoneDebrisParticle(Projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)) * Size, 30 + Main.rand.Next(50), 0.1f); + Particle Rock = new StoneDebrisParticle(Projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)), 30 + Main.rand.Next(50), 0.1f); GeneralParticleHandler.SpawnParticle(Rock); } } } - //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. - public void SurfaceUp() - { - for (float i = 0; i < 40; i += 0.5f) - { - Vector2 positionToCheck = Projectile.Center + Projectile.velocity * i; - if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - { - Projectile.Center = Projectile.Center + Projectile.velocity * i; - return; - } - } - Projectile.Center = Projectile.Center + Projectile.velocity * 40f; - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (Projectile.numHits > 0) - modifiers.SourceDamage *= TrueBiomeBlade.AstralAttunement_MonolithDamageFalloff; - } - public override bool PreDraw(ref Color lightColor) { - if (WaitTimer > 0) - return false; - - Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith").Value; + Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith").Value; float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); @@ -156,10 +120,7 @@ namespace CalamityMod.Projectiles.Melee } public override void PostDraw(Color lightColor) { - if (WaitTimer > 0) - return; - - Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith_Glow").Value; + Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow").Value; float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); @@ -172,16 +133,5 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(tex, drawPosition, frame, Color.White * opacity, drawAngle, drawOrigin, drawScale, 0f, 0); } - - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(WaitTimer); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - WaitTimer = reader.ReadSingle(); - } - } } diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.png similarity index 100% rename from Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith.png rename to Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.png diff --git a/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith_Glow.png b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow.png similarity index 100% rename from Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith_Glow.png rename to Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow.png From 07845a73281f8b17ecd737754cd9b1ab52731c07 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 15 Jul 2024 23:39:44 -0400 Subject: [PATCH 04/35] A massive amount of TBB shit Mostly to resolve continuity issues resulting from BB changes Swordsmith's Pride is now obtained from Hallow and Astral Mercurial Tides is now obtained from Purity and sea biomes; renamed it to Earthen Tides Swordsmith's Pride: * Sword is still spun up as usual, but fires homing astral energies instead of sword beams * Sword throw no longer spawns the sigil, but now spawns monoliths at its peak distance * Number of monoliths scale with sword charge (50% = 1, 75% = 3, 100% = 5), and spawn in a fan shape * Passive now makes attacks inflict Astral Infection instead of spawning sword beams Earthen Tides: * Keeps current core functionality of being a charge-up dash attack * Now spawns homing sword beams while charging up instead of shockwaves * Dash spawns the sigil on hit; sigil continuously inflicts Armor Crunch on the marked enemy and causes sword beam homing to prioritize the marked enemy * Passive still spawns shockwaves; make them bigger, but hit less often * TODO: Retheme tile collision monolith into rocky stalagmites --- Balancing/BalancingChangesManager.cs | 4 +- CalamityLists.cs | 2 +- DataStructures/Attunement.cs | 24 +-- Items/Weapons/Melee/OmegaBiomeBlade.cs | 16 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 19 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 10 +- .../Melee/MendedBiomeBlade_HeavensMight.cs | 2 +- .../MendedBiomeBlade_PurityProjectionSigil.cs | 7 +- Projectiles/Melee/TrueBiomeBladeHoldout.cs | 13 +- ...ides.cs => TrueBiomeBlade_EarthenTides.cs} | 43 +++- ...es.png => TrueBiomeBlade_EarthenTides.png} | Bin ....cs => TrueBiomeBlade_EarthenTidesBeam.cs} | 58 ++++-- ...ng => TrueBiomeBlade_EarthenTidesBeam.png} | Bin ...=> TrueBiomeBlade_EarthenTidesMonolith.cs} | 21 +- ...> TrueBiomeBlade_EarthenTidesMonolith.png} | Bin ...> TrueBiomeBlade_EarthenTidesShockwave.cs} | 15 +- ... TrueBiomeBlade_EarthenTidesShockwave.png} | Bin .../Melee/TrueBiomeBlade_GhastlyChain.cs | 6 + ...TrueBiomeBlade_LamentationsOfTheChained.cs | 3 + .../Melee/TrueBiomeBlade_SanguineFury.cs | 8 +- .../Melee/TrueBiomeBlade_SanguineFuryDash.cs | 11 +- .../Melee/TrueBiomeBlade_SanguineFuryWheel.cs | 13 +- .../Melee/TrueBiomeBlade_SwordsmithsPride.cs | 95 +++------ ...BiomeBlade_SwordsmithsPrideAstralEnergy.cs | 54 +++++ ...TrueBiomeBlade_SwordsmithsPrideMonolith.cs | 193 ++++++++++++++++++ ...rueBiomeBlade_SwordsmithsPrideMonolith.png | Bin 0 -> 34100 bytes 26 files changed, 465 insertions(+), 152 deletions(-) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTides.cs => TrueBiomeBlade_EarthenTides.cs} (84%) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTides.png => TrueBiomeBlade_EarthenTides.png} (100%) rename Projectiles/Melee/{TrueBiomeBlade_SwordsmithsPrideBeam.cs => TrueBiomeBlade_EarthenTidesBeam.cs} (65%) rename Projectiles/Melee/{TrueBiomeBlade_SwordsmithsPrideBeam.png => TrueBiomeBlade_EarthenTidesBeam.png} (100%) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTidesMonolith.cs => TrueBiomeBlade_EarthenTidesMonolith.cs} (93%) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTidesMonolith.png => TrueBiomeBlade_EarthenTidesMonolith.png} (100%) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTidesShockwave.cs => TrueBiomeBlade_EarthenTidesShockwave.cs} (88%) rename Projectiles/Melee/{TrueBiomeBlade_MercurialTidesShockwave.png => TrueBiomeBlade_EarthenTidesShockwave.png} (100%) create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralEnergy.cs create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.png diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 1db3befd52..8e7ba80c19 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -281,8 +281,8 @@ namespace CalamityMod.Balancing // 20% resist to The Hive's nuke. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); - // 20% resist to Mercurial Tides (True Biome Blade). - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType())))); + // 20% resist to Earthen Tides (True Biome Blade). + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType())))); #endregion #region Profaned Guardians diff --git a/CalamityLists.cs b/CalamityLists.cs index c25fef9094..335813768a 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -824,7 +824,7 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 79990458d4..91d65bbae3 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Melee; using Microsoft.Xna.Framework; using Terraria; @@ -441,7 +442,7 @@ namespace CalamityMod.DataStructures { id = AttunementID.Whirlwind; tooltipColor = new Color(220, 105, 197); - tooltipColor2 = new Color(171, 239, 113); + tooltipColor2 = new Color(132, 70, 232); } public override float DamageMultiplier => OmegaBiomeBlade.WhirlwindAttunement_BaseDamage / (float)OmegaBiomeBlade.BaseDamage; @@ -459,15 +460,12 @@ namespace CalamityMod.DataStructures public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) { - if (UseTimer % 30 == 29 && Main.rand.NextBool(2)) - { - SoundEngine.PlaySound(SoundID.Item78); - int damage = (int)player.GetTotalDamage().ApplyTo(OmegaBiomeBlade.WhirlwindAttunement_PassiveBaseDamage); - Projectile beamSword = Projectile.NewProjectileDirect(source, player.Center, player.SafeDirectionTo(Main.MouseWorld, Vector2.One) * 15f, ProjectileType(), damage, 10f, player.whoAmI, 1f); - beamSword.timeLeft = 50; - UseTimer++; - } + // CIT 15JUL2024: Swordsmith's Pride no longer applies its passive effect using this function, since it requires an NPC argument. + // It is now applied using the RealPassiveEffect function below. + // This implentation is admittedly kinda clunky, but oh well. } + + public static void RealPassiveEffect(NPC target) => target.AddBuff(BuffType(), 90); } public class FlailBladeAttunement : Attunement @@ -546,7 +544,7 @@ namespace CalamityMod.DataStructures public ShockwaveAttunement() { id = AttunementID.Shockwave; - tooltipColor = new Color(132, 109, 233); + tooltipColor = new Color(71, 191, 71); tooltipColor2 = new Color(122, 213, 233); } @@ -557,7 +555,7 @@ namespace CalamityMod.DataStructures item.channel = true; item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Shoot; - item.shoot = ProjectileType(); + item.shoot = ProjectileType(); item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; @@ -568,7 +566,7 @@ namespace CalamityMod.DataStructures if (UseTimer % 120 == 119) { int damage = (int)player.GetTotalDamage().ApplyTo(OmegaBiomeBlade.ShockwaveAttunement_PassiveBaseDamage); - Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), damage, 10f, player.whoAmI, 1f); + Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), damage, 10f, player.whoAmI, 2.25f); UseTimer++; } } diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 213198cac8..a72d574dea 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -35,11 +35,11 @@ namespace CalamityMod.Items.Weapons.Melee public static int WhirlwindAttunement_BaseDamage = 140; public static int WhirlwindAttunement_LocalIFrames = 20; //Remember its got one extra update - public static int WhirlwindAttunement_SigilTime = 1000; - public static float WhirlwindAttunement_BeamDamageReduction = 0.5f; + public static float WhirlwindAttunement_EnergyDamageMult = 0.5f; public static float WhirlwindAttunement_BaseDamageReduction = 0.3f; public static float WhirlwindAttunement_FullChargeDamageBoost = 0.9f; public static float WhirlwindAttunement_ThrowDamageBoost = 3.3f; + public static float WhirlwindAttunement_MonolithDamageMult = 0.5f; public static int WhirlwindAttunement_PassiveBaseDamage = 200; @@ -59,11 +59,12 @@ namespace CalamityMod.Items.Weapons.Melee public static int ShockwaveAttunement_BaseDamage = 550; + public static float ShockwaveAttunement_BeamDamageMult = 0.25f; public static int ShockwaveAttunement_DashHitIFrames = 20; public static float ShockwaveAttunement_FullChargeBoost = 2.5f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. + public static int ShockwaveAttunement_SigilTime = 1000; public static float ShockwaveAttunement_MonolithDamageBoost = 1.1f; public static float ShockwaveAttunement_MonolithDamageFalloff = 0.15f; //Damage multiplier for all subsequent hits after the first one. - public static float ShockwaveAttunement_BlastDamageReduction = 0.8f; public static int ShockwaveAttunement_PassiveBaseDamage = 200; @@ -80,13 +81,14 @@ namespace CalamityMod.Items.Weapons.Melee //Proc coefficients. aka the likelihood of any given attack to trigger a on-hit passive. public static float WhirlwindAttunement_WhirlwindProc = 0.24f; public static float WhirlwindAttunement_SwordThrowProc = 1f; - public static float WhirlwindAttunement_SwordBeamProc = 0.05f; + public static float WhirlwindAttunement_MonolithProc = 0.25f; public static float SuperPogoAttunement_ShredderProc = 0.1f; public static float SuperPogoAttunement_WheelProc = 0.4f; public static float SuperPogoAttunement_DashProc = 1f; public static float ShockwaveAttunement_SwordProc = 1f; + public static float ShockwaveAttunement_SwordBeamProc = 0.05f; public static float ShockwaveAttunement_MonolithProc = 1f; public static float ShockwaveAttunement_BlastProc = 0.5f; @@ -262,7 +264,7 @@ namespace CalamityMod.Items.Weapons.Melee player.Calamity().rightClickListener = true; player.Calamity().mouseWorldListener = true; - //Reset the strong lunge thing just in case it didnt get caught beofre. + //Reset the strong lunge thing just in case it didnt get caught before. if (CanUseItem(player)) { @@ -292,7 +294,7 @@ namespace CalamityMod.Items.Weapons.Melee return; - //PAssive effetcsts only happen on the side of the owner + //Passive effects only happen on the side of the owner var source = player.GetSource_ItemUse(Item); if (secondaryAttunement != null) { @@ -329,7 +331,7 @@ namespace CalamityMod.Items.Weapons.Melee bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None; return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || - n.type == ProjectileType() || + n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType())); } diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index e8794a869c..f3229bdf1d 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -99,10 +99,12 @@ WhirlwindAttunement: { Name: Swordsmith's Pride Function: ''' - Hold to swing the sword around you, accelerating over time. Sword beams are fired wildly while swinging - Releasing hurls the sword towards your cursor. Sword beams home onto enemies struck by the thrown sword + Hold to swing the sword around you, accelerating and dealing more damage over time + Homing astral energies are wildly fired around you while swinging + Once swung for long enough, releasing hurls the sword towards your cursor + Once pulled back, the hurled sword erupts into astral monoliths ''' - PassiveDesc: All attacks have a chance to fire sword beams + PassiveDesc: All attacks inflict the Astral Infection debuff } FlailBladeAttunement: { @@ -122,20 +124,21 @@ SuperPogoAttunement: { Hold to conjure molten blades in front of you that get larger and stronger the more you hit enemies The blades can also be used to bounce off tiles when in the air Releasing sends the charged blades hurtling forwards like a wheel - Attacking again immediately thereafter dashes to the wheel, shredding anything in the way + Attacking again immediately thereafter dashes to the wheel, shredding anything in the way and healing you ''' PassiveDesc: Striking enemies rarely steals a small amount of life } ShockwaveAttunement: { - Name: Mercurial Tides + Name: Earthen Tides Function: ''' Hold to charge a heaven-shattering lunge, release to unleash the devastating blow - Shock waves are emitted as the sword charges up - Striking the earth with the lunge will cause a massive shock wave on impact which raises a flood of monoliths + Homing sword beams are emitted as the sword charges up + Striking an enemy with the lunge marks them with an armor crunching sigil that sword beam homing will prioritize + Striking the earth with the lunge will cause a massive shock wave on impact which raises a flood of stalagmites ''' - PassiveDesc: Periodically emit shock waves while attacking + PassiveDesc: Periodically emit large shock waves while attacking } // Galaxia diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 48fcd55f4e..f5eb4ee0ac 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -99,6 +99,10 @@ DragonPowFlail.DisplayName: Dragon Pow DragonRageFireball.DisplayName: Dragon Rage Fireball EarthBoom.DisplayName: Earth's Judgement EarthMeteor.DisplayName: Gaia Meteor +EarthenTides.DisplayName: Earthen Tides +EarthenTidesBeam.DisplayName: Swordsmith's Projection +EarthenTidesBlast.DisplayName: Earthen Tides Blast +EarthenTidesMonolith.DisplayName: Earthen Tides Monolith ElementalGlassStar.DisplayName: Glass Star ElementBall.DisplayName: Elemental Ball EmpyreanKnife.DisplayName: Empyrean Knife @@ -168,9 +172,6 @@ LifeScythe.DisplayName: Lifehunt Scythe LightBeam.DisplayName: Light Beam LightningThing.DisplayName: Lightning LuxorsGiftMelee.DisplayName: Luxor's Melee -MercurialTides.DisplayName: Mercurial Tides -MercurialTidesBlast.DisplayName: Mercurial Blast -MercurialTidesMonolith.DisplayName: Mercurial Monolith MicrowaveAura.DisplayName: Microwave Radiation MirrorBlast.DisplayName: Mirror Blade MonstrousKnife.DisplayName: Monstrous Knife @@ -249,7 +250,8 @@ StygianShieldThrown.DisplayName: Shield of Chaos SulphurousGrabberBubble.DisplayName: Grabber Bubble SulphurousGrabberBubble2.DisplayName: Grabber Bubble SwordsmithsPride.DisplayName: Swordsmith's Pride -SwordsmithsPrideBeam.DisplayName: Swordsmith's Projection +SwordsmithsPrideAstralEnergy.DisplayName: Swordsmith's Astral Energy +SwordsmithsPrideMonolith.DisplayName: Swordsmiths Pride Monolith SwordsplosionBlue.DisplayName: Blue Sword SwordsplosionGreen.DisplayName: Green Sword SwordsplosionPurple.DisplayName: Purple Sword diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index e756f387fc..a5abf19757 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -101,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.numHits = 0; SoundEngine.PlaySound(SoundID.Item80, Projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); diff --git a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs index 7fd0b3059e..1b24f9949d 100644 --- a/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs +++ b/Projectiles/Melee/MendedBiomeBlade_PurityProjectionSigil.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Items.Weapons.Melee; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -44,6 +45,10 @@ namespace CalamityMod.Projectiles.Melee if (target.active) { Projectile.Center = target.Center; + + // TBB sigil marks the enemy with Armor Crunch + if (Projectile.ai[1] == 1f) + target.AddBuff(ModContent.BuffType(), 5); } else Projectile.active = false; diff --git a/Projectiles/Melee/TrueBiomeBladeHoldout.cs b/Projectiles/Melee/TrueBiomeBladeHoldout.cs index 672b2c4a28..50e65632aa 100644 --- a/Projectiles/Melee/TrueBiomeBladeHoldout.cs +++ b/Projectiles/Melee/TrueBiomeBladeHoldout.cs @@ -134,23 +134,22 @@ namespace CalamityMod.Projectiles.Melee bool desert = Owner.ZoneDesert; bool hell = Owner.ZoneUnderworldHeight; bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur; - bool hallow = Owner.ZoneHallow; - bool astral = Owner.Calamity().ZoneAstral; + bool heavenly = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; - Attunement attunement = Attunement.attunementArray[(int)AttunementID.Whirlwind]; + Attunement attunement = Attunement.attunementArray[(int)AttunementID.Shockwave]; if (desert || hell) attunement = Attunement.attunementArray[(int)AttunementID.SuperPogo]; if (jungle || ocean || snow) //Check put after the desert check so ocean doesnt get overriden as desert attunement = Attunement.attunementArray[(int)AttunementID.FlailBlade]; if (evil) //Evil check separated so that it overrides corrupted beach & snow biomes attunement = Attunement.attunementArray[(int)AttunementID.SuperPogo]; - if (astral || marine) + if (marine) attunement = Attunement.attunementArray[(int)AttunementID.Shockwave]; - if (hallow) - attunement = Attunement.attunementArray[(int)AttunementID.Whirlwind]; //Putting holy check at the end so it may override hallowed variants of biomes + if (heavenly) + attunement = Attunement.attunementArray[(int)AttunementID.Whirlwind]; //Putting holy check at the end so it may override hallowed variants of biomes - //If the owner already had the attunement , break out of it (And unswap) + //If the owner already had the attunement, break out of it (And unswap) if (item.secondaryAttunement == attunement) { SoundEngine.PlaySound(SoundID.DD2_LightningBugZap, Projectile.Center); diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs similarity index 84% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs rename to Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index a0183dbc9b..64c7284c6a 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Projectiles.Boss; @@ -16,10 +17,10 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class MercurialTides : ModProjectile, ILocalizedModType + public class EarthenTides : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTides"; private bool initialized = false; Vector2 direction = Vector2.Zero; public Player Owner => Main.player[Projectile.owner]; @@ -111,7 +112,13 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 2; if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + int swordAmt = 3 + (int)CurrentIndicator; + for (int s = 0; s < swordAmt; s++) + { + Vector2 swordVel = (Vector2.UnitX.RotatedBy(Projectile.rotation) * 10f).RotatedByRandom(MathHelper.Pi / 8); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, swordVel, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BeamDamageMult), 10f, Owner.whoAmI); + } + SoundEngine.PlaySound(DeusRitualDrama.PulseSound with { Pitch = DeusRitualDrama.PulseSound.Pitch - 0.2f + 0.1f * CurrentIndicator }, Projectile.Center); CurrentIndicator++; @@ -123,7 +130,11 @@ namespace CalamityMod.Projectiles.Melee Charge = MaxCharge; if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BlastDamageReduction), 10f, Owner.whoAmI, 1f + CurrentIndicator * 0.15f); + for (int s = 0; s < 6; s++) + { + Vector2 swordVel = (Vector2.UnitX.RotatedBy(Projectile.rotation) * 10f).RotatedByRandom(MathHelper.Pi / 8); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, swordVel, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BeamDamageMult), 10f, Owner.whoAmI); + } OverCharge = 20f; SoundEngine.PlaySound(AstralBeacon.UseSound, Projectile.Center); CurrentIndicator++; @@ -188,7 +199,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + (direction * 120 * Projectile.scale), -direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + (direction * 120 * Projectile.scale), -direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); proj.timeLeft = 81; @@ -220,8 +231,8 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is MercurialTidesMonolith monolith) + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.ModProjectile is EarthenTidesMonolith monolith) { monolith.WaitTimer = (1 - projSize) * 34f; monolith.OriginDirection = direction; @@ -237,6 +248,9 @@ namespace CalamityMod.Projectiles.Melee // 17APR2024: Ozzatron: True Biome Blade's shockwave slam gives iframes when striking enemies in a similar manner to a ram dash. // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. Owner.GiveUniversalIFrames(OmegaBiomeBlade.ShockwaveAttunement_DashHitIFrames); + + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) @@ -245,12 +259,25 @@ namespace CalamityMod.Projectiles.Melee if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordProc) sword.OnHitProc = true; + + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) + { + //Reset the timeLeft on the sigil & set its new target (or same target, doesn't matter) + proj.ai[0] = target.whoAmI; + proj.timeLeft = OmegaBiomeBlade.ShockwaveAttunement_SigilTime; + return; + } + } + Projectile sigil = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI, 1f); + sigil.timeLeft = OmegaBiomeBlade.ShockwaveAttunement_SigilTime; } public override bool PreDraw(ref Color lightColor) { Texture2D handle = Request("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade").Value; - Texture2D blade = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTides").Value; + Texture2D blade = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTides").Value; float drawAngle = direction.ToRotation(); float drawRotation = drawAngle + MathHelper.PiOver4; diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTides.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.png similarity index 100% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTides.png rename to Projectiles/Melee/TrueBiomeBlade_EarthenTides.png diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs similarity index 65% rename from Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs index 68efc899ff..f3ef2eb8f9 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs @@ -1,6 +1,8 @@ using System; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Ranged; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -12,12 +14,12 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class SwordsmithsPrideBeam : ModProjectile, ILocalizedModType + public class EarthenTidesBeam : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public NPC target; public Player Owner => Main.player[Projectile.owner]; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam"; public override void SetStaticDefaults() { @@ -32,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee AIType = ProjectileID.LightBeam; Projectile.friendly = true; Projectile.penetrate = 1; - Projectile.timeLeft = 80; + Projectile.timeLeft = 150; Projectile.extraUpdates = 1; Projectile.DamageType = DamageClass.Melee; Projectile.tileCollide = false; @@ -40,27 +42,52 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - - if (target == null) + // Sword beams home + if (Projectile.timeLeft < 120) { + // Find the closest target + float npcDistCompare = 240f; + int index = -1; + foreach (NPC n in Main.ActiveNPCs) + { + if (!n.CanBeChasedBy(Projectile, false)) + continue; + + float currentNPCDist = Vector2.Distance(n.Center, Projectile.Center); + if ((currentNPCDist < npcDistCompare) && Collision.CanHit(Projectile.Center, 1, 1, n.Center, 1, 1)) + { + npcDistCompare = currentNPCDist; + index = n.whoAmI; + } + } + // Homing will prioritize an enemy that is marked foreach (Projectile proj in Main.projectile) { if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) { - target = Main.npc[(int)proj.ai[0]]; - break; + if (Vector2.Distance(Main.npc[(int)proj.ai[0]].Center, Projectile.Center) < 560f) + { + index = (int)proj.ai[0]; + break; + } } } + // If we found an enemy, curve towards them + if (index != -1) + { + float homingTurnSpeed = 0.05f; + Projectile.velocity = Projectile.velocity.ToRotation().AngleTowards(Projectile.SafeDirectionTo(Main.npc[index].Center).ToRotation(), homingTurnSpeed).ToRotationVector2() * 10f; + } } - else if ((Projectile.Center - target.Center).Length() >= (Projectile.Center + Projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver4) //Home in + /*else if ((Projectile.Center - target.Center).Length() >= (Projectile.Center + Projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver4) //Home in { Projectile.timeLeft = 70; //Remain alive float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(15, 2.5f, MathHelper.Clamp(Projectile.Distance(target.Center) / 10f, 0f, 1f))); float idealDirection = Projectile.AngleTo(target.Center); float updatedDirection = Projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); Projectile.velocity = updatedDirection.ToRotationVector2() * Projectile.velocity.Length(); - } + }*/ Lighting.AddLight(Projectile.Center, 0.75f, 1f, 0.24f); int dustParticle = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); @@ -71,12 +98,12 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - if (Projectile.timeLeft > 75) + if (Projectile.timeLeft > 145) return false; DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); - Main.spriteBatch.End(); //Haha sup babe what if i restarted the spritebatch way too many times haha /blushes + Main.spriteBatch.End(); //Yippee wahoo spritebatch restarting! Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); Texture2D tex = Terraria.GameContent.TextureAssets.Projectile[Projectile.type].Value; @@ -103,15 +130,16 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - int debuffTime = 90; - target.AddBuff(BuffType(), debuffTime); + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordBeamProc) + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordBeamProc) sword.OnHitProc = true; } - public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)); + public override Color? GetAlpha(Color lightColor) => Color.Lerp(Color.DeepSkyBlue, Color.GreenYellow, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 4f)); } } diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.png similarity index 100% rename from Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideBeam.png rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.png diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs similarity index 93% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs index 6d758d21ed..62a63b05b9 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -14,15 +15,15 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class MercurialTidesMonolith : ModProjectile, ILocalizedModType + public class EarthenTidesMonolith : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith"; public Player Owner => Main.player[Projectile.owner]; public float Timer => (100f - Projectile.timeLeft) / 100f; public ref float Variant => ref Projectile.ai[0]; //Yes public ref float Size => ref Projectile.ai[1]; //Yes - public float WaitTimer; //How long until the monoliths appears + public float WaitTimer; //How long until the monolith appears public Vector2 OriginDirection; //The direction of the original strike public float Facing; //The direction of the original strike public const float BaseWidth = 90f; @@ -162,8 +163,8 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projPosition = Projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is MercurialTidesMonolith monolith) + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); + if (proj.ModProjectile is EarthenTidesMonolith monolith) { monolith.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f; monolith.OriginDirection = OriginDirection; @@ -174,6 +175,12 @@ namespace CalamityMod.Projectiles.Melee return validPositionFound; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_MonolithProc) @@ -188,7 +195,7 @@ namespace CalamityMod.Projectiles.Melee if (WaitTimer > 0) return false; - Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith").Value; + Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith").Value; Vector2 Shake = Projectile.timeLeft < 70 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (70 - Projectile.timeLeft / 30f) * 0.05f; @@ -210,7 +217,7 @@ namespace CalamityMod.Projectiles.Melee if (WaitTimer > 0) return; - Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_ExtantAbhorrenceMonolith_Glow").Value; + Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow").Value; float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.png similarity index 100% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTidesMonolith.png rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.png diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs similarity index 88% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs index cafa9fde02..64884afedf 100644 --- a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -11,10 +12,10 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class MercurialTidesBlast : ModProjectile, ILocalizedModType + public class EarthenTidesBlast : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave"; public Player Owner => Main.player[Projectile.owner]; public float Timer => (60f - Projectile.timeLeft) / 100f; public ref float Variant => ref Projectile.ai[0]; //Yes @@ -33,6 +34,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.timeLeft = 60; + Projectile.usesIDStaticNPCImmunity = true; + Projectile.idStaticNPCHitCooldown = 12; } public override bool? CanDamage() => Projectile.timeLeft < 40; @@ -85,6 +88,12 @@ namespace CalamityMod.Projectiles.Melee } } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) @@ -93,7 +102,7 @@ namespace CalamityMod.Projectiles.Melee public override bool PreDraw(ref Color lightColor) { - Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave").Value; + Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave").Value; float drawAngle = Projectile.rotation; int animFrame = 6 - (int)Math.Ceiling(Projectile.timeLeft / 10f); diff --git a/Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png similarity index 100% rename from Projectiles/Melee/TrueBiomeBlade_MercurialTidesShockwave.png rename to Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png diff --git a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs index 7c61988cce..b763216a2c 100644 --- a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs +++ b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs @@ -57,6 +57,12 @@ namespace CalamityMod.Projectiles.Melee sword.OnHitProc = true; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } + public override bool PreDraw(ref Color lightColor) { Texture2D chainTex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain").Value; diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 38a4346f7e..c0694d1dc9 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -117,6 +117,9 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + if (hit.Crit) { SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound, Projectile.Center); diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index e7b182dc10..4b580a3548 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Sounds; @@ -241,7 +242,12 @@ namespace CalamityMod.Projectiles.Melee modifiers.SourceDamage *= damageMultiplier * damageReduction; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => ShredTarget(); + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + ShredTarget(); + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } public override void OnHitPlayer(Player target, Player.HurtInfo info) => ShredTarget(); private void ShredTarget() diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs index 0d2290995c..c744402dbe 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs @@ -1,4 +1,5 @@ using System; +using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; @@ -43,8 +44,14 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) - sword.OnHitProc = true; + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword) + { + if (Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) + sword.OnHitProc = true; + + if (sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); GeneralParticleHandler.SpawnParticle(bloom); diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs index 034fc7c9a3..37098ad43d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs @@ -1,4 +1,5 @@ -using CalamityMod.Items.Weapons.Melee; +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -84,8 +85,14 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) - sword.OnHitProc = true; + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword) + { + if (Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) + sword.OnHitProc = true; + + if (sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 8c8351f8f7..000f867f59 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -2,6 +2,8 @@ using System.IO; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Tiles.Astral; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -39,10 +41,7 @@ namespace CalamityMod.Projectiles.Melee public float AngleReset = 0f; - public bool CanDirectFire = true; public Particle smear; - public Particle sightLine; - public NPC lastTarget; public override void SetStaticDefaults() { @@ -102,7 +101,7 @@ namespace CalamityMod.Projectiles.Melee CurrentState = 1f; SoundEngine.PlaySound(SoundID.Item80, Projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); @@ -122,40 +121,37 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 0f) { - - if (hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) - { - hasMadeChargeSound = 1f; - SoundEngine.PlaySound(SoundID.Item76, Projectile.Center); - } - float rotation = direction.ToRotation(); if (rotation > -MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < -MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 1f) hasMadeSound = 0f; else if (rotation > MathHelper.PiOver2 - MathHelper.PiOver4 && rotation < MathHelper.PiOver2 + MathHelper.PiOver4 && hasMadeSound == 0f) { - CanDirectFire = true; hasMadeSound = 1f; SoundEngine.PlaySound(SoundID.Item71, Projectile.Center); } + if ((hasMadeChargeSound == 0f && Empowerment / maxEmpowerment >= 0.5) || (hasMadeChargeSound == 1f && Empowerment / maxEmpowerment >= 0.75)) + { + hasMadeChargeSound++; + SoundEngine.PlaySound(DeusRitualDrama.PulseSound with { Pitch = -0.1f + hasMadeChargeSound * 0.1f }, Projectile.Center); + } + if (hasMadeChargeSound == 2f && Empowerment >= maxEmpowerment) + { + hasMadeChargeSound++; + SoundEngine.PlaySound(AstralBeacon.UseSound, Projectile.Center); + } if (Empowerment / maxEmpowerment >= 0.5 && (Empowerment + OverEmpowerment) % 30 == 29 && Owner.whoAmI == Main.myPlayer) { - Vector2 shotDirection = Main.rand.NextVector2CircularEdge(15f, 15f); - if (lastTarget != null && lastTarget.active) //If you've got an actual target, angle your shots towards them - { - shotDirection = (shotDirection.ToRotation().AngleTowards(Owner.AngleTo(lastTarget.Center), MathHelper.PiOver2)).ToRotationVector2() * 15f; - } - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, shotDirection, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); + Vector2 shotDirection = Main.rand.NextVector2CircularEdge(10f, 10f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, shotDirection, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_EnergyDamageMult), 0f, Owner.whoAmI); } - if (Empowerment / maxEmpowerment >= 0.75) { - Color currentColor = Color.Lerp(Color.HotPink, Color.GreenYellow, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); + Color currentColor = Color.Lerp(Color.HotPink, Color.DarkViolet, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 2f)) * (((Empowerment / maxEmpowerment) - 0.75f) / 0.25f * 0.8f); if (smear == null) { smear = new CircularSmearVFX(Owner.Center, Color.HotPink, direction.ToRotation(), Projectile.scale * 1.5f); @@ -171,38 +167,6 @@ namespace CalamityMod.Projectiles.Melee smear.Color = currentColor; } - if (sightLine == null) - { - sightLine = new LineVFX(Owner.Center, Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.One), 0.2f, Color.HotPink, false); - GeneralParticleHandler.SpawnParticle(sightLine); - } - else - { - sightLine.Position = Owner.Center + Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.One) * Projectile.scale * 1.88f * 40; - (sightLine as LineVFX).LineVector = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.One) * Projectile.scale * 1.88f * 38f; - sightLine.Scale = 0.2f; - sightLine.Time = 0; - sightLine.Color = currentColor * 0.7f; - } - - float rotationAdjusted = MathHelper.WrapAngle(Projectile.rotation) + MathHelper.Pi; - float mouseAngleAdjusted = MathHelper.WrapAngle(Owner.SafeDirectionTo(Main.MouseWorld, Vector2.One).ToRotation()) + MathHelper.Pi; - float deltaAngleShoot = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - mouseAngleAdjusted)); - - if (CanDirectFire && deltaAngleShoot < 0.1f) - { - Particle Blink = new GenericSparkle(Owner.Center + Owner.SafeDirectionTo(Main.MouseWorld, Vector2.One) * Projectile.scale * 1.88f * 78f, Owner.velocity, Color.White, currentColor, 1.5f, 10, 0.1f, 3f); - GeneralParticleHandler.SpawnParticle(Blink); - - if (Owner.whoAmI == Main.myPlayer) - { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, Owner.SafeDirectionTo(Main.MouseWorld, Vector2.One) * 15f, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_BeamDamageReduction), 0f, Owner.whoAmI); - } - CanDirectFire = false; - AngleReset = Owner.SafeDirectionTo(Main.MouseWorld, Vector2.One).ToRotation(); - } - - if (Main.rand.NextBool()) { float maxDistance = Projectile.scale * 1.9f * 78f; @@ -234,6 +198,16 @@ namespace CalamityMod.Projectiles.Melee { Projectile.Center = Owner.Center + (direction * Projectile.scale * 10) + (direction * throwOutDistance * ThrowCurve()); Projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); + + if (snapTimer > 0.01f && snapTimer < 0.02f) + { + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_MonolithDamageMult), Projectile.knockBack, Owner.whoAmI, Main.rand.Next(4), 1f, hasMadeChargeSound); + if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) + { + monolith.OriginDirection = direction; + monolith.Facing = 0f; + } + } } //Make the owner look like theyre holding the sword bla bla @@ -251,7 +225,6 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (CurrentState == 1f) modifiers.SourceDamage *= MathHelper.Lerp(1f, OmegaBiomeBlade.WhirlwindAttunement_ThrowDamageBoost, Empowerment / maxEmpowerment); else @@ -266,28 +239,12 @@ namespace CalamityMod.Projectiles.Melee if (Owner.HeldItem.ModItem is OmegaBiomeBlade blade && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_SwordThrowProc) blade.OnHitProc = true; - - lastTarget = target; - foreach (Projectile proj in Main.projectile) - { - if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) - { - //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. - proj.ai[0] = target.whoAmI; - proj.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; - return; - } - } - Projectile sigil = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); - sigil.timeLeft = OmegaBiomeBlade.WhirlwindAttunement_SigilTime; } public override void OnKill(int timeLeft) { if (smear != null) smear.Kill(); - if (sightLine != null) - sightLine.Kill(); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralEnergy.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralEnergy.cs new file mode 100644 index 0000000000..f2e88c452b --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralEnergy.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class SwordsmithsPrideAstralEnergy : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public ref float Timer => ref Projectile.ai[0]; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 32; + Projectile.friendly = true; + Projectile.penetrate = 1; + Projectile.timeLeft = 240; + Projectile.extraUpdates = 1; + Projectile.DamageType = DamageClass.Melee; + Projectile.tileCollide = false; + } + + public override void AI() + { + Timer++; + + if (Timer >= 40f) + { + CalamityUtils.HomeInOnNPC(Projectile, true, 480f, 13f, 20f); + } + + Projectile.ai[1] += 0.18f; + float angle = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + float pulse = (float)Math.Sin(Projectile.ai[1]); + float radius = 9f; + Vector2 offset = angle.ToRotationVector2() * pulse * radius; + Dust.NewDustPerfect(Projectile.Center + offset, ModContent.DustType(), Vector2.Zero, Scale: 0.75f); + Dust.NewDustPerfect(Projectile.Center - offset, ModContent.DustType(), Vector2.Zero, Scale: 0.75f); + + Color partColor = Color.Lerp(Color.Orange, Color.Blue, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3.5f)); + GlowOrbParticle obligatory = new(Projectile.Center, Vector2.Zero, false, 2, 0.8f, partColor); + GeneralParticleHandler.SpawnParticle(obligatory); + } + } +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs new file mode 100644 index 0000000000..b3b69afa7b --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.IO; +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; +using static CalamityMod.CalamityUtils; +using static Terraria.ModLoader.ModContent; + +namespace CalamityMod.Projectiles.Melee +{ + public class SwordsmithsPrideMonolith : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith"; + public Player Owner => Main.player[Projectile.owner]; + public float Timer => (100f - Projectile.timeLeft) / 100f; + public ref float Variant => ref Projectile.ai[0]; //Yes + public ref float Size => ref Projectile.ai[1]; //Yes + public Vector2 OriginDirection; //The direction of the original strike + public float Facing; //The direction of the original strike + public const float BaseWidth = 90f; + public const float BaseHeight = 420f; + + public CurveSegment StaySmall = new CurveSegment(EasingType.Linear, 0f, 0.2f, 0f); + public CurveSegment GoBig = new CurveSegment(EasingType.SineOut, 0.25f, 0.2f, 1f); + public CurveSegment GoNormal = new CurveSegment(EasingType.CircIn, 0.4f, 1.2f, -0.2f); + public CurveSegment StayNormal = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); + + internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth * Size; + + public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); + public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); + public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f, 1.15f, -0.15f); + public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); + internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; + + public override void SetStaticDefaults() + { + } + public override void SetDefaults() + { + Projectile.DamageType = DamageClass.Melee; + Projectile.width = Projectile.height = 70; + Projectile.tileCollide = false; + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 102; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + Projectile.hide = true; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float collisionPoint = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + ((Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * Height()), Width(), ref collisionPoint); + } + + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + behindNPCsAndTiles.Add(index); + } + + public override void AI() + { + if (Projectile.velocity != Vector2.Zero) + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + Projectile.velocity = Vector2.Zero; + } + + if (Projectile.timeLeft == 100) + { + if (Size >= 1) //Big monoliths create sparkles even before sprouting up + { + + for (int i = 0; i < 20; i++) + { + Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + GeneralParticleHandler.SpawnParticle(Sparkle); + } + } + + if (Projectile.ai[2] > 1f) + { + if (Facing == 0) + { + SideSprouts(-1f, Size * 0.8f); + SideSprouts(1f, Size * 0.8f); + } + else + { + SideSprouts(Facing, Size * 0.8f); + } + } + + } + + if (Projectile.timeLeft == 80) + { + Vector2 particleDirection = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); + SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, Projectile.Center); + + for (int i = 0; i < 8; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); + Particle smoke = new SmallSmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); + GeneralParticleHandler.SpawnParticle(smoke); + } + for (int i = 0; i < 6; i++) + { + Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 30f); + Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); + + Particle Rock = new StoneDebrisParticle(Projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)) * Size, 30 + Main.rand.Next(50), 0.1f); + GeneralParticleHandler.SpawnParticle(Rock); + } + } + } + + public void SideSprouts(float facing, float projSize) + { + Vector2 monolithRotation = OriginDirection.RotatedBy((MathHelper.Pi / 6f) * facing); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize, Projectile.ai[2] - 1f); + if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) + { + monolith.OriginDirection = monolithRotation; + monolith.Facing = facing; + } + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.WhirlwindAttunement_MonolithProc) + sword.OnHitProc = true; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith").Value; + + Vector2 Shake = Projectile.timeLeft < 70 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (70 - Projectile.timeLeft / 30f) * 0.05f; + + float drawAngle = Projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); + + Main.EntitySpriteDraw(tex, drawPosition + Shake, frame, lightColor * opacity, drawAngle, drawOrigin, drawScale, 0f, 0); + + return false; + } + public override void PostDraw(Color lightColor) + { + Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow").Value; + + float drawAngle = Projectile.rotation; + Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); + + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); + + float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); + + Main.EntitySpriteDraw(tex, drawPosition, frame, Color.White * opacity, drawAngle, drawOrigin, drawScale, 0f, 0); + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(Facing); + writer.WriteVector2(OriginDirection); + + } + public override void ReceiveExtraAI(BinaryReader reader) + { + Facing = reader.ReadSingle(); + OriginDirection = reader.ReadVector2(); + } + } +} diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.png b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.png new file mode 100644 index 0000000000000000000000000000000000000000..9d931f19185ebb65a090430b127909a3bd478d69 GIT binary patch literal 34100 zcmYg%cR1T&+cs5n7^SsGTCHk}+O_GRY8171>{%4Glb~wUtiAW9_Fjq58ntTIN)SY? z*g=FZ&-?Jc-ye<~ha91!s^*?hm($HAErpF!8Js1jbonpRB~ z<}e*09vb&I@wHNVpS5S4bPiXx|FdzT>|4isC(bzdKxA6X+eCZ;yk%!%@NoP!B-22IPf!4w1$_=v-`tM`57Mv2DVBQbyM+sl+PnN z@+imx&9dN(ZG^8r-}4QI+a%*&c0;|+qN)#k%}%~m*I5vL?MvCcKuH#ullRx13}!em zPgtgf%3_Bs5dP=GCUan=)pqw^!uMukjDezz6v0vEJxpg!$+)@Ak9$+e zeJ_x7Oj?g9&^*={cCLt0Fu{e{;@FHOBo+%O-qcG_b~V>vrp z7GbNWlG;o%iZ-uyM`^=BMHvxx~T0 zpXTe68UM;pmJCd3`+NpXR5#zQRY1XHKaOCgemh^;_$C0v4Xg}~#Ter{?FWn@ z5V!;Cjy>u|od;u{;CRLHk_#I-wMuws@8qFFt9W`Em1B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E@}l<>WAY5VjI5tz!dR9~{|45R#pN|G&5b#*q`zqu*QKb$l8U&ZA(|&nx#~pCfjFhG^PRVI5+pkG^5{j`fJViUbT-hxO zQ)IJENEe$gGNyg}>jvMz!l{040Yju-TdMeDPumdnb&rLIlv%d%OmH3rdeBV$V^_4$ zAAzV9^+lmlU&;Qx3B8DnvCHorrhTwmvD=-omM&H{!o@bu{68BZ6PNQy!)wCpL~2NR zGW|HP8v!N>LO&gE-~$=<8CJ9VT2=6Ye#3V?AFW990B-yhHIzwhzm$n_v$kXU58G=F ze|hWluzD-Zu$UDrG>YCAgWp7G4eFTaP#6{7K^Ug57WKjRZh5-o>fGbSB9<<7et4;- zt-T{nV4a4`{_{1_$3RNA| z+P42=>;-{{eZtq&ffq literal 0 HcmV?d00001 From bcd5415e49759a18fe268f6f99ea511bb5102c7e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 16 Jul 2024 11:36:16 -0400 Subject: [PATCH 05/35] Sunken Sea and Abyss go into the same attunements on BBB as BB --- Projectiles/Melee/BrokenBiomeBladeHoldout.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs index 08f7b76c91..74e88f0315 100644 --- a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs +++ b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs @@ -122,9 +122,9 @@ namespace CalamityMod.Projectiles.Melee bool jungle = Owner.ZoneJungle; bool snow = Owner.ZoneSnow; bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert; + bool desert = Owner.ZoneDesert || Owner.Calamity().ZoneSunkenSea; bool hell = Owner.ZoneUnderworldHeight; - bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur; + bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur || Owner.Calamity().ZoneAbyss; Attunement attunement = Attunement.attunementArray[(int)AttunementID.Default]; From 9609005b912b5939a011b0cd192385deead18c57 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 16 Jul 2024 13:55:21 -0400 Subject: [PATCH 06/35] More TBB tweaking Lamentations of the Chained: * Halved damage, but also halved iframes * Somewhat decreased randomness of whip trajectories Earthen Tides: * Decreased number of sword beams spawned when charging up the lunge * Changed sounds when charging up and when hitting a tile --- Items/Weapons/Melee/OmegaBiomeBlade.cs | 4 ++-- Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs | 14 ++++++++------ .../TrueBiomeBlade_LamentationsOfTheChained.cs | 12 ++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index a72d574dea..db975ca1ea 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -69,8 +69,8 @@ namespace CalamityMod.Items.Weapons.Melee public static int ShockwaveAttunement_PassiveBaseDamage = 200; - public static int FlailBladeAttunement_BaseDamage = 400; - public static int FlailBladeAttunement_LocalIFrames = 30; + public static int FlailBladeAttunement_BaseDamage = 200; + public static int FlailBladeAttunement_LocalIFrames = 15; public static int FlailBladeAttunement_FlailTime = 10; public static int FlailBladeAttunement_Reach = 400; public static float FlailBladeAttunement_ChainDamageReduction = 0.5f; diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index 64c7284c6a..565f6e212e 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -34,6 +34,9 @@ namespace CalamityMod.Projectiles.Melee public Vector2 lastDisplacement; public float dashDuration; + public static readonly SoundStyle FullChargeSound = new("CalamityMod/Sounds/Item/MagicRockSound"); + public static readonly SoundStyle GroundImpact = new("CalamityMod/Sounds/Item/MagicRockImpact"); + public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -112,14 +115,13 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 2; if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) { - int swordAmt = 3 + (int)CurrentIndicator; - for (int s = 0; s < swordAmt; s++) + for (int s = 0; s < 2; s++) { Vector2 swordVel = (Vector2.UnitX.RotatedBy(Projectile.rotation) * 10f).RotatedByRandom(MathHelper.Pi / 8); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, swordVel, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BeamDamageMult), 10f, Owner.whoAmI); } - SoundEngine.PlaySound(DeusRitualDrama.PulseSound with { Pitch = DeusRitualDrama.PulseSound.Pitch - 0.2f + 0.1f * CurrentIndicator }, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item69 with { Pitch = -0.2f + 0.1f * CurrentIndicator }, Projectile.Center); CurrentIndicator++; OverCharge = 20f; @@ -130,13 +132,13 @@ namespace CalamityMod.Projectiles.Melee Charge = MaxCharge; if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - for (int s = 0; s < 6; s++) + for (int s = 0; s < 5; s++) { Vector2 swordVel = (Vector2.UnitX.RotatedBy(Projectile.rotation) * 10f).RotatedByRandom(MathHelper.Pi / 8); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, swordVel, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_BeamDamageMult), 10f, Owner.whoAmI); } OverCharge = 20f; - SoundEngine.PlaySound(AstralBeacon.UseSound, Projectile.Center); + SoundEngine.PlaySound(FullChargeSound, Projectile.Center); CurrentIndicator++; } } @@ -190,7 +192,7 @@ namespace CalamityMod.Projectiles.Melee public void SlamDown() { - SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = SoundID.DD2_MonkStaffGroundImpact.Volume * 1.5f }, Projectile.Center); + SoundEngine.PlaySound(GroundImpact, Projectile.Center); if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index c0694d1dc9..70ad3324fe 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -339,24 +339,24 @@ namespace CalamityMod.Projectiles.Melee if (ChainSwapTimer % 6 == 0 || whip1.Y == 0) { - whip1.X = Projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.PiOver4 / 16f, -MathHelper.PiOver4 / 16f)).ToRotation(); //X is the orientation - whip1.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + whip1.X = Projectile.velocity.RotatedByRandom(MathHelper.Pi / 64f).ToRotation(); //X is the orientation + whip1.Y = Main.rand.NextFloat(0.2f, 50f);//Y is the "seed" ChainSwapTimer++; } if ((ChainSwapTimer - 2) % 6 == 0 || whip2.Y == 0) { - whip2.X = Projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation - whip2.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + whip2.X = Projectile.velocity.RotatedByRandom(MathHelper.Pi / 32f).ToRotation(); //X is the orientation + whip2.Y = Main.rand.NextFloat(0.2f, 50f);//Y is the "seed" ChainSwapTimer++; } if ((ChainSwapTimer - 4) % 6 == 0 || whip3.Y == 0) { - whip3.X = Projectile.velocity.RotatedBy(Main.rand.NextFloat(MathHelper.Pi / 16f, -MathHelper.Pi / 16f)).ToRotation(); //X is the orientation - whip3.Y = Main.rand.NextFloat(0.2f, 100f);//Y is the "seed" + whip3.X = Projectile.velocity.RotatedByRandom(MathHelper.Pi / 24f).ToRotation(); //X is the orientation + whip3.Y = Main.rand.NextFloat(0.2f, 50f);//Y is the "seed" ChainSwapTimer++; } From da2ad299059671b704d963e6cbf26038f005bbe1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 16 Jul 2024 14:46:31 -0400 Subject: [PATCH 07/35] Fractured Ark and AotA stuff: Fractured Ark's parry no longer interacts with projectiles at all Ark of the Ancients: * Parry no longer gives charge from projectiles, and now only reduces their damage. This also changes the parry sound and the color of the "Parry!" text. * Removed "ultimate" attack. It's too early to introduce this, it could be implemented in better ways on its successors. --- CalamityLists.cs | 1 - Items/Weapons/Melee/TrueArkoftheAncients.cs | 18 +-- .../en-US/Mods.CalamityMod.Attunement.hjson | 2 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 +- .../Melee/ArkOfTheAncients_ParryHoldout.cs | 33 ----- Projectiles/Melee/TrueAncientBlast.cs | 128 ------------------ .../TrueArkOfTheAncients_ParryHoldout.cs | 16 ++- 7 files changed, 13 insertions(+), 189 deletions(-) delete mode 100644 Projectiles/Melee/TrueAncientBlast.cs diff --git a/CalamityLists.cs b/CalamityLists.cs index 335813768a..e32b18fd92 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -834,7 +834,6 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index 8ace1c199a..e93a9807cb 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -23,10 +23,6 @@ namespace CalamityMod.Items.Weapons.Melee public static float beamDamageMultiplier = 1f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied public static float glassStarDamageMultiplier = 0.6f; //Damage multiplier for the glass stars it shoots (Shoots 3x glass stars when not charged, shoots 2x glass stars + one beam when charged) - public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets - public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder - public override void ModifyTooltips(List tooltips) { if (tooltips == null) @@ -79,19 +75,7 @@ namespace CalamityMod.Items.Weapons.Melee { if (player.altFunctionUse == 2) { - if (Charge > 0 && player.controlUp) - { - float angle = player.SafeDirectionTo(Main.MouseWorld, Vector2.UnitY).ToRotation(); - Vector2 laserVector = player.SafeDirectionTo(Main.MouseWorld, Vector2.UnitY) * 600; - Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, laserVector, ProjectileType(), (int)(damage * Charge * chargeDamageMultiplier * blastDamageMultiplier), 0, player.whoAmI); - - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; - - Charge = 0; - } - - else if (!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType()))) + if (!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType()))) Projectile.NewProjectile(source, player.Center, velocity, ProjectileType(), damage, 0, player.whoAmI, 0, 0); return false; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index f3229bdf1d..bfbb8e2510 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -133,7 +133,7 @@ ShockwaveAttunement: { Name: Earthen Tides Function: ''' - Hold to charge a heaven-shattering lunge, release to unleash the devastating blow + Hold to charge an earth-shattering lunge, release to unleash the devastating blow Homing sword beams are emitted as the sword charges up Striking an enemy with the lunge marks them with an armor crunching sigil that sword beam homing will prioritize Striking the earth with the lunge will cause a massive shock wave on impact which raises a flood of stalagmites diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 0bdb891193..f57cf17ad0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -571,7 +571,6 @@ FracturedArk: { ''' to extend the Ark out in front of you Hitting an enemy with it will parry them, granting you a small window of invulnerability - You can also parry projectiles and temporarily make them deal 50 less damage Parrying empowers the next 10 swings of the sword, boosting damage and letting them throw projectiles ''' } @@ -1361,9 +1360,8 @@ TrueArkoftheAncients: { ''' to extend the Ark out in front of you Hitting an enemy with it will parry them, granting you brief invulnerability + Parrying an enemy empowers the next 10 swings of the sword, letting them throw stronger projectiles You can also parry projectiles to make them deal 80 less damage for a short period - Parrying empowers the next 10 swings of the sword, letting them throw stronger projectiles - Pressing while holding UP will release all empowered charges in a powerful burst of energy ''' } diff --git a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs index af6256b14a..fd76d2f149 100644 --- a/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/ArkOfTheAncients_ParryHoldout.cs @@ -105,39 +105,6 @@ namespace CalamityMod.Projectiles.Melee Projectile.Center = Owner.Center + DistanceFromPlayer; Projectile.scale = 1.4f + ((float)Math.Sin(Timer / 160f * MathHelper.Pi) * 0.6f); //SWAGGER - if (Timer > ParryTime) - return; - - if (AlreadyParried == 0) - { - float collisionPoint = 0f; - float bladeLength = 80f * Projectile.scale; - - for (int k = 0; k < Main.maxProjectiles; k++) - { - Projectile proj = Main.projectile[k]; - - if (proj.active && proj.hostile && proj.damage > 1 && //Only parry harmful projectiles - proj.velocity.Length() * (proj.extraUpdates + 1) > 1f && //Only parry projectiles that move semi-quickly - proj.Size.Length() < 300 && //Only parry projectiles that aren't too large - Collision.CheckAABBvLineCollision(proj.Hitbox.TopLeft(), proj.Hitbox.Size(), Owner.Center + DistanceFromPlayer, Owner.Center + DistanceFromPlayer + (Projectile.velocity * bladeLength), 24, ref collisionPoint)) - { - GeneralParryEffects(); - - //Reduce the projectile's damage by 50 for a second. - if (proj.Calamity().flatDR < 50) - proj.Calamity().flatDR = 50; - if (proj.Calamity().flatDRTimer < 60) - proj.Calamity().flatDRTimer = 60; - - //Bounce off the player if they are in the air - if (Owner.velocity.Y != 0) - Owner.velocity += Utils.SafeNormalize(Owner.Center - proj.Center, Vector2.Zero) * 2; - break; - } - } - } - //Make the owner look like theyre holding the sword bla bla Owner.heldProj = Projectile.whoAmI; Owner.ChangeDir(Math.Sign(Projectile.velocity.X)); diff --git a/Projectiles/Melee/TrueAncientBlast.cs b/Projectiles/Melee/TrueAncientBlast.cs deleted file mode 100644 index d5e29ed281..0000000000 --- a/Projectiles/Melee/TrueAncientBlast.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -using static Terraria.ModLoader.ModContent; - - -namespace CalamityMod.Projectiles.Melee -{ - public class TrueAncientBlast : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailCacheLength[Projectile.type] = 5; - ProjectileID.Sets.TrailingMode[Projectile.type] = 2; - } - - const float MaxTime = 20; - public float Timer => MaxTime - Projectile.timeLeft; - - public Player Owner => Main.player[Projectile.owner]; - - public override void SetDefaults() - { - Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 8; - Projectile.tileCollide = false; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 30; - Projectile.timeLeft = 20; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + Projectile.velocity, 20f, ref collisionPoint); - } - - public override bool ShouldUpdatePosition() => false; - - public override void AI() - { - if (Timer == 0) - { - Particle Star = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Color.HotPink, Main.rand.NextFloat(2f, 2.5f), 20, 0.1f, 3f); - GeneralParticleHandler.SpawnParticle(Star); - - Star = new GenericSparkle(Projectile.Center + Projectile.velocity, Vector2.Zero, Color.White, Color.PaleGoldenrod, Main.rand.NextFloat(2f, 2.5f), 20, 0.1f, 3f); - GeneralParticleHandler.SpawnParticle(Star); - - SoundEngine.PlaySound(SoundID.Item84, Projectile.Center); - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - Color pulseColor = Main.rand.NextBool() ? (Main.rand.NextBool() ? Color.CornflowerBlue : Color.Coral) : (Main.rand.NextBool() ? Color.GreenYellow : Color.Gold); - Particle pulse = new PulseRing(target.Center, Vector2.Zero, pulseColor, 0.05f, 0.2f + Main.rand.NextFloat(0f, 1f), 30); - GeneralParticleHandler.SpawnParticle(pulse); - - for (int i = 0; i < 10; i++) - { - Vector2 particleSpeed = Utils.SafeNormalize(Projectile.velocity, Vector2.Zero).RotatedByRandom(MathHelper.PiOver4 * 0.8f) * Main.rand.NextFloat(2.6f, 4f); - Particle energyLeak = new SquishyLightParticle(target.Center, particleSpeed, Main.rand.NextFloat(0.3f, 0.6f), Color.Cyan, 60, 1, 1.5f, hueShift: 0.02f); - GeneralParticleHandler.SpawnParticle(energyLeak); - } - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - //Add some damage falloff - modifiers.SourceDamage *= (float)Math.Pow(1 - TrueArkoftheAncients.blastFalloffStrenght, Projectile.numHits * TrueArkoftheAncients.blastFalloffSpeed); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D sword = Request("CalamityMod/Items/Weapons/Melee/TrueArkoftheAncients").Value; - Texture2D glowmask = Request("CalamityMod/Items/Weapons/Melee/TrueArkoftheAncientsGlow").Value; - - float displace = 10 * (1f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.8f)); - - float angle = Projectile.velocity.ToRotation(); - - float drawRotation = angle + MathHelper.PiOver4; - Vector2 drawOrigin = new Vector2(0f, sword.Height); - Vector2 drawOffset = Owner.Center + angle.ToRotationVector2() * displace - Main.screenPosition; - - float swordSize = 1.4f + ((float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.6f); - - Main.EntitySpriteDraw(sword, drawOffset, null, lightColor, drawRotation, drawOrigin, swordSize, 0f, 0); - Main.EntitySpriteDraw(glowmask, drawOffset, null, Color.Lerp(lightColor, Color.White, 0.75f), drawRotation, drawOrigin, swordSize, 0f, 0); - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - //Draw the laser - Texture2D tex = Request("CalamityMod/Particles/BloomLine").Value; - float rot = angle + MathHelper.PiOver2; - Vector2 origin = new Vector2(tex.Width / 2f, tex.Height); - float size = Timer / MaxTime > 0.5f ? (float)Math.Sin(Timer / MaxTime * MathHelper.Pi) * 0.2f + 0.8f : (float)Math.Sin(Timer / MaxTime * MathHelper.Pi); - size *= 3; - Vector2 scale = new Vector2(size, Projectile.velocity.Length() / tex.Height); - Main.EntitySpriteDraw(tex, Projectile.Center - Main.screenPosition, null, Color.LightPink, rot, origin, scale, SpriteEffects.None, 0); - - //Cap the lines - Texture2D cap = Request("CalamityMod/Particles/BloomLineCap").Value; - scale = new Vector2(size, size); - origin = new Vector2(cap.Width / 2f, cap.Height); - Main.EntitySpriteDraw(cap, Projectile.Center - Main.screenPosition, null, Color.LightPink, rot + MathHelper.Pi, origin, scale, SpriteEffects.None, 0); - Main.EntitySpriteDraw(cap, Projectile.Center + Projectile.velocity - Main.screenPosition, null, Color.LightPink, rot, origin, scale, SpriteEffects.None, 0); - - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - return false; - } - } -} diff --git a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs index 1bd5336742..6606c5275b 100644 --- a/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs +++ b/Projectiles/Melee/TrueArkOfTheAncients_ParryHoldout.cs @@ -47,14 +47,18 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Owner.Center + DistanceFromPlayer, Owner.Center + DistanceFromPlayer + (Projectile.velocity * bladeLength), 24, ref collisionPoint); } - public void GeneralParryEffects() + public void GeneralParryEffects(bool npcHit) { TrueArkoftheAncients sword = (Owner.HeldItem.ModItem as TrueArkoftheAncients); - if (sword != null) + if (sword != null && npcHit) sword.Charge = 10f; + SoundEngine.PlaySound(SoundID.DD2_WitherBeastCrystalImpact); - SoundEngine.PlaySound(SoundID.Item67); - CombatText.NewText(Projectile.Hitbox, new Color(111, 247, 200), CalamityUtils.GetTextValue("Misc.ArkParry"), true); + if (npcHit) + SoundEngine.PlaySound(SoundID.Item67); + + Color parryTextColor = npcHit ? new Color(111, 247, 200) : new Color(98, 161, 139); + CombatText.NewText(Projectile.Hitbox, parryTextColor, CalamityUtils.GetTextValue("Misc.ArkParry"), true); AlreadyParried = 1f; } @@ -63,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee if (AlreadyParried > 0) return; - GeneralParryEffects(); + GeneralParryEffects(true); // 17APR2024: Ozzatron: True Ark of the Ancients is a parry. It uses vanilla parry iframes and benefits from Cross Necklace. // However, iframes are only granted if the target has contact damage. This means it won't work on Providence. Too bad. I have no sympathy for you if you are using this weapon line. @@ -122,7 +126,7 @@ namespace CalamityMod.Projectiles.Melee proj.Size.Length() < 300 && //Only parry projectiles that aren't too large Collision.CheckAABBvLineCollision(proj.Hitbox.TopLeft(), proj.Hitbox.Size(), Owner.Center + DistanceFromPlayer, Owner.Center + DistanceFromPlayer + (Projectile.velocity * bladeLength), 24, ref collisionPoint)) { - GeneralParryEffects(); + GeneralParryEffects(false); //Reduce the projectile's damage by 80 for a second. if (proj.Calamity().flatDR < 80) From e849c1c54993900a301c8394774cfdf3f7d78701 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 16 Jul 2024 15:48:35 -0400 Subject: [PATCH 08/35] Removed Big Rip from AotE Tooltip also specifies that you can parry an enemy or projectile to empower the sword --- Items/Weapons/Melee/ArkoftheElements.cs | 26 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 +- .../Melee/ArkOfTheElements_SnapBlast.cs | 273 ------------------ 3 files changed, 2 insertions(+), 301 deletions(-) delete mode 100644 Projectiles/Melee/ArkOfTheElements_SnapBlast.cs diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index df934e2e7c..7a8887ffae 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -27,10 +27,6 @@ namespace CalamityMod.Items.Weapons.Melee public static float needleDamageMultiplier = 0.8f; //Damage multiplier for non-homing needle projectile public static float glassStarDamageMultiplier = 0.2f; //Damage multiplier for the homing glass stars (4 glass stars per shot) - public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets - public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder - public override void ModifyTooltips(List tooltips) { if (tooltips == null) @@ -52,12 +48,6 @@ namespace CalamityMod.Items.Weapons.Melee parryTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("ParryInfo")); parryTooltip.OverrideColor = Color.Orange; } - var blastTooltip = tooltips.FirstOrDefault(x => x.Text.Contains("[BLAST]") && x.Mod == "Terraria"); - if (blastTooltip != null) - { - blastTooltip.Text = Lang.SupportGlyphs(this.GetLocalizedValue("BlastInfo")); - blastTooltip.OverrideColor = Color.Gold; - } } public override void SetDefaults() @@ -106,18 +96,7 @@ namespace CalamityMod.Items.Weapons.Melee { if (player.altFunctionUse == 2) { - if (Charge > 0 && player.controlUp) - { - float angle = velocity.ToRotation(); - Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType(), (int)(damage * Charge * chargeDamageMultiplier * blastDamageMultiplier), 0, player.whoAmI); - - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; - - Charge = 0; - } - - else if (!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType()))) + if (!Main.projectile.Any(n => n.active && n.owner == player.whoAmI && (n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType() || n.type == ProjectileType()))) Projectile.NewProjectile(source, player.Center, velocity, ProjectileType(), damage, 0, player.whoAmI, 0, 0); return false; @@ -133,9 +112,6 @@ namespace CalamityMod.Items.Weapons.Melee if (Combo > ComboLength) Combo = 0; - - - //Shoot projectiles every upwards swing if (scissorState == 1f) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index f57cf17ad0..c8b8408810 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -104,7 +104,6 @@ ArkoftheElements: { ''' [COMBO] [PARRY] - [BLAST] A heavenly pair of blades infused with the essence of Terraria, powerful enough to cut through the fabric of reality ''' ComboInfo: @@ -117,9 +116,8 @@ ArkoftheElements: { to snip out the scissor blades in front of you Hitting an enemy with it will parry them, granting you brief invulnerability You can parry projectiles to make them deal 100 less damage for a short period - Parrying will empower the next 10 swings of the sword, letting you use both blades at once + Parrying an enemy or projectile will empower the next 10 swings of the sword, letting you use both blades at once ''' - BlastInfo: Pressing while holding UP with empowered charges will provoke a Big Rip in spacetime and use all charges } AstralBlade: { diff --git a/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs b/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs deleted file mode 100644 index 97ca32cb42..0000000000 --- a/Projectiles/Melee/ArkOfTheElements_SnapBlast.cs +++ /dev/null @@ -1,273 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -using static CalamityMod.CalamityUtils; -using static Terraria.ModLoader.ModContent; - - -namespace CalamityMod.Projectiles.Melee -{ - public class ArkoftheElementsSnapBlast : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/RendingScissorsRight"; - - private bool initialized = false; - - const int maxStitches = 8; - public int CurrentStitches => (int)Math.Ceiling((1 - (float)Math.Sqrt(1f - (float)Math.Pow(MathHelper.Clamp(StitchProgress * 3f, 0f, 1f), 2f))) * maxStitches); - public float[] StitchRotations = new float[maxStitches]; - public float[] StitchLifetimes = new float[maxStitches]; - - const float MaxTime = 70; - const float SnapTime = 25f; - const float HoldTime = 15f; - - public float SnapTimer => MaxTime - Projectile.timeLeft; - public float HoldTimer => MaxTime - Projectile.timeLeft - SnapTime; - public float StitchTimer => MaxTime - Projectile.timeLeft - SnapTime - (HoldTime / 2f); - - public float SnapProgress => MathHelper.Clamp(SnapTimer / SnapTime, 0, 1); - public float HoldProgress => MathHelper.Clamp(HoldTimer / HoldTime, 0, 1); - public float StitchProgress => MathHelper.Clamp(StitchTimer / (MaxTime - (SnapTime + (HoldTime / 2f))), 0, 1); - - public int CurrentAnimation => (MaxTime - Projectile.timeLeft) <= SnapTime ? 0 : (MaxTime - Projectile.timeLeft) <= SnapTime + HoldTime ? 1 : 2; - - public Player Owner => Main.player[Projectile.owner]; - - public override void SetStaticDefaults() - { - } - public override void SetDefaults() - { - Projectile.DamageType = DamageClass.MeleeNoSpeed; - Projectile.width = Projectile.height = 300; - Projectile.width = Projectile.height = 300; - Projectile.tileCollide = false; - Projectile.friendly = true; - Projectile.penetrate = -1; - - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = (int)MaxTime + 2; - } - - public override bool? CanDamage() - { - return HoldProgress > 0; - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - if (HoldProgress == 0) - return false; - - //The hitbox is simplified into a line collision. - float collisionPoint = 0f; - float bladeLength = ThrustDisplaceRatio() * 242f; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + (Projectile.velocity * bladeLength), 30, ref collisionPoint); - } - - public override bool ShouldUpdatePosition() => false; - - public override void AI() - { - if (!initialized) //Initialization - { - Projectile.timeLeft = (int)MaxTime; - SoundEngine.PlaySound(SoundID.Item84 with { Volume = SoundID.Item84.Volume * 0.3f }, Projectile.Center); - - Projectile.velocity.Normalize(); - Projectile.rotation = Projectile.velocity.ToRotation(); - - - initialized = true; - Projectile.netUpdate = true; - Projectile.netSpam = 0; - } - - //Manage position and rotation - Projectile.scale = 1.4f; - - //Update stitches - for (int i = 0; i < CurrentStitches; i++) - { - if (StitchRotations[i] == 0) - { - StitchRotations[i] = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4) + MathHelper.PiOver2; - - SoundStyle sewSound = i % 3 == 0 ? SoundID.Item63 : i % 3 == 1 ? SoundID.Item64 : SoundID.Item65; - SoundEngine.PlaySound(sewSound with { Volume = sewSound.Volume * 0.5f }, Owner.Center); - - float positionAlongLine = (ThrustDisplaceRatio() * 242f / (float)maxStitches * 0.5f) + MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, i / (float)maxStitches); - Vector2 stitchCenter = Projectile.Center + Projectile.velocity * positionAlongLine + (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 10f; - - - Particle spark = new CritSpark(stitchCenter, Vector2.Zero, Color.White, Color.Cyan, 3f, 8, 0.1f, 3); - GeneralParticleHandler.SpawnParticle(spark); - } - StitchLifetimes[i]++; - } - - //Spawn particles when the line appears - if (HoldTimer == 1) - { - for (int i = 0; i < 20; i++) - { - float positionAlongLine = MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, Main.rand.NextFloat(0f, 1f)); - Vector2 particlePosition = Projectile.Center + Projectile.velocity * positionAlongLine + (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 10f; - Color particleColor = Main.rand.NextBool() ? Color.OrangeRed : Main.rand.NextBool() ? Color.White : Color.Orange; - float particleScale = Main.rand.NextFloat(0.05f, 0.4f) * (0.4f + 0.6f * (float)Math.Sin(positionAlongLine / (ThrustDisplaceRatio() * 242f) * MathHelper.Pi)); - - int particleType = Main.rand.Next(3); - Particle particle; - - switch (particleType) - { - case 0: - particle = new StrongBloom(particlePosition, Vector2.UnitY * Main.rand.NextFloat(-4f, -1f), particleColor, particleScale, Main.rand.Next(20) + 10); - GeneralParticleHandler.SpawnParticle(particle); - break; - case 1: - particle = new GenericBloom(particlePosition, Vector2.UnitY * Main.rand.NextFloat(-4f, -1f), particleColor, particleScale, Main.rand.Next(20) + 10); - GeneralParticleHandler.SpawnParticle(particle); - break; - case 2: - particle = new CritSpark(particlePosition, Vector2.UnitY * Main.rand.NextFloat(-10f, -1f), Color.White, particleColor, particleScale * 7f, Main.rand.Next(20) + 10, 0.1f, 3); - GeneralParticleHandler.SpawnParticle(particle); - break; - } - } - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - Color pulseColor = Main.rand.NextBool() ? (Main.rand.NextBool() ? Color.Orange : Color.Coral) : (Main.rand.NextBool() ? Color.OrangeRed : Color.Gold); - Particle pulse = new PulseRing(target.Center, Vector2.Zero, pulseColor, 0.05f, 0.2f + Main.rand.NextFloat(0f, 1f), 30); - GeneralParticleHandler.SpawnParticle(pulse); - - for (int i = 0; i < 10; i++) - { - Vector2 particleSpeed = Projectile.velocity.RotatedByRandom(MathHelper.PiOver4 * 0.8f) * Main.rand.NextFloat(2.6f, 4f); - Particle energyLeak = new SquishyLightParticle(target.Center, particleSpeed, Main.rand.NextFloat(0.3f, 0.6f), Color.Red, 60, 1, 1.5f, hueShift: 0.002f); - GeneralParticleHandler.SpawnParticle(energyLeak); - } - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - //Add some damage falloff - modifiers.SourceDamage *= (float)Math.Pow(1 - ArkoftheElements.blastFalloffStrenght, Projectile.numHits * ArkoftheElements.blastFalloffSpeed); - } - - //Animation keys - public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0.2f, -0.1f); - public CurveSegment thrust = new CurveSegment(EasingType.PolyOut, 0.3f, 0.2f, 3f, 3); - internal float ThrustDisplaceRatio() => PiecewiseAnimation(SnapProgress, new CurveSegment[] { anticipation, thrust }); - - - public CurveSegment openMore = new CurveSegment(EasingType.SineBump, 0f, 0f, -0.15f); - public CurveSegment close = new CurveSegment(EasingType.PolyIn, 0.35f, 0f, 1f, 4); - public CurveSegment stayClosed = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); - internal float RotationRatio() => PiecewiseAnimation(SnapProgress, new CurveSegment[] { openMore, close, stayClosed }); - - public override bool PreDraw(ref Color lightColor) - { - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - Texture2D sliceTex = Request("CalamityMod/Particles/BloomLine").Value; - Color sliceColor = Color.Lerp(Color.OrangeRed, Color.White, SnapProgress); - float rot = Projectile.rotation + MathHelper.PiOver2; - Vector2 nitpickShiftCorrection = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 10f; //Ngl these minor nitpick variables probably be horrible to understand when decompiled into Vector43 - Vector2 sliceScale = new Vector2(0.2f * (1 - SnapProgress), ThrustDisplaceRatio() * 242f); - Main.EntitySpriteDraw(sliceTex, Projectile.Center + nitpickShiftCorrection - Main.screenPosition, null, sliceColor, rot, new Vector2(sliceTex.Width / 2f, sliceTex.Height), sliceScale, 0f, 0); - - //Draw the scissors - if (HoldProgress <= 0.4f) - { - Texture2D frontBlade = Request("CalamityMod/Projectiles/Melee/RendingScissorsRight").Value; - Texture2D backBlade = Request("CalamityMod/Projectiles/Melee/RendingScissorsLeft").Value; - - float snippingRotation = Projectile.rotation + MathHelper.PiOver4; - float snippingRotationBack = Projectile.rotation + MathHelper.PiOver4 * 1.75f; - - float nitpickAngleCorrection = MathHelper.ToRadians(6f); //ITS IMPORTANT MOM! - float drawRotation = MathHelper.Lerp(snippingRotation + MathHelper.PiOver4, snippingRotation, RotationRatio()) + nitpickAngleCorrection; - float drawRotationBack = MathHelper.Lerp(snippingRotationBack - MathHelper.PiOver4, snippingRotationBack, RotationRatio()) + nitpickAngleCorrection; - - Vector2 drawOrigin = new Vector2(51, 86); //Right on the hole - Vector2 drawOriginBack = new Vector2(22, 109); //Right on the hole - Vector2 drawPosition = Projectile.Center + ThrustDisplaceRatio() * Projectile.velocity * 200f - Main.screenPosition; - - float opacity = (0.4f - HoldProgress) / 0.4f; - Color drawColor = Color.Orange * opacity * 0.9f; - Color drawColorBack = Color.HotPink * opacity * 0.9f; - - Main.EntitySpriteDraw(backBlade, drawPosition, null, drawColorBack, drawRotationBack, drawOriginBack, Projectile.scale, 0f, 0); - Main.EntitySpriteDraw(frontBlade, drawPosition, null, drawColor * opacity, drawRotation, drawOrigin, Projectile.scale, 0f, 0); - } - - //Draw the rip - if (HoldProgress > 0) - { - Texture2D lineTex = Request("CalamityMod/Particles/ThinEndedLine").Value; - - Vector2 Shake = HoldProgress > 0.2f ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (1 - HoldProgress * 5f) * 0.5f; - float raise = (float)Math.Sin(HoldProgress * MathHelper.PiOver2); - - Vector2 origin = new Vector2(lineTex.Width / 2f, lineTex.Height); - float ripWidth = StitchProgress < 0.75f ? 0.2f : (1 - (StitchProgress - 0.75f) * 4f) * 0.2f; - Vector2 scale = new Vector2(ripWidth, (ThrustDisplaceRatio() * 242f) / lineTex.Height); - float lineOpacity = StitchProgress < 0.75f ? 1f : 1 - (StitchProgress - 0.75f) * 4f; - - Main.EntitySpriteDraw(lineTex, Projectile.Center - Main.screenPosition + Shake + nitpickShiftCorrection, null, Color.Lerp(Color.White, Color.OrangeRed * 0.7f, raise) * lineOpacity, rot, origin, scale, SpriteEffects.None, 0); - - - //Draw the stitches - if (StitchProgress > 0) - { - for (int i = 0; i < CurrentStitches; i++) - { - float positionAlongLine = (ThrustDisplaceRatio() * 242f / (float)maxStitches * 0.5f) + MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, i / (float)maxStitches); - Vector2 stitchCenter = Projectile.Center + Projectile.velocity * positionAlongLine + nitpickShiftCorrection; - - rot = Projectile.rotation + MathHelper.PiOver2 + StitchRotations[i]; - origin = new Vector2(lineTex.Width / 2f, lineTex.Height / 2f); - - float stitchLength = (float)Math.Sin(i / (float)(maxStitches - 1) * MathHelper.Pi) * 0.5f + 0.5f; - float stitchScale = (1f + (float)Math.Sin(MathHelper.Clamp(StitchLifetimes[i] / 7f, 0f, 1f) * MathHelper.Pi) * 0.3f) * 0.85f; - if (CurrentStitches == maxStitches) - { - stitchScale *= 1 - ((StitchTimer - (MaxTime - SnapTime - HoldTime * 0.5f) * 0.3f) / (MaxTime - SnapTime - HoldTime * 0.5f) * 0.7f) * 0.8f; - } - scale = new Vector2(0.2f, stitchLength) * stitchScale; - - Color stitchColor = Color.Lerp(Color.White, Color.CornflowerBlue * 0.7f, (float)Math.Sin(MathHelper.Clamp(StitchLifetimes[i] / 7f, 0f, 1f) * MathHelper.PiOver2)); - - Main.EntitySpriteDraw(lineTex, stitchCenter - Main.screenPosition + Shake, null, stitchColor, rot, origin, scale, SpriteEffects.None, 0); - } - } - } - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - return false; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(initialized); - } - public override void ReceiveExtraAI(BinaryReader reader) - { - initialized = reader.ReadBoolean(); - } - } -} From 6a29e2f4f81bb4a7d3a974e9cf88d2a1b691c168 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 16 Jul 2024 20:30:03 -0400 Subject: [PATCH 09/35] AotC Big Rip changes * Now activated by right clicking while on parry cooldown, instead of holding UP when right clicking * No longer makes the player dash across the Big Rip when continuing to hold UP * Stars are now summoned across the length of the Big Rip by default * Some visual changes --- Items/Weapons/Melee/ArkoftheCosmos.cs | 15 ++- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 6 +- .../Melee/ArkOfTheCosmos_BlastAttack.cs | 92 ++++++------------- 3 files changed, 37 insertions(+), 76 deletions(-) diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index b2075df53f..e84f4cc892 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -29,14 +29,10 @@ namespace CalamityMod.Items.Weapons.Melee public static float MaxCharge = 15f; // Maximum charge value AKA how much charge you get from a parry public static float chargeDamageMultiplier = 1.35f; //Extra damage from charge public static float chainDamageMultiplier = 0.1f; - - public static int DashIframes = 10; - public static float SlashBoltsDamageMultiplier = 0.2f; public static float SnapBoltsDamageMultiplier = 0.1f; public static float blastDamageMultiplier = 0.5f; //Damage multiplier applied ontop of the charge damage multiplier mutliplied by the amount of charges consumed. So if you consume 5 charges, the blast will get multiplied by 5 times the damage multiplier - public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets - public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder + public static float BlastBoltsDamageMultiplier = 0.2f; public static float SwirlBoltAmount = 6f; //The amount of cosmic bolts produced during hte swirl attack public static float SwirlBoltDamageMultiplier = 0.7f; //This is the damage multiplier for ALL THE BOLTS: Aka, said damage multiplier is divided by the amount of bolts in a swirl and the full damage multiplier is gotten if you hit all the bolts @@ -116,14 +112,15 @@ namespace CalamityMod.Items.Weapons.Melee { if (player.altFunctionUse == 2) { - if (Charge > 0 && player.controlUp) + bool onParryCooldown = false; + if (Main.projectile.Any(p => p.active && p.owner == player.whoAmI && p.type == ProjectileType())) + onParryCooldown = true; + + if (Charge > 0 && onParryCooldown) { float angle = velocity.ToRotation(); Projectile.NewProjectile(source, player.Center + angle.ToRotationVector2() * 90f, velocity, ProjectileType(), (int)(damage * Charge * chargeDamageMultiplier * blastDamageMultiplier), 0, player.whoAmI, Charge); - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 3) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 3; - Charge = 0; } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index c8b8408810..3027ff09b5 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -91,11 +91,7 @@ ArkoftheCosmos: { You can parry projectiles to make them deal 160 less damage for a short period Parrying anything will empower the next 15 swings of the sword ''' - BlastInfo: - ''' - Pressing while holding UP with empowered charges will provoke a Big Rip in spacetime and use all charges - If more than 5 charges were used, you can dash across the rip by holding UP - ''' + BlastInfo: Pressing while on parry cooldown with empowered charges will provoke a Big Rip in spacetime and use all charges } ArkoftheElements: { diff --git a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs index e2b1ac7c17..908a79f168 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs @@ -17,25 +17,12 @@ namespace CalamityMod.Projectiles.Melee public class ArkoftheCosmosBlast : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/RendingScissorsRight"; //Umm actually the rending scissors are for aote mr programmer what the hel.. it gets changed in predraw anywyas + public override string Texture => "CalamityMod/Projectiles/Melee/RendingScissorsRight"; //Yes this is AotE sprite, but it gets changed in predraw anyways private bool initialized = false; public ref float Charge => ref Projectile.ai[0]; - public bool Dashing - { - get - { - return Projectile.ai[1] == 1; - } - - set - { - Projectile.ai[1] = value ? 1f : 0f; - } - } - - const int maxStitches = 8; + const int maxStitches = 10; public int CurrentStitches => (int)Math.Ceiling((1 - (float)Math.Sqrt(1f - (float)Math.Pow(MathHelper.Clamp(StitchProgress * 3f, 0f, 1f), 2f))) * maxStitches); public float[] StitchRotations = new float[maxStitches]; public float[] StitchLifetimes = new float[maxStitches]; @@ -74,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = (int)MaxTime + 2; + Projectile.localNPCHitCooldown = -1; } public override bool? CanDamage() @@ -118,14 +105,12 @@ namespace CalamityMod.Projectiles.Melee //Spawn particles when the line appears if (HoldTimer == 1) { - //Check for the up arrow once more so if the player has good reflexes they can avoid the dash. Gives them more control - if (Owner.controlUp && Charge >= 5) - { - // 17APR2024: Ozzatron: Dash iframes are not boosted by Cross Necklace at all and are fixed. - Owner.GiveUniversalIFrames(ArkoftheCosmos.DashIframes); - Dashing = true; - } + // Feel the power + SoundEngine.PlaySound(CommonCalamitySounds.MeatySlashSound, Projectile.Center); + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 7.5f) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = 7.5f; + // Feel the particles for (int i = 0; i < 20; i++) { float positionAlongLine = MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, Main.rand.NextFloat(0f, 1f)); @@ -152,32 +137,19 @@ namespace CalamityMod.Projectiles.Melee break; } } - } - - Owner.Calamity().LungingDown = false; - - if (Dashing) - { - Owner.Calamity().LungingDown = true; - Owner.fallStart = (int)(Owner.position.Y / 16f); - Owner.velocity = Owner.SafeDirectionTo(scissorPosition, Vector2.Zero) * 60f; - - if (Owner.Distance(scissorPosition) < 60f) + // Feel the extra stars + if (Owner.whoAmI == Main.myPlayer) { - Dashing = false; - Owner.velocity *= 0.1f; //Abrupt stop - SoundEngine.PlaySound(CommonCalamitySounds.MeatySlashSound, Projectile.Center); - - if (Owner.whoAmI == Main.myPlayer) + int starAmt = 5; + for (int s = 1; s <= starAmt; s++) { - for (int i = 0; i < 5; i++) + float lerpRatio = s / (float)starAmt; + float positionAlongLine = MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, lerpRatio); + Vector2 starPosition = Projectile.Center + Projectile.velocity * positionAlongLine; + Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), starPosition, Main.rand.NextVector2CircularEdge(28, 28), ProjectileType(), (int)(ArkoftheCosmos.BlastBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.07f); { - var source = Projectile.GetSource_FromThis(); - Projectile blast = Projectile.NewProjectileDirect(source, Owner.Center, Main.rand.NextVector2CircularEdge(28, 28), ProjectileType(), (int)(ArkoftheCosmos.SlashBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.07f); - { - blast.timeLeft = 100; - } + blast.timeLeft = 100; } } } @@ -217,6 +189,17 @@ namespace CalamityMod.Projectiles.Melee } StitchLifetimes[i]++; } + + if (StitchProgress > 0) + { + for (int m = 0; m < 2; m++) + { + float positionAlongLine = MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, Main.rand.NextFloat()); + Vector2 smokePosition = Projectile.Center + Projectile.velocity * positionAlongLine; + HeavySmokeParticle smoke = new(smokePosition, Main.rand.NextVector2CircularEdge(4f, 4f), new Color(117, 36, 32), 12, 0.8f, 0.6f, 0f, true); + GeneralParticleHandler.SpawnParticle(smoke); + } + } } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -233,22 +216,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - //Add some damage falloff - modifiers.SourceDamage *= (float)Math.Pow(1 - ArkoftheCosmos.blastFalloffStrenght, Projectile.numHits * ArkoftheCosmos.blastFalloffSpeed); - } - - public override void OnKill(int timeLeft) - { - if (Dashing) - { - Owner.velocity *= 0.1f; //Abrupt stop if the player was still dashing - } - - Owner.Calamity().LungingDown = false; - } - //Animation keys public CurveSegment anticipation = new CurveSegment(EasingType.SineBump, 0f, 0.2f, -0.1f); public CurveSegment thrust = new CurveSegment(EasingType.PolyOut, 0.3f, 0.2f, 3f, 3); @@ -302,7 +269,7 @@ namespace CalamityMod.Projectiles.Melee float raise = (float)Math.Sin(HoldProgress * MathHelper.PiOver2); Vector2 origin = new Vector2(lineTex.Width / 2f, lineTex.Height); - float ripWidth = StitchProgress < 0.75f ? 0.2f : (1 - (StitchProgress - 0.75f) * 4f) * 0.2f; + float ripWidth = StitchProgress < 0.75f ? 0.4f : (1 - (StitchProgress - 0.75f) * 4f) * 0.2f; Vector2 scale = new Vector2(ripWidth, (ThrustDisplaceRatio() * 242f) / lineTex.Height); float lineOpacity = StitchProgress < 0.75f ? 1f : 1 - (StitchProgress - 0.75f) * 4f; @@ -313,6 +280,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < CurrentStitches; i++) { + float positionAlongLine = (ThrustDisplaceRatio() * 242f / (float)maxStitches * 0.5f) + MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, i / (float)maxStitches); Vector2 stitchCenter = Projectile.Center + Projectile.velocity * positionAlongLine; From 4d9e1eb3b519893cbc10bfe3e586f3d5d2707bf6 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:21:51 +0700 Subject: [PATCH 10/35] ark tooltip thing --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 3027ff09b5..721377647b 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -89,7 +89,7 @@ ArkoftheCosmos: { to snip out the scissor blades in front of you Hitting an enemy with it will parry them, granting you brief invulnerability You can parry projectiles to make them deal 160 less damage for a short period - Parrying anything will empower the next 15 swings of the sword + Parrying will empower the next 15 swings of the sword ''' BlastInfo: Pressing while on parry cooldown with empowered charges will provoke a Big Rip in spacetime and use all charges } @@ -112,7 +112,7 @@ ArkoftheElements: { to snip out the scissor blades in front of you Hitting an enemy with it will parry them, granting you brief invulnerability You can parry projectiles to make them deal 100 less damage for a short period - Parrying an enemy or projectile will empower the next 10 swings of the sword, letting you use both blades at once + Parrying will empower the next 10 swings of the sword, letting you use both blades at once ''' } From d2ae5f38528ccdbdcbc4f87bd5930ee6c19cccbe Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 31 Aug 2024 00:09:37 -0400 Subject: [PATCH 11/35] More TBB Earthen Tides stuff * Enemy hits also create a shockwave; recolored shockwave to red-brown color to be more earth-themed * Replaced monoliths on tile collide with several dust blasts which appear around the player * Added additional visual effects for tile collisions --- Balancing/BalancingChangesManager.cs | 2 +- DataStructures/Attunement.cs | 2 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 7 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 4 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 5 +- .../Melee/TrueBiomeBlade_EarthenTides.cs | 76 ++---- .../Melee/TrueBiomeBlade_EarthenTidesBlast.cs | 74 ++++++ ...TrueBiomeBlade_EarthenTidesBlastSpawner.cs | 47 ++++ .../TrueBiomeBlade_EarthenTidesMonolith.cs | 248 ------------------ .../TrueBiomeBlade_EarthenTidesShockwave.cs | 15 +- .../TrueBiomeBlade_EarthenTidesShockwave.png | Bin 5794 -> 3984 bytes 11 files changed, 165 insertions(+), 315 deletions(-) create mode 100644 Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs create mode 100644 Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlastSpawner.cs delete mode 100644 Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 017be7ff9a..64714cba0c 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -291,7 +291,7 @@ namespace CalamityMod.Balancing NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType())))); // 20% resist to Earthen Tides (True Biome Blade). - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType())))); + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCID.MoonLordCore, Do(new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType(), ProjectileType())))); #endregion #region Profaned Guardians diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 91d65bbae3..fd239c11cf 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -566,7 +566,7 @@ namespace CalamityMod.DataStructures if (UseTimer % 120 == 119) { int damage = (int)player.GetTotalDamage().ApplyTo(OmegaBiomeBlade.ShockwaveAttunement_PassiveBaseDamage); - Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), damage, 10f, player.whoAmI, 2.25f); + Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), damage, 10f, player.whoAmI, 2f); UseTimer++; } } diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index db975ca1ea..fc65aea889 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -63,8 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int ShockwaveAttunement_DashHitIFrames = 20; public static float ShockwaveAttunement_FullChargeBoost = 2.5f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. public static int ShockwaveAttunement_SigilTime = 1000; - public static float ShockwaveAttunement_MonolithDamageBoost = 1.1f; - public static float ShockwaveAttunement_MonolithDamageFalloff = 0.15f; //Damage multiplier for all subsequent hits after the first one. + public static float ShockwaveAttunement_MonolithDamageBoost = 0.75f; public static int ShockwaveAttunement_PassiveBaseDamage = 200; @@ -89,8 +88,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float ShockwaveAttunement_SwordProc = 1f; public static float ShockwaveAttunement_SwordBeamProc = 0.05f; - public static float ShockwaveAttunement_MonolithProc = 1f; - public static float ShockwaveAttunement_BlastProc = 0.5f; + public static float ShockwaveAttunement_BlastProc = 0.33f; + public static float ShockwaveAttunement_ShockwaveProc = 0.33f; public static float FlailBladeAttunement_BladeProc = 0.1f; public static float FlailBladeAttunement_ChainProc = 0.05f; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index d814a3200c..bd18c6553c 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -131,8 +131,8 @@ ShockwaveAttunement: { ''' Charge an earth-shattering lunge, release to unleash a devastating blow Homing sword beams are emitted as the sword charges up - Striking an enemy with the lunge marks them with an armor crunching sigil that sword beam homing will prioritize - Striking the earth with the lunge will cause a massive shock wave on impact which raises a flood of stalagmites + Striking an enemy with the lunge creates a shockwave and marks them with an armor crunching sigil that attracts sword beam homing + Striking the earth with the lunge will cause several blasts of dust to erupt around you ''' PassiveDesc: Periodically emit large shock waves while attacking } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 65b0989097..6115d579f8 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -98,9 +98,10 @@ DragonRageFireball.DisplayName: Dragon Rage Fireball EarthBoom.DisplayName: Earth's Judgement EarthMeteor.DisplayName: Gaia Meteor EarthenTides.DisplayName: Earthen Tides -EarthenTidesBeam.DisplayName: Swordsmith's Projection +EarthenTidesBeam.DisplayName: Earthen Projection EarthenTidesBlast.DisplayName: Earthen Tides Blast -EarthenTidesMonolith.DisplayName: Earthen Tides Monolith +EarthenTidesBlastSpawner.DisplayName: Blast Spawner +EarthenTidesShockwave.DisplayName: Earthen Tides Shockwave ElementalGlassStar.DisplayName: Glass Star ElementBall.DisplayName: Elemental Ball EmpyreanKnife.DisplayName: Empyrean Knife diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index 565f6e212e..573dec4b77 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -49,10 +49,8 @@ namespace CalamityMod.Projectiles.Melee Projectile.localNPCHitCooldown = 16; } - public override bool? CanDamage() - { - return (State == 1); - } + // Only deal damage while charging + public override bool? CanDamage() => State == 1f; public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { @@ -73,17 +71,19 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (!initialized) //Initialization. Here its litterally just playing a sound tho lmfao + if (!initialized) //Initialization. Here it's literally just playing a sound { Projectile.velocity = Vector2.Zero; SoundEngine.PlaySound(SoundID.Item101, Projectile.Center); initialized = true; } + // Attempt a charge if the player stops channeling the sword if (Owner.CantUseHoldout()) { if (State == 0f) { + // You need at least 25% charge duration to do a charge if (Charge / MaxCharge < 0.25f) { SoundEngine.PlaySound(SoundID.Item109, Projectile.Center); @@ -92,7 +92,6 @@ namespace CalamityMod.Projectiles.Melee } else { - SoundEngine.PlaySound(SoundID.Item120 with { Volume = SoundID.Item120.Volume * 0.5f }, Projectile.Center); State = 1f; Projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death @@ -151,9 +150,10 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().LungingDown = true; - if (Collision.SolidCollision(Owner.Center + (direction * 120 * Projectile.scale) - Vector2.One * 5f, 10, 10)) + Vector2 collisionCheckPos = Owner.Center + (direction * 120 * Projectile.scale) - Vector2.One * 5f; + if (Collision.SolidCollision(collisionCheckPos, 10, 10)) { - SlamDown(); + SlamDown(collisionCheckPos); Projectile.timeLeft = 0; Owner.Calamity().LungingDown = false; Projectile.active = false; @@ -190,59 +190,34 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } - public void SlamDown() + public void SlamDown(Vector2 collisionSpot) { - SoundEngine.PlaySound(GroundImpact, Projectile.Center); - - if (Owner.whoAmI != Main.myPlayer || Owner.velocity.Y == 0f) return; + // Sound and screenshake + SoundEngine.PlaySound(GroundImpact, Projectile.Center); if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + (direction * 120 * Projectile.scale), -direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), 1f); - proj.timeLeft = 81; + // Dust and particles from the impact + for (int d = 0; d < 13; d++) + Dust.NewDustPerfect(collisionSpot, Main.rand.NextBool() ? DustID.Clay : DustID.Dirt, Main.rand.NextVector2CircularEdge(6f, 6f), Scale: 1.2f); - - SideSprouts(1, 150f, 1f * Charge / MaxCharge); - SideSprouts(-1, 150f, 1f * Charge / MaxCharge); - - } - - public bool SideSprouts(float facing, float distance, float projSize) - { - float widestAngle = 0f; - float widestSurfaceAngle = 0f; - bool validPositionFound = false; - for (float i = 0f; i < 1; i += 1 / distance) + CustomPulse shatter = new(collisionSpot, Vector2.Zero, Color.SandyBrown, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.03f, 0.275f, 30); + GeneralParticleHandler.SpawnParticle(shatter); + for (int i = 0; i < 10; i++) { - Vector2 positionToCheck = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - widestAngle = i; - - else if (widestAngle != 0) - { - validPositionFound = true; - widestSurfaceAngle = widestAngle; - } + Vector2 rockVel = -(Owner.velocity * 0.55f).RotatedByRandom(MathHelper.Pi / 2.5f); + StoneDebrisParticle rock = new(collisionSpot, rockVel, Color.White, 1f, 35); + GeneralParticleHandler.SpawnParticle(rock); } - if (validPositionFound) - { - Vector2 projPosition = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is EarthenTidesMonolith monolith) - { - monolith.WaitTimer = (1 - projSize) * 34f; - monolith.OriginDirection = direction; - monolith.Facing = facing; - } - } + // Spawn the blast spawner + // Its duration scales with the current charge level + int duration = 12 + (int)CurrentIndicator * 12; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageBoost), 0f, Owner.whoAmI, duration); - return validPositionFound; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -253,6 +228,9 @@ namespace CalamityMod.Projectiles.Melee if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) WhirlwindAttunement.RealPassiveEffect(target); + + if (!CalamityUtils.AnyProjectiles(ProjectileType())) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * 0.5f), 0f, Owner.whoAmI, 1f); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs new file mode 100644 index 0000000000..cb57a97185 --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs @@ -0,0 +1,74 @@ +using CalamityMod.DataStructures; +using CalamityMod.Items.Weapons.Melee; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class EarthenTidesBlast : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Magic/PrimordialAncientProjectile"; + public Player Owner => Main.player[Projectile.owner]; + + public override void SetStaticDefaults() => Main.projFrames[Type] = 6; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 140; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Melee; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.timeLeft = 72; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 40; + Projectile.scale = 0.05f; + } + + public override void AI() + { + Lighting.AddLight(Projectile.Center, 0.9f, 0.45f, 0.05f); + Projectile.rotation = Projectile.ai[0]; + if (Projectile.timeLeft > 12) + { + if (Projectile.scale < Projectile.ai[1]) + Projectile.scale += (Projectile.ai[1] - 0.05f) / 12f; + } + else + Projectile.scale -= (Projectile.ai[1] - 0.05f) / 12f; + + Projectile.frameCounter++; + if (Projectile.frameCounter > 2) + { + Projectile.frameCounter = 0; + Projectile.frame++; + if (Projectile.frame >= Main.projFrames[Projectile.type]) + Projectile.frame = 0; + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) + WhirlwindAttunement.RealPassiveEffect(target); + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) + sword.OnHitProc = true; + } + + public override bool PreDraw(ref Color lightColor) + { + Texture2D tex = ModContent.Request(Texture).Value; + Rectangle 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); + return false; + } + } +} diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlastSpawner.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlastSpawner.cs new file mode 100644 index 0000000000..18d4b79564 --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlastSpawner.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class EarthenTidesBlastSpawner : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 2; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.timeLeft = 50; + } + + public override void AI() + { + // Set how long the spawner will exist + // 30-40-50-60 for 25%-50%-75%-100% + if (Projectile.ai[1] == 0f) + { + Projectile.timeLeft = (int)Projectile.ai[0]; + Projectile.ai[1]++; + } + + // Constantly stay on top of the owner + Projectile.Center = Main.player[Projectile.owner].Center; + + // Spawn dust blasts + if (Projectile.timeLeft % 6 == 3) + { + for (int i = 0; i < 2; i++) + { + float randomX = Main.rand.NextFloat(-200f, 200f); + float randomY = Main.rand.NextFloat(-200f, 200f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), new Vector2(Projectile.Center.X + randomX, Projectile.Center.Y + randomY), Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Main.myPlayer, Main.rand.NextFloat(-MathHelper.Pi, MathHelper.Pi), Main.rand.NextFloat(0.96f, 1.04f)); + } + } + } + + public override bool? CanDamage() => false; + } +} diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs deleted file mode 100644 index 62a63b05b9..0000000000 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using CalamityMod.DataStructures; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -using static CalamityMod.CalamityUtils; -using static Terraria.ModLoader.ModContent; - -namespace CalamityMod.Projectiles.Melee -{ - public class EarthenTidesMonolith : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith"; - public Player Owner => Main.player[Projectile.owner]; - public float Timer => (100f - Projectile.timeLeft) / 100f; - public ref float Variant => ref Projectile.ai[0]; //Yes - public ref float Size => ref Projectile.ai[1]; //Yes - public float WaitTimer; //How long until the monolith appears - public Vector2 OriginDirection; //The direction of the original strike - public float Facing; //The direction of the original strike - public const float BaseWidth = 90f; - public const float BaseHeight = 420f; - - public CurveSegment StaySmall = new CurveSegment(EasingType.Linear, 0f, 0.2f, 0f); - public CurveSegment GoBig = new CurveSegment(EasingType.SineOut, 0.25f, 0.2f, 1f); - public CurveSegment GoNormal = new CurveSegment(EasingType.CircIn, 0.4f, 1.2f, -0.2f); - public CurveSegment StayNormal = new CurveSegment(EasingType.Linear, 0.5f, 1f, 0f); - - internal float Width() => PiecewiseAnimation(Timer, new CurveSegment[] { StaySmall, GoBig, GoNormal, StayNormal }) * BaseWidth * Size; - - public CurveSegment Anticipate = new CurveSegment(EasingType.CircIn, 0f, 0f, 0.15f); - public CurveSegment Overextend = new CurveSegment(EasingType.SineOut, 0.2f, 0.15f, 1f); - public CurveSegment Unextend = new CurveSegment(EasingType.CircIn, 0.25f, 1.15f, -0.15f); - public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); - internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; - - public override void SetStaticDefaults() - { - } - public override void SetDefaults() - { - Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 70; - Projectile.tileCollide = false; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.timeLeft = 102; - Projectile.hide = true; - } - - public override bool? CanDamage() => WaitTimer <= 0; - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float collisionPoint = 0f; - return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + ((Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * Height()), Width(), ref collisionPoint); - } - - public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) - { - behindNPCsAndTiles.Add(index); - } - - public override void AI() - { - if (Projectile.velocity != Vector2.Zero) - { - SurfaceUp(); - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - Projectile.velocity = Vector2.Zero; - } - - if (WaitTimer > 0) - { - Projectile.timeLeft = 102; - WaitTimer--; - } - - if (Projectile.timeLeft == 100) - { - if (Size >= 1) //Big monoliths create sparkles even before sprouting up - { - - for (int i = 0; i < 20; i++) - { - Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(7.5f, 20f), Color.White, Main.rand.NextBool() ? Color.MediumTurquoise : Color.DarkOrange, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); - GeneralParticleHandler.SpawnParticle(Sparkle); - } - } - - if (Size * 0.8 > 0.4 && Facing != 0) - { - SideSprouts(Facing, 150f, Size * 0.8f); - } - } - - if (Projectile.timeLeft == 80) - { - Vector2 particleDirection = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); - SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, Projectile.Center); - - for (int i = 0; i < 8; i++) - { - Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); - Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); - Particle smoke = new SmallSmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.DarkOrange, Color.MediumTurquoise, Main.rand.NextFloat()), new Color(130, 130, 130), Main.rand.NextFloat(2.8f, 3.6f) * Size, 165 - Main.rand.Next(30), 0.1f); - GeneralParticleHandler.SpawnParticle(smoke); - } - for (int i = 0; i < 6; i++) - { - Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(10f, 30f); - Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4)); - - Particle Rock = new StoneDebrisParticle(Projectile.Center + hitPositionDisplace * 3, flyDirection * Main.rand.NextFloat(3f, 6f), Color.Lerp(Color.DarkSlateBlue, Color.LightSlateGray, Main.rand.NextFloat()), (1f + Main.rand.NextFloat(0f, 2.4f)) * Size, 30 + Main.rand.Next(50), 0.1f); - GeneralParticleHandler.SpawnParticle(Rock); - } - } - } - - //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. - public void SurfaceUp() - { - for (float i = 0; i < 40; i += 0.5f) - { - Vector2 positionToCheck = Projectile.Center + Projectile.velocity * i; - if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - { - Projectile.Center = Projectile.Center + Projectile.velocity * i; - return; - } - } - Projectile.Center = Projectile.Center + Projectile.velocity * 40f; - } - - public bool SideSprouts(float facing, float distance, float projSize) - { - float widestAngle = 0f; - float widestSurfaceAngle = 0f; - bool validPositionFound = false; - for (float i = 0f; i < 1; i += 1 / distance) - { - Vector2 positionToCheck = Projectile.Center + OriginDirection.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - widestAngle = i; - - else if (widestAngle != 0) - { - validPositionFound = true; - widestSurfaceAngle = widestAngle; - } - } - - if (validPositionFound) - { - Vector2 projPosition = Projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is EarthenTidesMonolith monolith) - { - monolith.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f; - monolith.OriginDirection = OriginDirection; - monolith.Facing = facing; - } - } - - return validPositionFound; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_MonolithProc) - sword.OnHitProc = true; - - if (Projectile.numHits > 0) - modifiers.SourceDamage *= OmegaBiomeBlade.ShockwaveAttunement_MonolithDamageFalloff; - } - - public override bool PreDraw(ref Color lightColor) - { - if (WaitTimer > 0) - return false; - - Texture2D tex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesMonolith").Value; - - Vector2 Shake = Projectile.timeLeft < 70 ? Vector2.Zero : Vector2.One.RotatedByRandom(MathHelper.TwoPi) * (70 - Projectile.timeLeft / 30f) * 0.05f; - - float drawAngle = Projectile.rotation; - Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); - Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; - Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); - - float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); - - Main.EntitySpriteDraw(tex, drawPosition + Shake, frame, lightColor * opacity, drawAngle, drawOrigin, drawScale, 0f, 0); - - return false; - } - public override void PostDraw(Color lightColor) - { - if (WaitTimer > 0) - return; - - Texture2D tex = Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith_Glow").Value; - - float drawAngle = Projectile.rotation; - Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); - Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; - Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); - - float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); - - Main.EntitySpriteDraw(tex, drawPosition, frame, Color.White * opacity, drawAngle, drawOrigin, drawScale, 0f, 0); - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(WaitTimer); - writer.Write(Facing); - writer.WriteVector2(OriginDirection); - - } - public override void ReceiveExtraAI(BinaryReader reader) - { - WaitTimer = reader.ReadSingle(); - Facing = reader.ReadSingle(); - OriginDirection = reader.ReadVector2(); - } - } -} diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs index 64884afedf..9c6c385221 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs @@ -12,13 +12,12 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class EarthenTidesBlast : ModProjectile, ILocalizedModType + public class EarthenTidesShockwave : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave"; public Player Owner => Main.player[Projectile.owner]; public float Timer => (60f - Projectile.timeLeft) / 100f; - public ref float Variant => ref Projectile.ai[0]; //Yes public ref float Size => ref Projectile.ai[0]; //Yes public Particle BloomRing; @@ -53,7 +52,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft == 60) { SoundEngine.PlaySound(SoundID.Item79, Projectile.Center); - Particle Sparkle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, Projectile.scale, 20, 0.2f, 2); + Particle Sparkle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Main.rand.NextBool() ? Color.BurlyWood : Color.Brown, Projectile.scale, 20, 0.2f, 2); GeneralParticleHandler.SpawnParticle(Sparkle); } @@ -63,21 +62,21 @@ namespace CalamityMod.Projectiles.Melee { SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode, Projectile.Center); - BloomRing = new BloomRing(Projectile.Center, Vector2.Zero, Color.Aqua, Projectile.scale, 40); + BloomRing = new BloomRing(Projectile.Center, Vector2.Zero, Color.Brown, Projectile.scale, 40); GeneralParticleHandler.SpawnParticle(BloomRing); - Particle Bloom = new StrongBloom(Projectile.Center, Vector2.Zero, Main.rand.NextBool() ? Color.Aqua * 0.6f : Color.SpringGreen * 0.6f, Projectile.scale * (1f + Main.rand.NextFloat(0f, 1.5f)), 20); + Particle Bloom = new StrongBloom(Projectile.Center, Vector2.Zero, Main.rand.NextBool() ? Color.BurlyWood * 0.6f : Color.Brown * 0.6f, Projectile.scale * (1f + Main.rand.NextFloat(0f, 1.5f)), 20); GeneralParticleHandler.SpawnParticle(Bloom); for (int i = 0; i < 10; i++) { - Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * Projectile.scale, Color.White, Main.rand.NextBool() ? Color.DarkSlateBlue : Color.Chocolate, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * Projectile.scale, Color.White, Main.rand.NextBool() ? Color.SandyBrown : Color.LimeGreen, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); } for (float i = 0f; i < 1; i += 0.05f) { float rotation = i * MathHelper.TwoPi; - Particle Sparkle = new CritSpark(Projectile.Center + rotation.ToRotationVector2() * 65f * Projectile.scale, rotation.ToRotationVector2() * 10f, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + Particle Sparkle = new CritSpark(Projectile.Center + rotation.ToRotationVector2() * 65f * Projectile.scale, rotation.ToRotationVector2() * 10f, Color.White, Main.rand.NextBool() ? Color.SaddleBrown : Color.Brown, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); } } @@ -96,7 +95,7 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) + if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_ShockwaveProc) sword.OnHitProc = true; } diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png index 55dd6345b9849b755cf464bedbf545d34c7c5d89..bc29ed731e42743974f21c23bf8c801f5c470768 100644 GIT binary patch literal 3984 zcmbVP2~<lL8543je-X`)z-_R##b<_0D~{!@2kDz0Y~+ zSRaoK2HOn~2*d`@58V8~vkZZF5hB^nQP5dKbMo;lxPp!^<3vIARHYT0m!khL^=B4hcG1{%Hn2@mK_B62qY;E z`-5oC!_lNRB!*h3wu)S)z?4=nC4w{QFaX=A5=QQ6B-a0ZVTUjX-G z@Hg5G9D4=xNy-E>^$Ug){fIXXyV`c5!zED<_3|zNi zkitC9ByRR2tJl>npWaVwYLC35jT&{-9!k1x(VzC7rB zR|4TTy0XCqo$E$nA2#(RB?D5Hh*z8MYNd>jaq0QI+^4D;5zo#3jEWs|T0L(q%XtF^ zL>T1P6sO~(G281UF8c7ITNmAM+p@S(rIo{Oxb*UbdN#|_m|cKG)!I9}50C}(0&_*V zxQ33GmB(d*i(IRI7w_4$GPBSkH~}P;S)cDT$=^M7swH*`4#a6I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y?VZq_{wz#k}R51!* zF`lj}yso~r0l$!x56~JeqswgeJSJBZ``r2pk`Yeeqt_>He2R+y0~%VpkuBRp(D>(BSiiR!&w_$agAbX3}9fwOr~J0fd1}g(HhJM_gn=-hM8vw z9SGnBZ+2DBj=SClDoIXrjL&CKw6;|DedRzbqPaHoz7ELT$Q&<)q)4ni$Zp$5Q0C|W zl~B~PsL?EvwH9p9W_eS=ZWa)=UK+*(tpHua1vx|O-tP+u>lyjx3xVF{G=^k4kS}Lg zEnClov5vu(`rZLqH6(Z!imGa7rYSA})>L7u=r(g`|JWu!Ko`6~sYC(R=wCO>E>JoG%4Ms9Qe_<&Qk<%ZyA&0<9*^NeZTRWv5=v3MOgO#ctYA(l;Trq z78C*XfLr(?p??$)mxUrn`ZTP((vwkQgst|jZ>9Y+8`I>({rgVAJ2 zi)I-j4a$43>L?2`Gi5J4m8V=z6>c02%OEY8;&uxQfHrL*$cLyNwyJIb%4ucMAhiuX zl2iq1{|7W_Un5KaUc_AT(1*^LJ@ViGI${P~^_U?xc_Y`J{PwQquN&Wvng7!{L2t;a zSIU8Bb|MX9)0uxv<{)5 z5p?=BPzTkQ#B20zAx$5-<(Qb^SdOe*{idhn4ayJAq-M;A2Y4mEnLqL>? zrCo7?^!gs~Ucn9dBgXeVQLyYdcGUh{s_(p(O)uoI6wrG@=x`H~>MeBosjBc0)K+(O zKi(c;*`4;-!kRnuuGGo74_LPoF!98Ao1BFv7r=NQ7TPbU%I*`P!gWK!>S9Nd`9|x~ jlk>4{4shgmAFvwZ<5NUV%~FULMEav}Z+F(g6Dj`%Ao& Date: Sat, 31 Aug 2024 13:59:36 -0400 Subject: [PATCH 12/35] Made Swordsmith's Pride throw faster --- Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs | 4 ++-- Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs index 2c8390d560..3671807fe5 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPride.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 direction = Vector2.Zero; public ref float CurrentState => ref Projectile.ai[0]; public Player Owner => Main.player[Projectile.owner]; - public const float throwOutTime = 90f; + public const float throwOutTime = 60f; public const float throwOutDistance = 440f; public static float snapPoint = 0.45f; @@ -199,7 +199,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.Center = Owner.Center + (direction * Projectile.scale * 10) + (direction * throwOutDistance * ThrowCurve()); Projectile.scale = (1 + Empowerment / maxEmpowerment * 1.5f) * MathHelper.Clamp(1 - retractionTimer, 0.3f, 1f); - if (snapTimer > 0.01f && snapTimer < 0.02f) + if (snapTimer > 0f && snapTimer < 0.04f) { Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_MonolithDamageMult), Projectile.knockBack, Owner.whoAmI, Main.rand.Next(4), 1f, hasMadeChargeSound); if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs index b3b69afa7b..2098858de1 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs @@ -53,7 +53,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.timeLeft = 102; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = 20; Projectile.hide = true; } From 71f77270646d86706e0b8805411b955e55848db0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 31 Aug 2024 19:18:06 -0400 Subject: [PATCH 13/35] Andromeda's Stride changes * Added visual explosion and screenshake when a dash starts * Increased how long chargeup stars last * Hitting an enemy now rains stars on them, the amount of which scales based on charge level * No longer has any tile collision effects --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 4 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 4 +- Projectiles/Melee/Galaxia_AndromedasStride.cs | 88 +++--------- .../Galaxia_AndromedasStrideBoltSpawner.cs | 134 ++++-------------- 4 files changed, 51 insertions(+), 179 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index f2a0223988..3e52429c52 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -53,8 +53,8 @@ namespace CalamityMod.Items.Weapons.Melee public static int AndromedaAttunement_BaseDamage = 2800; public static int AndromedaAttunement_DashHitIFrames = 20; public static float AndromedaAttunement_FullChargeBoost = 6f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. - public static float AndromedaAttunement_MonolithDamageBoost = 1.2f; - public static float AndromedaAttunement_BoltsDamageReduction = 0.2f; //The shots fired as it charges + public static float AndromedaAttunement_StarDamageMultiplier = 1.2f; + public static float AndromedaAttunement_ChargeupBoltDamageMultiplier = 0.2f; //The shots fired as it charges public static int AriesAttunement_BaseDamage = 1325; public static int AriesAttunement_LocalIFrames = 10; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index bd18c6553c..9f8fa7c009 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -190,9 +190,9 @@ AndromedaAttunement: { Name: Andromeda's Stride Function: ''' - Charge a spatial lunge, release to shred all enemies in your path + Charge a spatial lunge, release to unleash a galactic blow Charging the sword periodically emits homing bolts - Lunging into tiles releases a ripple of large homing stars + Lunging into enemies rains large homing stars from the heavens ''' PassiveName: Cancer's Blessing PassiveDesc: diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 63dde30024..109659d94a 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -44,10 +44,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localNPCHitCooldown = 16; } - public override bool? CanDamage() - { - return (State == 1); - } + public override bool? CanDamage() => State == 1f; public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { @@ -87,10 +84,15 @@ namespace CalamityMod.Projectiles.Melee } else { - SoundEngine.PlaySound(SoundID.Item120 with { Volume = SoundID.Item120.Volume * 0.5f }, Projectile.Center); + float screenshakeLevel = 4f + CurrentIndicator * 2f; + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenshakeLevel) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenshakeLevel; + CustomPulse shatter = new(Owner.Center, Vector2.Zero, Color.HotPink, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.0075f * CurrentIndicator, 0.075f * CurrentIndicator, 30); + GeneralParticleHandler.SpawnParticle(shatter); + State = 1f; - Projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; //Keep that even, if its an odd number itll fuck off and wont reset the players velocity on death + Projectile.timeLeft = (7 + (int)((Charge / MaxCharge - 0.25f) * 20)) * 2; // Keep that even, if it's an odd number it'll fuck off and won't reset the player's velocity on death dashDuration = Projectile.timeLeft; lastDisplacement = Projectile.Center - Owner.Center; Projectile.netUpdate = true; @@ -110,13 +112,10 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 2; if ((Charge / MaxCharge >= 0.25f && CurrentIndicator == 0f) || (Charge / MaxCharge >= 0.5f && CurrentIndicator == 1f) || (Charge / MaxCharge >= 0.75f && CurrentIndicator == 2f) && Owner.whoAmI == Main.myPlayer) { - //WOahhh do a ring of projectiles!! woahhh + // Spawn a ring of stars for (int i = 0; i < 5; i++) { - Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 5f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_BoltsDamageReduction), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); - { - blast.timeLeft = 30; - } + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 5f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); } SoundEngine.PlaySound(SoundID.Item79, Projectile.Center); @@ -144,13 +143,10 @@ namespace CalamityMod.Projectiles.Melee if (Owner.whoAmI == Main.myPlayer && CurrentIndicator < 4f) { - //Projectiles!!! wah!!! + // Spawn more stars for (int i = 0; i < 9; i++) { - Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 9f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_BoltsDamageReduction), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); - { - blast.timeLeft = 50; - } + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 9f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); } OverCharge = 20f; @@ -167,9 +163,10 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().LungingDown = true; + // Immediately cancel the lunge if you hit a tile + // Unlike its downgrades, there are NO effects from hitting tiles - it's too impractical at this stage, why would there be? if (Collision.SolidCollision(Owner.Center + (direction * 120 * Projectile.scale) - Vector2.One * 5f, 10, 10)) { - SlamDown(); Projectile.timeLeft = 0; Owner.Calamity().LungingDown = false; Projectile.active = false; @@ -206,64 +203,15 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } - public void SlamDown() - { - if (Owner.whoAmI != Main.myPlayer) - return; - - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < 15) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = 15; - - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center + (direction * 120 * Projectile.scale), -direction * 16f, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); - proj.scale = 3f; - proj.timeLeft = 50; - - SideSprouts(1, 150f, 1f * Charge / MaxCharge); - SideSprouts(-1, 150f, 1f * Charge / MaxCharge); - - SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = SoundID.DD2_MonkStaffGroundImpact.Volume * 1.5f }, Projectile.Center); - } - - public bool SideSprouts(float facing, float distance, float projSize) - { - float widestAngle = 0f; - float widestSurfaceAngle = 0f; - bool validPositionFound = false; - for (float i = 0f; i < 1; i += 1 / distance) - { - Vector2 positionToCheck = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - widestAngle = i; - - else if (widestAngle != 0) - { - validPositionFound = true; - widestSurfaceAngle = widestAngle; - } - } - - if (validPositionFound) - { - Vector2 projPosition = Owner.Center + (direction * 120 * Projectile.scale) + direction.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - Vector2 monolithRotation = direction.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_MonolithDamageBoost), 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is AndromedasStrideBoltSpawner spawner) - { - spawner.WaitTimer = (1 - projSize) * 34f; - spawner.OriginDirection = direction; - spawner.Facing = facing; - } - } - - return validPositionFound; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { // 17APR2024: Ozzatron: Galaxia's dash gives iframes when striking enemies in a similar manner to a ram dash. // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. Owner.GiveUniversalIFrames(FourSeasonsGalaxia.AndromedaAttunement_DashHitIFrames); + + // ai[0] is NPC index to stay locked onto it, ai[1] is charge level to determine how many stars are rained + if (!CalamityUtils.AnyProjectiles(ProjectileType())) + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_StarDamageMultiplier), Projectile.knockBack, Owner.whoAmI, target.whoAmI, CurrentIndicator); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs index 1e34f170f6..089af06a1b 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs @@ -15,15 +15,9 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; public Player Owner => Main.player[Projectile.owner]; - public ref float Size => ref Projectile.ai[1]; //Yes + public NPC Target => Main.npc[(int)Projectile.ai[0]]; + public ref float ChargeLevel => ref Projectile.ai[1]; - public float WaitTimer; //How long until the monoliths appears - public Vector2 OriginDirection; //The direction of the original strike - public float Facing; //The direction of the original strike - - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -31,7 +25,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = false; Projectile.friendly = true; Projectile.penetrate = -1; - Projectile.timeLeft = 30; + Projectile.timeLeft = 60; Projectile.hide = true; } @@ -39,31 +33,22 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (Projectile.velocity != Vector2.Zero) + // Set time left based on charge level + if (Projectile.localAI[0] == 0f) { - SurfaceUp(); - Projectile.rotation = Projectile.velocity.ToRotation(); - Projectile.velocity = Vector2.Zero; + Projectile.timeLeft = 15 * (int)ChargeLevel; + Projectile.localAI[0] = 1f; } - if (WaitTimer > 0) - { - Projectile.timeLeft = 30; - WaitTimer--; - } + // Constantly follow its target + Projectile.Center = Target.Center; - if (Projectile.timeLeft == 29) - { - if (Size * 0.8 > 0.4 && Facing != 0) - SideSprouts(Facing, 150f, Size * 0.8f); - } - - if (Projectile.timeLeft < 29) + // Spawn smoke + if (Projectile.timeLeft < 59) { if (Main.rand.NextBool(3)) { - Vector2 particleDirection = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2(); - Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver4 / 2f, MathHelper.PiOver4 / 2f)) * Main.rand.NextFloat(15f, 35f); + Vector2 flyDirection = -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 8f) * Main.rand.NextFloat(15f, 35f); Particle smoke = new HeavySmokeParticle(Projectile.Center, flyDirection, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.4f, 1.3f) * Projectile.scale, 0.8f, 0, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); @@ -77,98 +62,37 @@ namespace CalamityMod.Projectiles.Melee } } - if (Projectile.timeLeft == 2) + // Rain stars from the sky + if (Projectile.timeLeft % 15 == 5) { - //New bolt - if (Owner.whoAmI == Main.myPlayer) + SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, Projectile.Center); + for (int i = 0; i < 2; i++) { - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.position, Projectile.rotation.ToRotationVector2() * 18f, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, 0.75f, MathHelper.Pi / 25f); - proj.scale = Size * 3f; - proj.timeLeft = 50; + if (Owner.whoAmI == Main.myPlayer) + { + Vector2 starPos = new Vector2(Projectile.Center.X + Main.rand.NextFloat(-250f, 250f), Projectile.Center.Y - Main.rand.NextFloat(650f, 750f)); + Vector2 starVel = (Projectile.Center - starPos).SafeNormalize(Vector2.UnitY) * 27f; + Projectile star = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), starPos, starVel, ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI, 0.75f, MathHelper.Pi / 20f); + star.scale = 2f; + star.timeLeft = 100; + } } - Vector2 particleDirection = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); - SoundEngine.PlaySound(SoundID.DD2_EtherianPortalDryadTouch, Projectile.Center); - - for (int i = 0; i < 8; i++) + for (int i = 0; i < 4; i++) { - Vector2 hitPositionDisplace = particleDirection.RotatedBy(MathHelper.PiOver2) * Main.rand.NextFloat(0f, 10f); - Vector2 flyDirection = particleDirection.RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * Main.rand.NextFloat(5f, 15f); + Vector2 hitPositionDisplace = -Vector2.UnitY * Main.rand.NextFloat(10f); + Vector2 flyDirection = -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * Main.rand.NextFloat(5f, 15f); - Particle smoke = new HeavySmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(1.6f, 2.2f) * Projectile.scale, 0.8f, 0, false, 0, true); + Particle smoke = new HeavySmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Lerp(Color.MidnightBlue, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(1f, 1.6f) * Projectile.scale, 0.8f, 0, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); if (Main.rand.NextBool(3)) { - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Red, 20, Main.rand.NextFloat(1.4f, 1.7f) * Projectile.scale, 0.8f, 0, true, 0.005f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center + hitPositionDisplace, flyDirection, Color.Red, 20, Main.rand.NextFloat(1.1f, 1.4f) * Projectile.scale, 0.8f, 0, true, 0.005f, true); GeneralParticleHandler.SpawnParticle(smokeGlow); } } } } - - //Go up to the "surface" so you're not stuck in the middle of the ground like a complete moron. - public void SurfaceUp() - { - for (float i = 0; i < 40; i += 0.5f) - { - Vector2 positionToCheck = Projectile.Center + Projectile.velocity * i; - if (!Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - { - Projectile.Center = Projectile.Center + Projectile.velocity * i; - return; - } - } - Projectile.Center = Projectile.Center + Projectile.velocity * 40f; - } - - public bool SideSprouts(float facing, float distance, float projSize) - { - float widestAngle = 0f; - float widestSurfaceAngle = 0f; - bool validPositionFound = false; - for (float i = 0f; i < 1; i += 1 / distance) - { - Vector2 positionToCheck = Projectile.Center + OriginDirection.RotatedBy((i * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - - if (Main.tile[(int)(positionToCheck.X / 16), (int)(positionToCheck.Y / 16)].IsTileSolid()) - widestAngle = i; - - else if (widestAngle != 0) - { - validPositionFound = true; - widestSurfaceAngle = widestAngle; - } - } - - if (validPositionFound) - { - Vector2 projPosition = Projectile.Center + OriginDirection.RotatedBy((widestSurfaceAngle * MathHelper.PiOver2 + MathHelper.PiOver4) * facing) * distance; - Vector2 monolithRotation = OriginDirection.RotatedBy(Utils.AngleLerp(widestSurfaceAngle * -facing, 0f, projSize)); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projPosition, -monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize); - if (proj.ModProjectile is AndromedasStrideBoltSpawner spawner) - { - spawner.WaitTimer = (float)Math.Sqrt(1.0 - Math.Pow(projSize - 1.0, 2)) * 3f; - spawner.OriginDirection = OriginDirection; - spawner.Facing = facing; - } - } - - return validPositionFound; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(WaitTimer); - writer.Write(Facing); - writer.WriteVector2(OriginDirection); - - } - public override void ReceiveExtraAI(BinaryReader reader) - { - WaitTimer = reader.ReadSingle(); - Facing = reader.ReadSingle(); - OriginDirection = reader.ReadVector2(); - } } } From a6ef9743ff2077cd283573ca167fe1dfdf339d43 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 1 Sep 2024 18:25:38 -0400 Subject: [PATCH 14/35] Several changes based on feedback * Reverted Earthen Tides shockwave color to be water-themed again * Removed passive attunements from Galaxia * Monoliths from BB Heaven's Might and TBB Swordsmith's Pride now scale in size based on the target's size and follow their targets * TBB Swordsmith's Pride monoliths now spawn on hit instead of at the peak of the sword throw, and always rise upwards instead of being based on sword throw direction --- DataStructures/Attunement.cs | 40 ------- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 23 +--- .../en-US/Mods.CalamityMod.Attunement.hjson | 24 ---- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 - .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 - Projectiles/Melee/GalaxiaTropicRing.cs | 112 ------------------ .../Galaxia_AndromedasStrideBoltSpawner.cs | 9 +- .../Melee/MendedBiomeBlade_HeavensMight.cs | 8 +- .../Melee/MendedBiomeBlade_HeavensMonolith.cs | 23 ++-- .../TrueBiomeBlade_EarthenTidesShockwave.cs | 10 +- .../TrueBiomeBlade_EarthenTidesShockwave.png | Bin 3984 -> 5794 bytes .../Melee/TrueBiomeBlade_SwordsmithsPride.cs | 27 +++-- ...TrueBiomeBlade_SwordsmithsPrideMonolith.cs | 30 +++-- 13 files changed, 72 insertions(+), 237 deletions(-) delete mode 100644 Projectiles/Melee/GalaxiaTropicRing.cs diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index fd239c11cf..2307e19427 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -599,16 +599,6 @@ namespace CalamityMod.DataStructures item.UseSound = null; item.noMelee = true; } - - public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) - { - if (UseTimer % 500 == 449) - { - SoundEngine.PlaySound(SoundID.Item78); - Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, ProjectileType(), 0, 0f, player.whoAmI, 1f); - UseTimer++; - } - } } public class AriesAttunement : Attunement @@ -633,16 +623,6 @@ namespace CalamityMod.DataStructures item.UseSound = null; item.noMelee = true; } - - public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) - { - if (UseTimer % 500 == 449) - { - SoundEngine.PlaySound(SoundID.Item78); - Projectile.NewProjectile(source, Main.MouseWorld, Vector2.Zero, ProjectileType(), 0, 0f, player.whoAmI, 1f); - UseTimer++; - } - } } public class PolarisAttunement : Attunement @@ -667,16 +647,6 @@ namespace CalamityMod.DataStructures item.UseSound = null; item.noMelee = true; } - - public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) - { - if (UseTimer % 500 == 449) - { - SoundEngine.PlaySound(SoundID.Item78); - Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), FourSeasonsGalaxia.CancerPassiveDamage, 0f, player.whoAmI, 0f); - UseTimer++; - } - } } public class AndromedaAttunement : Attunement @@ -702,16 +672,6 @@ namespace CalamityMod.DataStructures item.UseSound = null; item.noMelee = true; } - - public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) - { - if (UseTimer % 500 == 449) - { - SoundEngine.PlaySound(SoundID.Item78); - Projectile.NewProjectile(source, player.Center, Vector2.Zero, ProjectileType(), FourSeasonsGalaxia.CancerPassiveDamage, 0f, player.whoAmI, 0f); - UseTimer++; - } - } } #endregion diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 3e52429c52..008bea0bf2 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -86,9 +86,7 @@ namespace CalamityMod.Items.Weapons.Melee return; var effectDescTooltip = list.FirstOrDefault(x => x.Text.Contains("[FUNC]") && x.Mod == "Terraria"); - var passiveDescTooltip = list.FirstOrDefault(x => x.Text.Contains("[PASS]") && x.Mod == "Terraria"); var mainAttunementTooltip = list.FirstOrDefault(x => x.Text.Contains("[ATT]") && x.Mod == "Terraria"); - var blessingTooltip = list.FirstOrDefault(x => x.Text.Contains("[BLE]") && x.Mod == "Terraria"); //Default stuff gets skipped here. MainAttunement is set to true in SafeCheckAttunements() above @@ -105,23 +103,11 @@ namespace CalamityMod.Items.Weapons.Melee effectDescTooltip.OverrideColor = mainAttunement.tooltipColor; } - if (passiveDescTooltip != null) - { - passiveDescTooltip.Text = mainAttunement.PassiveDesc.ToString(); - passiveDescTooltip.OverrideColor = mainAttunement.tooltipPassiveColor; - } - if (mainAttunementTooltip != null) { mainAttunementTooltip.Text = mainAttunementTooltip.Text.Replace("ATT", mainAttunement.AttunementName.ToString()); mainAttunementTooltip.OverrideColor = Color.Lerp(mainAttunement.tooltipColor, mainAttunement.tooltipColor2, 0.5f + (float)Math.Sin(Main.GlobalTimeWrappedHourly) * 0.5f); } - - if (blessingTooltip != null) - { - blessingTooltip.Text = blessingTooltip.Text.Replace("BLE", mainAttunement.PassiveName.ToString()); - blessingTooltip.OverrideColor = mainAttunement.tooltipPassiveColor; - } } #endregion @@ -222,22 +208,15 @@ namespace CalamityMod.Items.Weapons.Melee } SafeCheckAttunements(); - mainAttunement.ApplyStats(Item); - //Passive effects only jappen player side haha - if (player.whoAmI != Main.myPlayer) - return; - - var source = player.GetSource_ItemUse(Item); - mainAttunement.PassiveEffect(player, source, ref UseTimer, ref OnHitProc); - if (player.Calamity().mouseRight && CanUseItem(player) && player.whoAmI == Main.myPlayer && !Main.mapFullscreen) { //Don't shoot out a visual blade if you already have one out if (Main.projectile.Any(n => n.active && n.type == ProjectileType() && n.owner == player.whoAmI)) return; + var source = player.GetSource_ItemUse(Item); Projectile.NewProjectile(source, player.Top, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, 0, Math.Sign(player.position.X - Main.MouseWorld.X)); } } diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 9f8fa7c009..661dce6473 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -146,12 +146,6 @@ PhoenixAttunement: { The swirling nebula constantly emits homing cosmic bolts Release to hurl the sword toward the cursor alongside 6 gigantic cosmic bolts ''' - PassiveName: Capricorn's Blessing - PassiveDesc: - ''' - Periodically releases a ring of weakening stars around your cursor when attacking - The ring moves away from you, but slows down over time - ''' } AriesAttunement: { @@ -161,12 +155,6 @@ AriesAttunement: { Binds the sword to your cursor through a chain of constellations Striking enemies causes nebulous explosions which spawn homing cosmic bolts ''' - PassiveName: Capricorn's Blessing - PassiveDesc: - ''' - Periodically releases a ring of weakening stars around your cursor when attacking - The ring moves away from you, but slows down over time - ''' } PolarisAttunement: { @@ -178,12 +166,6 @@ PolarisAttunement: { Release to fire a powerful star directly at your cursor Attacking immediately after firing the star launches you toward it, damaging enemies ''' - PassiveName: Cancer's Blessing - PassiveDesc: - ''' - Periodically releases a ring of lifestealing stars around you when attacking - The ring moves toward you, but slows down over time - ''' } AndromedaAttunement: { @@ -194,10 +176,4 @@ AndromedaAttunement: { Charging the sword periodically emits homing bolts Lunging into enemies rains large homing stars from the heavens ''' - PassiveName: Cancer's Blessing - PassiveDesc: - ''' - Periodically releases a ring of lifestealing stars around you when attacking - The ring moves toward you, but slows down over time - ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index c7e6853ffc..5571e2c695 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -544,12 +544,10 @@ FourSeasonsGalaxia: { Tooltip: ''' [FUNC] - [PASS] Freed from earthly shackles and coursing with cosmic power Has access to all of the attunements at all times Press to cycle the sword's attunement depending on the cursor's position Active Attunement : [ATT] - Passive Blessing : [BLE] ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 6115d579f8..034a060b36 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -130,7 +130,6 @@ GaelSkull2.DisplayName: No Longer Ark of the Cosmos' Superior Cousin GalacticaComet.DisplayName: Galactus Comet GalaxiaBolt.DisplayName: Galaxia Bolt GalaxiaHoldout.DisplayName: Galactic Formation -GalaxiaTropicRing.DisplayName: Star Ring GalaxyBlast.DisplayName: Galaxy Blast GalaxyBlastType2.DisplayName: Galaxy Blast GalaxyBlastType3.DisplayName: Galaxy Blast diff --git a/Projectiles/Melee/GalaxiaTropicRing.cs b/Projectiles/Melee/GalaxiaTropicRing.cs deleted file mode 100644 index c0fb8cc795..0000000000 --- a/Projectiles/Melee/GalaxiaTropicRing.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Weapons.Melee; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ModLoader; -using static Terraria.ModLoader.ModContent; - -namespace CalamityMod.Projectiles.Melee -{ - public class GalaxiaTropicRing : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public Player Owner => Main.player[Projectile.owner]; - public ref float Mode => ref Projectile.ai[0]; - public ref float Fade => ref Projectile.ai[1]; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 30; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; - Projectile.DamageType = DamageClass.Melee; - Projectile.tileCollide = false; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Mode == 0f && Main.rand.NextFloat() < FourSeasonsGalaxia.CancerPassiveLifeStealProc) - { - Owner.statLife += FourSeasonsGalaxia.CancerPassiveLifeSteal; - Owner.HealEffect(FourSeasonsGalaxia.CancerPassiveLifeSteal); - } - else - { - target.AddBuff(BuffType(), FourSeasonsGalaxia.CapricornPassiveDebuffTime); - } - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - return Collision.CheckAABBvAABBCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center - Vector2.One * 95 * Projectile.scale, Vector2.One * 190 * Projectile.scale); - } - - public override void AI() - { - Projectile.velocity *= 0.95f; - - if (Mode == 0f) - Projectile.Center = Vector2.Lerp(Projectile.Center, Owner.Center, 0.4f * MathHelper.Clamp((Projectile.timeLeft - 150) / 150f, 0, 1)); - else - Projectile.velocity = Utils.SafeNormalize(Projectile.Center - Owner.Center, Vector2.Zero) * MathHelper.Clamp((Projectile.timeLeft - 150) / 150f, 0, 1) * 3f * (5f - MathHelper.Clamp((Projectile.Center - Owner.Center).Length() / 150f, 0, 4f)); - - Fade = Projectile.timeLeft > 250 ? (float)Math.Sin((300 - Projectile.timeLeft) / 50f * MathHelper.PiOver2) * 0.6f + 0.4f : Projectile.timeLeft > 50 ? 1f : (float)Math.Sin((Projectile.timeLeft) / 50f * MathHelper.PiOver2); - Lighting.AddLight(Projectile.Center, 0.75f, 1f, 0.24f); - - } - - public Vector2 starPosition(int MaxStars, int StarIndex, float diameter) - { - float starHeight = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 + StarIndex * MathHelper.TwoPi / (float)MaxStars); - float starWidth = (float)Math.Cos(Main.GlobalTimeWrappedHourly * 3 + StarIndex * MathHelper.TwoPi / (float)MaxStars); - - return Projectile.Center + Projectile.rotation.ToRotationVector2() * starWidth * (Projectile.scale * diameter * 0.4f) + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * starHeight * (Projectile.scale * diameter * 0.4f); - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D sigil = Request(Mode == 0 ? "CalamityMod/Projectiles/Melee/GalaxiaCancer" : "CalamityMod/Projectiles/Melee/GalaxiaCapricorn").Value; //OMG Karkat and Gamzee from homestuck i am a big fan - Texture2D ring = Request("CalamityMod/Particles/BloomRing").Value; - Texture2D starTexture = Request("CalamityMod/Particles/Sparkle").Value; - Texture2D lineTexture = Request("CalamityMod/Particles/BloomLine").Value; - Texture2D bloomTexture = Request("CalamityMod/Particles/BloomCircle").Value; - - Color ringColor = Mode == 0 ? new Color(255, 0, 0) * Fade : new Color(66, 0, 176) * Fade; - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - Main.EntitySpriteDraw(bloomTexture, Projectile.Center - Main.screenPosition, null, ringColor * 0.5f, 0, bloomTexture.Size() / 2f, 2.5f, SpriteEffects.None, 0); - Main.EntitySpriteDraw(ring, Projectile.Center - Main.screenPosition, null, ringColor * 0.8f, 0f, ring.Size() / 2f, Projectile.scale, 0f, 0); - - Main.EntitySpriteDraw(sigil, Projectile.Center - Main.screenPosition, null, ringColor * MathHelper.Lerp(0.7f, 0f, ((Main.GlobalTimeWrappedHourly * 5f) % 10) / 10f), 0f, sigil.Size() / 2f, Projectile.scale + ((Main.GlobalTimeWrappedHourly * 5f) % 10) / 10f * 2f, 0f, 0); - Main.EntitySpriteDraw(sigil, Projectile.Center - Main.screenPosition, null, Color.White * Fade, 0f, sigil.Size() / 2f, Projectile.scale, 0f, 0); - - for (int i = 0; i < 5; i++) - { - - Vector2 starPos = starPosition(5, i, ring.Width); - - Vector2 LineVector = starPosition(5, i + 1, ring.Width) - starPos; - float rot = LineVector.ToRotation() + MathHelper.PiOver2; - Vector2 origin = new Vector2(lineTexture.Width / 2f, lineTexture.Height); - Vector2 scale = new Vector2(0.3f, LineVector.Length() / lineTexture.Height); - - Main.EntitySpriteDraw(lineTexture, starPos - Main.screenPosition, null, Color.White * Fade * 0.7f, rot, origin, scale, SpriteEffects.None, 0); - - Main.EntitySpriteDraw(bloomTexture, starPos - Main.screenPosition, null, ringColor * 0.5f, 0, bloomTexture.Size() / 2f, 0.1f, SpriteEffects.None, 0); - Main.EntitySpriteDraw(starTexture, starPos - Main.screenPosition, null, ringColor * 0.5f, Main.GlobalTimeWrappedHourly * 5 + MathHelper.PiOver4 * i, starTexture.Size() / 2f, 1f, SpriteEffects.None, 0); - Main.EntitySpriteDraw(starTexture, starPos - Main.screenPosition, null, Color.White * Fade, Main.GlobalTimeWrappedHourly * 5, starTexture.Size() / 2f, 1.4f, SpriteEffects.None, 0); - } - - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - } -} diff --git a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs index 089af06a1b..c0a6677e0f 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs @@ -41,7 +41,14 @@ namespace CalamityMod.Projectiles.Melee } // Constantly follow its target - Projectile.Center = Target.Center; + // Die if the target is no longer active + if (!Target.active) + { + Projectile.Kill(); + return; + } + else + Projectile.Center = Target.Center; // Spawn smoke if (Projectile.timeLeft < 59) diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index a33a92b11e..88a1444c12 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -98,7 +98,6 @@ namespace CalamityMod.Projectiles.Melee else if (CurrentState == 0f) { CurrentState = 1f; - Projectile.numHits = 0; SoundEngine.PlaySound(SoundID.Item80, Projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES @@ -205,11 +204,14 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { // Spawn a monolith on max power sword throws - if (!(CurrentState == 1f && Projectile.numHits <= 0)) + if (!(CurrentState == 1f && !CalamityUtils.AnyProjectiles(ProjectileType()))) return; if (Empowerment >= maxEmpowerment) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 10), ProjectileType(), (int)(Projectile.damage * TrueBiomeBlade.HolyAttunement_MonolithDamage), 10f, Owner.whoAmI, Main.rand.Next(4)); + { + float monolithScale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 10f), ProjectileType(), (int)(Projectile.damage * TrueBiomeBlade.HolyAttunement_MonolithDamage), 10f, Owner.whoAmI, Main.rand.Next(4), monolithScale, target.whoAmI); + } } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs index dee46f1586..d2ada56839 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs @@ -18,9 +18,10 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith"; public Player Owner => Main.player[Projectile.owner]; + public NPC Target => Main.npc[(int)Projectile.ai[2]]; public float Timer => (100f - Projectile.timeLeft) / 100f; - public ref float Variant => ref Projectile.ai[0]; //Yes - public ref float WaitTimer => ref Projectile.ai[1]; //How long till it appears fr + public ref float Variant => ref Projectile.ai[0]; + public ref float Scale => ref Projectile.ai[1]; public const float BaseWidth = 90f; public const float BaseHeight = 420f; @@ -37,9 +38,6 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -48,6 +46,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.timeLeft = 102; + Projectile.scale = Scale; Projectile.usesIDStaticNPCImmunity = true; Projectile.idStaticNPCHitCooldown = 10; Projectile.hide = true; @@ -78,6 +77,16 @@ namespace CalamityMod.Projectiles.Melee } } + // Constantly follow its target + // Die if its target is no longer active + if (!Target.active) + { + Projectile.Kill(); + return; + } + else + Projectile.Center = Target.Center; + if (Projectile.timeLeft == 80) { Vector2 particleDirection = (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2(); @@ -108,7 +117,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); @@ -125,7 +134,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs index 9c6c385221..f5bb85666d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.timeLeft == 60) { SoundEngine.PlaySound(SoundID.Item79, Projectile.Center); - Particle Sparkle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Main.rand.NextBool() ? Color.BurlyWood : Color.Brown, Projectile.scale, 20, 0.2f, 2); + Particle Sparkle = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, Projectile.scale, 20, 0.2f, 2); GeneralParticleHandler.SpawnParticle(Sparkle); } @@ -62,21 +62,21 @@ namespace CalamityMod.Projectiles.Melee { SoundEngine.PlaySound(SoundID.DD2_ExplosiveTrapExplode, Projectile.Center); - BloomRing = new BloomRing(Projectile.Center, Vector2.Zero, Color.Brown, Projectile.scale, 40); + BloomRing = new BloomRing(Projectile.Center, Vector2.Zero, Color.Aqua, Projectile.scale, 40); GeneralParticleHandler.SpawnParticle(BloomRing); - Particle Bloom = new StrongBloom(Projectile.Center, Vector2.Zero, Main.rand.NextBool() ? Color.BurlyWood * 0.6f : Color.Brown * 0.6f, Projectile.scale * (1f + Main.rand.NextFloat(0f, 1.5f)), 20); + Particle Bloom = new StrongBloom(Projectile.Center, Vector2.Zero, Main.rand.NextBool() ? Color.Aqua * 0.6f : Color.SpringGreen * 0.6f, Projectile.scale * (1f + Main.rand.NextFloat(0f, 1.5f)), 20); GeneralParticleHandler.SpawnParticle(Bloom); for (int i = 0; i < 10; i++) { - Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * Projectile.scale, Color.White, Main.rand.NextBool() ? Color.SandyBrown : Color.LimeGreen, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + Particle Sparkle = new CritSpark(Projectile.Center, Main.rand.NextVector2Circular(1f, 1f) * Main.rand.NextFloat(17.5f, 25f) * Projectile.scale, Color.White, Main.rand.NextBool() ? Color.DarkSlateBlue : Color.Chocolate, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); } for (float i = 0f; i < 1; i += 0.05f) { float rotation = i * MathHelper.TwoPi; - Particle Sparkle = new CritSpark(Projectile.Center + rotation.ToRotationVector2() * 65f * Projectile.scale, rotation.ToRotationVector2() * 10f, Color.White, Main.rand.NextBool() ? Color.SaddleBrown : Color.Brown, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); + Particle Sparkle = new CritSpark(Projectile.Center + rotation.ToRotationVector2() * 65f * Projectile.scale, rotation.ToRotationVector2() * 10f, Color.White, Main.rand.NextBool() ? Color.Aqua : Color.SpringGreen, 0.1f + Main.rand.NextFloat(0f, 1.5f), 20 + Main.rand.Next(30), 1, 3f); GeneralParticleHandler.SpawnParticle(Sparkle); } } diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.png index bc29ed731e42743974f21c23bf8c801f5c470768..55dd6345b9849b755cf464bedbf545d34c7c5d89 100644 GIT binary patch literal 5794 zcmbVQd0diNzjx|wDx2)J)Rxh_Q?FC*O}XSsmPBbT$d;g3GnomwBrfGf+2T#hrbVq> z!zBa-Q*jL`oi6I; zL?f3`@$)gs@&(xfdroSL>))H^@i%zh`|SD6u!S1SrJtNt{@3S3e6Yt;cycv20Hx1@P5QMG#&pwK(+7j;C+${d$h|C18Iy+&K{?`H4+ z+z%}s6C3}B07qSjV`_M?#aBGp;@#oa&A25k--F0?E~b;@(d;cr75cR|XdB&-Avf;T z)D%)ixQaGaE(EjycHnoehvQZSjU z;U3@XCki({KVXuw6E&yWdHAuRBm_M2d9U-IqZW)q>EiOT3BAlU#-_W|V=05a z89$GoDv^G61pOF8iP(4WqPEByt~Oyv@)-0uT|I#B9@O?t#}aXHla{fZw<(q*0nwNB zDSeDK2Hm~>>^^@&H?wXUTg=sf2z%^r)mS#fn95Q?Zfe?h1i$4n2SvtU=xENN8G@Ni zph^Za=?wiq67Drc4K094zC^YteY+2+7iN8XHS4!E7qBn$U{`1xPbw=4PlOj0Ut%Q( z>1VEKTE9@jbT?_A|EFs~qXJ~t@QFAm`kLz#Z{fN^x_iH~m`z+C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@inLJm z9-0DicEvf`){aaRRl%w_5ok^KhevEQlL+7!y9faxCMMql&7Y*6UTabotw66G!{Fq)+n z#h0k_d&05XS}9P<348i(m?CViJR<3`bgQgC5#%bRt_9qi~#&_Vo0!pVig>Xv4ZmtO29 zIZsS-sD(R6aG6s&z6ijA{SmCerW$a}E8WWaSfg+45F7t; zbepC8OlnyPn|7@$2o!nUiPqk#!7+8?9%n0XzVgfU7b3rt3`;?Q@k;?xy?>6BH~ovE z%F-*kuvQ3`eRcC6 z6R9qRrtMNF;=X5UWLkhan?(bHB%Gd9UFPH?zVBSbO<*Tu~`Mxjq=1pddW7lgmJr+%U&Wm7vJuAUhXDc1U@U{+@0}png}H7h5YF#)zWM>@j>kEDgN_=vZ&XGsroU?Jpo%B*^ciPj@K;fa$m#7{gdhc|&u5s05$ zC%Y-9CzJV$MUQVY!RN%n+p%F|cdeEe+rh%dc0cmyRCv+_?wqrbyIOt&<5(;9=JNhS z_gl~By`t%>XKrEkz6T3UKPQrnvWq-E6C^gq*z)Ntc-Z?UJOOKCqmytk!?^ zv2)C8uJR|0Xd(S1Hq4Lmau|MivSj-olS2;aPhS2>4*4ys{HWDbOZjpsxCT6`cy9tSgK6Hd&1plvb0+*xH zgwdeHdF0HKO7p-l3lx1kZ-=`c&jR%gj_wtJL>;%U_Y2;ji&Q>svNCGz9B$RC%SIrc zk)`k1G&XbAMT*6ST+v90Jjm?if8dHB&&%?Zx6b&gA 0f && snapTimer < 0.04f) - { - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, direction, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_MonolithDamageMult), Projectile.knockBack, Owner.whoAmI, Main.rand.Next(4), 1f, hasMadeChargeSound); - if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) - { - monolith.OriginDirection = direction; - monolith.Facing = 0f; - } - } } //Make the owner look like theyre holding the sword bla bla @@ -223,6 +213,23 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (CurrentState == 1f && !CalamityUtils.AnyProjectiles(ProjectileType())) + { + float monolithScale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); + Vector2 monolithDirection = -Vector2.UnitY.RotatedByRandom(MathHelper.Pi / 10f); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, monolithDirection, ProjectileType(), (int)(Projectile.damage * OmegaBiomeBlade.WhirlwindAttunement_MonolithDamageMult), Projectile.knockBack, Owner.whoAmI, Main.rand.Next(4), 1f, hasMadeChargeSound); + if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) + { + monolith.Scale = monolithScale; + monolith.OriginDirection = monolithDirection; + monolith.Facing = 0f; + monolith.Target = target; + } + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (CurrentState == 1f) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs index 2098858de1..7e8f5a7680 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs @@ -21,10 +21,12 @@ namespace CalamityMod.Projectiles.Melee public override string Texture => "CalamityMod/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith"; public Player Owner => Main.player[Projectile.owner]; public float Timer => (100f - Projectile.timeLeft) / 100f; - public ref float Variant => ref Projectile.ai[0]; //Yes - public ref float Size => ref Projectile.ai[1]; //Yes - public Vector2 OriginDirection; //The direction of the original strike - public float Facing; //The direction of the original strike + public ref float Variant => ref Projectile.ai[0]; + public ref float Size => ref Projectile.ai[1]; + public float Scale; // The scale multiplier based on the target's size + public Vector2 OriginDirection; // The direction of the original strike + public float Facing; // The direction of the original strike + public NPC Target; // The NPC to stick on top of public const float BaseWidth = 90f; public const float BaseHeight = 420f; @@ -41,9 +43,6 @@ namespace CalamityMod.Projectiles.Melee public CurveSegment Hold = new CurveSegment(EasingType.ExpOut, 0.70f, 1f, -0.1f); internal float Height() => PiecewiseAnimation(Timer, new CurveSegment[] { Anticipate, Overextend, Unextend, Hold }) * BaseHeight * Size; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -52,6 +51,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.penetrate = -1; Projectile.timeLeft = 102; + Projectile.scale = Scale; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 20; Projectile.hide = true; @@ -76,6 +76,14 @@ namespace CalamityMod.Projectiles.Melee Projectile.velocity = Vector2.Zero; } + if (!Target.active) + { + Projectile.Kill(); + return; + } + else + Projectile.Center = Target.Center; + if (Projectile.timeLeft == 100) { if (Size >= 1) //Big monoliths create sparkles even before sprouting up @@ -128,12 +136,14 @@ namespace CalamityMod.Projectiles.Melee public void SideSprouts(float facing, float projSize) { - Vector2 monolithRotation = OriginDirection.RotatedBy((MathHelper.Pi / 6f) * facing); + Vector2 monolithRotation = OriginDirection.RotatedBy(MathHelper.Pi / 9.5f * facing); Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, monolithRotation, ProjectileType(), Projectile.damage, 10f, Owner.whoAmI, Main.rand.Next(4), projSize, Projectile.ai[2] - 1f); if (proj.ModProjectile is SwordsmithsPrideMonolith monolith) { + monolith.Scale = Scale; monolith.OriginDirection = monolithRotation; monolith.Facing = facing; + monolith.Target = Target; } } @@ -152,7 +162,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); @@ -169,7 +179,7 @@ namespace CalamityMod.Projectiles.Melee float drawAngle = Projectile.rotation; Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); - Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight); + Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); From f9c3b9473011fd0f71f332659f646a0914f5bbe8 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 1 Sep 2024 21:04:08 -0400 Subject: [PATCH 15/35] Two more feedback changes * Swordsmith's Pride passive now makes attacks spawn homing astral bombers instead of making attacks inflict Astral Infection * Andromeda's Stride chargeup stars are now aimed in a spread forward, with delayed homing --- DataStructures/Attunement.cs | 13 +- Items/Weapons/Melee/OmegaBiomeBlade.cs | 2 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 2 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 + Projectiles/Melee/GalaxiaBolt.cs | 3 +- Projectiles/Melee/Galaxia_AndromedasStride.cs | 6 +- .../Galaxia_AndromedasStrideBoltSpawner.cs | 1 - .../Melee/TrueBiomeBlade_EarthenTides.cs | 3 - .../Melee/TrueBiomeBlade_EarthenTidesBeam.cs | 6 - .../Melee/TrueBiomeBlade_EarthenTidesBlast.cs | 6 - .../TrueBiomeBlade_EarthenTidesShockwave.cs | 6 - .../Melee/TrueBiomeBlade_GhastlyChain.cs | 6 - ...TrueBiomeBlade_LamentationsOfTheChained.cs | 3 - .../Melee/TrueBiomeBlade_SanguineFury.cs | 7 +- .../Melee/TrueBiomeBlade_SanguineFuryDash.cs | 6 - .../Melee/TrueBiomeBlade_SanguineFuryWheel.cs | 8 -- ...BiomeBlade_SwordsmithsPrideAstralBomber.cs | 122 ++++++++++++++++++ Projectiles/Summon/AureusBomberGlow.png | Bin 0 -> 696 bytes 18 files changed, 140 insertions(+), 61 deletions(-) create mode 100644 Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralBomber.cs create mode 100644 Projectiles/Summon/AureusBomberGlow.png diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 2307e19427..4cbac05222 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -460,12 +460,15 @@ namespace CalamityMod.DataStructures public override void PassiveEffect(Player player, IEntitySource source, ref int UseTimer, ref bool Procced, Projectile projectile = null) { - // CIT 15JUL2024: Swordsmith's Pride no longer applies its passive effect using this function, since it requires an NPC argument. - // It is now applied using the RealPassiveEffect function below. - // This implentation is admittedly kinda clunky, but oh well. - } + if (Procced) + { + int damage = (int)player.GetTotalDamage().ApplyTo(OmegaBiomeBlade.WhirlwindAttunement_PassiveBaseDamage); + Vector2 velocity = (Main.MouseWorld - player.Center).SafeNormalize(Vector2.UnitX) * 15f; + Projectile.NewProjectile(source, player.Center, velocity, ProjectileType(), damage, 0f, player.whoAmI); - public static void RealPassiveEffect(NPC target) => target.AddBuff(BuffType(), 90); + Procced = false; + } + } } public class FlailBladeAttunement : Attunement diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index fc65aea889..3deb216156 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float WhirlwindAttunement_ThrowDamageBoost = 3.3f; public static float WhirlwindAttunement_MonolithDamageMult = 0.5f; - public static int WhirlwindAttunement_PassiveBaseDamage = 200; + public static int WhirlwindAttunement_PassiveBaseDamage = 80; public static int SuperPogoAttunement_BaseDamage = 200; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 661dce6473..9665c578f1 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -100,7 +100,7 @@ WhirlwindAttunement: { Once swung for long enough, releasing hurls the sword towards your cursor Once pulled back, the hurled sword erupts into astral monoliths ''' - PassiveDesc: All attacks inflict the Astral Infection debuff + PassiveDesc: Striking enemies occasionally spawns homing astral bombers that spread the Astral Infection } FlailBladeAttunement: { diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 034a060b36..0d27023e3e 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -249,6 +249,7 @@ StygianShieldThrown.DisplayName: Shield of Chaos SulphurousGrabberBubble.DisplayName: Grabber Bubble SulphurousGrabberBubble2.DisplayName: Grabber Bubble SwordsmithsPride.DisplayName: Swordsmith's Pride +SwordsmithsPrideAstralBomber.DisplayName: Swordsmith's Astral Bomber SwordsmithsPrideAstralEnergy.DisplayName: Swordsmith's Astral Energy SwordsmithsPrideMonolith.DisplayName: Swordsmiths Pride Monolith SwordsplosionBlue.DisplayName: Blue Sword diff --git a/Projectiles/Melee/GalaxiaBolt.cs b/Projectiles/Melee/GalaxiaBolt.cs index 1e9c160c2b..2a449495e2 100644 --- a/Projectiles/Melee/GalaxiaBolt.cs +++ b/Projectiles/Melee/GalaxiaBolt.cs @@ -16,6 +16,7 @@ namespace CalamityMod.Projectiles.Melee public ref float Hue => ref Projectile.ai[0]; public ref float HomingStrenght => ref Projectile.ai[1]; + public ref float ShouldDelayHoming => ref Projectile.ai[2]; Particle Head; @@ -55,7 +56,7 @@ namespace CalamityMod.Projectiles.Melee if (target == null) target = Projectile.Center.ClosestNPCAt(812f, true); - else if (CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver2) //Home in + else if (CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver2 && (ShouldDelayHoming != 1f || Projectile.timeLeft < 60)) //Home in { float idealDirection = Projectile.AngleTo(target.Center); float updatedDirection = Projectile.velocity.ToRotation().AngleTowards(idealDirection, HomingStrenght); diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 109659d94a..83953994bc 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -115,7 +115,8 @@ namespace CalamityMod.Projectiles.Melee // Spawn a ring of stars for (int i = 0; i < 5; i++) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 5f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); + Vector2 velocity = direction.RotatedByRandom(MathHelper.PiOver4) * 10f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, velocity, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f, 1f); } SoundEngine.PlaySound(SoundID.Item79, Projectile.Center); @@ -146,7 +147,8 @@ namespace CalamityMod.Projectiles.Melee // Spawn more stars for (int i = 0; i < 9; i++) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, (MathHelper.TwoPi * i / 9f).ToRotationVector2() * 10f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f); + Vector2 velocity = direction.RotatedByRandom(MathHelper.PiOver4) * 10f; + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, velocity, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.AndromedaAttunement_ChargeupBoltDamageMultiplier), 0f, Owner.whoAmI, 0.75f, MathHelper.Pi * 0.02f, 1f); } OverCharge = 20f; diff --git a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs index c0a6677e0f..00b06171b7 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStrideBoltSpawner.cs @@ -81,7 +81,6 @@ namespace CalamityMod.Projectiles.Melee Vector2 starVel = (Projectile.Center - starPos).SafeNormalize(Vector2.UnitY) * 27f; Projectile star = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), starPos, starVel, ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI, 0.75f, MathHelper.Pi / 20f); star.scale = 2f; - star.timeLeft = 100; } } diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs index 573dec4b77..8431177f0b 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTides.cs @@ -226,9 +226,6 @@ namespace CalamityMod.Projectiles.Melee // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. Owner.GiveUniversalIFrames(OmegaBiomeBlade.ShockwaveAttunement_DashHitIFrames); - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - if (!CalamityUtils.AnyProjectiles(ProjectileType())) Projectile.NewProjectile(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * 0.5f), 0f, Owner.whoAmI, 1f); } diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs index f3ef2eb8f9..8ab9d6e068 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs @@ -128,12 +128,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_SwordBeamProc) diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs index cb57a97185..843cd4effd 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBlast.cs @@ -51,12 +51,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_BlastProc) diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs index f5bb85666d..aa5ad1ce0d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesShockwave.cs @@ -87,12 +87,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.ShockwaveAttunement_ShockwaveProc) diff --git a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs index b763216a2c..7c61988cce 100644 --- a/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs +++ b/Projectiles/Melee/TrueBiomeBlade_GhastlyChain.cs @@ -57,12 +57,6 @@ namespace CalamityMod.Projectiles.Melee sword.OnHitProc = true; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } - public override bool PreDraw(ref Color lightColor) { Texture2D chainTex = Request("CalamityMod/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChainedChain").Value; diff --git a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs index 70ad3324fe..2b388cda7d 100644 --- a/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs +++ b/Projectiles/Melee/TrueBiomeBlade_LamentationsOfTheChained.cs @@ -117,9 +117,6 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - if (hit.Crit) { SoundEngine.PlaySound(CommonCalamitySounds.SwiftSliceSound, Projectile.Center); diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index 4b580a3548..17f2ad2f16 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -242,12 +242,7 @@ namespace CalamityMod.Projectiles.Melee modifiers.SourceDamage *= damageMultiplier * damageReduction; } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - ShredTarget(); - if (Owner.HeldItem.ModItem is OmegaBiomeBlade sword && sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => ShredTarget(); public override void OnHitPlayer(Player target, Player.HurtInfo info) => ShredTarget(); private void ShredTarget() diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs index c744402dbe..51944ea35a 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryDash.cs @@ -20,9 +20,6 @@ namespace CalamityMod.Projectiles.Melee public Vector2 DashStart; public Vector2 DashEnd; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -48,9 +45,6 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_DashProc) sword.OnHitProc = true; - - if (sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); } Particle bloom = new StrongBloom(target.Center, target.velocity, Color.Crimson * 0.5f, 1f, 30); diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs index 37098ad43d..278a8a8158 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFuryWheel.cs @@ -25,11 +25,6 @@ namespace CalamityMod.Projectiles.Melee public const float MaxTime = 120; - - - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -89,9 +84,6 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_WheelProc) sword.OnHitProc = true; - - if (sword.secondaryAttunement.id == AttunementID.Whirlwind) - WhirlwindAttunement.RealPassiveEffect(target); } } diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralBomber.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralBomber.cs new file mode 100644 index 0000000000..595e5117e2 --- /dev/null +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideAstralBomber.cs @@ -0,0 +1,122 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class SwordsmithsPrideAstralBomber : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/Summon/AureusBomber"; + + public Player Owner => Main.player[Projectile.owner]; + + public override void SetStaticDefaults() + { + Main.projFrames[Type] = 3; + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 3; + ProjectileID.Sets.TrailingMode[Projectile.type] = 0; + } + + public override void SetDefaults() + { + Projectile.width = Projectile.height = 60; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Melee; + Projectile.timeLeft = 240; + Projectile.tileCollide = false; + } + + public override void AI() + { + // Animation and visuals. + Projectile.frameCounter++; + if (Projectile.frameCounter > 6) + { + Projectile.frame++; + Projectile.frameCounter = 0; + if (Projectile.frame >= 3) + Projectile.frame = 0; + } + Lighting.AddLight(Projectile.Center, Color.Lerp(Color.Orange, Color.Cyan, (float)Math.Sin(Main.GlobalTimeWrappedHourly)).ToVector3()); + if (Projectile.timeLeft % 10 == 0) + { + Vector2 sparklePos = new Vector2(Projectile.position.X + Main.rand.Next(Projectile.width), Projectile.position.Y + Main.rand.Next(Projectile.height)); + GenericSparkle sparkle = new(sparklePos, Vector2.Zero, Main.rand.NextBool() ? Color.Orange : Color.Cyan, Color.White, 0.9f, 30, 0f); + GeneralParticleHandler.SpawnParticle(sparkle); + } + + // Find the closest target. + Vector2 destination = Projectile.Center; + bool foundTarget = false; + float npcDistCompare = 400f; + int index = -1; + + foreach (NPC n in Main.ActiveNPCs) + { + if (!n.CanBeChasedBy(Projectile, false)) + continue; + + float currentNPCDist = Vector2.Distance(n.Center, Projectile.Center); + if (currentNPCDist < npcDistCompare) + { + npcDistCompare = currentNPCDist; + index = n.whoAmI; + } + } + if (index != -1) + { + destination = Main.npc[index].Center; + foundTarget = true; + } + + // Homing and facing direction. + if (foundTarget) + { + Vector2 homeDirection = (destination - Projectile.Center).SafeNormalize(Vector2.UnitY); + Projectile.velocity = (Projectile.velocity * 20f + homeDirection * 15f) / 21f; + if ((destination - Projectile.Center).X > 0f) + Projectile.spriteDirection = Projectile.direction = -1; + else + Projectile.spriteDirection = Projectile.direction = 1; + } + else + { + if (Projectile.velocity.X > 0f) + Projectile.spriteDirection = Projectile.direction = -1; + else if (Projectile.velocity.X < 0f) + Projectile.spriteDirection = Projectile.direction = 1; + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 90); + + public override void OnKill(int timeLeft) + { + for (int i = 0; i < 9; i++) + { + Vector2 veloc = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(3.5f, 6f); + LineParticle sparks = new(Projectile.Center, veloc, false, 16, 0.8f, Main.rand.NextBool() ? Color.Orange : Color.Cyan); + GeneralParticleHandler.SpawnParticle(sparks); + } + } + + public override bool PreDraw(ref Color lightColor) + { + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1); + return false; + } + + public override void PostDraw(Color lightColor) + { + Texture2D glow = ModContent.Request("CalamityMod/Projectiles/Summon/AureusBomberGlow").Value; + Rectangle frame = glow.Frame(1, 3, 0, Projectile.frame); + Main.EntitySpriteDraw(glow, Projectile.Center - Main.screenPosition, frame, Color.White, 0f, frame.Size() / 2f, 1f, SpriteEffects.None); + } + } +} diff --git a/Projectiles/Summon/AureusBomberGlow.png b/Projectiles/Summon/AureusBomberGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..1faa9ff87dbf4225c1e94aca186b2b66031abdbf GIT binary patch literal 696 zcmV;p0!RIcP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0!>LoK~#8N?V7(Y z1VI$Xcj@R(BT?`tD78++A3%o_Duqr*t<))0B!`YaK*VX4{san%L|jKF%X_!)a^4y< zYsc8P`##BJc8bf*eedo2H4`bGiPJe4d-K~#`iSga?K|yZD4i7>*UhB_M!Ga2M$wFY zysR$buWKxf;yPYw2eD&P^>%m?*W7l+DB9m>a@tB@G}>DcjL?9RFgC~Uad70>Xp-D~ zdGorh1DwZBE`r!7LGQ@jWAAI{I_LNxU(q<84XPwTiW2mX3RLv-jZYtuQ2vu3Kib?F z!FBiY6=!jZ8aL`1gM9%?qMFO=y}^*DDA)wq1u#94;P`96+n~o`N`fCHUkb>3>k0n$ zcaGk0rU>C1?!Tk6W1P6xk*g@dBLs2yG=;Nktz(1!L7U%}uP8xPqWbz(i$O{Q$0D@ypTVyl;r@?KDAv<03zx?C`5Tj^+ zqogF*;D6cSPsmfW?15^4K%Oh8qOOq7+*y0ZwW-&oirO&cv!<-8K8p7Hso(V7 zk+k1wqdwg{8<~zV$DnB5+N#EidQy;6Uq5O(9WII(MHNM<8@YWP?_$_a^oXJ-d)0|d zT*17G(C6vCovEK{%LVEi>s>L`OjIfGyMd}`UQCq&-4Rqp^OC7%*=-%oM-@dWDH%WN zdiyXmawC&#cg~l>uKBL~Sa0nl6Nc^`F?eqp7`(R(xSqRKFMBd(aSBxlnVy)Se eq9~;#iar2kb`Y&Uc5{RP0000 Date: Mon, 2 Sep 2024 20:26:49 -0400 Subject: [PATCH 16/35] I hate custom use style melee Oh I also did actual things as well: * Removed Grovetender's Touch from BBB * Removed specific attunement classification for sea biomes (they now attune into Pure Clarity) * Space now attunes into Biting Embrace * Reorganized the structure of bools for granting attunements --- CalamityLists.cs | 2 +- DataStructures/Attunement.cs | 41 +-- Items/Weapons/Melee/BrokenBiomeBlade.cs | 17 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 9 - .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 + Projectiles/Melee/BiomeBladeHoldout.cs | 22 +- Projectiles/Melee/BrokenBiomeBladeHoldout.cs | 19 +- .../BrokenBiomeBlade_GrovetendersTouch.cs | 248 ------------------ .../Melee/BrokenBiomeBlade_PureClarity.cs | 153 +++++++++++ Projectiles/Melee/TrueBiomeBladeHoldout.cs | 23 +- 10 files changed, 190 insertions(+), 345 deletions(-) delete mode 100644 Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs create mode 100644 Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs diff --git a/CalamityLists.cs b/CalamityLists.cs index d01e70294c..cb46dd77c2 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -807,10 +807,10 @@ namespace CalamityMod ProjectileType(), ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 4cbac05222..a88486d14d 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -14,7 +14,7 @@ namespace CalamityMod.DataStructures { public enum AttunementID : byte { - Default, Hot, Cold, Tropical, Evil, //Broken biome blade + Default, Hot, Cold, Evil, //Broken biome blade TrueDefault, TrueHot, TrueCold, TrueTropical, TrueEvil, Holy, //Biome blade Whirlwind, FlailBlade, SuperPogo, Shockwave, //True biome blade Phoenix, Aries, Polaris, Andromeda //Galaxia @@ -28,7 +28,7 @@ namespace CalamityMod.DataStructures public static void Load() { attunementArray = new Attunement[] { - new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new TropicalAttunement(), new EvilAttunement(), + new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new EvilAttunement(), new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new WhirlwindAttunement(), new FlailBladeAttunement(), new SuperPogoAttunement(), new ShockwaveAttunement(), new PhoenixAttunement(), new AriesAttunement(), new PolarisAttunement(), new AndromedaAttunement(), @@ -98,13 +98,13 @@ namespace CalamityMod.DataStructures public override void ApplyStats(Item item) { - item.channel = false; - item.noUseGraphic = false; - item.useStyle = ItemUseStyleID.Swing; - item.shoot = ProjectileType(); + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Shoot; + item.shoot = ProjectileType(); item.shootSpeed = 12f; - item.UseSound = SoundID.Item1; - item.noMelee = false; + item.UseSound = null; + item.noMelee = true; } } public class HotAttunement : Attunement @@ -178,31 +178,6 @@ namespace CalamityMod.DataStructures } } - public class TropicalAttunement : Attunement - { - public TropicalAttunement() - { - id = AttunementID.Tropical; - tooltipColor = new Color(162, 200, 85); - - energyParticleEdgeColor = new Color(53, 112, 4); - energyParticleCenterColor = new Color(131, 173, 39); - } - - public override float DamageMultiplier => BrokenBiomeBlade.TropicalAttunement_BaseDamage / (float)BrokenBiomeBlade.BaseDamage; - - public override void ApplyStats(Item item) - { - item.channel = false; - item.noUseGraphic = true; - item.useStyle = ItemUseStyleID.Swing; - item.shoot = ProjectileType(); - item.shootSpeed = 30; - item.UseSound = null; - item.noMelee = true; - } - } - public class EvilAttunement : Attunement { public EvilAttunement() diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index ebd82fb459..a45c00e5ac 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using CalamityMod.DataStructures; +using CalamityMod.Items.BaseItems; using CalamityMod.Items.Materials; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; @@ -20,7 +21,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Items.Weapons.Melee { [LegacyName("BiomeBlade")] - public class BrokenBiomeBlade : ModItem, ILocalizedModType + public class BrokenBiomeBlade : CustomUseProjItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; public Attunement mainAttunement = null; @@ -47,18 +48,8 @@ namespace CalamityMod.Items.Weapons.Melee public static int HotAttunement_LocalIFrames = 40; //Be warned its got one extra update so all the iframes should be divided in 2 public static int HotAttunement_LocalIFramesCharged = 25; public static float HotAttunement_ShredDecayRate = 1f; //How much charge is lost per frame. - - public static int TropicalAttunement_BaseDamage = 65; - public static float TropicalAttunement_ChainDamageReduction = 0.6f; - public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.2f; //It also crits, so be mindful of that - public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 #endregion - public override void SetStaticDefaults() - { - //Theres potential for flavor text as well but im not a writer - } - public override void ModifyTooltips(List list) { if (list == null) @@ -261,8 +252,8 @@ namespace CalamityMod.Items.Weapons.Melee { bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None; return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || - n.type == ProjectileType() || + (n.type == ProjectileType() || + n.type == ProjectileType() || n.type == ProjectileType())); } diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 9665c578f1..4e218e340c 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -18,15 +18,6 @@ ColdAttunement: { Function: Perform a 3 strike combo with a glacial blade, with the final strike freezing foes for a split second } -TropicalAttunement: { - Name: Grovetender's Touch - Function: - ''' - Throw out the blade on a vine whip, pulling you toward struck tiles - Striking enemies with the tip of the whip as it cracks guarantees a critical hit - ''' -} - EvilAttunement: { Name: Decay's Retort Function: Lunge forward with a ghostly rapier projection, bouncing away from struck targets and leeching their life diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 0d27023e3e..8c7e1291b3 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -199,6 +199,7 @@ PrismaticBeam.DisplayName: Prismatic Beam PrismaticWave.DisplayName: Prismatic Wave PrismRay.DisplayName: Prismatic Light PrismTooth.DisplayName: Photon Ripper +PureClarity.DisplayName: Pure Clarity PurityProjection.DisplayName: Purity Projection PurityProjectionSigil.DisplayName: Purity Sigil PwnagehammerEcho.DisplayName: Pwnagehammer Echo diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index 4bfba69445..9b1bc95342 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -117,25 +117,23 @@ namespace CalamityMod.Projectiles.Melee public void Attune(TrueBiomeBlade item) { - bool jungle = Owner.ZoneJungle; - bool snow = Owner.ZoneSnow; - bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert || Owner.Calamity().ZoneSunkenSea; - bool hell = Owner.ZoneUnderworldHeight; - bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur || Owner.Calamity().ZoneAbyss; - bool heavenly = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; + bool jungleAttune = Owner.ZoneJungle; + bool coldAttune = Owner.ZoneSnow || Owner.ZoneSkyHeight; + bool evilAttune = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool hotAttune = Owner.ZoneDesert || Owner.ZoneUnderworldHeight; + bool heavenlyAttune = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; Attunement attunement = Attunement.attunementArray[(int)AttunementID.TrueDefault]; - if (desert || hell) + if (hotAttune) attunement = Attunement.attunementArray[(int)AttunementID.TrueHot]; - if (snow) + if (coldAttune) attunement = Attunement.attunementArray[(int)AttunementID.TrueCold]; - if (jungle || ocean) + if (jungleAttune) attunement = Attunement.attunementArray[(int)AttunementID.TrueTropical]; - if (evil) + if (evilAttune) attunement = Attunement.attunementArray[(int)AttunementID.TrueEvil]; - if (heavenly) + if (heavenlyAttune) attunement = Attunement.attunementArray[(int)AttunementID.Holy]; //If the owner already had the attunement, break out of it (And unswap) diff --git a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs index 74e88f0315..1cf5493bf4 100644 --- a/Projectiles/Melee/BrokenBiomeBladeHoldout.cs +++ b/Projectiles/Melee/BrokenBiomeBladeHoldout.cs @@ -119,28 +119,21 @@ namespace CalamityMod.Projectiles.Melee public void Attune(BrokenBiomeBlade item) { - bool jungle = Owner.ZoneJungle; - bool snow = Owner.ZoneSnow; - bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert || Owner.Calamity().ZoneSunkenSea; - bool hell = Owner.ZoneUnderworldHeight; - bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur || Owner.Calamity().ZoneAbyss; + bool coldAttune = Owner.ZoneSnow || Owner.ZoneSkyHeight; + bool evilAttune = Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool hotAttune = Owner.ZoneDesert || Owner.ZoneUnderworldHeight; Attunement attunement = Attunement.attunementArray[(int)AttunementID.Default]; - if (desert || hell) + if (hotAttune) { attunement = Attunement.attunementArray[(int)AttunementID.Hot]; } - if (snow) + if (coldAttune) { attunement = Attunement.attunementArray[(int)AttunementID.Cold]; } - if (jungle || ocean) - { - attunement = Attunement.attunementArray[(int)AttunementID.Tropical]; - } - if (evil) + if (evilAttune) { attunement = Attunement.attunementArray[(int)AttunementID.Evil]; } diff --git a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs deleted file mode 100644 index 0490a4ad6e..0000000000 --- a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using System.IO; -using CalamityMod.DataStructures; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; -using static Terraria.ModLoader.ModContent; - - -namespace CalamityMod.Projectiles.Melee -{ - public class GrovetendersTouch : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade"; - private bool initialized = false; - public Player Owner => Main.player[Projectile.owner]; - public float Timer => MaxTime - Projectile.timeLeft; - public ref float HasSnapped => ref Projectile.ai[0]; - public ref float SnapCoyoteTime => ref Projectile.ai[1]; - public ref float Reach => ref Projectile.localAI[0]; - - const float MaxTime = 90; - const int coyoteTimeFrames = 15; //How many frames does the whip stay extended - const int MaxReach = 450; - const int MinReach = 250; - const float SnappingPoint = 0.65f; //When does the snap occur. - - public BezierCurve curve; - private Vector2 controlPoint1; - private Vector2 controlPoint2; - internal bool ReelingBack => Timer / MaxTime > SnappingPoint; - - public override void SetStaticDefaults() - { - } - public override void SetDefaults() - { - Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 40; - Projectile.tileCollide = false; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.extraUpdates = 2; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = BrokenBiomeBlade.TropicalAttunement_LocalIFrames; - } - - public override bool? CanCutTiles() => false; //Itd be quite counterproductive to make the whip cut the tiles it just grew - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, Projectile.Center }); - - int numPoints = 32; - Vector2[] chainPositions = curve.GetPoints(numPoints).ToArray(); - float collisionPoint = 0; - for (int i = 1; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - Vector2 previousPosition = chainPositions[i - 1]; - if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), position, previousPosition, 6, ref collisionPoint)) - return true; - } - return base.Colliding(projHitbox, targetHitbox); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - base.ModifyHitNPC(target, ref modifiers); - Vector2 projectileHalfLength = (Projectile.Size / 2f) * Projectile.rotation.ToRotationVector2(); - float collisionPoint = 0; - //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit & get some bonus damage - if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), Projectile.Center - projectileHalfLength, Projectile.Center + projectileHalfLength, 32, ref collisionPoint)) - { - if (SnapCoyoteTime > 0f) - { - modifiers.SourceDamage *= BrokenBiomeBlade.TropicalAttunement_SweetSpotDamageMultiplier; - modifiers.SetCrit(); - for (int i = 0; i < 3; i++) - { - Vector2 sparkSpeed = Owner.DirectionTo(target.Center).RotatedBy(Main.rand.NextFloat(-MathHelper.PiOver2, MathHelper.PiOver2)) * 9f; - Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.LimeGreen, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); - GeneralParticleHandler.SpawnParticle(Spark); - } - } - } - else - modifiers.SourceDamage *= BrokenBiomeBlade.TropicalAttunement_ChainDamageReduction; //If the enemy is hit with the chain of the whip, the damage gets reduced - } - - public override void AI() - { - if (!initialized) //Initialization. create control points & shit - { - Projectile.velocity = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - Reach = MathHelper.Clamp((Owner.Center - Owner.Calamity().mouseWorld).Length(), MinReach, MaxReach); - SoundEngine.PlaySound(SoundID.DD2_OgreSpit, Projectile.Center); - controlPoint1 = Projectile.Center; - controlPoint2 = Projectile.Center; - Projectile.timeLeft = (int)MaxTime; - initialized = true; - Projectile.netUpdate = true; - Projectile.netSpam = 0; - } - - if (ReelingBack && HasSnapped == 0f) //Snap & also small coyote time for the hook - { - SoundEngine.PlaySound(SoundID.Item41, Projectile.Center); //Snap - HasSnapped = 1f; - SnapCoyoteTime = coyoteTimeFrames; - } - - if (SnapCoyoteTime > 0) - { - Lighting.AddLight(Projectile.Center, 0.8f, 1f, 0.35f); - SnapCoyoteTime--; - } - - Owner.ChangeDir(Math.Sign(Projectile.velocity.X)); - Projectile.rotation = Projectile.AngleFrom(Owner.Center); //Point away from playah - - float ratio = GetSwingRatio(); - Projectile.Center = Owner.MountedCenter + SwingPosition(ratio); - Projectile.direction = Projectile.spriteDirection = -Owner.direction; - - Owner.itemRotation = MathHelper.WrapAngle(Owner.AngleTo(Owner.Calamity().mouseWorld) - (Owner.direction < 0 ? MathHelper.Pi : 0)); - } - - internal float EaseInFunction(float progress) => progress == 0 ? 0f : (float)Math.Pow(2, 10 * progress - 10); //Potion seller i need your strongest easeIns - - private float GetSwingRatio() - { - float ratio = (Timer - SnappingPoint * MaxTime) / (MaxTime * (1 - SnappingPoint)); //The ratio for the last section of the snap is a new curve. - if (!ReelingBack) - ratio = EaseInFunction(Timer / (MaxTime * SnappingPoint)); //Watch this ratio get eased - if (SnapCoyoteTime > 0) - ratio = 0f; - return ratio; - } - - private Vector2 SwingPosition(float progress) - { - //Whip windup and snap part - if (!ReelingBack) - { - float distance = Reach * MathHelper.Lerp((float)Math.Sin(progress * MathHelper.PiOver2), 1, 0.04f); //half arc - distance = Math.Max(distance, 65); //Dont be too close to player - - float angleDeviation = MathHelper.Pi / 1.2f; - float angleOffset = Owner.direction * MathHelper.Lerp(-angleDeviation, 0, progress); //Go from very angled to straight at the zenith of the attack - return Projectile.velocity.RotatedBy(angleOffset) * distance; - } - else - { - float distance = MathHelper.Lerp(Reach, 0f, progress); //Quickly zip back to the player . No angles or minimum distance from player. - return Projectile.velocity * distance; - } - } - - public override bool PreDraw(ref Color lightColor) - { - if (Timer == 0) - return false; - Texture2D handle = Request("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchBlade").Value; - Texture2D blade = Request("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchGlow").Value; - - Vector2 projBottom = Projectile.Center + new Vector2(-handle.Width / 2, handle.Height / 2).RotatedBy(Projectile.rotation + MathHelper.PiOver4) * 0.75f; - DrawChain(projBottom, out Vector2[] chainPositions); - - float drawRotation = (projBottom - chainPositions[^2]).ToRotation() + MathHelper.PiOver4; //Face away from the last point of the bezier curve - drawRotation += SnapCoyoteTime > 0 ? MathHelper.Pi : 0; //During coyote time the blade flips for some reason. Prevent that from happening - drawRotation += Projectile.spriteDirection < 0 ? 0f : 0f; - - Vector2 drawOrigin = new Vector2(0f, handle.Height); - SpriteEffects flip = (Projectile.spriteDirection < 0) ? SpriteEffects.None : SpriteEffects.None; - lightColor = Lighting.GetColor((int)(Projectile.Center.X / 16f), (int)(Projectile.Center.Y / 16f)); - - Main.EntitySpriteDraw(handle, projBottom - Main.screenPosition, null, lightColor, drawRotation, drawOrigin, Projectile.scale, flip, 0); - - //Turn on additive blending - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - //Only update the origin for once - drawOrigin = new Vector2(0f, blade.Height); - Main.EntitySpriteDraw(blade, projBottom - Main.screenPosition, null, Color.Lerp(Color.White, lightColor, 0.5f) * 0.9f, drawRotation, drawOrigin, Projectile.scale, flip, 0); - //Back to normal - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - - return false; - } - - private void DrawChain(Vector2 projBottom, out Vector2[] chainPositions) - { - Texture2D chainTex = Request("CalamityMod/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouchChain").Value; - - float ratio = GetSwingRatio(); - - if (!ReelingBack) //Make the curve be formed from points slightly ahead of the projectile, but clamped to the max rotation (straight line ahead) - { - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.5f, 0f, 1f)) * 0.2f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Clamp(ratio + 0.2f, 0f, 1f)) * 0.5f; - } - else //After the whip snaps, make the curve be a wave - { - Vector2 perpendicular = SwingPosition(ratio).SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.PiOver2); - controlPoint1 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * -155f; - controlPoint2 = Owner.MountedCenter + SwingPosition(MathHelper.Lerp(ratio, 1f, ratio / 2)) + perpendicular * MathHelper.SmoothStep(0f, 1f, ratio) * 100f; - } - - BezierCurve curve = new BezierCurve(new Vector2[] { Owner.MountedCenter, controlPoint1, controlPoint2, projBottom }); - int numPoints = 30; //"Should make dynamic based on curve length, but I'm not sure how to smoothly do that while using a bezier curve" -Graydee, from the code i referenced. I do agree. - chainPositions = curve.GetPoints(numPoints).ToArray(); - - //Draw each chain segment bar the very first one - for (int i = 1; i < numPoints; i++) - { - Vector2 position = chainPositions[i]; - float rotation = (chainPositions[i] - chainPositions[i - 1]).ToRotation() - MathHelper.PiOver2; //Calculate rotation based on direction from last point - float yScale = Vector2.Distance(chainPositions[i], chainPositions[i - 1]) / chainTex.Height; //Calculate how much to squash/stretch for smooth chain based on distance between points - Vector2 scale = new Vector2(1, yScale); - Color chainLightColor = Lighting.GetColor((int)position.X / 16, (int)position.Y / 16); //Lighting of the position of the chain segment - if (ReelingBack) - chainLightColor *= 1 - EaseInFunction(ratio); //Make the chain fade when reeling it back - Vector2 origin = new Vector2(chainTex.Width / 2, chainTex.Height); //Draw from center bottom of texture - Main.EntitySpriteDraw(chainTex, position - Main.screenPosition, null, chainLightColor, rotation, origin, scale, SpriteEffects.None, 0); - } - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(initialized); - writer.Write(Reach); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - initialized = reader.ReadBoolean(); - Reach = reader.ReadSingle(); - } - } -} diff --git a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs new file mode 100644 index 0000000000..fe61227a00 --- /dev/null +++ b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs @@ -0,0 +1,153 @@ +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class PureClarity : BaseCustomUseStyleProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override int AssignedItemID => ModContent.ItemType(); + public override string Texture => "CalamityMod/Items/Weapons/Melee/BrokenBiomeBlade"; + public override float HitboxOutset => 30f; + public override Vector2 HitboxSize => new Vector2(36, 36); + public override float HitboxRotationOffset => MathHelper.ToRadians(-45); + public override Vector2 SpriteOrigin => new(0, 12); + + public ref float SwingDir => ref Projectile.ai[1]; + public Vector2 mousePos; + public Vector2 aimPos; + public bool doSwing = true; + public bool postSwing = false; + public int useAnimation; + + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.DamageType = DamageClass.Melee; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void OnSpawn(IEntitySource source) + { + SwingDir = 1f; + base.OnSpawn(source); + mousePos = Owner.Calamity().mouseWorld; + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + useAnimation = Owner.itemAnimationMax; + + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + FlipAsSword = Owner.direction == -1 ? true : false; + } + + public override void UseStyle() + { + if (CanHit || postSwing) + mousePos = Owner.Center - aimPos; + else + mousePos = Owner.Calamity().mouseWorld; + + if (!doSwing) + { + for (int i = 0; i < Main.maxNPCs; i++) + Projectile.localNPCImmunity[i] = 0; + + mousePos = Owner.Calamity().mouseWorld; + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + CanHit = false; + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + FlipAsSword = Owner.direction == -1 ? true : false; + doSwing = true; + } + else + { + if (!CanHit && !postSwing) + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + else + Owner.direction = ((Owner.Center - aimPos).X < Owner.Center.X) ? -1 : 1; + Projectile.rotation = Projectile.rotation.AngleLerp(Owner.AngleTo(mousePos) + MathHelper.ToRadians(65f), 0.1f); + + if (AnimationProgress < (useAnimation / 3)) + { + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + CanHit = false; + postSwing = false; + if (AnimationProgress == 0) + { + doSwing = false; + SwingDir = -SwingDir; + } + RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(120f * SwingDir * Owner.direction), 0.2f); + } + else + { + float swingTime = AnimationProgress - (useAnimation / 3); + float swingTimeMax = useAnimation - (useAnimation / 3); + + if (swingTime > (int)(swingTimeMax * 0.2f) && swingTime < (int)(swingTimeMax * 0.85f)) + { + CanHit = true; + + Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); + Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(10, 90), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); + Color particleColor = (Owner.HeldItem.ModItem as BrokenBiomeBlade).mainAttunement.tooltipColor; + if (Main.rand.NextBool()) + { + GenericBloom bloom = new(particlePos, particleVel, particleColor, 0.08f, 20); + GeneralParticleHandler.SpawnParticle(bloom); + } + else + { + GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, 0.55f, 20); + GeneralParticleHandler.SpawnParticle(sparkle); + } + } + else + CanHit = false; + + if (swingTime == (int)(swingTimeMax * 0.4f)) + { + Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * Owner.HeldItem.shootSpeed; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); + } + + RotationOffset = MathHelper.Lerp(RotationOffset, + MathHelper.ToRadians(MathHelper.Lerp(150f * SwingDir * Owner.direction, 120f * -SwingDir * Owner.direction, CalamityUtils.ExpInOutEasing(swingTime / swingTimeMax, 1))), + 0.2f); + + if (swingTime >= swingTimeMax) + doSwing = false; + if (swingTime < (int)(swingTimeMax * 0.7f)) + postSwing = true; + } + } + + ArmRotationOffset = MathHelper.ToRadians(-140f); + } + + 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. + if ((useAnimation > 0 || DrawUnconditionally) && Owner.ItemAnimationActive) + { + Asset tex = ModContent.Request(Texture); + + float r = FlipAsSword ? MathHelper.ToRadians(90) : 0f; + + 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)); + } + return false; + } + + public override void ResetStyle() + { + } + } +} diff --git a/Projectiles/Melee/TrueBiomeBladeHoldout.cs b/Projectiles/Melee/TrueBiomeBladeHoldout.cs index b7510385cf..bf24937c8e 100644 --- a/Projectiles/Melee/TrueBiomeBladeHoldout.cs +++ b/Projectiles/Melee/TrueBiomeBladeHoldout.cs @@ -128,26 +128,17 @@ namespace CalamityMod.Projectiles.Melee public void Attune(OmegaBiomeBlade item) { - bool jungle = Owner.ZoneJungle; - bool snow = Owner.ZoneSnow; - bool evil = Owner.ZoneCorrupt || Owner.ZoneCrimson; - bool desert = Owner.ZoneDesert; - bool hell = Owner.ZoneUnderworldHeight; - bool ocean = Owner.ZoneBeach || Owner.Calamity().ZoneSulphur; - bool heavenly = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; - bool marine = Owner.Calamity().ZoneAbyss || Owner.Calamity().ZoneSunkenSea; + bool flailAttune = Owner.ZoneJungle || Owner.ZoneSnow || Owner.ZoneSkyHeight; + bool pogoAttune = Owner.ZoneDesert || Owner.ZoneUnderworldHeight || Owner.ZoneCorrupt || Owner.ZoneCrimson; + bool whirlAttune = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; Attunement attunement = Attunement.attunementArray[(int)AttunementID.Shockwave]; - if (desert || hell) + if (pogoAttune) attunement = Attunement.attunementArray[(int)AttunementID.SuperPogo]; - if (jungle || ocean || snow) //Check put after the desert check so ocean doesnt get overriden as desert + if (flailAttune) attunement = Attunement.attunementArray[(int)AttunementID.FlailBlade]; - if (evil) //Evil check separated so that it overrides corrupted beach & snow biomes - attunement = Attunement.attunementArray[(int)AttunementID.SuperPogo]; - if (marine) - attunement = Attunement.attunementArray[(int)AttunementID.Shockwave]; - if (heavenly) - attunement = Attunement.attunementArray[(int)AttunementID.Whirlwind]; //Putting holy check at the end so it may override hallowed variants of biomes + if (whirlAttune) + attunement = Attunement.attunementArray[(int)AttunementID.Whirlwind]; //If the owner already had the attunement, break out of it (And unswap) if (item.secondaryAttunement == attunement) From cf1506b4996e65156fb93776de18b6e116af719f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Sep 2024 12:58:04 -0400 Subject: [PATCH 17/35] Fixed it not swinging back and forth Still need to properly align it (this will be annoying) --- Items/Weapons/Melee/BrokenBiomeBlade.cs | 3 +-- Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index a45c00e5ac..eb08776086 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -252,8 +252,7 @@ namespace CalamityMod.Items.Weapons.Melee { bool isRightClicking = player.altFunctionUse != ItemAlternativeFunctionID.None; return !isRightClicking && !Main.projectile.Any(n => n.active && n.owner == player.whoAmI && - (n.type == ProjectileType() || - n.type == ProjectileType() || + (n.type == ProjectileType() || n.type == ProjectileType())); } diff --git a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs index fe61227a00..df34c9d60b 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override int AssignedItemID => ModContent.ItemType(); public override string Texture => "CalamityMod/Items/Weapons/Melee/BrokenBiomeBlade"; - public override float HitboxOutset => 30f; - public override Vector2 HitboxSize => new Vector2(36, 36); + public override float HitboxOutset => 36f; + public override Vector2 HitboxSize => new Vector2(45, 45); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(0, 12); + public override Vector2 SpriteOrigin => new(0, 30); public ref float SwingDir => ref Projectile.ai[1]; public Vector2 mousePos; @@ -130,6 +130,7 @@ namespace CalamityMod.Projectiles.Melee } ArmRotationOffset = MathHelper.ToRadians(-140f); + ArmRotationOffsetBack = MathHelper.ToRadians(-140f); } public override bool PreDraw(ref Color lightColor) From 96a2132d4b006d773274336eff2fd0f31fb8ca45 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Sep 2024 20:32:05 -0400 Subject: [PATCH 18/35] BBB Pure Clarity functionality done This is the first time I've ever used hot reload lol --- DataStructures/Attunement.cs | 2 +- .../Melee/BrokenBiomeBlade_PureClarity.cs | 33 ++++++++----------- .../BrokenBiomeBlade_PurityProjection.cs | 9 ++--- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index a88486d14d..ec9e58b5ff 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -102,7 +102,7 @@ namespace CalamityMod.DataStructures item.noUseGraphic = true; item.useStyle = ItemUseStyleID.Shoot; item.shoot = ProjectileType(); - item.shootSpeed = 12f; + item.shootSpeed = 0f; item.UseSound = null; item.noMelee = true; } diff --git a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs index df34c9d60b..19fe521f4b 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs @@ -3,9 +3,10 @@ using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; +using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee @@ -15,10 +16,10 @@ namespace CalamityMod.Projectiles.Melee public new string LocalizationCategory => "Projectiles.Melee"; public override int AssignedItemID => ModContent.ItemType(); public override string Texture => "CalamityMod/Items/Weapons/Melee/BrokenBiomeBlade"; - public override float HitboxOutset => 36f; - public override Vector2 HitboxSize => new Vector2(45, 45); + public override float HitboxOutset => 50f; + public override Vector2 HitboxSize => new Vector2(48, 48); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); - public override Vector2 SpriteOrigin => new(0, 30); + public override Vector2 SpriteOrigin => new(-5, 40); public ref float SwingDir => ref Projectile.ai[1]; public Vector2 mousePos; @@ -30,6 +31,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { base.SetDefaults(); + Projectile.scale = 1.25f; Projectile.DamageType = DamageClass.Melee; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; @@ -76,6 +78,7 @@ namespace CalamityMod.Projectiles.Melee if (AnimationProgress < (useAnimation / 3)) { + // Swing wind-up. Should not deal damage. aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; CanHit = false; postSwing = false; @@ -95,8 +98,9 @@ namespace CalamityMod.Projectiles.Melee { CanHit = true; + // Particle effects on swing. Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); - Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(10, 90), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); + Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(0, 80), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); Color particleColor = (Owner.HeldItem.ModItem as BrokenBiomeBlade).mainAttunement.tooltipColor; if (Main.rand.NextBool()) { @@ -112,9 +116,11 @@ namespace CalamityMod.Projectiles.Melee else CanHit = false; + // Fire projectiles. if (swingTime == (int)(swingTimeMax * 0.4f)) { - Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * Owner.HeldItem.shootSpeed; + SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); + Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * 12f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); } @@ -129,24 +135,11 @@ namespace CalamityMod.Projectiles.Melee } } + // Make the player's arms rotate. ArmRotationOffset = MathHelper.ToRadians(-140f); ArmRotationOffsetBack = MathHelper.ToRadians(-140f); } - 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. - if ((useAnimation > 0 || DrawUnconditionally) && Owner.ItemAnimationActive) - { - Asset tex = ModContent.Request(Texture); - - float r = FlipAsSword ? MathHelper.ToRadians(90) : 0f; - - 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)); - } - return false; - } - public override void ResetStyle() { } diff --git a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs index cf1ff9c56c..35b530522b 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PurityProjection.cs @@ -10,7 +10,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class PurityProjection : ModProjectile, ILocalizedModType //The boring plain one + public class PurityProjection : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/Melee/BrokenBiomeBlade_PurityProjection"; @@ -56,7 +56,6 @@ namespace CalamityMod.Projectiles.Melee public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); for (int i = 0; i <= 15; i++) { Vector2 displace = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; @@ -66,10 +65,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - int debuffTime = 90; - target.AddBuff(BuffType(), debuffTime); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType(), 90); } } From 3ff9880c94c77b28734fb6f604c858dc68f6eb19 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Sep 2024 21:30:48 -0400 Subject: [PATCH 19/35] Start of BB Pure Clarity Also increased Grovetender's Touch range --- DataStructures/Attunement.cs | 14 +- Items/Weapons/Melee/TrueBiomeBlade.cs | 3 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 + .../MendedBiomeBlade_TrueGrovetendersTouch.cs | 2 +- .../Melee/MendedBiomeBlade_TruePureClarity.cs | 147 ++++++++++++++++++ .../MendedBiomeBlade_TruePurityProjection.cs | 9 +- 6 files changed, 160 insertions(+), 16 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index ec9e58b5ff..55a51bc7f7 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -227,13 +227,13 @@ namespace CalamityMod.DataStructures public override void ApplyStats(Item item) { - item.channel = false; - item.noUseGraphic = false; - item.useStyle = ItemUseStyleID.Swing; - item.shoot = ProjectileType(); - item.shootSpeed = 12f; - item.UseSound = SoundID.Item1; - item.noMelee = false; + item.channel = true; + item.noUseGraphic = true; + item.useStyle = ItemUseStyleID.Shoot; + item.shoot = ProjectileType(); + item.shootSpeed = 0f; + item.UseSound = null; + item.noMelee = true; } } public class TrueHotAttunement : Attunement diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index eff49af8c8..762bd2c0f9 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using CalamityMod.DataStructures; +using CalamityMod.Items.BaseItems; using CalamityMod.Items.Materials; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; @@ -20,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee { // TODO -- CANNOT RENAME this and True Biome Blade to "TrueBiomeBlade" and "BiomeBlade" internally without corrupting existing items // (Comment copied from an equivalent one on OmegaBiomeBlade from June 2022) - public class TrueBiomeBlade : ModItem, ILocalizedModType + public class TrueBiomeBlade : CustomUseProjItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; public Attunement mainAttunement = null; diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 8c7e1291b3..d37976ea67 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -287,6 +287,7 @@ TrueBiomeBladeHoldout.DisplayName: True Biome Blade TrueBitingEmbrace.DisplayName: Biting Embrace TrueDecaysRetort.DisplayName: Decay's Retort TrueGrovetendersTouch.DisplayName: Grovetender's Touch +TruePureClarity.DisplayName: Pure Clarity TruePurityProjection.DisplayName: Purity Projection TumbleweedRolling.DisplayName: Rolling Tumbleweed TyphonsGreedBubble.DisplayName: Typhon's Greed diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs index f85d83704d..380e758333 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee const float MaxTime = 90; const int coyoteTimeFrames = 15; //How many frames does the whip stay extended - const int MaxReach = 450; + const int MaxReach = 600; const int MinReach = 250; const float SnappingPoint = 0.55f; //When does the snap occur. diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs new file mode 100644 index 0000000000..545205e61b --- /dev/null +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -0,0 +1,147 @@ +using CalamityMod.Items.Weapons.Melee; +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.Melee +{ + public class TruePureClarity : BaseCustomUseStyleProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; + public override int AssignedItemID => ModContent.ItemType(); + + public override float HitboxOutset => 65f; + public override Vector2 HitboxSize => new Vector2(100, 100); + public override float HitboxRotationOffset => MathHelper.ToRadians(-45); + public override Vector2 SpriteOrigin => new(-2, 70); + + public ref float SwingDir => ref Projectile.ai[1]; + public Vector2 mousePos; + public Vector2 aimPos; + public bool doSwing = true; + public bool postSwing = false; + public int useAnimation; + + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.scale = 1.25f; + Projectile.DamageType = DamageClass.Melee; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void OnSpawn(IEntitySource source) + { + SwingDir = 1f; + base.OnSpawn(source); + mousePos = Owner.Calamity().mouseWorld; + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + useAnimation = Owner.itemAnimationMax; + + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + FlipAsSword = Owner.direction == -1 ? true : false; + } + + public override void UseStyle() + { + if (CanHit || postSwing) + mousePos = Owner.Center - aimPos; + else + mousePos = Owner.Calamity().mouseWorld; + + if (!doSwing) + { + for (int i = 0; i < Main.maxNPCs; i++) + Projectile.localNPCImmunity[i] = 0; + + mousePos = Owner.Calamity().mouseWorld; + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + CanHit = false; + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + FlipAsSword = Owner.direction == -1 ? true : false; + doSwing = true; + } + else + { + if (!CanHit && !postSwing) + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + else + Owner.direction = ((Owner.Center - aimPos).X < Owner.Center.X) ? -1 : 1; + Projectile.rotation = Projectile.rotation.AngleLerp(Owner.AngleTo(mousePos) + MathHelper.ToRadians(65f), 0.1f); + + if (AnimationProgress < (useAnimation / 3)) + { + // Swing wind-up. Should not deal damage. + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + CanHit = false; + postSwing = false; + if (AnimationProgress == 0) + { + doSwing = false; + SwingDir = -SwingDir; + } + RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(120f * SwingDir * Owner.direction), 0.2f); + } + else + { + float swingTime = AnimationProgress - (useAnimation / 3); + float swingTimeMax = useAnimation - (useAnimation / 3); + + if (swingTime > (int)(swingTimeMax * 0.2f) && swingTime < (int)(swingTimeMax * 0.85f)) + { + CanHit = true; + + // Particle effects on swing. + Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); + Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(0, 80), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); + Color particleColor = (Owner.HeldItem.ModItem as TrueBiomeBlade).mainAttunement.tooltipColor; + if (Main.rand.NextBool()) + { + GenericBloom bloom = new(particlePos, particleVel, particleColor, 0.08f, 20); + GeneralParticleHandler.SpawnParticle(bloom); + } + else + { + GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, 0.55f, 20); + GeneralParticleHandler.SpawnParticle(sparkle); + } + } + else + CanHit = false; + + // Fire projectiles. + if (swingTime == (int)(swingTimeMax * 0.4f)) + { + SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); + Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * 12f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); + } + + RotationOffset = MathHelper.Lerp(RotationOffset, + MathHelper.ToRadians(MathHelper.Lerp(150f * SwingDir * Owner.direction, 120f * -SwingDir * Owner.direction, CalamityUtils.ExpInOutEasing(swingTime / swingTimeMax, 1))), + 0.2f); + + if (swingTime >= swingTimeMax) + doSwing = false; + if (swingTime < (int)(swingTimeMax * 0.7f)) + postSwing = true; + } + } + + // Make the player's arms rotate. + ArmRotationOffset = MathHelper.ToRadians(-140f); + ArmRotationOffsetBack = MathHelper.ToRadians(-140f); + } + + public override void ResetStyle() + { + } + } +} diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs index 1545f4d734..841004a76f 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePurityProjection.cs @@ -10,7 +10,7 @@ using static Terraria.ModLoader.ModContent; namespace CalamityMod.Projectiles.Melee { - public class TruePurityProjection : ModProjectile, ILocalizedModType //The boring plain one. With cool homing now + public class TruePurityProjection : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public NPC target; @@ -80,7 +80,6 @@ namespace CalamityMod.Projectiles.Melee public override void OnKill(int timeLeft) { - SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); for (int i = 0; i <= 15; i++) { Vector2 displace = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * (-0.5f + (i / 15f)) * 88f; @@ -90,10 +89,6 @@ namespace CalamityMod.Projectiles.Melee } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - int debuffTime = 90; - target.AddBuff(BuffType(), debuffTime); - } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffType(), 90); } } From 1c6510ef9d872f1e4fbd89fe333cba659c3314f2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Sep 2024 00:56:52 -0400 Subject: [PATCH 20/35] Biome Blade Pure Clarity wrangling --- Items/Weapons/Melee/TrueBiomeBlade.cs | 24 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 7 +- .../Melee/BrokenBiomeBlade_PureClarity.cs | 2 +- .../Melee/MendedBiomeBlade_TruePureClarity.cs | 262 +++++++++++++----- .../MendedBiomeBlade_TruePureClarityGhost.png | Bin 0 -> 1072 bytes 5 files changed, 198 insertions(+), 97 deletions(-) create mode 100644 Projectiles/Melee/MendedBiomeBlade_TruePureClarityGhost.png diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 762bd2c0f9..4903f3dba7 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -37,7 +37,8 @@ namespace CalamityMod.Items.Weapons.Melee public static int DefaultAttunement_BaseDamage = 105; public static int DefaultAttunement_SigilTime = 900; public static int DefaultAttunement_BeamTime = 90; - public static float DefaultAttunement_HomingAngle = MathHelper.PiOver4; + public static float DefaultAttunement_LungeDamageMult = 2f; + public static float DefaultAttunement_HomingAngle = MathHelper.Pi / 3f; public static int EvilAttunement_BaseDamage = 155; public static int EvilAttunement_Lifesteal = 2; @@ -297,27 +298,6 @@ namespace CalamityMod.Items.Weapons.Melee return mainAttunement.Shoot(player, source, ref position, ref velocity.X, ref velocity.Y, ref type, ref damage, ref knockback, ref Combo, ref StoredLunges, ref PowerLungeCounter); } - - //This is only used for the purity sigil effect of the default attunement - public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) - { - if (mainAttunement == null || mainAttunement.id != AttunementID.TrueDefault || player.whoAmI != Main.myPlayer) - return; - - foreach (Projectile proj in Main.projectile) - { - if (proj.active && proj.type == ProjectileType() && proj.owner == player.whoAmI) - { - //Reset the timeleft on the sigil & give it its new target (or the same, it doesnt matter really. - proj.ai[0] = target.whoAmI; - proj.timeLeft = DefaultAttunement_SigilTime; - return; - } - } - var source = player.GetSource_ItemUse(Item); - Projectile.NewProjectile(source, target.Center, Vector2.Zero, ProjectileType(), 0, 0, player.whoAmI, target.whoAmI); - } - internal static ChargingEnergyParticleSet BiomeEnergyParticles = new ChargingEnergyParticleSet(-1, 2, Color.White, Color.White, 0.04f, 20f); internal static void UpdateAllParticleSets() { diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 4e218e340c..d71b9af0a1 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -1,7 +1,7 @@ // Broken Biome Blade DefaultAttunement: { Name: Pure Clarity - Function: Fires a weak projectile that crushes enemy defenses + Function: Fires a weak sword beam that crushes enemy defenses } HotAttunement: { @@ -28,8 +28,9 @@ TrueDefaultAttunement: { Name: Pure Clarity Function: ''' - Fires a weak projectile that crushes enemy defenses - True melee hits mark enemies with a sigil; your projectiles home onto marked foes + Fires a weak sword beam that crushes enemy defenses + True melee hits charge a powerful lunge, unleashed when you stop swinging the sword + Enemies hit by the lunge are marked with a sigil that sword beams will home in on ''' } diff --git a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs index 19fe521f4b..4c59053614 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_PureClarity.cs @@ -119,7 +119,7 @@ namespace CalamityMod.Projectiles.Melee // Fire projectiles. if (swingTime == (int)(swingTimeMax * 0.4f)) { - SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item43 with { Volume = 0.65f }, Projectile.Center); Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * 12f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); } diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs index 545205e61b..d25ae3f0ee 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -2,6 +2,8 @@ using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.Audio; using Terraria.DataStructures; @@ -13,14 +15,15 @@ namespace CalamityMod.Projectiles.Melee public class TruePureClarity : BaseCustomUseStyleProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; public override int AssignedItemID => ModContent.ItemType(); + public override string Texture => "CalamityMod/Items/Weapons/Melee/TrueBiomeBlade"; public override float HitboxOutset => 65f; public override Vector2 HitboxSize => new Vector2(100, 100); public override float HitboxRotationOffset => MathHelper.ToRadians(-45); public override Vector2 SpriteOrigin => new(-2, 70); + public ref float State => ref Projectile.ai[0]; // 0 - Swinging. 1 - Thrusting. public ref float SwingDir => ref Projectile.ai[1]; public Vector2 mousePos; public Vector2 aimPos; @@ -28,6 +31,13 @@ namespace CalamityMod.Projectiles.Melee public bool postSwing = false; public int useAnimation; + public Color outlineColorGreen => (Main.player[Projectile.owner].HeldItem.ModItem as TrueBiomeBlade).mainAttunement.tooltipColor; + public Color outlineColorBlue => new Color(90, 176, 255); + public const int dashTime = 30; + public float dashRotation; + public Vector2 lastDisplacement; + public Vector2 dashDirection = Vector2.Zero; + public override void SetDefaults() { base.SetDefaults(); @@ -51,93 +61,203 @@ namespace CalamityMod.Projectiles.Melee public override void UseStyle() { - if (CanHit || postSwing) - mousePos = Owner.Center - aimPos; - else - mousePos = Owner.Calamity().mouseWorld; - - if (!doSwing) + if (Owner.CantUseHoldout()) { - for (int i = 0; i < Main.maxNPCs; i++) - Projectile.localNPCImmunity[i] = 0; - - mousePos = Owner.Calamity().mouseWorld; - aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; - CanHit = false; - Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; - FlipAsSword = Owner.direction == -1 ? true : false; - doSwing = true; - } - else - { - if (!CanHit && !postSwing) - Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; - else - Owner.direction = ((Owner.Center - aimPos).X < Owner.Center.X) ? -1 : 1; - Projectile.rotation = Projectile.rotation.AngleLerp(Owner.AngleTo(mousePos) + MathHelper.ToRadians(65f), 0.1f); - - if (AnimationProgress < (useAnimation / 3)) + if (State == 0f && Projectile.numHits > 0) { - // Swing wind-up. Should not deal damage. + State = 1f; + AnimationProgress = 0; + Projectile.rotation = (Owner.Calamity().mouseWorld - Owner.Center).SafeNormalize(Vector2.UnitX).ToRotation(); + Projectile.timeLeft = dashTime; + lastDisplacement = Projectile.Center - Owner.Center; + Projectile.netUpdate = true; + Projectile.netSpam = 0; + } + } + + if (State == 0f) + { + dashDirection = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero).SafeNormalize(Vector2.UnitX); + + if (CanHit || postSwing) + mousePos = Owner.Center - aimPos; + else + mousePos = Owner.Calamity().mouseWorld; + + if (!doSwing) + { + for (int i = 0; i < Main.maxNPCs; i++) + Projectile.localNPCImmunity[i] = 0; + + mousePos = Owner.Calamity().mouseWorld; aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; CanHit = false; - postSwing = false; - if (AnimationProgress == 0) - { - doSwing = false; - SwingDir = -SwingDir; - } - RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(120f * SwingDir * Owner.direction), 0.2f); + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + FlipAsSword = Owner.direction == -1 ? true : false; + doSwing = true; } else { - float swingTime = AnimationProgress - (useAnimation / 3); - float swingTimeMax = useAnimation - (useAnimation / 3); + if (!CanHit && !postSwing) + Owner.direction = (mousePos.X < Owner.Center.X) ? -1 : 1; + else + Owner.direction = ((Owner.Center - aimPos).X < Owner.Center.X) ? -1 : 1; - if (swingTime > (int)(swingTimeMax * 0.2f) && swingTime < (int)(swingTimeMax * 0.85f)) + Projectile.rotation = Projectile.rotation.AngleLerp(Owner.AngleTo(mousePos) + MathHelper.ToRadians(65f), 0.1f); + + if (AnimationProgress < (useAnimation / 3)) { - CanHit = true; - - // Particle effects on swing. - Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); - Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(0, 80), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); - Color particleColor = (Owner.HeldItem.ModItem as TrueBiomeBlade).mainAttunement.tooltipColor; - if (Main.rand.NextBool()) + // Swing wind-up. Should not deal damage. + aimPos = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitX) * 65; + CanHit = false; + postSwing = false; + if (AnimationProgress == 0) { - GenericBloom bloom = new(particlePos, particleVel, particleColor, 0.08f, 20); - GeneralParticleHandler.SpawnParticle(bloom); - } - else - { - GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, 0.55f, 20); - GeneralParticleHandler.SpawnParticle(sparkle); + doSwing = false; + SwingDir = -SwingDir; } + RotationOffset = MathHelper.Lerp(RotationOffset, MathHelper.ToRadians(120f * SwingDir * Owner.direction), 0.2f); } else - CanHit = false; - - // Fire projectiles. - if (swingTime == (int)(swingTimeMax * 0.4f)) { - SoundEngine.PlaySound(SoundID.Item43, Projectile.Center); - Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * 12f; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); + float swingTime = AnimationProgress - (useAnimation / 3); + float swingTimeMax = useAnimation - (useAnimation / 3); + + if (swingTime > (int)(swingTimeMax * 0.2f) && swingTime < (int)(swingTimeMax * 0.85f)) + { + CanHit = true; + + // Particle effects on swing. + Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); + Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(0, 80), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); + Color particleColor = Main.rand.NextBool() ? outlineColorBlue : outlineColorGreen; + bool empowered = Projectile.numHits > 0; + if (Main.rand.NextBool()) + { + GenericBloom bloom = new(particlePos, particleVel, particleColor, empowered ? 0.13f : 0.08f, 20); + GeneralParticleHandler.SpawnParticle(bloom); + } + else + { + GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, empowered ? 0.75f : 0.55f, 20); + GeneralParticleHandler.SpawnParticle(sparkle); + } + } + else + CanHit = false; + + // Fire projectiles. + if (swingTime == (int)(swingTimeMax * 0.4f)) + { + SoundEngine.PlaySound(SoundID.Item43 with { Volume = 0.65f }, Projectile.Center); + Vector2 projVel = -aimPos.SafeNormalize(Vector2.UnitX) * 12f; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.Center, projVel, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Owner.whoAmI); + } + + RotationOffset = MathHelper.Lerp(RotationOffset, + MathHelper.ToRadians(MathHelper.Lerp(150f * SwingDir * Owner.direction, 120f * -SwingDir * Owner.direction, CalamityUtils.ExpInOutEasing(swingTime / swingTimeMax, 1))), + 0.2f); + + if (swingTime >= swingTimeMax) + doSwing = false; + if (swingTime < (int)(swingTimeMax * 0.7f)) + postSwing = true; } - - RotationOffset = MathHelper.Lerp(RotationOffset, - MathHelper.ToRadians(MathHelper.Lerp(150f * SwingDir * Owner.direction, 120f * -SwingDir * Owner.direction, CalamityUtils.ExpInOutEasing(swingTime / swingTimeMax, 1))), - 0.2f); - - if (swingTime >= swingTimeMax) - doSwing = false; - if (swingTime < (int)(swingTimeMax * 0.7f)) - postSwing = true; } - } - // Make the player's arms rotate. - ArmRotationOffset = MathHelper.ToRadians(-140f); - ArmRotationOffsetBack = MathHelper.ToRadians(-140f); + // Make the player's arms rotate. + ArmRotationOffset = MathHelper.ToRadians(-140f); + ArmRotationOffsetBack = MathHelper.ToRadians(-140f); + } + else + { + CanHit = true; + Owner.direction = Owner.velocity.X > 0f ? 1 : -1; + FlipAsSword = Owner.direction == -1 ? true : false; + RotationOffset = MathHelper.PiOver4 * Owner.direction; + Owner.itemAnimation = 5; + Owner.fallStart = (int)(Owner.position.Y / 16f); + Owner.Calamity().LungingDown = true; + + // Fancy particle dash effects + Vector2 waterVel = Owner.velocity.RotatedBy(MathHelper.PiOver2 * (Main.rand.NextBool() ? 1 : -1)).RotatedByRandom(MathHelper.Pi / 16f).SafeNormalize(Vector2.UnitX) * 5f; + WaterFoamParticle water = new(Owner.Center, waterVel, 20, 0.45f, outlineColorBlue); + GeneralParticleHandler.SpawnParticle(water); + + // Immediately cancel if the lunge hits a tile + Vector2 collisionCheckPos = Owner.Center + (dashDirection * 120 * Projectile.scale) - Vector2.One * 5f; + if (Collision.SolidCollision(collisionCheckPos, 10, 10)) + { + Projectile.timeLeft = 0; + Owner.Calamity().LungingDown = false; + Projectile.active = false; + Projectile.netUpdate = true; + Projectile.netSpam = 0; + } + + Owner.velocity = dashDirection * 30f; + } + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (State == 1f) + { + foreach (Projectile proj in Main.projectile) + { + if (proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Owner.whoAmI) + { + // Reset the time left on the sigil and set the new target + proj.ai[0] = target.whoAmI; + proj.timeLeft = TrueBiomeBlade.DefaultAttunement_SigilTime; + return; + } + } + // If no sigil exists, spawn one + var source = Owner.GetSource_ItemUse(Owner.HeldItem); + Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); + } + } + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (State == 1f) + modifiers.SourceDamage *= TrueBiomeBlade.DefaultAttunement_LungeDamageMult; + } + + public override void OnKill(int timeLeft) + { + // Cut the velocity short if dashing + if (State == 1f) + Owner.velocity *= 0.33f; + + Owner.Calamity().LungingDown = false; + + Projectile.active = false; + } + + public override bool PreDraw(ref Color lightColor) + { + if (Owner.itemAnimation > 0) + { + Texture2D tex = ModContent.Request(Texture).Value; + float r = FlipAsSword ? (State == 1f ? MathHelper.Pi : MathHelper.PiOver2) : 0f; + + if (Projectile.numHits > 0) + { + for (int i = 0; i < 5; i++) + { + Color outlineColor = Color.Lerp(outlineColorGreen, outlineColorBlue, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 1.5f)); + Texture2D outline = ModContent.Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TruePureClarityGhost").Value; + Vector2 rotationalDrawOffset = (MathHelper.TwoPi * i / 7f + Main.GlobalTimeWrappedHourly * 17f).ToRotationVector2(); + rotationalDrawOffset *= MathHelper.Lerp(3.25f, 6f, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 4f) * 0.5f + 1.5f); + Main.EntitySpriteDraw(outline, Projectile.Center - Main.screenPosition + rotationalDrawOffset + new Vector2(0, Owner.gfxOffY), null, outlineColor, 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(tex, 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)); + } + return false; } public override void ResetStyle() diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarityGhost.png b/Projectiles/Melee/MendedBiomeBlade_TruePureClarityGhost.png new file mode 100644 index 0000000000000000000000000000000000000000..e30e2c1b14953dddae699ccff4b2dc317dee709d GIT binary patch literal 1072 zcmV-01kd}4P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1I0;1K~#8N?V8Oi zY+)S7$1MvR*?LPBMzK+BER>gGL9>vRC|QauZ1@8x8&a}UR!VlFCh}4W$-+irBY7^S$?U&dfEPGc&(WO`mhRa=YjG+~;}DnNt)hQ2P4%z7vOFdwUz#;t$S@ zBn4Lp%joFn!1>|fA#8;>P%syysj2BZ_6di>q1eX>D@4fq3&Jw0s;WY|`-D&WP%MOYahABQ(LH$DAZtq>vbg}9Z`+}sQg4GqC0 z-7<(3A_TS&meJ7Afb-|)XP9M7Pfx>SZ*LDiJ3E8ZErVDgLf{I~GCn>&U{YFI3UgKA zK7;#@Ov@lvh!B`UoXTJk{r&xLTU#6a+hq_dMDV>3Ekn`Ogma~Gw$#2Ve-HG3^%M0A!~(nc6Q?Y`uZAvd3k}Ko}OUBXQ6X*b1z?J|fJB4m8Ebq=_^yiECBS_7Q&yetEx3nSqy< zmf-5@YS^zbh!rAaT*&L|D@-0A9}`D$SVnDaEj%?f1&@x7!YqWa6u-(KR*2xa5RQ0F zO$|)m-``>GL`h>~BV1o!4|7$~lE%iyVE+03{yx0EzHW0!5b!(-EQRnMgztlYGAx9v&+P0h+|$zo^En60a9TwM z2M1FMv_b+x+N0n!mz0#0z=ZcMoDt3}S@{e~pgrGqjAOqoaS0sM8$7H-31pLj1mGal#4_lB2^B z=8lu^VeIbi!urhAD|{E7rI4VNL97s=NXy`pE`CpPdU_hjk<1oWh>*M>0|Nv26gpOj qkenY{TU%51AB8q|5Gy2wQ0NCi{FymvTs0N|0000 Date: Thu, 5 Sep 2024 11:13:12 -0400 Subject: [PATCH 21/35] Lunge use sound --- .../Melee/MendedBiomeBlade_TruePureClarity.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs index d25ae3f0ee..751010a192 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -61,11 +61,14 @@ namespace CalamityMod.Projectiles.Melee public override void UseStyle() { + // If the player stops using the weapon after hitting with it once, switch to lunge. if (Owner.CantUseHoldout()) { if (State == 0f && Projectile.numHits > 0) { State = 1f; + SoundEngine.PlaySound(SoundID.Item120 with { Volume = SoundID.Item120.Volume * 0.5f }, Projectile.Center); + AnimationProgress = 0; Projectile.rotation = (Owner.Calamity().mouseWorld - Owner.Center).SafeNormalize(Vector2.UnitX).ToRotation(); Projectile.timeLeft = dashTime; @@ -75,6 +78,7 @@ namespace CalamityMod.Projectiles.Melee } } + // Normal swing behavior. if (State == 0f) { dashDirection = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero).SafeNormalize(Vector2.UnitX); @@ -84,6 +88,7 @@ namespace CalamityMod.Projectiles.Melee else mousePos = Owner.Calamity().mouseWorld; + // Reset before a new swing. if (!doSwing) { for (int i = 0; i < Main.maxNPCs; i++) @@ -158,6 +163,7 @@ namespace CalamityMod.Projectiles.Melee MathHelper.ToRadians(MathHelper.Lerp(150f * SwingDir * Owner.direction, 120f * -SwingDir * Owner.direction, CalamityUtils.ExpInOutEasing(swingTime / swingTimeMax, 1))), 0.2f); + // Extra swing control. if (swingTime >= swingTimeMax) doSwing = false; if (swingTime < (int)(swingTimeMax * 0.7f)) @@ -171,6 +177,7 @@ namespace CalamityMod.Projectiles.Melee } else { + // These are set to ensure the lunge looks and works properly. CanHit = true; Owner.direction = Owner.velocity.X > 0f ? 1 : -1; FlipAsSword = Owner.direction == -1 ? true : false; @@ -179,12 +186,12 @@ namespace CalamityMod.Projectiles.Melee Owner.fallStart = (int)(Owner.position.Y / 16f); Owner.Calamity().LungingDown = true; - // Fancy particle dash effects + // Fancy particle dash effects. Vector2 waterVel = Owner.velocity.RotatedBy(MathHelper.PiOver2 * (Main.rand.NextBool() ? 1 : -1)).RotatedByRandom(MathHelper.Pi / 16f).SafeNormalize(Vector2.UnitX) * 5f; WaterFoamParticle water = new(Owner.Center, waterVel, 20, 0.45f, outlineColorBlue); GeneralParticleHandler.SpawnParticle(water); - // Immediately cancel if the lunge hits a tile + // Immediately cancel if the lunge hits a tile. Vector2 collisionCheckPos = Owner.Center + (dashDirection * 120 * Projectile.scale) - Vector2.One * 5f; if (Collision.SolidCollision(collisionCheckPos, 10, 10)) { @@ -207,13 +214,13 @@ namespace CalamityMod.Projectiles.Melee { if (proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Owner.whoAmI) { - // Reset the time left on the sigil and set the new target + // Reset the time left on the sigil and set the new target. proj.ai[0] = target.whoAmI; proj.timeLeft = TrueBiomeBlade.DefaultAttunement_SigilTime; return; } } - // If no sigil exists, spawn one + // If no sigil exists, spawn one. var source = Owner.GetSource_ItemUse(Owner.HeldItem); Projectile.NewProjectile(source, target.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0, Owner.whoAmI, target.whoAmI); } @@ -227,7 +234,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnKill(int timeLeft) { - // Cut the velocity short if dashing + // Cut the velocity short if dashing. if (State == 1f) Owner.velocity *= 0.33f; @@ -243,6 +250,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D tex = ModContent.Request(Texture).Value; float r = FlipAsSword ? (State == 1f ? MathHelper.Pi : MathHelper.PiOver2) : 0f; + // Draw extra outline sprites if you've hit once, to signify that you can lunge. if (Projectile.numHits > 0) { for (int i = 0; i < 5; i++) From 7566e7ad351b16a9e0b8d16df57bd3bf366f8507 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Sep 2024 23:43:36 -0400 Subject: [PATCH 22/35] BB Pure Clarity changes * Brightened colors * Now have to hit the true melee 3 times to get the lunge; this also has particle effects to signify it --- DataStructures/Attunement.cs | 2 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 4 +-- .../Melee/MendedBiomeBlade_TruePureClarity.cs | 27 ++++++++++++++----- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 55a51bc7f7..fdc4d09edd 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -217,7 +217,7 @@ namespace CalamityMod.DataStructures public TrueDefaultAttunement() { id = AttunementID.TrueDefault; - tooltipColor = new Color(171, 180, 73); + tooltipColor = new Color(201, 220, 93); energyParticleEdgeColor = new Color(117, 126, 72); energyParticleCenterColor = new Color(200, 184, 136); diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index d71b9af0a1..0511293d38 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -29,8 +29,8 @@ TrueDefaultAttunement: { Function: ''' Fires a weak sword beam that crushes enemy defenses - True melee hits charge a powerful lunge, unleashed when you stop swinging the sword - Enemies hit by the lunge are marked with a sigil that sword beams will home in on + Landing three true melee hits charges a powerful lunge, unleashed when you stop swinging the sword + Enemies struck by the lunge are marked with a sigil that sword beams will home in on ''' } diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs index 751010a192..dddfb1ea03 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -30,9 +30,10 @@ namespace CalamityMod.Projectiles.Melee public bool doSwing = true; public bool postSwing = false; public int useAnimation; + public static readonly SoundStyle FullChargeSound = new("CalamityMod/Sounds/Item/MagicRockSound"); public Color outlineColorGreen => (Main.player[Projectile.owner].HeldItem.ModItem as TrueBiomeBlade).mainAttunement.tooltipColor; - public Color outlineColorBlue => new Color(90, 176, 255); + public Color outlineColorBlue => new Color(110, 216, 255); public const int dashTime = 30; public float dashRotation; public Vector2 lastDisplacement; @@ -64,7 +65,7 @@ namespace CalamityMod.Projectiles.Melee // If the player stops using the weapon after hitting with it once, switch to lunge. if (Owner.CantUseHoldout()) { - if (State == 0f && Projectile.numHits > 0) + if (State == 0f && Projectile.numHits > 2) { State = 1f; SoundEngine.PlaySound(SoundID.Item120 with { Volume = SoundID.Item120.Volume * 0.5f }, Projectile.Center); @@ -136,15 +137,15 @@ namespace CalamityMod.Projectiles.Melee Vector2 particleVel = new Vector2(0, 10 * -SwingDir * Owner.direction).RotatedBy(FinalRotation - MathHelper.PiOver4); Vector2 particlePos = Owner.Center + new Vector2(Main.rand.Next(0, 80), 0).RotatedBy(FinalRotation - MathHelper.PiOver4); Color particleColor = Main.rand.NextBool() ? outlineColorBlue : outlineColorGreen; - bool empowered = Projectile.numHits > 0; + bool empowered = Projectile.numHits > 2; if (Main.rand.NextBool()) { - GenericBloom bloom = new(particlePos, particleVel, particleColor, empowered ? 0.13f : 0.08f, 20); + GenericBloom bloom = new(particlePos, particleVel, particleColor, empowered ? 0.12f : 0.08f, 20); GeneralParticleHandler.SpawnParticle(bloom); } else { - GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, empowered ? 0.75f : 0.55f, 20); + GenericSparkle sparkle = new(particlePos, particleVel, particleColor, particleColor, empowered ? 0.78f : 0.55f, 20); GeneralParticleHandler.SpawnParticle(sparkle); } } @@ -208,6 +209,20 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + // Burst of particles to signify that the lunge is ready. + // Due to how numHits works, this has to be 1 less than our target. + if (Projectile.numHits == 2) + { + SoundEngine.PlaySound(FullChargeSound, Owner.Center); + + for (int i = 0; i < 10; i++) + { + Vector2 particleVel = Vector2.UnitX.RotatedBy(MathHelper.TwoPi * (i / 10f)) * Main.rand.NextFloat(3.5f, 4f); + MediumMistParticle readySmoke = new(Owner.Center, particleVel, outlineColorGreen, Color.Brown, 1f, 192f); + GeneralParticleHandler.SpawnParticle(readySmoke); + } + } + if (State == 1f) { foreach (Projectile proj in Main.projectile) @@ -255,7 +270,7 @@ namespace CalamityMod.Projectiles.Melee { for (int i = 0; i < 5; i++) { - Color outlineColor = Color.Lerp(outlineColorGreen, outlineColorBlue, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 1.5f)); + Color outlineColor = Color.Lerp(outlineColorGreen, outlineColorBlue, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 1.5f)) * MathHelper.Clamp(Projectile.numHits / 3f, 0f, 1f); Texture2D outline = ModContent.Request("CalamityMod/Projectiles/Melee/MendedBiomeBlade_TruePureClarityGhost").Value; Vector2 rotationalDrawOffset = (MathHelper.TwoPi * i / 7f + Main.GlobalTimeWrappedHourly * 17f).ToRotationVector2(); rotationalDrawOffset *= MathHelper.Lerp(3.25f, 6f, (float)Math.Cos(Main.GlobalTimeWrappedHourly * 4f) * 0.5f + 1.5f); From 972ef671e3d5950b0e1192ccc51ff589723e3d41 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:12:07 +0700 Subject: [PATCH 23/35] merge fixes --- Items/Weapons/Melee/TrueBiomeBlade.cs | 4 ++-- Projectiles/Melee/BiomeBladeHoldout.cs | 10 +++++----- Projectiles/Melee/TrueBiomeBladeHoldout.cs | 12 ++++-------- Systems/Mechanic/AttunementSystem.cs | 4 ++-- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 3fec69e72c..9db83c88aa 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -225,8 +225,8 @@ namespace CalamityMod.Items.Weapons.Melee if (input < (int)AttunementID.TrueDefault) return (int)AttunementID.TrueDefault; - if (input > (int)AttunementID.Marine) - return (int)AttunementID.Marine; + if (input > (int)AttunementID.Holy) + return (int)AttunementID.Holy; return input; } diff --git a/Projectiles/Melee/BiomeBladeHoldout.cs b/Projectiles/Melee/BiomeBladeHoldout.cs index 5babf42730..a5d92275f1 100644 --- a/Projectiles/Melee/BiomeBladeHoldout.cs +++ b/Projectiles/Melee/BiomeBladeHoldout.cs @@ -127,15 +127,15 @@ namespace CalamityMod.Projectiles.Melee Attunement attunement = AttunementSystem.FindOrNull(AttunementID.TrueDefault); if (hotAttune) - attunement = Attunement.attunementArray[(int)AttunementID.TrueHot]; + attunement = AttunementSystem.FindOrNull(AttunementID.TrueHot); if (coldAttune) - attunement = Attunement.attunementArray[(int)AttunementID.TrueCold]; + attunement = AttunementSystem.FindOrNull(AttunementID.TrueCold); if (jungleAttune) - attunement = Attunement.attunementArray[(int)AttunementID.TrueTropical]; + attunement = AttunementSystem.FindOrNull(AttunementID.TrueTropical); if (evilAttune) - attunement = Attunement.attunementArray[(int)AttunementID.TrueEvil]; + attunement = AttunementSystem.FindOrNull(AttunementID.TrueEvil); if (heavenlyAttune) - attunement = Attunement.attunementArray[(int)AttunementID.Holy]; + attunement = AttunementSystem.FindOrNull(AttunementID.Holy); //If the owner already had the attunement, break out of it (And unswap) if (item.secondaryAttunement == attunement) diff --git a/Projectiles/Melee/TrueBiomeBladeHoldout.cs b/Projectiles/Melee/TrueBiomeBladeHoldout.cs index e5492cc9f8..4dae7e2423 100644 --- a/Projectiles/Melee/TrueBiomeBladeHoldout.cs +++ b/Projectiles/Melee/TrueBiomeBladeHoldout.cs @@ -133,16 +133,12 @@ namespace CalamityMod.Projectiles.Melee bool pogoAttune = Owner.ZoneDesert || Owner.ZoneUnderworldHeight || Owner.ZoneCorrupt || Owner.ZoneCrimson; bool whirlAttune = Owner.ZoneHallow || Owner.Calamity().ZoneAstral; - Attunement attunement = AttunementSystem.FindOrNull(AttunementID.Whirlwind); - if (desert || hell) - attunement = AttunementSystem.FindOrNull(AttunementID.SuperPogo); - if (jungle || ocean || snow) //Check put after the desert check so ocean doesnt get overriden as desert + Attunement attunement = AttunementSystem.FindOrNull(AttunementID.Shockwave); + if (flailAttune) //Check put after the desert check so ocean doesnt get overriden as desert attunement = AttunementSystem.FindOrNull(AttunementID.FlailBlade); - if (evil) //Evil check separated so that it overrides corrupted beach & snow biomes + if (pogoAttune) //Evil check separated so that it overrides corrupted beach & snow biomes attunement = AttunementSystem.FindOrNull(AttunementID.SuperPogo); - if (astral || marine) - attunement = AttunementSystem.FindOrNull(AttunementID.Shockwave); - if (hallow) + if (whirlAttune) attunement = AttunementSystem.FindOrNull(AttunementID.Whirlwind); //Putting holy check at the end so it may override hallowed variants of biomes //If the owner already had the attunement, break out of it (And unswap) diff --git a/Systems/Mechanic/AttunementSystem.cs b/Systems/Mechanic/AttunementSystem.cs index 0471e0d769..707a654630 100644 --- a/Systems/Mechanic/AttunementSystem.cs +++ b/Systems/Mechanic/AttunementSystem.cs @@ -20,10 +20,10 @@ namespace CalamityMod.Systems Registry = [ // Broken Biome Blade - new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new TropicalAttunement(), new EvilAttunement(), + new DefaultAttunement(), new HotAttunement(), new ColdAttunement(), new EvilAttunement(), // Biome Blade - new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), new AstralAttunement(), new MarineAttunement(), + new TrueDefaultAttunement(), new TrueHotAttunement(), new TrueColdAttunement(), new TrueTropicalAttunement(), new TrueEvilAttunement(), new HolyAttunement(), // True Biome Blade new WhirlwindAttunement(), new FlailBladeAttunement(), new SuperPogoAttunement(), new ShockwaveAttunement(), From 3b3e3fa6abb8d8ff12db0d35917017414221ffa5 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Sat, 26 Oct 2024 22:51:55 +0700 Subject: [PATCH 24/35] meregege --- Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs index 908a79f168..1f7dcec0cf 100644 --- a/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs +++ b/Projectiles/Melee/ArkOfTheCosmos_BlastAttack.cs @@ -148,9 +148,7 @@ namespace CalamityMod.Projectiles.Melee float positionAlongLine = MathHelper.Lerp(0f, ThrustDisplaceRatio() * 242f, lerpRatio); Vector2 starPosition = Projectile.Center + Projectile.velocity * positionAlongLine; Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), starPosition, Main.rand.NextVector2CircularEdge(28, 28), ProjectileType(), (int)(ArkoftheCosmos.BlastBoltsDamageMultiplier * Projectile.damage), 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.07f); - { - blast.timeLeft = 100; - } + blast.timeLeft = 100; } } } From 614e948a814e0458633714e42132513b6395e34f Mon Sep 17 00:00:00 2001 From: mochi-angel Date: Tue, 29 Oct 2024 09:03:39 -0700 Subject: [PATCH 25/35] Galaxia retier (balance unfinished) --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 44b836e289..c5688eda6b 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -30,9 +30,9 @@ namespace CalamityMod.Items.Weapons.Melee public bool OnHitProc = false; #region stats - public static int BaseDamage = 800; + public static int BaseDamage = 250; - public static int PhoenixAttunement_BaseDamage = 1200; + public static int PhoenixAttunement_BaseDamage = 300; public static int PhoenixAttunement_LocalIFrames = 30; //Remember its got one extra update public static float PhoenixAttunement_BoltDamageReduction = 0.5f; public static float PhoenixAttunement_BoltThrowDamageMultiplier = 1f; @@ -40,8 +40,8 @@ namespace CalamityMod.Items.Weapons.Melee public static float PhoenixAttunement_FullChargeDamageBoost = 2.1f; public static float PhoenixAttunement_ThrowDamageBoost = 3.2f; - public static int PolarisAttunement_BaseDamage = 1800; - public static int PolarisAttunement_FullChargeDamage = 3600; + public static int PolarisAttunement_BaseDamage = 350; + public static int PolarisAttunement_FullChargeDamage = 600; public static int PolarisAttunement_ShredIFrames = 10; public static int PolarisAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int PolarisAttunement_LocalIFramesCharged = 16; @@ -51,19 +51,19 @@ namespace CalamityMod.Items.Weapons.Melee public static float PolarisAttunement_ShotDamageBoost = 0.8f; //The shots fired if the dash connects public static float PolarisAttunement_ShredChargeupGain = 1f; //How much charge is gainted per second. - public static int AndromedaAttunement_BaseDamage = 2800; + public static int AndromedaAttunement_BaseDamage = 1200; public static int AndromedaAttunement_DashHitIFrames = 20; public static float AndromedaAttunement_FullChargeBoost = 6f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. public static float AndromedaAttunement_StarDamageMultiplier = 1.2f; public static float AndromedaAttunement_ChargeupBoltDamageMultiplier = 0.2f; //The shots fired as it charges - public static int AriesAttunement_BaseDamage = 1325; + public static int AriesAttunement_BaseDamage = 300; public static int AriesAttunement_LocalIFrames = 10; public static int AriesAttunement_Reach = 650; public static float AriesAttunement_ChainDamageReduction = 0.2f; public static float AriesAttunement_OnHitBoltDamageReduction = 0.5f; - public static int CancerPassiveDamage = 3000; + public static int CancerPassiveDamage = 725; public static int CancerPassiveLifeSteal = 3; public static float CancerPassiveLifeStealProc = 0.4f; public static int CapricornPassiveDebuffTime = 200; @@ -124,10 +124,10 @@ namespace CalamityMod.Items.Weapons.Melee Item.knockBack = 9f; Item.UseSound = SoundID.Item1; Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; + Item.value = CalamityGlobalItem.RarityTurquoiseBuyPrice; + Item.rare = ModContent.RarityType(); Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 24f; - Item.rare = RarityType(); Item.reuseDelay = 30; } @@ -301,9 +301,10 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(). - AddIngredient(8). - AddIngredient(8). - AddTile(). + AddIngredient(). + AddIngredient(). + AddIngredient(). + AddTile(TileID.LunarCraftingStation). Register(); } } From 4e3128d72cd88fd3902a5ac59e544107ccb474da Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 15 Nov 2024 12:41:43 -0500 Subject: [PATCH 26/35] CalamityLists deletion oops --- Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs | 2 +- Systems/Collections/ProjectileDestroyExceptionsList.cs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs index dddfb1ea03..69ce6b481d 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Melee public override void UseStyle() { - // If the player stops using the weapon after hitting with it once, switch to lunge. + // If the player stops using the weapon after hitting with it three times, switch to lunge. if (Owner.CantUseHoldout()) { if (State == 0f && Projectile.numHits > 2) diff --git a/Systems/Collections/ProjectileDestroyExceptionsList.cs b/Systems/Collections/ProjectileDestroyExceptionsList.cs index 3c2315dc33..27808b0d0a 100644 --- a/Systems/Collections/ProjectileDestroyExceptionsList.cs +++ b/Systems/Collections/ProjectileDestroyExceptionsList.cs @@ -37,7 +37,6 @@ namespace CalamityMod.Systems.Collections ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), @@ -45,13 +44,12 @@ namespace CalamityMod.Systems.Collections ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), @@ -61,7 +59,6 @@ namespace CalamityMod.Systems.Collections ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), From 7e56c47bd3ec2f8d7b55df2c9ffed40858ad186f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 15 Nov 2024 12:50:09 -0500 Subject: [PATCH 27/35] Fixed Biome Blade Pure Clarity appearing in the swing state for a couple frames at the end of the lunge --- Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs index 69ce6b481d..1da0389140 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TruePureClarity.cs @@ -183,7 +183,7 @@ namespace CalamityMod.Projectiles.Melee Owner.direction = Owner.velocity.X > 0f ? 1 : -1; FlipAsSword = Owner.direction == -1 ? true : false; RotationOffset = MathHelper.PiOver4 * Owner.direction; - Owner.itemAnimation = 5; + Owner.itemAnimation = 2; Owner.fallStart = (int)(Owner.position.Y / 16f); Owner.Calamity().LungingDown = true; @@ -197,6 +197,7 @@ namespace CalamityMod.Projectiles.Melee if (Collision.SolidCollision(collisionCheckPos, 10, 10)) { Projectile.timeLeft = 0; + Owner.itemAnimation = 0; Owner.Calamity().LungingDown = false; Projectile.active = false; Projectile.netUpdate = true; @@ -253,6 +254,7 @@ namespace CalamityMod.Projectiles.Melee if (State == 1f) Owner.velocity *= 0.33f; + Owner.itemAnimation = 0; Owner.Calamity().LungingDown = false; Projectile.active = false; From 677f415c5c8bd54b406b683a78eb3b6e124d3b1a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 15 Nov 2024 13:07:57 -0500 Subject: [PATCH 28/35] TBB Swordsmith's Pride monoliths change draw location based on scale To not appear awkward at smaller scales --- Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs index 7e8f5a7680..1c50fbb05c 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SwordsmithsPrideMonolith.cs @@ -163,7 +163,7 @@ namespace CalamityMod.Projectiles.Melee Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; - Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f * Scale; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); @@ -180,7 +180,7 @@ namespace CalamityMod.Projectiles.Melee Rectangle frame = new Rectangle(0 + (int)Variant * 94, 0, 94, 420); Vector2 drawScale = new Vector2(Width() / BaseWidth, Height() / BaseHeight) * Scale; - Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f; + Vector2 drawPosition = Projectile.Center - Main.screenPosition - (Projectile.rotation - MathHelper.PiOver2).ToRotationVector2() * 26f * Scale; Vector2 drawOrigin = new Vector2(frame.Width / 2f, frame.Height); float opacity = MathHelper.Clamp(1f - ((Timer - 0.85f) / 0.15f), 0f, 1f); From b85903c435529f06d69fddbf758535da9765ef04 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 15 Nov 2024 18:28:14 -0500 Subject: [PATCH 29/35] Phoenix's Pride sword throw spawn a flame pillar on hit Reduced visual clutter of Phoenix's Pride spin I had started balancing stuff before realizing I wasn't fully satisfied with the actual functionalities thus the Andromeda's Stride nerf; Polaris' Gaze's current effect needs to be shot in a ditch --- Effects/BordernadoFire.fx | 1 + Effects/BordernadoFire.xnb | Bin 3228 -> 3308 bytes Items/Weapons/Melee/FourSeasonsGalaxia.cs | 4 +- .../en-US/Mods.CalamityMod.Attunement.hjson | 3 +- .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 + Projectiles/Melee/Galaxia_PhoenixsPride.cs | 35 +++--- .../Melee/Galaxia_PhoenixsPrideFirewall.cs | 104 ++++++++++++++++++ 7 files changed, 126 insertions(+), 22 deletions(-) create mode 100644 Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs diff --git a/Effects/BordernadoFire.fx b/Effects/BordernadoFire.fx index 44d9e2dec8..057d5b1112 100644 --- a/Effects/BordernadoFire.fx +++ b/Effects/BordernadoFire.fx @@ -58,6 +58,7 @@ float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0 opacity *= pow(sin(coords.y * 3.141), lerp(1, 4, pow(coords.x, 2))); opacity *= fadeMapColor.r * 1.5 + 1; opacity *= lerp(0.4, 0.9, fadeMapColor.r); + opacity *= uOpacity; float3 transformColor = lerp(float3(1, 205 / 255.0, 119 / 255.0), float3(1, 76 / 255.0, 79 / 255.0), fadeMapColor.r); color.rgb = lerp(color.rgb, transformColor, fadeMapColor.r); diff --git a/Effects/BordernadoFire.xnb b/Effects/BordernadoFire.xnb index 053e44de327d28d73627842665a4073aac315e64..4b38ad5eb06bace1e20ba6ee69f58a652fa0f45a 100644 GIT binary patch delta 495 zcmYL`KS&%w6vp41{eKrRuozhs&c;GT#4ZxJ^ce6Jda?~Dh;KgJKH+P3+bOPdxEsb=$EbCAYnM@Bob+=aBK@X>3Gt}4Pf zWDw)AX-c~opCFyb&=RyR{dPxNWv0BaxV*YSX_~&&upAogwF&zzTRNF!#qp)=n9Ndf z?%9-*>j#QjW3XRPSihbs{@l9=OGK6-U)=V<%;@kiQ4|tgBI7!vmK=lH8I8i5`gHjG z^i;$iq-z~%fV!aEa(lXvKRZv8-Va;V>X4?Mw0L8zq~sMQ70tyak$xi-M+Q-B!1J>+ zYA=aic>| j7G{2c8Jg;y<{*l3Q;Nxn9J$K*Y|C9PWV6kbALo7XgFdxEo`*V!XhHc<zi@Bp_cM(vg?) zda_a0hY*2kMv`^Ycw${O<1WHrz#%ObztdjMp4M*sH2_V}t(kCTpXPD^$_KdPh<2aG z=$)z7r^CowH_J63%GD`lC0v6k4m>uuoU7}LaBAVGT%M1pNhPbuGgd8c31K6M z0Yp!6vJwD+U|*aE`}2kBpNGst=DlE&A%ftXP#N$VnDlLVn&fOrDcj@OGWIn0*tI<^ o>VZ_TXPAe~?`=(); + Item.rare = RarityType(); Item.shoot = ProjectileID.PurificationPowder; Item.shootSpeed = 24f; Item.reuseDelay = 30; diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 0511293d38..4c3f673701 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -90,7 +90,7 @@ WhirlwindAttunement: { Hold to swing the sword around you, accelerating and dealing more damage over time Homing astral energies are wildly fired around you while swinging Once swung for long enough, releasing hurls the sword towards your cursor - Once pulled back, the hurled sword erupts into astral monoliths + The hurled sword erupts into astral monoliths on enemy hits ''' PassiveDesc: Striking enemies occasionally spawns homing astral bombers that spread the Astral Infection } @@ -137,6 +137,7 @@ PhoenixAttunement: { Swing the sword around you, accelerating over time The swirling nebula constantly emits homing cosmic bolts Release to hurl the sword toward the cursor alongside 6 gigantic cosmic bolts + The hurled sword erupts into a blazing flame pillar on enemy hits ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index 5650ecf3c0..ea186d9779 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -188,6 +188,7 @@ Orbacle.DisplayName: Auric Orb OrderbringerBeam.DisplayName: Orderbringer Beam OrderbringerWaveProj.DisplayName: Order-bringing Wave PhoenixsPride.DisplayName: Phoenix's Pride +PhoenixsPrideFirewall.DisplayName: Phoenix's Pride Flame Pillar PhosphorescentGauntletPunches.DisplayName: Gauntlet Punch PhotonRipperProjectile.DisplayName: Extraordinarily Cost-Inefficient Chainsaw PlagueSeeker.DisplayName: Plague Seeker diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index d76dde0d6f..5da374be95 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.Item80, Projectile.Center); direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); - //PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES YES YES MH YES YES + // PARTICLES LOTS OF PARTICLES LOTS OF SPARKLES for (int i = 0; i <= 8; i++) { float variation = Main.rand.NextFloat(-MathHelper.PiOver4, MathHelper.PiOver4); @@ -112,7 +112,7 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(Sparkle); } - //Actually do projectiles now + // Actually do projectiles now if (Owner.whoAmI == Main.myPlayer) { for (int i = 0; i <= 5; i++) @@ -154,23 +154,14 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(2)) { - - float Opacity = MathHelper.Clamp((Empowerment / maxEmpowerment - 0.5f) * 3f, 0, 1) * 0.75f; + float Opacity = MathHelper.Clamp((Empowerment / maxEmpowerment - 0.5f) * 3f, 0, 1) * 0.5f; float scaleFactor = MathHelper.Clamp((Empowerment / maxEmpowerment - 0.5f) * 3f, 0, 1); - for (float i = 0f; i <= 1; i += 0.5f) + for (float i = 0f; i < 2; i++) { - Vector2 smokepos = Projectile.Center + (direction * (60 + 40 * i) * Projectile.scale) + direction.RotatedBy(-MathHelper.PiOver2) * 30f * scaleFactor * Main.rand.NextFloat(); - - + Vector2 smokepos = Projectile.Center + (direction * (60 + 20 * i) * Projectile.scale) + direction.RotatedBy(-MathHelper.PiOver2) * 30f * scaleFactor * Main.rand.NextFloat(); Particle smoke = new HeavySmokeParticle(smokepos, direction.RotatedBy(-MathHelper.PiOver2) * 20f * scaleFactor + Owner.velocity, Color.Lerp(Color.MidnightBlue, Color.Indigo, i), 10 + Main.rand.Next(5), scaleFactor * Main.rand.NextFloat(2.8f, 3.1f), Opacity + Main.rand.NextFloat(0f, 0.2f), 0f, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); - - if (Main.rand.NextBool(3)) - { - Particle smokeGlow = new HeavySmokeParticle(smokepos, direction.RotatedBy(-MathHelper.PiOver2) * 20f * scaleFactor + Owner.velocity, Color.OrangeRed, 7, scaleFactor * Main.rand.NextFloat(2f, 2.4f), Opacity * 2, 0f, true, 0.001f, true); - GeneralParticleHandler.SpawnParticle(smokeGlow); - } } } @@ -261,6 +252,16 @@ namespace CalamityMod.Projectiles.Melee Owner.itemAnimation = 2; } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (CurrentState == 1f && Main.myPlayer == Projectile.owner && !AnyProjectiles(ProjectileType())) + { + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), Projectile.damage, 0f, Projectile.owner, target.whoAmI); + if (proj.ModProjectile is PhoenixsPrideFirewall fire) + fire.Scale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (CurrentState == 1f) @@ -269,11 +270,7 @@ namespace CalamityMod.Projectiles.Melee modifiers.SourceDamage *= FourSeasonsGalaxia.PhoenixAttunement_BaseDamageReduction + (FourSeasonsGalaxia.PhoenixAttunement_FullChargeDamageBoost * Empowerment / maxEmpowerment); } - public override void OnKill(int timeLeft) - { - if (smear != null) - smear.Kill(); - } + public override void OnKill(int timeLeft) => smear?.Kill(); public override bool PreDraw(ref Color lightColor) { diff --git a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs new file mode 100644 index 0000000000..c520ea02a3 --- /dev/null +++ b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs @@ -0,0 +1,104 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Graphics.Primitives; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria; +using Terraria.Graphics.Shaders; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class PhoenixsPrideFirewall : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public const int TornadoHeight = 480; + + public float Scale; // Size of the firewall, scales with NPC width + public float fadeOut = 0.75f; // Used to control the firewall fading out at the end of its lifespan + public NPC Target => Main.npc[(int)Projectile.ai[0]]; + public override void SetStaticDefaults() => ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; + + public override void SetDefaults() + { + Projectile.width = 408; + Projectile.height = 102; + Projectile.friendly = true; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.penetrate = -1; + Projectile.alpha = 255; + Projectile.scale = Scale; + Projectile.timeLeft = 150; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 10; + } + + public override void AI() + { + // Constantly follow its target + // Die if the target is no longer active + if (!Target.active) + { + Projectile.Kill(); + return; + } + else + Projectile.Center = Target.Center + Target.velocity; + + // Fade out at the end of its lifespan + if (Projectile.timeLeft < 15) + fadeOut -= 0.05f; + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + float _ = 0f; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), + targetHitbox.Size(), + Projectile.Bottom, + Projectile.Bottom - Vector2.UnitY * TornadoHeight, + 72, + ref _); + } + + public float WidthFunction(float completionRatio) => 50f * Scale * (completionRatio > 0.5f ? 1f : completionRatio * 2f); + + public override bool PreDraw(ref Color lightColor) + { + Main.spriteBatch.EnterShaderRegion(); + + GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f); + GameShaders.Misc["CalamityMod:Bordernado"].UseOpacity(fadeOut); + GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request("Terraria/Images/Misc/Perlin")); + Vector2[] drawPoints = new Vector2[5]; + Vector2 upwardAscent = Vector2.UnitY * TornadoHeight; + + Vector2 bottom = Projectile.Center; + Vector2 top = bottom - upwardAscent; + for (int i = 0; i < drawPoints.Length - 1; i++) + drawPoints[i] = Vector2.Lerp(top, bottom, i / (float)(drawPoints.Length - 1)); + + drawPoints[drawPoints.Length - 1] = bottom; + PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, (_) => Color.Orange, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 80); + + Main.spriteBatch.ExitShaderRegion(); + + Texture2D vortexTexture = ModContent.Request("CalamityMod/Projectiles/Boss/OldDukeVortex").Value; + for (int i = 0; i < 90; i++) + { + float angle = MathHelper.TwoPi * i / (25f * Scale) + Main.GlobalTimeWrappedHourly * MathHelper.TwoPi; + Color drawColor = Color.White * 0.04f; + drawColor.A = 0; + Vector2 drawPosition = bottom + angle.ToRotationVector2() * 4f - Main.screenPosition; + + drawPosition += (angle + Main.GlobalTimeWrappedHourly * i / 16f).ToRotationVector2() * 6f; + Main.EntitySpriteDraw(vortexTexture, drawPosition, null, drawColor * fadeOut, angle + MathHelper.PiOver2, vortexTexture.Size() * 0.5f, 0.2f * Scale, SpriteEffects.None, 0); + } + + return false; + } + } +} From 602babea576489c369ef0236390875844cd1d0fc Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 15 Nov 2024 20:48:51 -0500 Subject: [PATCH 30/35] Slight revamp of Polaris' Gaze No longer fires out the star towards your cursor, which is dashed to and releases a burst of stars from the player at the end of the dash Now places the star directly on the cursor, which fires a barrage of 6 stars before disappearing; the star can still be dashed to, but this just deals the dash damage --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 1 - .../en-US/Mods.CalamityMod.Attunement.hjson | 2 +- Projectiles/Melee/GalaxiaBolt.cs | 7 +-- Projectiles/Melee/Galaxia_PolarisGaze.cs | 28 +++--------- Projectiles/Melee/Galaxia_PolarisGazeDash.cs | 20 ++------- Projectiles/Melee/Galaxia_PolarisGazeStar.cs | 43 +++++++------------ 6 files changed, 29 insertions(+), 72 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 308c120b31..102141adc6 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -46,7 +46,6 @@ namespace CalamityMod.Items.Weapons.Melee public static int PolarisAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int PolarisAttunement_LocalIFramesCharged = 16; public static float PolarisAttunement_SlashDamageBoost = 6f; //Keep in mind the slice always crits - public static int PolarisAttunement_SlashBoltsDamage = 1300; public static int PolarisAttunement_SlashIFrames = 20; public static float PolarisAttunement_ShotDamageBoost = 0.8f; //The shots fired if the dash connects public static float PolarisAttunement_ShredChargeupGain = 1f; //How much charge is gainted per second. diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index 4c3f673701..aadaea93ac 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -156,7 +156,7 @@ PolarisAttunement: { ''' Channel Galaxia's power into a vortex of celestial energies The vortex powers up over time and while hitting enemies - Release to fire a powerful star directly at your cursor + Release to fire a powerful star directly on your cursor that bombards nearby enemies with bolts Attacking immediately after firing the star launches you toward it, damaging enemies ''' } diff --git a/Projectiles/Melee/GalaxiaBolt.cs b/Projectiles/Melee/GalaxiaBolt.cs index ae0a519b2d..23478acb09 100644 --- a/Projectiles/Melee/GalaxiaBolt.cs +++ b/Projectiles/Melee/GalaxiaBolt.cs @@ -15,8 +15,9 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[Projectile.owner]; public ref float Hue => ref Projectile.ai[0]; - public ref float HomingStrenght => ref Projectile.ai[1]; + public ref float HomingStrength => ref Projectile.ai[1]; public ref float ShouldDelayHoming => ref Projectile.ai[2]; + public bool StrongerHoming = false; Particle Head; @@ -57,10 +58,10 @@ namespace CalamityMod.Projectiles.Melee if (target == null) target = Projectile.Center.ClosestNPCAt(812f, true); - else if (CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver2 && (ShouldDelayHoming != 1f || Projectile.timeLeft < 60)) //Home in + else if ((CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver2 || StrongerHoming) && (ShouldDelayHoming != 1f || Projectile.timeLeft < 60)) //Home in { float idealDirection = Projectile.AngleTo(target.Center); - float updatedDirection = Projectile.velocity.ToRotation().AngleTowards(idealDirection, HomingStrenght); + float updatedDirection = Projectile.velocity.ToRotation().AngleTowards(idealDirection, HomingStrength); Projectile.velocity = updatedDirection.ToRotationVector2() * Projectile.velocity.Length() * 0.995f; } diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index c676136f38..bcb136aa46 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -72,12 +72,6 @@ namespace CalamityMod.Projectiles.Melee { if (proj.active && proj.type == ProjectileType() && proj.owner == Owner.whoAmI) { - if (CalamityUtils.AngleBetween(Owner.Center - Main.MouseWorld, Owner.Center - proj.Center) > MathHelper.PiOver4) - { - proj.Kill(); - break; - } - Wheel = proj; Dashing = true; DashStart = Owner.Center; @@ -170,14 +164,6 @@ namespace CalamityMod.Projectiles.Melee if (Owner.whoAmI == Main.myPlayer) { - int blastDamage = Owner.CalcIntDamage(FourSeasonsGalaxia.PolarisAttunement_SlashBoltsDamage); - for (int i = 0; i < 5; i++) - { - Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, Main.rand.NextVector2CircularEdge(15, 15), ProjectileType(), blastDamage, 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.02f); - blast.timeLeft = 100; - } - - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center - DashStart / 2f, Vector2.Zero, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.PolarisAttunement_SlashDamageBoost), 0, Owner.whoAmI); if (proj.ModProjectile is PolarisGazeDash dash) { @@ -237,7 +223,7 @@ namespace CalamityMod.Projectiles.Melee { float maxMultiplier = FourSeasonsGalaxia.PolarisAttunement_FullChargeDamage / (float)FourSeasonsGalaxia.PolarisAttunement_BaseDamage; float damageMultiplier = MathHelper.Lerp(1f, maxMultiplier, ShredRatio); - //Adjust the damage to make it constant based on the local iframes + // Adjust the damage to make it constant based on the local iframes float damageReduction = Projectile.localNPCHitCooldown / (float)FourSeasonsGalaxia.PolarisAttunement_LocalIFrames; modifiers.SourceDamage *= damageMultiplier * damageReduction; @@ -247,14 +233,12 @@ namespace CalamityMod.Projectiles.Melee { float maxMultiplier = FourSeasonsGalaxia.PolarisAttunement_FullChargeDamage / (float)FourSeasonsGalaxia.PolarisAttunement_BaseDamage; float damageMultiplier = MathHelper.Lerp(1f, maxMultiplier, ShredRatio); - //Adjust the damage to make it constant based on the local iframes + // Adjust the damage to make it constant based on the local iframes float damageReduction = Projectile.localNPCHitCooldown / (float)FourSeasonsGalaxia.PolarisAttunement_LocalIFrames; modifiers.SourceDamage *= damageMultiplier * damageReduction; } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => ShredTarget(); public override void OnHitPlayer(Player target, Player.HurtInfo info) => ShredTarget(); @@ -267,10 +251,8 @@ namespace CalamityMod.Projectiles.Melee // get lifted up if (HitChargeCooldown <= 0) { - SoundEngine.PlaySound(SoundID.NPCHit30, Projectile.Center); //Sizzle - Shred += 80; //Augment the shredspeed - if (Owner.velocity.Y > 0) - Owner.velocity.Y = -2f; //Get "stuck" into the enemy partly + SoundEngine.PlaySound(SoundID.NPCHit30, Projectile.Center); // Sizzle + Shred += 80; // Augment the shredspeed // 17APR2024: Ozzatron: Galaxia's pogo gives iframes when striking enemies in a similar manner to a bonk dash. // This is a fixed and intentionally very low number of iframes, and is not boosted by Cross Necklace. @@ -285,7 +267,7 @@ namespace CalamityMod.Projectiles.Melee SoundEngine.PlaySound(SoundID.NPCHit43, Projectile.Center); if (ShredRatio > 0.85 && Owner.whoAmI == Main.myPlayer) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, direction * 36f, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.PolarisAttunement_ShotDamageBoost), Projectile.knockBack, Owner.whoAmI, Shred); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Owner.ClampedMouseWorld(), Vector2.Zero, ProjectileType(), (int)(Projectile.damage * FourSeasonsGalaxia.PolarisAttunement_ShotDamageBoost), Projectile.knockBack, Owner.whoAmI, Shred); } if (Dashing) { diff --git a/Projectiles/Melee/Galaxia_PolarisGazeDash.cs b/Projectiles/Melee/Galaxia_PolarisGazeDash.cs index aa04d60b0b..8d25d0320a 100644 --- a/Projectiles/Melee/Galaxia_PolarisGazeDash.cs +++ b/Projectiles/Melee/Galaxia_PolarisGazeDash.cs @@ -19,9 +19,6 @@ namespace CalamityMod.Projectiles.Melee public Vector2 DashStart; public Vector2 DashEnd; - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; @@ -52,21 +49,10 @@ namespace CalamityMod.Projectiles.Melee Particle Spark = new CritSpark(target.Center, sparkSpeed, Color.White, Color.CornflowerBlue, 1f + Main.rand.NextFloat(0, 1f), 30, 0.4f, 0.6f); GeneralParticleHandler.SpawnParticle(Spark); } - - //Explode into cosmic bolts - int blastDamage = Owner.CalcIntDamage(FourSeasonsGalaxia.PolarisAttunement_SlashBoltsDamage); - for (int i = 0; i < 3; i++) - { - Projectile blast = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Owner.Center, Owner.SafeDirectionTo(target.Center, Vector2.Zero).RotatedByRandom(MathHelper.PiOver4) * 30f, ProjectileType(), blastDamage, 0f, Owner.whoAmI, 0.55f, MathHelper.Pi * 0.01f); - blast.timeLeft = 100; - } } - - - public override bool PreDraw(ref Color lightColor) //OMw to reuse way too much code from the entangling vines + public override bool PreDraw(ref Color lightColor) // omw to reuse way too much code from the entangling vines { - Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); @@ -84,7 +70,7 @@ namespace CalamityMod.Projectiles.Melee Texture2D sparkTexture = Request("CalamityMod/Particles/ThinSparkle").Value; Texture2D bloomTexture = Request("CalamityMod/Particles/BloomCircle").Value; - //Ajust the bloom's texture to be the same size as the star's + // Adjust the bloom's texture to be the same size as the star's float properBloomSize = (float)sparkTexture.Width / (float)bloomTexture.Height; @@ -93,7 +79,7 @@ namespace CalamityMod.Projectiles.Melee Main.EntitySpriteDraw(bloomTexture, DashEnd - Main.screenPosition, null, Color.CornflowerBlue * bump * 0.5f, 0, bloomTexture.Size() / 2f, bump * 6f * properBloomSize, SpriteEffects.None, 0); Main.EntitySpriteDraw(sparkTexture, DashEnd - Main.screenPosition, frame, Color.Lerp(Color.White, Color.CornflowerBlue, raise) * bump, raise * MathHelper.TwoPi, frame.Size() / 2f, bump * 3f, SpriteEffects.None, 0); - //Back to normal + // Back to normal Main.spriteBatch.End(); Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); return false; diff --git a/Projectiles/Melee/Galaxia_PolarisGazeStar.cs b/Projectiles/Melee/Galaxia_PolarisGazeStar.cs index b3b897d19e..dea6c234cf 100644 --- a/Projectiles/Melee/Galaxia_PolarisGazeStar.cs +++ b/Projectiles/Melee/Galaxia_PolarisGazeStar.cs @@ -21,34 +21,24 @@ namespace CalamityMod.Projectiles.Melee public Player Owner => Main.player[Projectile.owner]; public float Timer => MaxTime - Projectile.timeLeft; + public const int MaxTime = 120; - public const float MaxTime = 120; + public Particle PolarStar; // Using a particle on top of it since the smoke particles would otherwise go over it - public Particle PolarStar; //Using a particle ontop of it since the smoke particles would otherwise go over it - - - public override void SetStaticDefaults() - { - } public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; Projectile.width = Projectile.height = 45; - Projectile.tileCollide = true; + Projectile.tileCollide = false; Projectile.ignoreWater = true; Projectile.friendly = true; Projectile.penetrate = -1; - Projectile.extraUpdates = 3; - + Projectile.MaxUpdates = 4; + Projectile.timeLeft = MaxTime; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 60; + Projectile.localNPCHitCooldown = 15 * Projectile.MaxUpdates; } - public override bool OnTileCollide(Vector2 oldVelocity) - { - Projectile.velocity *= 0.95f; - return false; - } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; @@ -68,23 +58,17 @@ namespace CalamityMod.Projectiles.Melee direction = Owner.SafeDirectionTo(Owner.Calamity().mouseWorld, Vector2.Zero); direction.Normalize(); Projectile.rotation = direction.ToRotation(); - - Projectile.timeLeft = (int)MaxTime; - Projectile.velocity = direction * 16f; - Projectile.scale = 1f + ShredRatio; //SWAGGER Projectile.netUpdate = true; - } - Projectile.velocity *= 0.96f; - Projectile.position += Projectile.velocity; - - if (PolarStar == null) { PolarStar = new GenericSparkle(Projectile.Center, Vector2.Zero, Color.White, Color.CornflowerBlue, Projectile.scale * 2f, 2, 0.1f, 5f, true); GeneralParticleHandler.SpawnParticle(PolarStar); + + CustomPulse poof = new(Projectile.Center, Vector2.Zero, Color.Indigo, "CalamityMod/Particles/SoftRoundExplosion", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.1f, 0.2f, 10); + GeneralParticleHandler.SpawnParticle(poof); } else { @@ -93,7 +77,6 @@ namespace CalamityMod.Projectiles.Melee PolarStar.Scale = Projectile.scale * 2f; } - Vector2 smokeSpeed = Main.rand.NextVector2Circular(10f, 10f); Particle smoke = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Projectile.velocity / 2, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f), 0.8f, 0, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); @@ -104,6 +87,13 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(smokeGlow); } + if (Timer % (MaxTime / 6) == 0 && Main.myPlayer == Projectile.owner) + { + Vector2 starVel = Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * 25f; + Projectile star = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, starVel, ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f, MathHelper.Pi / 20f); + if (star.ModProjectile is GalaxiaBolt bolt) + bolt.StrongerHoming = true; + } } public override bool PreDraw(ref Color lightColor) @@ -144,6 +134,5 @@ namespace CalamityMod.Projectiles.Melee } } } - } } From a2c4affc274797f3b3c6dd5eef7d9fcc7c694451 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 16 Nov 2024 00:59:39 -0500 Subject: [PATCH 31/35] Some Galaxia balancing --- DataStructures/Attunement.cs | 6 +++++- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 21 +++++++------------ Projectiles/Melee/Galaxia_AndromedasStride.cs | 4 +++- Projectiles/Melee/Galaxia_AriesWrath.cs | 2 +- Projectiles/Melee/Galaxia_PolarisGaze.cs | 6 +++--- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index aed7afc63a..6fef85f3c7 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -1,4 +1,4 @@ -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Enums; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Melee; @@ -576,6 +576,7 @@ namespace CalamityMod.DataStructures item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; + item.reuseDelay = 30; } } @@ -600,6 +601,7 @@ namespace CalamityMod.DataStructures item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; + item.reuseDelay = 30; } } @@ -624,6 +626,7 @@ namespace CalamityMod.DataStructures item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; + item.reuseDelay = 10; } } @@ -649,6 +652,7 @@ namespace CalamityMod.DataStructures item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; + item.reuseDelay = 30; } } diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index 102141adc6..d52d93adad 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -40,34 +40,27 @@ namespace CalamityMod.Items.Weapons.Melee public static float PhoenixAttunement_FullChargeDamageBoost = 2.1f; public static float PhoenixAttunement_ThrowDamageBoost = 3.2f; - public static int PolarisAttunement_BaseDamage = 350; - public static int PolarisAttunement_FullChargeDamage = 600; + public static int PolarisAttunement_BaseDamage = 400; + public static int PolarisAttunement_FullChargeDamage = 630; public static int PolarisAttunement_ShredIFrames = 10; public static int PolarisAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int PolarisAttunement_LocalIFramesCharged = 16; public static float PolarisAttunement_SlashDamageBoost = 6f; //Keep in mind the slice always crits public static int PolarisAttunement_SlashIFrames = 20; public static float PolarisAttunement_ShotDamageBoost = 0.8f; //The shots fired if the dash connects - public static float PolarisAttunement_ShredChargeupGain = 1f; //How much charge is gainted per second. + public static float PolarisAttunement_ShredChargeupGain = 1f; //How much charge is gained per second. - public static int AndromedaAttunement_BaseDamage = 1200; + public static int AndromedaAttunement_BaseDamage = 1120; public static int AndromedaAttunement_DashHitIFrames = 20; - public static float AndromedaAttunement_FullChargeBoost = 6f; //The EXTRA damage boost. So putting 1 here will make it deal double damage. Putting 0.5 here will make it deal 1.5x the damage. + public static float AndromedaAttunement_FullChargeMult = 3.5f; //The maxmimum damage multiplier of the lunge. Note that the lunge always crits. public static float AndromedaAttunement_StarDamageMultiplier = 1f; - public static float AndromedaAttunement_ChargeupBoltDamageMultiplier = 0.2f; //The shots fired as it charges + public static float AndromedaAttunement_ChargeupBoltDamageMultiplier = 0.2f; //Damage of shots fired as it charges - public static int AriesAttunement_BaseDamage = 300; + public static int AriesAttunement_BaseDamage = 375; public static int AriesAttunement_LocalIFrames = 10; public static int AriesAttunement_Reach = 650; public static float AriesAttunement_ChainDamageReduction = 0.2f; public static float AriesAttunement_OnHitBoltDamageReduction = 0.5f; - - public static int CancerPassiveDamage = 725; - public static int CancerPassiveLifeSteal = 3; - public static float CancerPassiveLifeStealProc = 0.4f; - public static int CapricornPassiveDebuffTime = 200; - - #endregion public override string Texture => "CalamityMod/Items/Weapons/Melee/Galaxia"; //Base sprite for stuff like item browser and shit. yeah diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 83953994bc..969bd3ddea 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -218,7 +218,9 @@ namespace CalamityMod.Projectiles.Melee public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SourceDamage *= 1f + FourSeasonsGalaxia.AndromedaAttunement_FullChargeBoost * (float)Math.Pow(Charge / MaxCharge, 2); + // Lunge always critically strikes + modifiers.SetCrit(); + modifiers.SourceDamage *= (FourSeasonsGalaxia.AndromedaAttunement_FullChargeMult * (float)Math.Pow(Charge / MaxCharge, 2)); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/Galaxia_AriesWrath.cs b/Projectiles/Melee/Galaxia_AriesWrath.cs index 01b0079f53..390b306607 100644 --- a/Projectiles/Melee/Galaxia_AriesWrath.cs +++ b/Projectiles/Melee/Galaxia_AriesWrath.cs @@ -120,7 +120,7 @@ namespace CalamityMod.Projectiles.Melee { if (Owner.CantUseHoldout() || Owner.HeldItem.type != ItemType()) { - //Kill the projectile if too far away from the player or close enough to get "re-absorbed) + // Kill the projectile if too far away from the player or close enough to get "re-absorbed") if ((Owner.Center - Projectile.Center).Length() < 30f || (Owner.Center - Projectile.Center).Length() > 2000f || Projectile.velocity.Length() > 100f) Projectile.Kill(); diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index bcb136aa46..cd526e98c4 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -129,12 +129,12 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool()) { Vector2 smokeSpeed = direction.RotatedByRandom(MathHelper.PiOver4 * 0.3f) * Main.rand.NextFloat(10f, 30f) * (ShredRatio * 0.5f + 1f); - Particle smoke = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.6f, 1.2f) * (ShredRatio * 0.5f + 1f), 0.8f, 0, false, 0, true); + Particle smoke = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.5f, 1f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, false, 0, true); GeneralParticleHandler.SpawnParticle(smoke); if (Main.rand.NextBool(3)) { - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Main.hslToRgb(0.55f, 1, 0.5f + 0.2f * ShredRatio), 20, Main.rand.NextFloat(0.4f, 0.7f) * (ShredRatio * 0.5f + 1f), 0.8f, 0, true, 0.01f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Main.hslToRgb(0.55f, 1, 0.5f + 0.2f * ShredRatio), 20, Main.rand.NextFloat(0.35f, 0.6f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, true, 0.01f, true); GeneralParticleHandler.SpawnParticle(smokeGlow); } } @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Melee //Scaling based on shred Projectile.localNPCHitCooldown = FourSeasonsGalaxia.PolarisAttunement_LocalIFrames - (int)(MathHelper.Lerp(0, FourSeasonsGalaxia.PolarisAttunement_LocalIFrames - FourSeasonsGalaxia.PolarisAttunement_LocalIFramesCharged, ShredRatio)); //Increase the hit frequency - Projectile.scale = 1f + (ShredRatio * 1f); //SWAGGER + Projectile.scale = 1f + (ShredRatio * 1.5f); //SWAGGER if ((Wheel == null || !Wheel.active) && Dashing) From 30cc1ad52bbe61b8d23a7d0cbef78212dd9ca4d2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 16 Nov 2024 14:43:54 -0500 Subject: [PATCH 32/35] More tweaks --- Items/Weapons/Melee/FourSeasonsGalaxia.cs | 1 + Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index d52d93adad..46a820df4b 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -39,6 +39,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float PhoenixAttunement_BaseDamageReduction = 0.5f; public static float PhoenixAttunement_FullChargeDamageBoost = 2.1f; public static float PhoenixAttunement_ThrowDamageBoost = 3.2f; + public static int PhoenixAttunement_FlamePillarLocalIFrames = 10; public static int PolarisAttunement_BaseDamage = 400; public static int PolarisAttunement_FullChargeDamage = 630; diff --git a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs index c520ea02a3..2f4a52d81d 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Graphics.Primitives; +using CalamityMod.Items.Weapons.Melee; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.IO; @@ -17,7 +18,7 @@ namespace CalamityMod.Projectiles.Melee public const int TornadoHeight = 480; public float Scale; // Size of the firewall, scales with NPC width - public float fadeOut = 0.75f; // Used to control the firewall fading out at the end of its lifespan + public float fadeOut = 0f; // Used to control the firewall fading in and out at the start and end of its lifespan public NPC Target => Main.npc[(int)Projectile.ai[0]]; public override void SetStaticDefaults() => ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; @@ -33,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.scale = Scale; Projectile.timeLeft = 150; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; + Projectile.localNPCHitCooldown = FourSeasonsGalaxia.PhoenixAttunement_FlamePillarLocalIFrames; } public override void AI() @@ -48,7 +49,9 @@ namespace CalamityMod.Projectiles.Melee else Projectile.Center = Target.Center + Target.velocity; - // Fade out at the end of its lifespan + // Fade in and out at the start and end of its lifespan + if (Projectile.timeLeft > 145) + fadeOut += 0.15f; if (Projectile.timeLeft < 15) fadeOut -= 0.05f; } @@ -64,7 +67,7 @@ namespace CalamityMod.Projectiles.Melee ref _); } - public float WidthFunction(float completionRatio) => 50f * Scale * (completionRatio > 0.5f ? 1f : completionRatio * 2f); + public float WidthFunction(float completionRatio) => 50f * Scale * (completionRatio > 0.4f ? 1f : completionRatio * 2.5f); public override bool PreDraw(ref Color lightColor) { From 90940e0dbab411a5b685e4d2c096513281b23c7d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 22 Nov 2024 21:59:33 -0500 Subject: [PATCH 33/35] Final Polaris' Gaze tweaks --- DataStructures/Attunement.cs | 2 +- Projectiles/Melee/Galaxia_PolarisGaze.cs | 27 ++++++------------------ 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index 697206672e..683b8a49b1 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -627,7 +627,7 @@ namespace CalamityMod.DataStructures item.shootSpeed = 12f; item.UseSound = null; item.noMelee = true; - item.reuseDelay = 10; + item.reuseDelay = 12; } } diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index 8d52fe04ab..e7e4fa40cc 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -21,7 +21,6 @@ namespace CalamityMod.Projectiles.Melee Vector2 direction = Vector2.Zero; public ref float Shred => ref Projectile.ai[0]; //Charge, basically public ref float HitChargeCooldown => ref Projectile.ai[1]; - public ref float ChargeSoundCooldown => ref Projectile.localAI[0]; public float Bounce(float x) => x <= 50 ? x / 50f : x <= 65 ? 1 + 0.15f * (float)Math.Sin((x - 50f) / 15f * MathHelper.Pi) : 1f; public float ShredRatio => MathHelper.Clamp(Shred / (maxShred * 0.5f), 0f, 1f); public Player Owner => Main.player[Projectile.owner]; @@ -115,26 +114,27 @@ namespace CalamityMod.Projectiles.Melee if (PolarStar == null) { - PolarStar = new GenericSparkle(Owner.Center + direction, Vector2.Zero, Color.White, Color.CornflowerBlue, Projectile.scale, 2, 0.05f, 5f, true); + PolarStar = new GenericSparkle(Owner.Center + direction, Vector2.Zero, Color.White, Color.DodgerBlue, Projectile.scale, 2, 0.05f, 5f, true); GeneralParticleHandler.SpawnParticle(PolarStar); } else { PolarStar.Time = 0; PolarStar.Position = Owner.Center + direction * 46 * Projectile.scale; - PolarStar.Rotation += (1 + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 4f)) * 0.02f; + PolarStar.Color = ShredRatio > 0.75 ? Color.Lerp(Color.White, Color.CornflowerBlue, Utils.Remap(ShredRatio, 0.75f, 0.85f, 0f, 1f)) : Color.White; + PolarStar.Rotation += (1 + (float)Math.Sin(Main.GlobalTimeWrappedHourly * 4f)) * (ShredRatio > 0.85 ? 0.03f : 0.02f); PolarStar.Scale = Projectile.scale * 2f; } if (Main.rand.NextBool()) { Vector2 smokeSpeed = direction.RotatedByRandom(MathHelper.PiOver4 * 0.3f) * Main.rand.NextFloat(10f, 30f) * (ShredRatio * 0.5f + 1f); - Particle smoke = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.5f, 1f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, false, 0, true); + Particle smoke = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Color.Lerp(Color.Purple, Color.Indigo, (float)Math.Sin(Main.GlobalTimeWrappedHourly * 6f)), 30, Main.rand.NextFloat(0.5f, 1f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, false, 0); GeneralParticleHandler.SpawnParticle(smoke); - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(3) && ShredRatio > 0.85) { - Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Main.hslToRgb(0.55f, 1, 0.5f + 0.2f * ShredRatio), 20, Main.rand.NextFloat(0.35f, 0.6f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, true, 0.01f, true); + Particle smokeGlow = new HeavySmokeParticle(Projectile.Center, smokeSpeed + Owner.velocity, Main.hslToRgb(0.55f, 1, 0.5f + 0.2f * ShredRatio), 20, Main.rand.NextFloat(0.4f, 0.7f) * (ShredRatio * 0.5f + 1f), 0.6f, 0, true, 0.01f); GeneralParticleHandler.SpawnParticle(smokeGlow); } } @@ -199,21 +199,6 @@ namespace CalamityMod.Projectiles.Melee Owner.itemTime = 2; Owner.itemAnimation = 2; - //Play a sound when the blade throw is available - if (ShredRatio > 0.85 && Owner.whoAmI == Main.myPlayer) - { - if (ChargeSoundCooldown <= 0) - { - SoundEngine.PlaySound(SoundID.DD2_BookStaffCast with { Volume = SoundID.DD2_BookStaffCast.Volume * 2.5f }); - ChargeSoundCooldown = 20; - } - } - else - { - ChargeSoundCooldown--; - } - - Shred += FourSeasonsGalaxia.PolarisAttunement_ShredChargeupGain; HitChargeCooldown--; Projectile.timeLeft = 2; From bdb2f3a41abd6d6f6e39ef72b78d9658c2dad7db Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:52:34 +0700 Subject: [PATCH 34/35] illegal biome blade prevention --- Items/Weapons/Melee/BrokenBiomeBlade.cs | 3 +++ Items/Weapons/Melee/OmegaBiomeBlade.cs | 3 +++ Items/Weapons/Melee/TrueBiomeBlade.cs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Items/Weapons/Melee/BrokenBiomeBlade.cs b/Items/Weapons/Melee/BrokenBiomeBlade.cs index 98952024f8..7658fe7a86 100644 --- a/Items/Weapons/Melee/BrokenBiomeBlade.cs +++ b/Items/Weapons/Melee/BrokenBiomeBlade.cs @@ -195,6 +195,9 @@ namespace CalamityMod.Items.Weapons.Melee if (secondaryAttunement != null) secondaryAttunement = AttunementSystem.FindOrNull(ClampAttunementRange((int)secondaryAttunement.id)); + + if (mainAttunement == secondaryAttunement) + secondaryAttunement = null; } private static int ClampAttunementRange(int input) diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index d975e283d6..61f992e40f 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -257,6 +257,9 @@ namespace CalamityMod.Items.Weapons.Melee if (secondaryAttunement != null) secondaryAttunement = AttunementSystem.FindOrNull(ClampAttunementRange((int)secondaryAttunement.id)); + + if (mainAttunement == secondaryAttunement) + secondaryAttunement = null; } private static int ClampAttunementRange(int input) diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 9db83c88aa..3a387cc179 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -218,6 +218,9 @@ namespace CalamityMod.Items.Weapons.Melee if (secondaryAttunement != null) secondaryAttunement = AttunementSystem.FindOrNull(ClampAttunementRange((int)secondaryAttunement.id)); + + if (mainAttunement == secondaryAttunement) + secondaryAttunement = null; } private static int ClampAttunementRange(int input) From 25f82db0c65cb579bd6e9bb767a206361cc7388e Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 1 Dec 2024 16:52:08 -0500 Subject: [PATCH 35/35] Changes based on code review 1. Changed CanDamage on AndromedasStride to return null instead of true 2. Removed dead code in EarthenTidesBeam 3. Removed unnecessary using in SanguineFury (pretty sure this is a leftover from my old Swordsmith's Pride passive effect) --- Projectiles/Melee/Galaxia_AndromedasStride.cs | 2 +- Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs | 9 --------- Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Projectiles/Melee/Galaxia_AndromedasStride.cs b/Projectiles/Melee/Galaxia_AndromedasStride.cs index 874048ee7f..7bcc83b5f9 100644 --- a/Projectiles/Melee/Galaxia_AndromedasStride.cs +++ b/Projectiles/Melee/Galaxia_AndromedasStride.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.localNPCHitCooldown = 16; } - public override bool? CanDamage() => State == 1f; + public override bool? CanDamage() => State == 1f ? (bool?)null : false; public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { diff --git a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs index 33373afe04..1ea26709ac 100644 --- a/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs +++ b/Projectiles/Melee/TrueBiomeBlade_EarthenTidesBeam.cs @@ -80,15 +80,6 @@ namespace CalamityMod.Projectiles.Melee } } - /*else if ((Projectile.Center - target.Center).Length() >= (Projectile.Center + Projectile.velocity - target.Center).Length() && CalamityUtils.AngleBetween(Projectile.velocity, target.Center - Projectile.Center) < MathHelper.PiOver4) //Home in - { - Projectile.timeLeft = 70; //Remain alive - float angularTurnSpeed = MathHelper.ToRadians(MathHelper.Lerp(15, 2.5f, MathHelper.Clamp(Projectile.Distance(target.Center) / 10f, 0f, 1f))); - float idealDirection = Projectile.AngleTo(target.Center); - float updatedDirection = Projectile.velocity.ToRotation().AngleTowards(idealDirection, angularTurnSpeed); - Projectile.velocity = updatedDirection.ToRotationVector2() * Projectile.velocity.Length(); - }*/ - Lighting.AddLight(Projectile.Center, 0.75f, 1f, 0.24f); int dustParticle = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, DustID.CursedTorch, 0f, 0f, 100, default, 0.9f); Main.dust[dustParticle].noGravity = true; diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index c0ea8acf64..e481eb379b 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using CalamityMod.DataStructures; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using CalamityMod.Sounds;