diff --git a/CalPlayer/DrawLayers/CombHairSparkleLayer.cs b/CalPlayer/DrawLayers/CombHairSparkleLayer.cs index 18ca428d85..e2525ac081 100644 --- a/CalPlayer/DrawLayers/CombHairSparkleLayer.cs +++ b/CalPlayer/DrawLayers/CombHairSparkleLayer.cs @@ -60,10 +60,14 @@ namespace CalamityMod.CalPlayer.DrawLayers { for (int j = TopRange; j <= BottomRange; j++) { + Tile tile = Main.tile[i, j]; + if (!tile.HasTile || !TileID.Sets.IsAContainer[tile.TileType] || TileID.Sets.BasicDresser[tile.TileType]) + continue; + int PotentialChest = Chest.FindChestByGuessing(i, j); - if (PotentialChest != -1 && !TileID.Sets.BasicDresser[Main.tile[i, j].TileType]) + if (PotentialChest != -1) { - // Adjust position ot the center of the chest + // Adjust position to the center of the chest Chest chest = Main.chest[PotentialChest]; Vector2 chestCenter = new Vector2(chest.x + 1, chest.y + 1) * 16f; float distance = Vector2.Distance(chestCenter, drawPlayer.MountedCenter); diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 2dbd3efbd9..36b0850ef5 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee #region stats public static int BaseDamage = 115; - public static int DefaultAttunement_BaseDamage = 100; + public static int DefaultAttunement_BaseDamage = 90; public static int DefaultAttunement_SigilTime = 900; public static int DefaultAttunement_BeamTime = 90; public static float DefaultAttunement_LungeDamageMult = 2f; @@ -48,27 +48,27 @@ namespace CalamityMod.Items.Weapons.Melee public static float EvilAttunement_SlashDamageBoost = 3f; public static int EvilAttunement_SlashIFrames = 60; - public static int ColdAttunement_BaseDamage = 150; + public static int ColdAttunement_BaseDamage = 140; public static float ColdAttunement_ThirdSwingBoost = 1.25f; public static float ColdAttunement_MistDamageReduction = 0.11f; - public static int HotAttunement_BaseDamage = 135; + public static int HotAttunement_BaseDamage = 126; public static int HotAttunement_PlayerShredIFrames = 8; public static float HotAttunement_ShotDamageBoost = 4.5f; public static int HotAttunement_LocalIFrames = 24; //Be warned its got one extra update so all the iframes should be divided in 2 public static float HotAttunement_ShredDecayRate = 0.65f; //How much charge is lost per frame. - public static int TropicalAttunement_BaseDamage = 150; + public static int TropicalAttunement_BaseDamage = 132; public static float TropicalAttunement_ChainDamageReduction = 0.6f; public static float TropicalAttunement_VineDamageReduction = 0.3f; public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.5f; //It also crits, so be mindful of that public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 - public static int HolyAttunement_BaseDamage = 66; - public static float HolyAttunement_BaseSwingDamageMult = 0.75f; - public static float HolyAttunement_FullSwingDamageMult = 1.5f; - public static float HolyAttunement_ThrowDamageBoost = 3.8f; - public static int HolyAttunement_LocalIFrames = 16; //Be warned its got 1 extra update yadda yadda + public static int HolyAttunement_BaseDamage = 84; + public static float HolyAttunement_BaseSwingDamageMult = 0.5f; + public static float HolyAttunement_FullSwingDamageMult = 1f; + public static float HolyAttunement_ThrowDamageBoost = 3f; + public static int HolyAttunement_LocalIFrames = 20; //Be warned its got 1 extra update yadda yadda public static float HolyAttunement_MonolithDamage = 0.5f; #endregion diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 13c460b178..9e640ee358 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -650,10 +650,9 @@ namespace CalamityMod.NPCs.CalClone float phaseTimer = 400f - (death ? 120f * (1f - lifeRatio) : 0f); if (NPC.ai[2] >= phaseTimer || phase4) { - if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) - NPC.ai[1] = 4f; - else - NPC.ai[1] = 1f; + // Prevent going to other positions during brothers phase + if (!brotherAlive) + NPC.ai[1] = death && !phase4 && Main.rand.NextBool() ? 4f : 1f; NPC.ai[2] = 0f; if (death) @@ -662,18 +661,15 @@ namespace CalamityMod.NPCs.CalClone NPC.netUpdate = true; } - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !brotherAlive) { NPC.localAI[1] += 1f; - if (!brotherAlive) - { - if (expertMode) - NPC.localAI[1] += death ? 2f * (1f - lifeRatio) : 1f - lifeRatio; - if (revenge) - NPC.localAI[1] += 0.5f; - } + if (expertMode) + NPC.localAI[1] += death ? 2f * (1f - lifeRatio) : 1f - lifeRatio; + if (revenge) + NPC.localAI[1] += 0.5f; - if (NPC.localAI[1] >= (brotherAlive ? 180f : 120f)) + if (NPC.localAI[1] >= 120f) { NPC.localAI[1] = 0f; SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.HellfireballSound, NPC.Center); @@ -697,24 +693,21 @@ namespace CalamityMod.NPCs.CalClone // Avoid cheap bullshit NPC.damage = 0; - if (Main.netMode != NetmodeID.MultiplayerClient) + if (Main.netMode != NetmodeID.MultiplayerClient && !brotherAlive) { NPC.localAI[1] += 1f; - if (!brotherAlive) - { - if (revenge) - NPC.localAI[1] += 0.5f; - if (expertMode) - NPC.localAI[1] += 0.5f; - } + if (revenge) + NPC.localAI[1] += 0.5f; + if (expertMode) + NPC.localAI[1] += 0.5f; - if (NPC.localAI[1] >= (brotherAlive ? 75f : 50f) && Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) + if (NPC.localAI[1] >= 50f && Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) { NPC.localAI[1] = 0f; float projectileVelocity = expertMode ? 12.5f : 11f; projectileVelocity += 3f * enrageScale; - int type = brotherAlive ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int type = ModContent.ProjectileType(); int damage = brotherAlive ? HellfireballDamage : HellblastDamage; Vector2 fireballVelocity = Vector2.Normalize(player.Center - NPC.Center) * projectileVelocity; Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; @@ -726,9 +719,7 @@ namespace CalamityMod.NPCs.CalClone } else { - float ai0 = type == ModContent.ProjectileType() ? 1f : player.position.X; - float ai1 = type == ModContent.ProjectileType() ? 0f : player.position.Y; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, ai0, ai1); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, 1f); } } } @@ -737,10 +728,12 @@ namespace CalamityMod.NPCs.CalClone float phaseTimer = 240f - (death ? 60f * (1f - lifeRatio) : 0f); if (NPC.ai[2] >= phaseTimer || phase4) { - if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) + if (brotherAlive) + NPC.ai[1] = 0f; + else if (death && !phase4 && Main.rand.NextBool()) NPC.ai[1] = 0f; else - NPC.ai[1] = !brotherAlive && phase2 && revenge ? 4f : 0f; + NPC.ai[1] = phase2 && revenge ? 4f : 0f; NPC.ai[2] = 0f; if (death) @@ -753,7 +746,7 @@ namespace CalamityMod.NPCs.CalClone { // Set damage NPC.damage = NPC.defDamage; - SoundEngine.PlaySound(CalamitasClone.ChargeSound, NPC.Center); + SoundEngine.PlaySound(ChargeSound, NPC.Center); NPC.rotation = rotation; float chargeVelocity = phase4 ? 30f : death ? 28f : 25f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index eb0d0b3d33..6a643fd94b 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -66,7 +66,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.damage = (int)Math.Round(npc.defDamage * Phase2ContactDamageMult); // Variables and target - bool enrage = !BossRushEvent.BossRushActive; + bool enrage = false; bool despawn = false; // Check for Jungle diff --git a/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs b/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs index fb19dc0660..cc6e39ef9c 100644 --- a/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs +++ b/Projectiles/Melee/MendedBiomeBlade_DecaysRetortDash.cs @@ -24,15 +24,13 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { Projectile.DamageType = DamageClass.Melee; - Projectile.width = Projectile.height = 8; + Projectile.width = Projectile.height = 80; Projectile.tileCollide = false; Projectile.friendly = true; Projectile.penetrate = -1; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 60; Projectile.timeLeft = 20; - Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs index 7a7fc8cb16..68bc6ca463 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMight.cs @@ -61,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) { float collisionPoint = 0f; - float bladeLength = 100 * Projectile.scale; + float bladeLength = 105 * Projectile.scale; float bladeWidth = 20 * Projectile.scale; return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Projectile.Center + (direction * bladeLength), bladeWidth, ref collisionPoint); } @@ -171,7 +171,7 @@ namespace CalamityMod.Projectiles.Melee //Manage position and rotation - Projectile.scale = 1 + Empowerment / maxEmpowerment * 1.5f; + Projectile.scale = 1 + Empowerment / maxEmpowerment * 1.85f; oldDirection = direction; direction = direction.RotatedBy(MathHelper.Clamp(Empowerment * 1.1f / maxEmpowerment, 0.45f, 1f) * MathHelper.PiOver4 * 0.20f); @@ -222,6 +222,8 @@ namespace CalamityMod.Projectiles.Melee modifiers.SourceDamage *= MathHelper.Lerp(1f, TrueBiomeBlade.HolyAttunement_ThrowDamageBoost, Empowerment / maxEmpowerment); else modifiers.SourceDamage *= MathHelper.Lerp(TrueBiomeBlade.HolyAttunement_BaseSwingDamageMult, TrueBiomeBlade.HolyAttunement_FullSwingDamageMult, Empowerment / maxEmpowerment); + + modifiers.HitDirectionOverride = (Owner.Center.X > target.Center.X).ToDirectionInt(); } public override void OnKill(int timeLeft) diff --git a/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs index d2ada56839..a9e9b8c3b8 100644 --- a/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs +++ b/Projectiles/Melee/MendedBiomeBlade_HeavensMonolith.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.timeLeft = 102; Projectile.scale = Scale; Projectile.usesIDStaticNPCImmunity = true; - Projectile.idStaticNPCHitCooldown = 10; + Projectile.idStaticNPCHitCooldown = 20; Projectile.hide = true; }