From a4cecaeb7bcb59450cbe7c6c9554b94c3595a385 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 28 Aug 2024 17:54:27 -0700 Subject: [PATCH] More balance and tweaks --- Items/Weapons/Ranged/OntologicalDespoiler.cs | 2 +- .../Ranged/OntoligicalDespoilerBurst.cs | 4 +-- .../Ranged/OntologicalDespoilerGrenade.cs | 21 ++++++++-------- .../Ranged/OntologicalDespoilerHoldout.cs | 6 ++--- .../Ranged/OntologicalDespoilerShot.cs | 25 +++++++++++++------ 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/Items/Weapons/Ranged/OntologicalDespoiler.cs b/Items/Weapons/Ranged/OntologicalDespoiler.cs index 7d26477e84..61d94a0b03 100644 --- a/Items/Weapons/Ranged/OntologicalDespoiler.cs +++ b/Items/Weapons/Ranged/OntologicalDespoiler.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged { Item.width = 88; Item.height = 34; - Item.damage = 426; + Item.damage = 397; Item.DamageType = DamageClass.Ranged; Item.useAnimation = Item.useTime = 8; Item.noMelee = true; diff --git a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs index 61eb931736..b2ad308701 100644 --- a/Projectiles/Ranged/OntoligicalDespoilerBurst.cs +++ b/Projectiles/Ranged/OntoligicalDespoilerBurst.cs @@ -29,10 +29,10 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.8f); + Projectile.damage = (int)(Projectile.damage * 0.97f); if (Projectile.damage < 1) Projectile.damage = 1; } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 300, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 450, targetHitbox); } } diff --git a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs index bedc1128b5..444afa2535 100644 --- a/Projectiles/Ranged/OntologicalDespoilerGrenade.cs +++ b/Projectiles/Ranged/OntologicalDespoilerGrenade.cs @@ -106,8 +106,8 @@ namespace CalamityMod.Projectiles.Ranged { Vector2 position = targetedNPC.Center; Vector2 moveToMouse = (position - Projectile.Center).SafeNormalize(Vector2.UnitX); - if (Projectile.velocity.Length() < 7 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true) * 2)) - Projectile.velocity += moveToMouse * (0.02f + Utils.GetLerpValue(550, 250, Projectile.timeLeft, true)); + if (Projectile.velocity.Length() < 7 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true))) + Projectile.velocity += moveToMouse * (0.1f * Utils.GetLerpValue(550, 60, Projectile.timeLeft, true) * 10); else Projectile.velocity *= 0.94f; explode = true; @@ -121,6 +121,7 @@ namespace CalamityMod.Projectiles.Ranged if (explode) { Owner.Calamity().GeneralScreenShakePower = 8.5f; + float power = 1.5f; for (int i = 0; i < 40; i++) { @@ -131,14 +132,14 @@ namespace CalamityMod.Projectiles.Ranged 2 => color3, _ => color4, }; - Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (Projectile.velocity * 6).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f)); + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType(), (Projectile.velocity * 6 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1f)); dust.noGravity = true; - dust.scale = Main.rand.NextFloat(1.85f, 2.45f); + dust.scale = Main.rand.NextFloat(1.85f, 2.45f) * power; dust.color = useColor; if (i % 2 == 0) { - Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -40).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/Sparkle", false, 40, Main.rand.NextFloat(1.4f, 2.4f), useColor, new Vector2(0.4f, 1.1f)); + Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -40 * power).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1f), "CalamityMod/Particles/Sparkle", false, 40, Main.rand.NextFloat(1.4f, 2.4f) * power, useColor, new Vector2(0.4f, 1.1f)); GeneralParticleHandler.SpawnParticle(orb2); } } @@ -151,10 +152,10 @@ namespace CalamityMod.Projectiles.Ranged 2 => color3, _ => color4, }; - Particle orb4 = new CustomPulse(Projectile.Center, Vector2.Zero, useColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.4f - i * 0.03f, 13); + Particle orb4 = new CustomPulse(Projectile.Center, Vector2.Zero, useColor, "CalamityMod/Particles/SoftRoundExplosion", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.4f - i * 0.03f * power, 13); GeneralParticleHandler.SpawnParticle(orb4); } - Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, baseColor, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.15f, 2.5f, 38); + Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, baseColor, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.15f * power, 2.5f * power, 38); GeneralParticleHandler.SpawnParticle(orb); int parts = 8; float rot = Main.rand.NextFloat(-9, 9); @@ -167,16 +168,16 @@ namespace CalamityMod.Projectiles.Ranged 2 => color3, _ => color4, }; - Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -15 * (i % 2 == 0 ? 1.8f : 1f)).RotatedBy(i * (MathHelper.ToRadians(360f) / parts)).RotatedBy(rot), "CalamityMod/Particles/VerticalSmear", false, 19, 3, useColor, new Vector2(0.2f, 1)); + Particle orb2 = new CustomSpark(Projectile.Center, new Vector2(0, -15 * (i % 2 == 0 ? 1.8f : 1f) * power).RotatedBy(i * (MathHelper.ToRadians(360f) / parts)).RotatedBy(rot), "CalamityMod/Particles/VerticalSmear", false, 19, 3 * power, useColor, new Vector2(0.2f, 1)); GeneralParticleHandler.SpawnParticle(orb2); } - Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 1.2f, 39, false); + Particle orb3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Black, "CalamityMod/Particles/SmallBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 1.2f * power, 39, false); GeneralParticleHandler.SpawnParticle(orb3); SoundStyle fire = new("CalamityMod/Sounds/Item/EarthMeteor"); SoundEngine.PlaySound(fire with { Volume = 1f, Pitch = Main.rand.NextFloat(0, 0.1f) * -3 }, Projectile.Center); - Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 2f), Projectile.knockBack * 3, Projectile.owner, 0, 0, 0); + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 5.5f), Projectile.knockBack * 3, Projectile.owner, 0, 0, 0); } else { diff --git a/Projectiles/Ranged/OntologicalDespoilerHoldout.cs b/Projectiles/Ranged/OntologicalDespoilerHoldout.cs index 3f69e1ea60..68632a9a7b 100644 --- a/Projectiles/Ranged/OntologicalDespoilerHoldout.cs +++ b/Projectiles/Ranged/OntologicalDespoilerHoldout.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Ranged dust.scale = Main.rand.NextFloat(0.9f, 1.25f); dust.color = Projectile.ai[2] == 15 ? baseColor : useColor; } - Projectile.timeLeft = (int)(AftershotCooldownFrames * 2.5f * (!Owner.Calamity().despoilerNerf ? 2 : 1)); // If you're swapping with no penalty, the swap takes longer + Projectile.timeLeft = (int)(AftershotCooldownFrames * 2.5f * (!Owner.Calamity().despoilerNerf ? 3 : 1)); // If you're swapping with no penalty, the swap takes longer Owner.Calamity().despoilerNerf = false; // Remove charge speed penalty if you swap OffsetLengthFromArm = 45f; } @@ -194,7 +194,7 @@ namespace CalamityMod.Projectiles.Ranged ChargeSound?.Stop(); Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitY) * BulletSpeed; - int charge2DamagePos = Projectile.damage * 3; // Most of the damage comes from the explosion + int charge2DamagePos = Projectile.damage; // Most of the damage comes from the explosion int charge2DamageNeg = Projectile.damage * 30; if (Positive) @@ -257,7 +257,7 @@ namespace CalamityMod.Projectiles.Ranged for (int i = 0; i < 3; i++) { float angle = i == 0 ? -0.25f : i == 2 ? 0.25f : 0; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec.RotatedBy(angle) * (1 - Math.Abs(angle * 0.4f)), ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, 0, i); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), GunTipPosition, fireVec.RotatedBy(angle) * (1 - Math.Abs(angle * 0.25f)), ModContent.ProjectileType(), Projectile.damage / 3, Projectile.knockBack, Projectile.owner, 0, 0, i); } } else diff --git a/Projectiles/Ranged/OntologicalDespoilerShot.cs b/Projectiles/Ranged/OntologicalDespoilerShot.cs index a47a680dc2..0bbabb47a1 100644 --- a/Projectiles/Ranged/OntologicalDespoilerShot.cs +++ b/Projectiles/Ranged/OntologicalDespoilerShot.cs @@ -33,11 +33,11 @@ namespace CalamityMod.Projectiles.Ranged } public override void SetDefaults() { - Projectile.width = 28; - Projectile.height = 28; + Projectile.width = 30; + Projectile.height = 30; Projectile.friendly = true; Projectile.penetrate = -1; - Projectile.timeLeft = 600; + Projectile.timeLeft = 750; Projectile.DamageType = DamageClass.Ranged; Projectile.extraUpdates = 4; Projectile.tileCollide = false; @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.rotation = Projectile.velocity.ToRotation(); Projectile.frameCounter++; - if (Projectile.frameCounter > 1) + if (Projectile.frameCounter > 10) { Projectile.frame++; Projectile.frameCounter = 0; @@ -82,7 +82,12 @@ namespace CalamityMod.Projectiles.Ranged baseColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); if (!Positive) + { baseColor = Color.White; + Projectile.extraUpdates = 3; + } + else + Projectile.extraUpdates = 5; if (time > 20) { @@ -131,7 +136,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 position = targetedNPC.Center; Vector2 moveToMouse = (position - Projectile.Center).SafeNormalize(Vector2.UnitX); if (Projectile.velocity.Length() < 8 - (Utils.GetLerpValue(350, 0, Projectile.timeLeft, true) * 2)) - Projectile.velocity += moveToMouse * (0.42f + Utils.GetLerpValue(500, 350, Projectile.timeLeft, true)); + Projectile.velocity += moveToMouse * (0.42f + Utils.GetLerpValue(650, 450, Projectile.timeLeft, true)); else Projectile.velocity *= 0.9f; } @@ -189,7 +194,7 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.92f); + Projectile.damage = (int)(Projectile.damage * 0.95f); if (Projectile.damage < 1) Projectile.damage = 1; } @@ -208,10 +213,16 @@ namespace CalamityMod.Projectiles.Ranged Asset tex3 = ModContent.Request("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot"); Asset tex4 = ModContent.Request("CalamityMod/Projectiles/Ranged/OntologicalDespoilerShot2"); + + Texture2D rTex = ModContent.Request("CalamityMod/ExtraTextures/BasicCircle").Value; + Rectangle frame = tex3.Frame(1, 6, 0, Projectile.frame); Vector2 rotationPoint = frame.Size() * 0.5f; - Main.EntitySpriteDraw(Positive ? tex4.Value : tex3.Value, drawPosition, frame, baseColor with { A = 0 }, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); + for (int i = 0; i < (Positive ? 3 : 1); i++) + Main.EntitySpriteDraw(Positive ? tex4.Value : tex3.Value, drawPosition, frame, Positive ? baseColor with { A = 0 } : baseColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); + if (Positive) + Main.EntitySpriteDraw(tex4.Value, drawPosition, frame, Color.Lerp(baseColor, Color.White, 0.7f) with { A = 0 }, drawRotation, rotationPoint, Projectile.scale * 0.9f, SpriteEffects.None); return false; } }