diff --git a/Balancing/BalancingChangesManager.cs b/Balancing/BalancingChangesManager.cs index 98eda5b212..bc26354d12 100644 --- a/Balancing/BalancingChangesManager.cs +++ b/Balancing/BalancingChangesManager.cs @@ -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()))); 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/Items/Ammo/ElysianArrow.png b/Items/Ammo/ElysianArrow.png index e0936c2556..a724665e76 100644 Binary files a/Items/Ammo/ElysianArrow.png and b/Items/Ammo/ElysianArrow.png differ 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' ''' diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 7ae6cfa1f1..f49f9c92ff 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/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 17e223f172..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,9 +4502,10 @@ 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(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); 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; }