From 7cb67f8effb044df4548bf050c528d1cb77a2cc2 Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Sat, 2 Aug 2025 22:25:58 -0500 Subject: [PATCH] Touchups Adjustments to Galileo, Sirius Crescent Moon, Halley's Added option for Cal homing util to not home into enemies that have iframes for that projectile --- CalPlayer/CalamityPlayer.cs | 4 +- Items/Weapons/Ranged/HalleysInferno.cs | 2 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 3 +- Projectiles/Melee/CrescentMoonFlail.cs | 28 ++-- Projectiles/Melee/CrescentMoonProj.cs | 21 ++- Projectiles/Melee/GalileoGladiusGlow.png | Bin 0 -> 467 bytes Projectiles/Melee/ScorpiusConstellation.cs | 143 ++++++++++++++++++ .../Melee/Shortswords/GalileoGladiusProj.cs | 32 +++- Projectiles/Ranged/HalleysStarburst.cs | 44 +++++- Projectiles/Summon/SiriusMinion.cs | 6 +- Utilities/ProjectileUtils.cs | 4 +- 11 files changed, 258 insertions(+), 29 deletions(-) create mode 100644 Projectiles/Melee/GalileoGladiusGlow.png create mode 100644 Projectiles/Melee/ScorpiusConstellation.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index fcb0d631e4..7945f5e871 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2063,8 +2063,8 @@ namespace CalamityMod.CalPlayer //Stratus Starburst amount management if (HalleyHitCooldown > 0) { - if (HalleyHitCooldown > 350) - HalleyHitCooldown = 350; + if (HalleyHitCooldown > 650) + HalleyHitCooldown = 650; StarburstSpawnFrameCounter += MathF.Pow(HalleyHitCooldown* 0.01f, 0.5f) * 0.03f; HalleyHitCooldown--; } diff --git a/Items/Weapons/Ranged/HalleysInferno.cs b/Items/Weapons/Ranged/HalleysInferno.cs index f147272a63..51bb87d81d 100644 --- a/Items/Weapons/Ranged/HalleysInferno.cs +++ b/Items/Weapons/Ranged/HalleysInferno.cs @@ -84,7 +84,7 @@ namespace CalamityMod.Items.Weapons.Ranged { if (player.Calamity().StratusStarburst > 0) { - Projectile.NewProjectile(source,position,velocity*1.5f, ModContent.ProjectileType(), damage,knockback,player.whoAmI); + Projectile.NewProjectile(source,position + velocity*5,velocity*0.75f, ModContent.ProjectileType(), damage,knockback,player.whoAmI); player.Calamity().StratusStarburst--; } return false; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 19b561eb7a..489fa9fab0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -305,9 +305,10 @@ CrescentMoon: { DisplayName: Crescent Moon Tooltip: ''' - Throws a lunar flail that releases homing moons at the apex of it's path + Throws a lunar flail that releases homing moons at the apex of its path Holding spins the flail around you, generating starbursts With 20 Starbursts, hold again after throwing the flail to cause it to explode + Instead of releasing moons, this explosion summons Scorpius to do immense damage ''' } diff --git a/Projectiles/Melee/CrescentMoonFlail.cs b/Projectiles/Melee/CrescentMoonFlail.cs index 2f771d1fbf..9fb4a2c550 100644 --- a/Projectiles/Melee/CrescentMoonFlail.cs +++ b/Projectiles/Melee/CrescentMoonFlail.cs @@ -104,23 +104,33 @@ namespace CalamityMod.Projectiles.Melee } else { burstStage = 0; - for (var i = 0; i < 6; i++) - { - int moonDamage = (int)(Projectile.damage * 0.1f); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.Zero).RotatedBy(MathHelper.TwoPi * (i / 6f + 0.5f)) * 20f, ModContent.ProjectileType(), moonDamage, 0f, Projectile.owner, 0f, 0f); - } SoundEngine.PlaySound(SoundID.DD2_WitherBeastDeath); + + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 3), 0f, Projectile.owner, 0f, 0f); Projectile.position = Projectile.Center; Projectile.Size *= 7; Projectile.Center = Projectile.position; - Projectile.damage *= 5; + Projectile.damage *= 3; Projectile.Damage(); Projectile.damage = 0; Projectile.position = Projectile.Center; Projectile.Size *= 0.2f; Projectile.Center = Projectile.position; - GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.SkyBlue, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0f, 0.25f, (int)(40 * 0.38f))); - GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.DeepSkyBlue, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0f, 0.2f, (int)(40 * 0.38f))); + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.SkyBlue, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0f, 0.25f, 12)); + GeneralParticleHandler.SpawnParticle(new CustomPulse(Projectile.Center, Vector2.Zero, Color.DeepSkyBlue, "CalamityMod/Particles/ShatteredExplosion", Vector2.One, Main.rand.NextFloat(-15f, 15f), 0f, 0.2f, 12)); + for (int i = 0; i < 30; i++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 109, + 111, + 132 + }); + + int dust = Dust.NewDust(Projectile.Center, 0, 0, dustType); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 7; + } player.Calamity().StratusStarburst -= 20; if (starburst1 != null) player.Calamity().StarburstEntities.Remove(starburst1); @@ -147,7 +157,7 @@ namespace CalamityMod.Projectiles.Melee if (hasStarbits) { var rotation = Projectile.DirectionFrom(player.Center).ToRotation() - MathHelper.PiOver2; - float distanceMod = MathHelper.Min(Projectile.ai[0] / 30f, 1); + float distanceMod = MathHelper.SmoothStep(0,1,MathHelper.Min(Projectile.ai[0] / 30f, 1)); if (burstStage > 0) distanceMod = (burstStage * 0.1f); float playerLerpMod = MathHelper.Min(Projectile.ai[0] / 40f, 1); diff --git a/Projectiles/Melee/CrescentMoonProj.cs b/Projectiles/Melee/CrescentMoonProj.cs index 5c64402668..aa05543aa1 100644 --- a/Projectiles/Melee/CrescentMoonProj.cs +++ b/Projectiles/Melee/CrescentMoonProj.cs @@ -53,9 +53,26 @@ namespace CalamityMod.Projectiles.Melee GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center, Vector2.UnitX.RotatedBy(Projectile.rotation) * 0.1f, "CalamityMod/Projectiles/Melee/CrescentMoonProj", false, 2, 1f, Color.White, Vector2.One, false)); } - Projectile.velocity *= 0.95f; + Projectile.velocity *= 0.965f; if (Projectile.timeLeft < 225 * Projectile.MaxUpdates) - CalamityUtils.HomeInOnNPC(Projectile, true, 600f, 12f, 20f); + CalamityUtils.HomeInOnNPC(Projectile, true, 600f, 12f, 20f,true) + } + + public override void OnKill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 109, + 111, + 132 + }); + + int dust = Dust.NewDust(Projectile.Center, 0, 0, dustType); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 2; + } } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Melee/GalileoGladiusGlow.png b/Projectiles/Melee/GalileoGladiusGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..d12f3ee1f663fd6140169121e7343570f6411e26 GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^IzX()!3-o*CUIK;DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheYymzYuK)l42QotsU9JOCOeH~n!T%YaZa44(@;D1TB8wRq_zrEpqg!|5uRzDo>~kXKn^Q| z6eBAGBaj6$QyR(!xmJUb87$5OWE(OvF$e(ZC?L*kX90_60ofq%sf>}~1<+G48qHD$ zpwt9*1{R=710!Pt#sv^lK{m23fS5D|$OZu>pt($7l|hykKo(S&p@9KN_Dr5wjaTps z86Y#s)5S5w!~5-p(_9P+94;4s{h#0WCY9Og5sU6F>#sRlPY(z2P7mYL`NH&WN}sxF zvTkLCquRa1>S!5dnR>B<9Z{cusZ5*dxL87y`*y%OgDQif9d8#4>-YV(*!DZ(`^I;I ZF$`b7vxR;+FvkyMv!|<{%Q~loCICicamoMy literal 0 HcmV?d00001 diff --git a/Projectiles/Melee/ScorpiusConstellation.cs b/Projectiles/Melee/ScorpiusConstellation.cs new file mode 100644 index 0000000000..75a44aadc8 --- /dev/null +++ b/Projectiles/Melee/ScorpiusConstellation.cs @@ -0,0 +1,143 @@ + +using System; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Melee +{ + public class ScorpiusConstellation : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Rogue"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public static int lifetime = 150; + + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Type] = 8; + ProjectileID.Sets.TrailingMode[Type] = 1; + } + + public override void SetDefaults() + { + + lifetime = 90; + Projectile.width = 10; + Projectile.height = 10; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.tileCollide = false; + Projectile.penetrate = -1; + Projectile.timeLeft = lifetime; + Projectile.DamageType = DamageClass.Melee; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + Projectile.scale = 0; + } + + public override void AI() + { + if (Projectile.velocity.Length() > 0) + Projectile.rotation = Projectile.velocity.ToRotation(); + var Owner = Main.player[Projectile.owner]; + var DrawCenter = Projectile.Center + Projectile.velocity; + var StarScale = 0.2f; + Projectile.scale = 0.75f*MathF.Min(MathF.Pow((lifetime- Projectile.timeLeft)/ 20f,2f), 1f); + Projectile.Opacity = MathF.Min(Projectile.timeLeft / 20f, 1f); + Vector2 ada = default; + void SpawnStar(Vector2 offset, float intensity, int flashOffset = 0, int flashMod = 60) + { + offset += new Vector2(5, 49.25f); //this centers the constellation + offset.X *= Projectile.spriteDirection; + var star = new BloomParticle(DrawCenter + offset.RotatedBy(Projectile.rotation) * Projectile.scale - (Owner.oldVelocity * Math.Clamp(offset.Length() * 0.001f, 0, 1)), Vector2.Zero, Color.SkyBlue * Projectile.Opacity * ((Owner.miscCounter + flashOffset) % flashMod < 5 ? 0.75f : 1f), StarScale * intensity, StarScale * intensity, 2, false); + var star2 = new CustomSpark(DrawCenter + offset.RotatedBy(Projectile.rotation) * Projectile.scale - (Owner.oldVelocity * Math.Clamp(offset.Length() * 0.001f, 0, 1)), Vector2.UnitX.RotatedBy(MathHelper.Pi * ((Owner.miscCounter + flashOffset) / 300f)) * 0.1f, "CalamityMod/Particles/Sparkle", false, 2, 4 * StarScale * intensity, Color.White * Projectile.Opacity, Vector2.One); + GeneralParticleHandler.SpawnParticle(star); + GeneralParticleHandler.SpawnParticle(star2); + } + if (Projectile.FinalExtraUpdate()) + { + SpawnStar(new Vector2(0f, 0f), 0.75f, 25); //Center + SpawnStar(new Vector2(99,-166), 1.25f, 20); //Antares + SpawnStar(new Vector2(224,-300), 0.75f, 15); //topHead + SpawnStar(new Vector2(243,-237), 0.75f, 10); //midHead + SpawnStar(new Vector2(243,-163), 0.75f, 5); //lowHead + SpawnStar(new Vector2(246,-97), 0.75f, 0); //bottomHead + SpawnStar(new Vector2(-255,77), 0.75f, 55); //tail + SpawnStar(new Vector2(-176,71), 0.75f, 50); //zig + SpawnStar(new Vector2(-236,142), 0.75f, 45); //zag + SpawnStar(new Vector2(-188,197), 0.75f, 40); //tail 4 + SpawnStar(new Vector2(-85,193), 0.75f, 35); //taol 5 + SpawnStar(new Vector2(-19,172), 0.75f, 30); //tail 6 + } + Projectile.position = Projectile.Center; + Projectile.Size = new Vector2(510,510) * Projectile.scale; + Projectile.Center = Projectile.position; + } + + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 120); + + public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType(), 120); + + public override bool PreDraw(ref Color lightColor) + { + var SiriusPos = Projectile.Center; + var Owner = Main.player[Projectile.owner]; + void ConnectStars(Vector2 point1, Vector2 point2) + { + point1 += new Vector2(5, 49.25f); //this centers the constellation + point2 += new Vector2(5, 49.25f); + point1.X *= Projectile.spriteDirection; + point2.X *= Projectile.spriteDirection; + var color = Color.SkyBlue * 0.5f * ((MathF.Sin(Main.GlobalTimeWrappedHourly) + 1) * 0.25f + 0.5f); + CalamityUtils.DrawLineBetter(Main.spriteBatch, SiriusPos + point1.RotatedBy(Projectile.rotation) * Projectile.scale, SiriusPos + point2.RotatedBy(Projectile.rotation) * Projectile.scale, color * Projectile.Opacity, 3); + } + //Order is back of tail to front. Last four are the head + ConnectStars( new Vector2(-255, 77), new Vector2(-176, 71)); + ConnectStars(new Vector2(-176, 71), new Vector2(-236, 142)); + ConnectStars(new Vector2(-236, 142), new Vector2(-188, 197)); + ConnectStars(new Vector2(-188, 197), new Vector2(-85, 193)); + ConnectStars(new Vector2(-85, 193), new Vector2(-19, 172)); + ConnectStars(new Vector2(-19, 172), new Vector2(0f, 0f)); + ConnectStars(new Vector2(0f, 0f), new Vector2(99, -166)); + ConnectStars(new Vector2(99, -166), new Vector2(224, -300)); + ConnectStars(new Vector2(99, -166), new Vector2(243, -237)); + ConnectStars(new Vector2(99, -166), new Vector2(243, -163)); + ConnectStars(new Vector2(99, -166), new Vector2(246, -97)); + + /* + SpawnStar(new Vector2(0f, 0f), 0.75f, 0); //Center + SpawnStar(new Vector2(99, -166), 1.25f, 40); //Antares + SpawnStar(new Vector2(224, -300), 0.75f, 40); //topHead + SpawnStar(new Vector2(243, -237), 0.75f, 40); //midHead + SpawnStar(new Vector2(243, -163), 0.75f, 40); //lowHead + SpawnStar(new Vector2(246, -97), 0.75f, 40); //bottomHead + SpawnStar(new Vector2(-255, 77), 0.75f, 40); //tail + SpawnStar(new Vector2(-176, 71), 0.75f, 40); //zig + SpawnStar(new Vector2(-236, 142), 0.75f, 40); //zag + SpawnStar(new Vector2(-188, 197), 0.75f, 40); //tail 4 + SpawnStar(new Vector2(-85, 193), 0.75f, 40); //taol 5(-19,172) + */ + return false; + } + + public override void OnKill(int timeLeft) + { + for (int i = 0; i < 5; i++) + { + int dustType = Utils.SelectRandom(Main.rand, new int[] + { + 109, + 111, + 132 + }); + + int dust = Dust.NewDust(Projectile.Center, 1, 1, dustType, Projectile.velocity.X, Projectile.velocity.Y, 0, default, 1.5f); + Main.dust[dust].noGravity = true; + } + } + } +} diff --git a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs index 9c67d72474..81b01930b4 100644 --- a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs +++ b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs @@ -6,9 +6,11 @@ using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Sounds; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.Audio; using Terraria.DataStructures; +using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; @@ -40,7 +42,8 @@ namespace CalamityMod.Projectiles.Melee.Shortswords public override void Spawn(IEntitySource source) { - angle = angle.RotatedByRandom(0.2f); + angle = angle.RotatedByRandom(0.25f); + //Projectile.scale *= 3; } public override void AdditionalAI() @@ -55,14 +58,13 @@ namespace CalamityMod.Projectiles.Melee.Shortswords for (float i = -1; i <= 1; i += 2f) { Vector2 velocity = -sparkAngle.RotatedBy(i * -0.3f) * 10f; - Vector2 position = Projectile.Center + new Vector2(MathHelper.Lerp(20, 100, SwingCompletion), i * 15).RotatedBy(sparkAngle.ToRotation()); + Vector2 position = Projectile.Center + new Vector2(MathHelper.Lerp(20, 93 * Projectile.scale, SwingCompletion), i * 15).RotatedBy(sparkAngle.ToRotation()); Particle spark = new CustomSpark(position, velocity, "CalamityMod/Particles/BloomCircle", false, 3, 0.3f, color, new Vector2(0.3f, 3f),noShrink:true); GeneralParticleHandler.SpawnParticle(spark); } - if (Projectile.FinalExtraUpdate()) - GeneralParticleHandler.SpawnParticle(new CustomSpark(Projectile.Center + sparkAngle * MathHelper.Lerp(0, 60, SwingCompletion), sparkAngle, "CalamityMod/Particles/GlowBlade", false, 3, 0.04f, Color.SkyBlue, new Vector2(MathHelper.Lerp(0.5f, 1f, SwingCompletion), MathHelper.Lerp(0.1f, 1.5f, SwingCompletion)), shrinkSpeed: 0.2f)); } Lighting.AddLight(Main.player[Projectile.owner].Center, 0.96f, 0.91f, 1f); + Main.player[Projectile.owner].heldProj = Projectile.whoAmI; } public override float SwingFunction() @@ -70,6 +72,28 @@ namespace CalamityMod.Projectiles.Melee.Shortswords return 0; //Galileo stabs, not swings. } + public override bool PreDraw(ref Color lightColor) + { + var tex = ModContent.Request("CalamityMod/Particles/GlowBlade").Value; + var sparkAngle = angle.RotatedBy(MathHelper.Pi); + Main.spriteBatch.SafeBegin(SpriteSortMode.Immediate, BatchSetting.Additive, null, Main.GameViewMatrix.TransformationMatrix, () => + { + Main.spriteBatch.Draw(tex, Projectile.Center + sparkAngle * -10 - Main.screenPosition, null, Color.SkyBlue * 0.75f, sparkAngle.ToRotation() + MathHelper.PiOver2, new Vector2(tex.Width * 0.5f,tex.Height), new Vector2(0.85f, MathHelper.Lerp(0.1f, 1.4f, SwingCompletion)) * Projectile.scale * 0.04f, SpriteEffects.None, 1); + }); + + var tex2 = TextureAssets.Projectile[Type].Value; + Main.spriteBatch.Draw(tex2, Projectile.Center + new Vector2(0, Projectile.gfxOffY) - Main.screenPosition, null, Color.SkyBlue * 1f, Projectile.rotation, tex2.Size() * 0.5f, Projectile.scale, Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 1); + return false ; + } + + public override void PostDraw(Color lightColor) + { + var tex2 = ModContent.Request("CalamityMod/Projectiles/Melee/GalileoGladiusGlow").Value; + Main.spriteBatch.SafeBegin(SpriteSortMode.Immediate, BatchSetting.Additive, null, Main.GameViewMatrix.TransformationMatrix, () => + { + Main.spriteBatch.Draw(tex2, Projectile.Center + new Vector2(0, Projectile.gfxOffY) - Main.screenPosition, null, Color.SkyBlue * 0.75f, Projectile.rotation, tex2.Size() * 0.5f, Projectile.scale, Projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 1); + }); + } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 300); diff --git a/Projectiles/Ranged/HalleysStarburst.cs b/Projectiles/Ranged/HalleysStarburst.cs index 250e474a05..9cacad14bc 100644 --- a/Projectiles/Ranged/HalleysStarburst.cs +++ b/Projectiles/Ranged/HalleysStarburst.cs @@ -27,17 +27,51 @@ namespace CalamityMod.Projectiles.Ranged Projectile.ignoreWater = true; Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; - Projectile.MaxUpdates = 2; - Projectile.timeLeft = 300 * Projectile.MaxUpdates; + Projectile.MaxUpdates = 4; + Projectile.timeLeft = 120 * Projectile.MaxUpdates; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; Projectile.frame = Main.rand.Next(0, 6); Projectile.scale = 0.75f; + Projectile.rotation += Main.rand.NextFloat(0, 3); } public override void AI() { - Projectile.frameCounter++; + if (drawColor == Color.Black) + { + switch (Main.rand.Next(1, 7)) + { + case 1: + drawColor = Color.HotPink; + break; + case 2: + drawColor = Color.Yellow; + break; + case 3: + drawColor = Color.LimeGreen; + break; + case 4: + drawColor = Color.SkyBlue; + break; + case 5: + drawColor = Color.Lavender; + break; + case 6: + + drawColor = Color.White; + break; + } + } + Projectile.rotation += Projectile.direction * 0.05f; + if (Projectile.FinalExtraUpdate()) + { + var star = new BloomParticle(Projectile.Center, Vector2.Zero, drawColor, 0.2f, 0.25f, 2, false); + var star2 = new CustomSpark(Projectile.Center, Vector2.UnitX.RotatedBy(Projectile.rotation) * 0.1f, "CalamityMod/Particles/Sparkle", false, 2, 1f, Color.White, Vector2.One); + GeneralParticleHandler.SpawnParticle(star); + GeneralParticleHandler.SpawnParticle(star2); + } + Projectile.frameCounter++; if (Projectile.frameCounter > 5) { Projectile.frame++; @@ -73,7 +107,7 @@ namespace CalamityMod.Projectiles.Ranged } } lightColor = drawColor; - return base.PreDraw(ref lightColor); + return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -92,7 +126,7 @@ namespace CalamityMod.Projectiles.Ranged dust.velocity = Projectile.velocity.RotatedByRandom(0.5f) * Main.rand.NextFloat(0.2f, 2.1f); dust.noGravity = true; } - Main.player[Projectile.owner].Calamity().HalleyHitCooldown += 7; + Main.player[Projectile.owner].Calamity().HalleyHitCooldown += 8; } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Summon/SiriusMinion.cs b/Projectiles/Summon/SiriusMinion.cs index b4fff42adf..e7647fc587 100644 --- a/Projectiles/Summon/SiriusMinion.cs +++ b/Projectiles/Summon/SiriusMinion.cs @@ -74,7 +74,7 @@ namespace CalamityMod.Projectiles.Summon TimerForShooting++; // Makes the star oscillate. - Projectile.scale = MathHelper.Lerp(0.22f,0.24f, (1+MathF.Sin((Projectile.frameCounter* 0.01f))*0.5f)); + Projectile.scale = MathHelper.Lerp(0.27f,0.29f, (1+MathF.Sin((Projectile.frameCounter* 0.01f))*0.5f)); Projectile.frameCounter++; if (Projectile.frameCounter > 31415) Projectile.frameCounter = 0; @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Summon Projectile.velocity = Owner.velocity * 0f; var SiriusPos = Projectile.Center + Projectile.velocity; - var SiriusScale = 0.075f; + var SiriusScale = 0.1f; void SpawnStar(float SlotRequirement, Vector2 offset, float intensity, int flashOffset = 0, int flashMod = 100) { if (SlotRequirement > 0 && Projectile.minionSlots < SlotRequirement) @@ -211,7 +211,7 @@ namespace CalamityMod.Projectiles.Summon point1.X *= Projectile.spriteDirection; point2.X *= Projectile.spriteDirection; var color = Color.SkyBlue * 0.5f * ((MathF.Sin(Main.GlobalTimeWrappedHourly) + 1) * 0.25f + 0.5f); - Utils.DrawLine(Main.spriteBatch, SiriusPos+point1 * Projectile.scale - (Owner.oldVelocity * Math.Clamp(point1.Length() * 0.001f, 0, 1)), SiriusPos+point2* Projectile.scale - (Owner.oldVelocity * Math.Clamp(point2.Length() * 0.001f, 0, 1)), color ,color, 1); + CalamityUtils.DrawLineBetter(Main.spriteBatch, SiriusPos+point1 * Projectile.scale - (Owner.oldVelocity * Math.Clamp(point1.Length() * 0.001f, 0, 1)), SiriusPos+point2* Projectile.scale - (Owner.oldVelocity * Math.Clamp(point2.Length() * 0.001f, 0, 1)), color, 1.5f); } ConnectStars(4,new Vector2(0f, 0f), new Vector2(119f, 32f)); //Sirius - Front Foot ConnectStars(2,new Vector2(0f, 0f), new Vector2(-118f, 217f)); //Sirius - Bottom diff --git a/Utilities/ProjectileUtils.cs b/Utilities/ProjectileUtils.cs index bf30417251..876ee61883 100644 --- a/Utilities/ProjectileUtils.cs +++ b/Utilities/ProjectileUtils.cs @@ -165,7 +165,7 @@ namespace CalamityMod } } - public static void HomeInOnNPC(Projectile projectile, bool ignoreTiles, float distanceRequired, float homingVelocity, float inertia) + public static void HomeInOnNPC(Projectile projectile, bool ignoreTiles, float distanceRequired, float homingVelocity, float inertia, bool respectIFrames = false) { if (!projectile.friendly) return; @@ -184,7 +184,7 @@ namespace CalamityMod foreach (NPC n in Main.ActiveNPCs) { float extraDistance = (n.width / 2) + (n.height / 2); - if (!n.CanBeChasedBy(projectile, false) || !projectile.WithinRange(n.Center, maxDistance + extraDistance)) + if (!n.CanBeChasedBy(projectile, false) || !projectile.WithinRange(n.Center, maxDistance + extraDistance) || (respectIFrames && (projectile.localNPCImmunity[n.whoAmI] > 0 || n.immune[projectile.owner] > 0 || Projectile.perIDStaticNPCImmunity[projectile.type][n.whoAmI] > 0))) continue; float currentNPCDist = Vector2.Distance(n.Center, projectile.Center);