diff --git a/Projectiles/Ranged/HailstormBulletProj.cs b/Projectiles/Ranged/HailstormBulletProj.cs index 4d8c89904c..29712945f8 100644 --- a/Projectiles/Ranged/HailstormBulletProj.cs +++ b/Projectiles/Ranged/HailstormBulletProj.cs @@ -71,12 +71,12 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { Player Owner = Main.player[Projectile.owner]; - target.AddBuff(BuffID.Frostburn2, 120); + target.AddBuff(BuffID.Frostburn, 120); if (hit.Crit) { SoundStyle crit = new("CalamityMod/Sounds/NPCHit/CryogenPhaseTransitionCrack"); SoundEngine.PlaySound(crit with { Volume = 0.35f, Pitch = 1f }, Projectile.Center); - target.AddBuff(ModContent.BuffType(), 30); + target.AddBuff(BuffID.Frostburn2, 300); int points = 6; float radians = MathHelper.TwoPi / points; Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f)); @@ -88,11 +88,19 @@ namespace CalamityMod.Projectiles.Ranged WaterFlavoredParticle subTrail = new WaterFlavoredParticle(Projectile.Center + velocity * 4.5f + addedPlacement, velocity * 7, false, 6, 0.65f, Color.SkyBlue); GeneralParticleHandler.SpawnParticle(subTrail); } - int onHitDamage = Owner.CalcIntDamage(0.33f * Projectile.damage); + int onHitDamage = Owner.CalcIntDamage(0.48f * Projectile.damage); Owner.ApplyDamageToNPC(target, onHitDamage, 0f, 0, false); } } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (Projectile.numHits > 0) + Projectile.damage = (int)(Projectile.damage * 0.5f); + if (Projectile.damage < 1) + Projectile.damage = 1; + } + public override bool PreDraw(ref Color lightColor) { if (Projectile.localAI[0] > 15f) diff --git a/Projectiles/Ranged/IcicleArrowProj.cs b/Projectiles/Ranged/IcicleArrowProj.cs index c657820e4f..45dc5b612d 100644 --- a/Projectiles/Ranged/IcicleArrowProj.cs +++ b/Projectiles/Ranged/IcicleArrowProj.cs @@ -13,6 +13,7 @@ namespace CalamityMod.Projectiles.Ranged public override string Texture => "CalamityMod/Items/Ammo/IcicleArrow"; public bool falling = false; public Vector2 startVelocity; + public bool setFallingStats = false; public override void SetDefaults() { @@ -50,7 +51,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.velocity *= 0.99f; Projectile.alpha += 1; - if (Projectile.localAI[0] == 250) + if (Projectile.localAI[0] == 200) { for (int k = 0; k < 10; k++) { @@ -60,14 +61,20 @@ namespace CalamityMod.Projectiles.Ranged } Projectile.alpha = 255; Projectile.velocity = new Vector2(0, 0.3f); - Projectile.penetrate = 2; - Projectile.ExpandHitboxBy(50); falling = true; } } else { + if (!setFallingStats) + { + Projectile.tileCollide = false; + Projectile.penetrate = 2; + Projectile.numHits = 1; + Projectile.ExpandHitboxBy(50); + setFallingStats = true; + } if (Projectile.Calamity().allProjectilesHome) Projectile.Calamity().allProjectilesHome = false; // Prevent the icicle effect from breaking with Arterial Assault @@ -82,7 +89,7 @@ namespace CalamityMod.Projectiles.Ranged } } - if (Projectile.localAI[0] < 350) + if (Projectile.localAI[0] < 320) Projectile.velocity *= 1.033f; else Projectile.tileCollide = true; @@ -98,12 +105,13 @@ namespace CalamityMod.Projectiles.Ranged Projectile.Calamity().allProjectilesHome = false; // Prevent the icicle effect from breaking with Arterial Assault if (!falling) { + Projectile.localAI[0] = 100; SoundEngine.PlaySound(SoundID.Item50 with { Volume = 0.35f, Pitch = -0.2f, PitchVariance = 0.2f }, Projectile.Center); Projectile.velocity = new Vector2(0, -6.5f).RotatedByRandom(0.25f) * Main.rand.NextFloat(0.75f, 1.1f); - for (int k = 0; k < 3; k++) + for (int k = 0; k < 2; k++) { Vector2 velocity = startVelocity.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.3f, 0.85f); - WaterFlavoredParticle burst = new WaterFlavoredParticle(Projectile.Center + velocity * 3f, velocity, false, 5, 0.65f, Color.SkyBlue); + WaterFlavoredParticle burst = new WaterFlavoredParticle(Projectile.Center + velocity * 3f, velocity * 0.5f, false, 8, 0.65f, Color.SkyBlue); GeneralParticleHandler.SpawnParticle(burst); } } @@ -111,7 +119,12 @@ namespace CalamityMod.Projectiles.Ranged public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (falling) - Projectile.damage = (int)(Projectile.damage * 1.2f); + modifiers.SourceDamage *= 1.35f; + + if (Projectile.numHits > 1 && falling) + Projectile.damage = (int)(Projectile.damage * 0.6f); + if (Projectile.damage < 1) + Projectile.damage = 1; } public override void OnKill(int timeLeft) { @@ -127,7 +140,7 @@ namespace CalamityMod.Projectiles.Ranged { if (!falling) { - Projectile.tileCollide = false; + Projectile.localAI[0] = 100; SoundEngine.PlaySound(SoundID.Item50 with { Volume = 0.35f, Pitch = -0.2f, PitchVariance = 0.2f }, Projectile.Center); for (int k = 0; k < 7; k++) {