From 3f76959d09a0d0cdd26119f6d74587f27aaf433d Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 15 Apr 2024 22:46:07 -0700 Subject: [PATCH] Oracle/Ataraxia/Wrathwing stuff Oracle balancing Ataraxia true melee buff Wrathwing sound fix --- Items/Weapons/Melee/Ataraxia.cs | 10 ++++----- Items/Weapons/Melee/TheOracle.cs | 6 +++--- Projectiles/Melee/Yoyos/OracleYoyo.cs | 30 ++++++++++++++++++++------ Projectiles/Rogue/WrathwingFireball.cs | 4 ++-- Projectiles/Rogue/WrathwingSpear.cs | 2 ++ 5 files changed, 35 insertions(+), 17 deletions(-) diff --git a/Items/Weapons/Melee/Ataraxia.cs b/Items/Weapons/Melee/Ataraxia.cs index 2cb0f10730..46c83cc8db 100644 --- a/Items/Weapons/Melee/Ataraxia.cs +++ b/Items/Weapons/Melee/Ataraxia.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 94; Item.height = 92; Item.DamageType = DamageClass.Melee; - Item.damage = 432; + Item.damage = 864; Item.knockBack = 2.5f; Item.useAnimation = 19; Item.useTime = 19; @@ -46,12 +46,12 @@ namespace CalamityMod.Items.Weapons.Melee // Center projectile int centerID = ModContent.ProjectileType(); - int centerDamage = damage; + int centerDamage = (damage / 2); Projectile.NewProjectile(source, position, velocity, centerID, centerDamage, knockback, player.whoAmI, 0f, 0f); // Side projectiles (these deal 75% damage) int sideID = ModContent.ProjectileType(); - int sideDamage = (int)(0.75f * centerDamage); + int sideDamage = ((int)(0.75f * centerDamage) / 2); Vector2 originalVelocity = velocity; velocity.Normalize(); velocity *= 22f; @@ -81,10 +81,10 @@ namespace CalamityMod.Items.Weapons.Melee private void OnHitEffects(Player player, Vector2 targetPos) { - // Individual true melee homing missiles deal 10% of the weapon's base damage. + // Individual true melee homing missiles deal 30% of the weapon's base damage. int numSplits = 5; int trueMeleeID = ModContent.ProjectileType(); - int trueMeleeDamage = (int)player.GetTotalDamage().ApplyTo(0.1f * Item.damage); + int trueMeleeDamage = (int)player.GetTotalDamage().ApplyTo(0.3f * Item.damage); float angleVariance = MathHelper.TwoPi / (float)numSplits; float spinOffsetAngle = MathHelper.Pi / (2f * numSplits); var source = player.GetSource_ItemUse(Item); diff --git a/Items/Weapons/Melee/TheOracle.cs b/Items/Weapons/Melee/TheOracle.cs index 9d1ec7a589..6d2d489dc8 100644 --- a/Items/Weapons/Melee/TheOracle.cs +++ b/Items/Weapons/Melee/TheOracle.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Weapons.Melee public class TheOracle : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; - public const int AuraBaseDamage = 100; - public const int AuraMaxDamage = 220; + public const int AuraBaseDamage = 68; + public const int AuraMaxDamage = 150; public override void SetStaticDefaults() { @@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee Item.width = 58; Item.height = 50; Item.DamageType = DamageClass.MeleeNoSpeed; - Item.damage = 170; + Item.damage = 205; Item.knockBack = 4f; Item.useTime = 20; Item.useAnimation = 20; diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index baddfb1645..39ec79b67f 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -29,8 +29,9 @@ namespace CalamityMod.Projectiles.Melee.Yoyos private const float MinDischargeRate = 0.05f; private const float MaxDischargeRate = 0.53f; private const float DischargeRateScaleFactor = 0.003f; - private const float ChargePerHit = 4f; - private const int HitsPerOrbVolley = 3; + private const float ChargePerHit = 6f; + private const int HitsPerOrbVolley = 2; + private int OrbCooldown = 0; // The aura hits once per this many frames. private const int AuraLocalIFrames = 12; @@ -68,12 +69,23 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.DamageType = DamageClass.MeleeNoSpeed; Projectile.penetrate = -1; Projectile.MaxUpdates = UpdatesPerFrame; + Projectile.tileCollide = false; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 6 * UpdatesPerFrame; + Projectile.localNPCHitCooldown = 8 * UpdatesPerFrame; } public override void AI() { + if (OrbCooldown > 0) + OrbCooldown--; + + if (AuraCharge <= SuperchargeThreshold) + { + Vector2 vel = new Vector2(45, 45).RotatedByRandom(100); + Dust dust = Dust.NewDustPerfect(Projectile.Center + vel, 213, Vector2.Zero, 0, default, Main.rand.NextFloat(2.2f, 2.4f)); + dust.noGravity = true; + } + if ((Projectile.position - Main.player[Projectile.owner].position).Length() > 3200f) //200 blocks Projectile.Kill(); @@ -149,8 +161,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos AuraCharge += ChargePerHit; // Fire Auric orbs every few hits while supercharged. - if (AuraCharge > SuperchargeThreshold && Projectile.numHits % HitsPerOrbVolley == 0) + if (AuraCharge > SuperchargeThreshold && Projectile.numHits % HitsPerOrbVolley == 0 && OrbCooldown == 0) + { + OrbCooldown = 30; FireAuricOrbs(); + } } // Uses dust type 260, which lives for an extremely short amount of time @@ -182,7 +197,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } // Rarely, draw some "arcs" which are lines of dust to the edge - if (Main.rand.NextBool(30)) + if (Main.rand.NextBool(15)) { int numArcs = 3; float arcDustDensity = 0.6f; @@ -211,7 +226,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos } // Make extra sound when these arcs happen - SoundEngine.PlaySound(SoundID.NPCHit53, Projectile.Center); + SoundEngine.PlaySound(SoundID.NPCHit53 with { Volume = 0.2f }, Projectile.Center); } } @@ -252,7 +267,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos private void FireAuricOrbs() { // Play a sound when orbs are fired - SoundEngine.PlaySound(SoundID.Item92, Projectile.Center); + SoundEngine.PlaySound(SoundID.Item92 with { Volume = 0.3f }, Projectile.Center); int numOrbs = 3; int orbID = ModContent.ProjectileType(); @@ -272,5 +287,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + posVec, velocity, orbID, orbDamage, orbKB, Main.myPlayer, 0.0f, 0.0f); } } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 60, targetHitbox); } } diff --git a/Projectiles/Rogue/WrathwingFireball.cs b/Projectiles/Rogue/WrathwingFireball.cs index ea03f6a7b0..debc8e09d6 100644 --- a/Projectiles/Rogue/WrathwingFireball.cs +++ b/Projectiles/Rogue/WrathwingFireball.cs @@ -26,14 +26,14 @@ namespace CalamityMod.Projectiles.Rogue Projectile.penetrate = 1; Projectile.timeLeft = 180; Projectile.aiStyle = ProjAIStyleID.Arrow; - AIType = ProjectileID.DD2BetsyFireball; Projectile.DamageType = RogueDamageClass.Instance; } public override void AI() { // Cancel out the first ten frames of Betsy fireball gravity, and half of all gravity thereafter - Projectile.velocity.Y -= 0.1f; + Projectile.velocity.Y += 0.2f; + Projectile.velocity.X *= 0.99f; // Animation Projectile.frameCounter++; diff --git a/Projectiles/Rogue/WrathwingSpear.cs b/Projectiles/Rogue/WrathwingSpear.cs index 9ec34f9a61..0549e21f39 100644 --- a/Projectiles/Rogue/WrathwingSpear.cs +++ b/Projectiles/Rogue/WrathwingSpear.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using Microsoft.Xna.Framework; using Terraria; +using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; @@ -37,6 +38,7 @@ namespace CalamityMod.Projectiles.Rogue { Projectile.ai[0] = 20f; + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot with { Volume = 0.5f, MaxInstances = -1 }, Projectile.Center); int fireballID = ModContent.ProjectileType(); int damage = (int)(Projectile.damage * 0.7f); float angleDiff = Main.rand.NextFloat(-FireballAngleVariance, FireballAngleVariance);