From 02ab29ce08fd27264bac8af73a5467b1889cacc0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 14 Apr 2024 10:33:00 -0700 Subject: [PATCH 1/6] Various fixes - Cultist Shield flashing fix - Soul seeker strange drawing bug fix (I think? It wasn't happening anymore for me at least when I changed display size and zoom) - Scal despawning projectiles on despawn fix - Supernova hearts resist reduction - Holy fire bullet explosion bonus lasts much longer so you can actually notice it - Hyperius slight speed increase and split projectiles no longer are made of particles (The particle cap is saved!) - Supernova stealth does a bit less damage before the actual explosion --- Balancing/BalancingChangesManager.cs | 4 +-- NPCs/CalamityGlobalNPC.cs | 4 +-- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 11 -------- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 22 +++++++++++++++- Projectiles/Ranged/HolyFireBulletProj.cs | 4 +-- Projectiles/Ranged/HyperiusBulletProj.cs | 2 +- Projectiles/Ranged/HyperiusSplit.cs | 30 ++++++++++++++++------ Projectiles/Rogue/SupernovaStealthBoom.cs | 2 +- 8 files changed, 51 insertions(+), 28 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 98eda5b212..ec523ffa48 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -485,8 +485,8 @@ namespace CalamityMod.Balancing // 30% resist to Surge Driver's alt click comets. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType()))); - // 30% resist to Supernova - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType(), ProjectileType()))); + // 20% resist to Supernova + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))); // 20% resist to Executioner's Blade stealth strikes. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType()))); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 22c471f028..59a2184b39 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6860,8 +6860,8 @@ namespace CalamityMod.NPCs GameShaders.Misc["CalamityMod:SupremeShield"].UseSecondaryColor(secondaryForcefieldColor); GameShaders.Misc["CalamityMod:SupremeShield"].UseColor(forcefieldColor); - GameShaders.Misc["CalamityMod:SupremeShield"].UseSaturation(intensity); - GameShaders.Misc["CalamityMod:SupremeShield"].UseOpacity(opacity); + GameShaders.Misc["CalamityMod:SupremeShield"].UseSaturation(1); + GameShaders.Misc["CalamityMod:SupremeShield"].UseOpacity(0.65f); GameShaders.Misc["CalamityMod:SupremeShield"].Apply(); // Actual Cultist has a bigger shield than the Clones. diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index 942d0b0902..b82c7af67e 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -262,17 +262,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - Texture2D lineTex = ModContent.Request("CalamityMod/ExtraTextures/LineFade").Value; - Main.spriteBatch.End(); - Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix); - int shootRate = BossRushEvent.BossRushActive ? 120 : 180; - float opacity = timer >= shootRate - 35 ? (timer - (BossRushEvent.BossRushActive ? 101 : 181)) * 0.03f : 0; - Vector2 lineDir = (NPC.Center - Target.Center).SafeNormalize(Vector2.UnitY); - Vector2 linePos = (lineDir * (lineTex.Height * 0.25f)) + NPC.Center - Main.screenPosition; - spriteBatch.Draw(lineTex, linePos, null, Color.Red * opacity, lineDir.ToRotation(), lineTex.Size(), NPC.scale * 1.5f, SpriteEffects.None, 0f); - Main.spriteBatch.End(); - Main.spriteBatch.Begin(); - SpriteEffects spriteEffects = SpriteEffects.None; if (NPC.spriteDirection == 1) spriteEffects = SpriteEffects.FlipHorizontally; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index fe97977c4d..0414bb836c 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -755,7 +755,27 @@ namespace CalamityMod.NPCs.SupremeCalamitas rumbleSound.Stop(); canDespawn = true; - despawnProj = true; + for (int x = 0; x < Main.maxProjectiles; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.active) + { + if (projectile.type == bulletHellblast || + projectile.type == barrage || + projectile.type == wave) + { + if (projectile.timeLeft > 60) + projectile.timeLeft = 60; + } + else if (projectile.type == fireblast || projectile.type == gigablast) + { + projectile.ai[2] = 1f; + + if (projectile.timeLeft > 15) + projectile.timeLeft = 15; + } + } + } NPC.Opacity = MathHelper.Lerp(NPC.Opacity, 0f, 0.065f); NPC.velocity = Vector2.Lerp(Vector2.UnitY * -4f, Vector2.Zero, (float)Math.Sin(MathHelper.Pi * NPC.Opacity)); diff --git a/Projectiles/Ranged/HolyFireBulletProj.cs b/Projectiles/Ranged/HolyFireBulletProj.cs index 937830714c..97da541fc2 100644 --- a/Projectiles/Ranged/HolyFireBulletProj.cs +++ b/Projectiles/Ranged/HolyFireBulletProj.cs @@ -46,9 +46,9 @@ namespace CalamityMod.Projectiles.Ranged } Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(90f); Projectile.spriteDirection = Projectile.direction; - if (Projectile.localAI[0] >= 10 && Projectile.localAI[0] <= 30 && SizeBonus > 1) + if (Projectile.localAI[0] >= 30 && SizeBonus > 1) { - SizeBonus -= 0.1f; + SizeBonus -= 0.02f; } // Flaking dust Projectile.localAI[0] += 1f; diff --git a/Projectiles/Ranged/HyperiusBulletProj.cs b/Projectiles/Ranged/HyperiusBulletProj.cs index 6becd523e2..8a5405821b 100644 --- a/Projectiles/Ranged/HyperiusBulletProj.cs +++ b/Projectiles/Ranged/HyperiusBulletProj.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Ranged Projectile.DamageType = DamageClass.Ranged; Projectile.penetrate = 1; Projectile.timeLeft = 1200; - Projectile.extraUpdates = 5; + Projectile.extraUpdates = 7; AIType = ProjectileID.Bullet; Projectile.ignoreWater = true; Projectile.Calamity().pointBlankShotDuration = CalamityGlobalProjectile.DefaultPointBlankDuration; diff --git a/Projectiles/Ranged/HyperiusSplit.cs b/Projectiles/Ranged/HyperiusSplit.cs index 7cd32b9906..8bff3cfed8 100644 --- a/Projectiles/Ranged/HyperiusSplit.cs +++ b/Projectiles/Ranged/HyperiusSplit.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Ammo; using CalamityMod.Particles; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -15,6 +16,11 @@ namespace CalamityMod.Projectiles.Ranged private int rotDirection = 1; private float rotIntensity; private bool rotPhase2 = false; + public override void SetStaticDefaults() + { + ProjectileID.Sets.TrailCacheLength[Projectile.type] = 20; + ProjectileID.Sets.TrailingMode[Projectile.type] = 2; + } public override void SetDefaults() { Projectile.width = 12; @@ -35,12 +41,10 @@ namespace CalamityMod.Projectiles.Ranged public override void AI() { - Player Owner = Main.player[Projectile.owner]; - float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); - Projectile.localAI[0]++; if (currentColor == Color.Black) { + Projectile.scale = 0.025f; Projectile.alpha = 255; rotDirection = Main.rand.NextBool() ? 1 : -1; rotIntensity = Main.rand.NextFloat(0.5f, 1.5f); @@ -64,11 +68,6 @@ namespace CalamityMod.Projectiles.Ranged break; } } - if (targetDist < 1200f) - { - GlowOrbParticle orb = new GlowOrbParticle(Projectile.Center - Projectile.velocity, -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.9f), false, 3, 0.55f, currentColor, true, true); - GeneralParticleHandler.SpawnParticle(orb); - } if (Projectile.timeLeft == 180) rotPhase2 = true; @@ -88,13 +87,28 @@ namespace CalamityMod.Projectiles.Ranged { for (int b = 0; b < 2; b++) { + /* Dust dust = Dust.NewDustPerfect(Projectile.Center, 66, new Vector2(2, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.5f)); dust.noGravity = true; dust.scale = Main.rand.NextFloat(0.5f, 1.1f); dust.color = currentColor; dust.fadeIn = 0; + */ + GlowOrbParticle orb = new GlowOrbParticle(Projectile.Center, new Vector2(2, 2).RotatedByRandom(100) * Main.rand.NextFloat(0.2f, 1.5f), false, 5, Main.rand.NextFloat(0.35f, 0.45f), currentColor, true, true); + GeneralParticleHandler.SpawnParticle(orb); } } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, 12, targetHitbox); + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request("CalamityMod/Particles/LargeBloom").Value; + Texture2D texture2 = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.Lerp(currentColor, Color.White, 0.15f), 1, texture); + CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], Color.White with { A = 0 }, 1, texture2); + //Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition, null, Color.White, 0, texture.Size() * 0.5f, Projectile.scale * 1.5f, 0, 0f); + return false; + } public override bool? CanDamage() => Projectile.localAI[0] < 20 ? false : null; public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) => modifiers.SourceDamage.Flat += HyperiusBullet.SplitBulletBonusDamage; diff --git a/Projectiles/Rogue/SupernovaStealthBoom.cs b/Projectiles/Rogue/SupernovaStealthBoom.cs index bf3a8fb660..de19b18d30 100644 --- a/Projectiles/Rogue/SupernovaStealthBoom.cs +++ b/Projectiles/Rogue/SupernovaStealthBoom.cs @@ -373,7 +373,7 @@ namespace CalamityMod.Projectiles.Rogue public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) // Add to regular plz { if (!damageFrame) - modifiers.SourceDamage *= 0.004f; + modifiers.SourceDamage *= 0.0025f; if (Projectile.damage < 1) Projectile.damage = 1; } From 9eaac70544aeaea62393abd35e6317c326aa41c1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 14 Apr 2024 18:23:40 -0400 Subject: [PATCH 2/6] Elysian Arrow resprite --- Items/Ammo/ElysianArrow.png | Bin 595 -> 862 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Items/Ammo/ElysianArrow.png b/Items/Ammo/ElysianArrow.png index e0936c25565bd052099993b0f1a73c4c1cb6ce5e..a724665e76ee8f77a66e22d62b52a6834cddc5b8 100644 GIT binary patch delta 825 zcmV-91IGN*1l|Ua7YZ&21^@s6C3Z=Hks%*{0`5sfK~zXfy_H=^lVKFc->I|NR&Hjk zt(MEJPxL}1NbC!tpoF|D2I5rF)JKG|HgV?EUjOGgqYb+1vH!*UJ7@3v?)h`x^PERx(d8)?!KG30^r9H}*e6L!EWbMD@* z18==dfSLCljtV%G@5uiwh#!vDZvuJcbCoN>j)8HI)!?}aw)qZ%(i~CKs0wxmz?x$E zimZ3TGa@4K{jGy1z&2cE)~Ke)j2iKOO3`&5aI<|a*m2hjmK4&ObtPKR)jkSxE#)~n zu+fSjIzFA|%yZ#9`1F+#oO*v4d>)|2e%K!Yc@Ijh5dw=o8)RqYyN@AnZlRhqZn*}s zlNAQqbAxf}czKQl6?SGQuz~Sd7|x!&J&oLIroJi6%f&mx6Eu%_F3ESqVrQy<$kBrs z5^GiJQ3UfhAq7)T3Uu_}vBV4<@jUX}i-N06)Hl1T%WKYOP^+gDJLP@aqGo2pX z;a1x;$c|XPeHIasq&b?KM{rPKr_rQ30@+EempVBTrvAFv{ROPfr`o;vA-S_t6SDSB z2-LQ;gS^}SrbU-%ZYhVZ0`eVyDPyf7SdA;so$A}gV8;MW#E)*euLO@16`E)A9Q7=0 zLZJ20N_$T31z(3gfv)x|Ad74B^Q;e46xm-bZ!(5rs1DFi&d%^0lseabkk#xyBO(&_ zk1;z7@5^)aeTdHdiSQdRD9$ryWf{olo8r7o%+LpM5=(QWX(+WLC|Kry1Y=)=sMV6H zM&w*8%l(}o>y&>IbS$5hTO(>;RqRYvnj=2f9*aH29bdYXzE6hX4R101jnXNoGw=04e|g00;m8000000Mb*F00000NkvXXu0mjf DY*&Vc delta 556 zcmV+{0@MB82GazP7YZy01^@s6Xujx*ks%*{010qNS#tmY4#NNd4#NS*Z>VGd00HPp zL_t(YOYM|TD1%`f$KOfpgmN+eii5+ryayLrtyaQP^S4lw0}i4Ua&UIgD3JqG%L?V+ zl!nwwElLi%umeS54Ei+OzkP|u&GXNtF#niTW~s~C2p^q?9sTfb zCiL;vsT#}y)6Yj%f^&(6C zCrRiUJ5xNBg?aG7RT$=>Gblb04<#J$sKvx!8NB5AxzXb(WQmdxN$eU= uf-dn0OY|j5t*Bm~@ryP3CW00hlB9QlPn$(5z=TZz0000Id!s From 90360dea7933883439e39c1064708a7daef585f4 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sun, 14 Apr 2024 22:17:20 -0600 Subject: [PATCH 3/6] Gave hearts and seekers more supernova resist --- Balancing/BalancingChangesManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index ec523ffa48..bc26354d12 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -485,8 +485,8 @@ namespace CalamityMod.Balancing // 30% resist to Surge Driver's alt click comets. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType()))); - // 20% resist to Supernova - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType(), ProjectileType()))); + // 30% resist to Supernova + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType(), ProjectileType()))); // 20% resist to Executioner's Blade stealth strikes. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.8f, ProjectileType()))); @@ -499,12 +499,12 @@ namespace CalamityMod.Balancing // 50% resist to Subsuming Vortex. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.5f, ProjectileType(), ProjectileType(), ProjectileType()))); + // 40% resist to Supernova + NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.6f, ProjectileType(), ProjectileType()))); + // 30% resist to Zenith. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileID.FinalFractal))); - // 30% resist to Supernova - NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.7f, ProjectileType(), ProjectileType()))); - // 25% resist to Yharim's Crystal. NPCSpecificBalancingChanges.Add(new NPCBalancingChange(NPCType(), new ProjectileResistBalancingRule(0.75f, ProjectileType()))); From de6e2bb71b66445b10a34a9d2cf47fa89ab641ed Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sun, 14 Apr 2024 22:17:53 -0600 Subject: [PATCH 4/6] nerfed Scuttler's jewel slightly --- Projectiles/CalamityGlobalProjectile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 17e223f172..0806e8b57e 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -4489,7 +4489,7 @@ namespace CalamityMod.Projectiles if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0) { - int damage = (int)player.GetTotalDamage().ApplyTo(18); + int damage = (int)player.GetTotalDamage().ApplyTo(16); damage = player.ApplyArmorAccDamageBonusesTo(damage); int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); From 94e15a87cda3c135471449d0760e76b4aa45bcf3 Mon Sep 17 00:00:00 2001 From: Storm2103 Date: Sun, 14 Apr 2024 22:36:58 -0600 Subject: [PATCH 5/6] Nerfed EMirror to only give 50% of stealth instead of filling it given it already being extremely strong before the dodge rework which made it even stronger; this would also make it more consistent with the rest of the ink bomb line which only grants 50%. Angel and CIT, the other 2 prominent rogue testers besides me, agreed on this change: https://discord.com/channels/458428222061936650/583454384290267147/1229272097587466371 --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 21c4b3efeb..cbcb1a724a 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -199,7 +199,7 @@ namespace CalamityMod.CalPlayer Player.noKnockback = true; Player.GiveIFrames(Player.longInvince ? 100 : 60, true); - rogueStealth = rogueStealthMax; + rogueStealth += 0.5f; SoundEngine.PlaySound(SoundID.Item68, Player.Center); var source = Player.GetSource_Accessory(FindAccessory(ModContent.ItemType())); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 55b5bc328a..aee6c98250 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -618,7 +618,7 @@ EclipseMirror: { Grants the ability to evade attacks in a blast of darksun light, which inflicts extreme damage in a wide area Attacks that deal less than 5% of your max life in damage will not be evaded The evade has a cooldown that ranges between 15 and 90 seconds depending on the evaded attack's damage - Evading an attack grants full stealth + Evading an attack grants a lot of stealth This cooldown is shared with all other dodges and reflects 'Its reflection shows naught but darkness' ''' From 627b28877eb5fbf10dc495e7826d2e437c5e4511 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 15 Apr 2024 09:13:43 -0400 Subject: [PATCH 6/6] Scuttler's Jewel spike can now spawn on-hit --- Projectiles/CalamityGlobalProjectile.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 0806e8b57e..0425409c89 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -128,6 +128,7 @@ namespace CalamityMod.Projectiles public bool extorterBoost = false; public bool LocketClone = false; public bool CannotProc = false; + public bool JewelSpikeSpawned = false; // Note: Although this was intended for fishing line colors, I use this as an AI variable a lot because vanilla only has 4 that sometimes are already in use. ~Ben // TODO -- uses of this variable are undocumented and unstable. Remove it from the API surface. @@ -3943,6 +3944,20 @@ namespace CalamityMod.Projectiles } } } + + // Scuttler's Jewel projectiles can spawn either on-hit or on-kill, but only spawn once per projectile. + if (projectile.owner == Main.myPlayer && !projectile.npcProj && !projectile.trap && projectile.CountsAsClass() && modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) + { + int damage = (int)player.GetTotalDamage().ApplyTo(16); + damage = player.ApplyArmorAccDamageBonusesTo(damage); + + int spike = Projectile.NewProjectile(projectile.GetSource_FromThis(), projectile.Center, Vector2.Zero, ProjectileType(), damage, projectile.knockBack, projectile.owner); + Main.projectile[spike].frame = 4; + if (spike.WithinBounds(Main.maxProjectiles)) + Main.projectile[spike].DamageType = DamageClass.Generic; + modPlayer.scuttlerCooldown = 30; + JewelSpikeSpawned = true; + } } #endregion @@ -4487,7 +4502,8 @@ namespace CalamityMod.Projectiles } } - if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0) + // Make sure the spike doesn't spawn again if it's already been spawned by on-hit. + if (modPlayer.scuttlersJewel && stealthStrike && modPlayer.scuttlerCooldown <= 0 && !JewelSpikeSpawned) { int damage = (int)player.GetTotalDamage().ApplyTo(16); damage = player.ApplyArmorAccDamageBonusesTo(damage);