diff --git a/Buffs/Potions/HolyWrathBuff.cs b/Buffs/Potions/HolyWrathBuff.cs index 83b9e43fa8..ee12d1a6d5 100644 --- a/Buffs/Potions/HolyWrathBuff.cs +++ b/Buffs/Potions/HolyWrathBuff.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions public override void SetDefaults() { DisplayName.SetDefault("Holy Wrath"); - Description.SetDefault("Increased damage, increased movement and flight speed, and all attacks inflict holy fire"); + Description.SetDefault("Increased damage and all attacks inflict holy fire"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/Buffs/Potions/ProfanedRageBuff.cs b/Buffs/Potions/ProfanedRageBuff.cs index fa93c8b202..719a5763f3 100644 --- a/Buffs/Potions/ProfanedRageBuff.cs +++ b/Buffs/Potions/ProfanedRageBuff.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.Potions public override void SetDefaults() { DisplayName.SetDefault("Profaned Rage"); - Description.SetDefault("Increased crit chance, movement and flight speed"); + Description.SetDefault("Increased critical strike chance"); Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = false; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 80e7467054..4facbdb339 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -2973,9 +2973,7 @@ namespace CalamityMod.CalPlayer Main.dust[dustIndex].noLight = true; } - int iframes = 150; - player.GiveIFrames(iframes, true); - spectralVeilImmunity = iframes; + spectralVeilImmunity = 60; } } } diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index f5a323c7f5..45bcd4e0af 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2739,7 +2739,6 @@ namespace CalamityMod.CalPlayer if (player.FindBuffIndex(BuffID.Lifeforce) > -1) player.ClearBuff(BuffID.Lifeforce); player.lifeMagnet = true; - player.calmed = true; } if (player.wellFed) diff --git a/CalamityLists.cs b/CalamityLists.cs index 36176ba696..d5e2af29f7 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -1484,7 +1484,8 @@ namespace CalamityMod ItemType(), ItemType(), ItemType(), - ItemType() + ItemType(), + ItemType() }; daggerProjList = new List() diff --git a/Items/Accessories/SpectralVeil.cs b/Items/Accessories/SpectralVeil.cs index 88924b10b4..42c353f0bd 100644 --- a/Items/Accessories/SpectralVeil.cs +++ b/Items/Accessories/SpectralVeil.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Items.Accessories "TOOLTIP LINE HERE\n" + "If you dodge something while invulnerable, you instantly gain full stealth\n" + "Teleportation is disabled while Chaos State is active\n" + - "Provides 10% increased movement speed\n" + "Stealth generates 20% faster while moving"); } @@ -45,7 +44,6 @@ namespace CalamityMod.Items.Accessories { player.Calamity().spectralVeil = true; player.Calamity().stealthGenMoving += 0.2f; - player.moveSpeed += 0.1f; } } } diff --git a/Items/Accessories/Wings/XerocWings.cs b/Items/Accessories/Wings/XerocWings.cs index a7483ef710..d8d63689c1 100644 --- a/Items/Accessories/Wings/XerocWings.cs +++ b/Items/Accessories/Wings/XerocWings.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Accessories.Wings DisplayName.SetDefault("Exodus Wings"); Tooltip.SetDefault("Pulsing with an alien heartbeat\n" + "Horizontal speed: 9.00\n" + - "Acceleration multiplier: 2.5\n" + + "Acceleration multiplier: 3.0\n" + "Great vertical speed\n" + "Flight time: 180\n" + "5% increased rogue damage and critical strike chance while wearing the Empyrean Armor"); @@ -61,11 +61,11 @@ namespace CalamityMod.Items.Accessories.Wings public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend) { - ascentWhenFalling = 0.75f; + ascentWhenFalling = 0.85f; ascentWhenRising = 0.15f; maxCanAscendMultiplier = 1f; - maxAscentMultiplier = 2.5f; - constantAscend = 0.125f; + maxAscentMultiplier = 3f; + constantAscend = 0.135f; } public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index f060a0121f..e6ddf33065 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -644,7 +644,7 @@ namespace CalamityMod.Items EditTooltipByNum(0, (line) => line.text += "\nCan mine Scoria Ore located in the Abyss"); if (item.type == ItemID.SolarFlarePickaxe || item.type == ItemID.VortexPickaxe || item.type == ItemID.NebulaPickaxe || item.type == ItemID.StardustPickaxe) - EditTooltipByName("Material", (line) => line.text += "\nCan mine Uelibloom Ore located in the Jungle"); + EditTooltipByName("Material", (line) => line.text += "\nCan mine Uelibloom Ore"); #endregion // Rebalances and information about vanilla set bonuses @@ -795,11 +795,11 @@ namespace CalamityMod.Items "10% increased movement speed and 12% increased jump speed"); if (item.type == ItemID.WingsSolar) - AddWingStats(9f, 2.5f, 2, 180, "7% increased melee damage and 3% increased melee critical strike chance\n" + + AddWingStats(9f, 3f, 2, 180, "7% increased melee damage and 3% increased melee critical strike chance\n" + "while wearing the Solar Flare Armor"); if (item.type == ItemID.WingsStardust) - AddWingStats(9f, 2.5f, 2, 180, "+1 max minion and 5% increased minion damage while wearing the Stardust Armor"); + AddWingStats(9f, 3f, 2, 180, "+1 max minion and 5% increased minion damage while wearing the Stardust Armor"); if (item.type == ItemID.WingsVortex) AddWingStats(6.5f, 1.5f, 1, 160, "3% increased ranged damage and 7% increased ranged critical strike chance\n" + diff --git a/Items/DifficultyItems/Death.cs b/Items/DifficultyItems/Death.cs index bd71679136..be38668425 100644 --- a/Items/DifficultyItems/Death.cs +++ b/Items/DifficultyItems/Death.cs @@ -20,7 +20,6 @@ namespace CalamityMod.Items.DifficultyItems // Biome effect lines "Allows certain bosses to spawn naturally depending on what biome you're in.\n" + - "Lethal Lava effects are always enabled.\n" + "Greatly boosts enemy spawn rates during the Blood Moon.\n" + "Makes the Abyss more treacherous to navigate.\n" + diff --git a/Items/Placeables/Banners/WulfrumSlimeBanner.cs b/Items/Placeables/Banners/WulfrumSlimeBanner.cs index 2f6b49575e..1931874629 100644 --- a/Items/Placeables/Banners/WulfrumSlimeBanner.cs +++ b/Items/Placeables/Banners/WulfrumSlimeBanner.cs @@ -1,4 +1,5 @@ using CalamityMod.Tiles; +using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -8,7 +9,7 @@ namespace CalamityMod.Items.Placeables.Banners { public override void SetStaticDefaults() { - Tooltip.SetDefault("A purely decorative banner themed after an extinct slime species"); + Tooltip.SetDefault("A decorative banner themed after an extinct slime species"); } public override void SetDefaults() @@ -27,5 +28,14 @@ namespace CalamityMod.Items.Placeables.Banners item.createTile = ModContent.TileType(); item.placeStyle = 51; } + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(ItemID.Silk, 3); + recipe.AddIngredient(ModContent.ItemType(), 3); + recipe.AddTile(TileID.Loom); + recipe.SetResult(this); + recipe.AddRecipe(); + } } } diff --git a/Items/Placeables/Furniture/AuricToilet.png b/Items/Placeables/Furniture/AuricToilet.png index 94e35486c4..bcdf04a3a6 100644 Binary files a/Items/Placeables/Furniture/AuricToilet.png and b/Items/Placeables/Furniture/AuricToilet.png differ diff --git a/Items/Potions/CadencePotion.cs b/Items/Potions/CadencePotion.cs index a7230fcd1c..7a4821b558 100644 --- a/Items/Potions/CadencePotion.cs +++ b/Items/Potions/CadencePotion.cs @@ -11,9 +11,8 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Cadance Potion"); - Tooltip.SetDefault("Gives the cadance buff which reduces spawn rates\n" + - "Increases life regen and increases max life by 25%\n" + - "Increases heart pickup range\n" + + Tooltip.SetDefault("Gives the cadance buff which increases life regeneration and heart pickup range\n" + + "Increases max life by 25%\n" + "While this potion's buff is active, Regeneration Potion and Lifeforce Potion buffs are disabled"); } diff --git a/Items/Potions/ProfanedRagePotion.cs b/Items/Potions/ProfanedRagePotion.cs index 2596c9a4cf..e1b9156735 100644 --- a/Items/Potions/ProfanedRagePotion.cs +++ b/Items/Potions/ProfanedRagePotion.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Potions public override void SetStaticDefaults() { DisplayName.SetDefault("Profaned Rage Potion"); - Tooltip.SetDefault("Increases critical strike chance by 12% and increases horizontal flight speed by 5%\n" + + Tooltip.SetDefault("Increases critical strike chance by 12%\n" + "While this potion's buff is active the Rage Potion's buff is disabled"); } diff --git a/Items/Tools/GallantPickaxe.cs b/Items/Tools/GallantPickaxe.cs index bb38dc2651..8ed50fe806 100644 --- a/Items/Tools/GallantPickaxe.cs +++ b/Items/Tools/GallantPickaxe.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { DisplayName.SetDefault("Genesis Pickaxe"); - Tooltip.SetDefault("Can mine Uelibloom Ore located in the Jungle"); + Tooltip.SetDefault("Can mine Uelibloom Ore"); } public override void SetDefaults() diff --git a/Items/Weapons/Melee/EutrophicScimitar.cs b/Items/Weapons/Melee/EutrophicScimitar.cs index 3a17c35598..e56f711d72 100644 --- a/Items/Weapons/Melee/EutrophicScimitar.cs +++ b/Items/Weapons/Melee/EutrophicScimitar.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Eutrophic Scimitar"); - Tooltip.SetDefault("Fires a beam upon swing that stuns enemies"); + Tooltip.SetDefault("Fires two beams that stun enemies"); } public override void SetDefaults() diff --git a/Items/Weapons/Melee/ForsakenSaber.cs b/Items/Weapons/Melee/ForsakenSaber.cs index b07f226414..18532a4374 100644 --- a/Items/Weapons/Melee/ForsakenSaber.cs +++ b/Items/Weapons/Melee/ForsakenSaber.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetStaticDefaults() { DisplayName.SetDefault("Forsaken Saber"); - Tooltip.SetDefault("Shoots a sand blade that alters its velocity as it travels"); + Tooltip.SetDefault("Shoots three sand blades that alter their velocity as they travel"); } public override void SetDefaults() diff --git a/Items/Weapons/Ranged/ClaretCannon.cs b/Items/Weapons/Ranged/ClaretCannon.cs index 92ffba69f4..4e436716c7 100644 --- a/Items/Weapons/Ranged/ClaretCannon.cs +++ b/Items/Weapons/Ranged/ClaretCannon.cs @@ -12,7 +12,8 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetStaticDefaults() { DisplayName.SetDefault("Claret Cannon"); - Tooltip.SetDefault("Converts musket balls into strings of 3 bloody tears that drain enemy health"); + Tooltip.SetDefault("Fires strings of 3 bullets\n" + + "Converts musket balls into bloody tears that drain enemy health"); } public override void SetDefaults() diff --git a/Items/Weapons/Rogue/KelvinCatalyst.cs b/Items/Weapons/Rogue/KelvinCatalyst.cs index edf25a841f..3ae7ca8a33 100644 --- a/Items/Weapons/Rogue/KelvinCatalyst.cs +++ b/Items/Weapons/Rogue/KelvinCatalyst.cs @@ -53,17 +53,12 @@ namespace CalamityMod.Items.Weapons.Rogue public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); - recipe.AddIngredient(ModContent.ItemType(), 200); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType(), 2); - recipe.AddIngredient(ModContent.ItemType()); - recipe.AddIngredient(ItemID.FrozenKey); - recipe.AddIngredient(ItemID.FrostCore, 2); + recipe.AddIngredient(ModContent.ItemType(), 100); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); + recipe.AddIngredient(ModContent.ItemType(), 1); recipe.AddIngredient(ModContent.ItemType(), 10); recipe.AddTile(TileID.IceMachine); recipe.SetResult(this); diff --git a/Items/Weapons/Rogue/Seraphim.cs b/Items/Weapons/Rogue/Seraphim.cs index 497f1dbb23..9e0cb8baa5 100644 --- a/Items/Weapons/Rogue/Seraphim.cs +++ b/Items/Weapons/Rogue/Seraphim.cs @@ -1,4 +1,5 @@ using CalamityMod.Items.Materials; +using CalamityMod.Tiles.Furniture.CraftingStations; using CalamityMod.Projectiles.Rogue; using Microsoft.Xna.Framework; using Terraria; @@ -46,7 +47,7 @@ namespace CalamityMod.Items.Weapons.Rogue ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 5); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddTile(ModContent.TileType()); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Items/Weapons/Typeless/AeroDynamite.cs b/Items/Weapons/Typeless/AeroDynamite.cs index 4cde2f4b5f..81d445c461 100644 --- a/Items/Weapons/Typeless/AeroDynamite.cs +++ b/Items/Weapons/Typeless/AeroDynamite.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Typeless public override void SetStaticDefaults() { - DisplayName.SetDefault("Aero Dynamite"); + DisplayName.SetDefault("Skynamite"); Tooltip.SetDefault("You don't need an aerodynamics major to use this\n" + "Throws a floaty explosive that defies gravity"); } diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 6d9388a873..eda1076fb6 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -659,7 +659,7 @@ namespace CalamityMod List enemies = AcidRainEvent.PossibleEnemiesPolter.Select(enemy => enemy.Key).ToList(); enemies.AddRange(AcidRainEvent.PossibleMinibossesPolter.Select(miniboss => miniboss.Key)); List summons = new List() { ItemType() }; - List loot = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ModContent.ItemType(), ModContent.ItemType() }; + List loot = new List() { ItemID.SharkFin, ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; List collection = new List() { ItemType() }; string instructions = $"Use a [i:{ItemType()}] or wait for the invasion to occur naturally after the Polterghast is defeated"; string despawn = CalamityUtils.ColorMessage("The mysterious creatures of the sulphuric sea descended back into the deep ocean.", new Color(146, 183, 116)); diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 055a1e1332..7e243e5fcf 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.AstrumAureus npc.height = 374; npc.defense = 40; npc.DR_NERD(0.5f); - npc.LifeMaxNERB(NPC.downedMoonlord ? 243750 : 89200, NPC.downedMoonlord ? 292500 : 107000, 740000); // 30 seconds in boss rush + npc.LifeMaxNERB(NPC.downedMoonlord ? 196000 : 98000, NPC.downedMoonlord ? 235200 : 117600, 740000); // 30 seconds in boss rush npc.aiStyle = -1; aiType = -1; npc.knockBackResist = 0f; @@ -70,8 +70,6 @@ namespace CalamityMod.NPCs.AstrumAureus public override void SendExtraAI(BinaryWriter writer) { writer.Write(stomping); - writer.Write(npc.dontTakeDamage); - writer.Write(npc.chaseable); writer.Write(npc.alpha); writer.Write(npc.localAI[2]); for (int i = 0; i < 4; i++) @@ -81,8 +79,6 @@ namespace CalamityMod.NPCs.AstrumAureus public override void ReceiveExtraAI(BinaryReader reader) { stomping = reader.ReadBoolean(); - npc.dontTakeDamage = reader.ReadBoolean(); - npc.chaseable = reader.ReadBoolean(); npc.alpha = reader.ReadInt32(); npc.localAI[2] = reader.ReadSingle(); for (int i = 0; i < 4; i++) diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 88da2f8781..bcc79d6885 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.Bumblebirb npc.height = 100; npc.defense = 40; npc.DR_NERD(0.1f); - npc.LifeMaxNERB(158500, 190000, 300000); // Old HP - 227500, 252500 + npc.LifeMaxNERB(190200, 228240, 300000); // Old HP - 227500, 252500 double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; @@ -66,7 +66,6 @@ namespace CalamityMod.NPCs.Bumblebirb public override void SendExtraAI(BinaryWriter writer) { - writer.Write(npc.dontTakeDamage); writer.Write(npc.localAI[0]); writer.Write(npc.localAI[1]); writer.Write(npc.localAI[2]); @@ -77,7 +76,6 @@ namespace CalamityMod.NPCs.Bumblebirb public override void ReceiveExtraAI(BinaryReader reader) { - npc.dontTakeDamage = reader.ReadBoolean(); npc.localAI[0] = reader.ReadSingle(); npc.localAI[1] = reader.ReadSingle(); npc.localAI[2] = reader.ReadSingle(); diff --git a/NPCs/Calamitas/CalamitasRun3.cs b/NPCs/Calamitas/CalamitasRun3.cs index 2cf870fb9f..9de3e661da 100644 --- a/NPCs/Calamitas/CalamitasRun3.cs +++ b/NPCs/Calamitas/CalamitasRun3.cs @@ -74,7 +74,6 @@ namespace CalamityMod.NPCs.Calamitas public override void SendExtraAI(BinaryWriter writer) { - writer.Write(npc.chaseable); writer.Write(npc.dontTakeDamage); writer.Write(npc.localAI[0]); writer.Write(npc.localAI[1]); @@ -86,7 +85,6 @@ namespace CalamityMod.NPCs.Calamitas public override void ReceiveExtraAI(BinaryReader reader) { - npc.chaseable = reader.ReadBoolean(); npc.dontTakeDamage = reader.ReadBoolean(); npc.localAI[0] = reader.ReadSingle(); npc.localAI[1] = reader.ReadSingle(); diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 8b8ea2bdc6..e1f5d42db3 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -1293,7 +1293,6 @@ namespace CalamityMod.NPCs Main.PlaySound(SoundID.Item109, npc.Center); calamityGlobalNPC.newAI[2] = 2f; SpawnDust(); - npc.alpha = 255; } else if (calamityGlobalNPC.newAI[0] <= (float)npc.lifeMax * 0.4) { @@ -1303,45 +1302,33 @@ namespace CalamityMod.NPCs string key = "Mods.CalamityMod.CalamitasBossText2"; Color messageColor = Color.Orange; CalamityUtils.DisplayLocalizedText(key, messageColor); + + SpawnDust(); } else { Main.PlaySound(SoundID.Item109, npc.Center); calamityGlobalNPC.newAI[2] = 1f; SpawnDust(); - npc.alpha = 255; } } } } - // Huge DR boost if brothers are alive - if (expertMode) + // Immunity if brothers are alive + if (CalamityGlobalNPC.cataclysm != -1) { - if (CalamityGlobalNPC.cataclysm != -1) - { - if (Main.npc[CalamityGlobalNPC.cataclysm].active) - brotherAlive = true; - } - if (CalamityGlobalNPC.catastrophe != -1) - { - if (Main.npc[CalamityGlobalNPC.catastrophe].active) - brotherAlive = true; - } - if (brotherAlive) - { - calamityGlobalNPC.DR = 0.9999f; - calamityGlobalNPC.unbreakableDR = true; - } - else - { - calamityGlobalNPC.DR = death ? 0.075f : 0.15f; - calamityGlobalNPC.unbreakableDR = false; - } + if (Main.npc[CalamityGlobalNPC.cataclysm].active) + brotherAlive = true; + } + if (CalamityGlobalNPC.catastrophe != -1) + { + if (Main.npc[CalamityGlobalNPC.catastrophe].active) + brotherAlive = true; } - // Disable homing if brothers are alive - npc.chaseable = !brotherAlive; + if (brotherAlive) + npc.dontTakeDamage = true; void SpawnDust() { @@ -1565,8 +1552,8 @@ namespace CalamityMod.NPCs { calamityGlobalNPC.newAI[3] += 1f; npc.damage = 0; - npc.chaseable = false; npc.dontTakeDamage = true; + npc.alpha = 255; float rotX = player.Center.X - npc.Center.X; float rotY = player.Center.Y - npc.Center.Y; @@ -1636,7 +1623,6 @@ namespace CalamityMod.NPCs npc.localAI[1] = 0f; calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 0f; - npc.alpha = 0; // Prevent bullshit charge hits when second bullet hell ends. if (phase5) @@ -1703,6 +1689,8 @@ namespace CalamityMod.NPCs return; } + npc.alpha = npc.dontTakeDamage ? 255 : 0; + // Float above target and fire lasers or fireballs if (npc.ai[1] == 0f) { @@ -3033,10 +3021,6 @@ namespace CalamityMod.NPCs // Mid-teleport else if (npc.ai[0] == 6f) { - // Become immune - npc.chaseable = false; - npc.dontTakeDamage = true; - if (death) npc.localAI[2] += 1f + 0.33f * (1f - lifeRatio); @@ -3105,10 +3089,6 @@ namespace CalamityMod.NPCs } } - // Become vulnerable - npc.chaseable = true; - npc.dontTakeDamage = false; - // Reset alpha and set AI to next phase (Idle) npc.alpha = 0; npc.ai[0] = 1f; @@ -4585,10 +4565,6 @@ namespace CalamityMod.NPCs bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); - npc.dontTakeDamage = phaseSwitchPhase; - - calamityGlobalNPC.DR = (npc.ai[0] == 5f || (enrageScale == 3f && !malice)) ? 0.75f : 0.1f; - if (phaseSwitchPhase) { if (npc.velocity.X < 0f) @@ -5216,7 +5192,6 @@ namespace CalamityMod.NPCs { Vector2 value43 = new Vector2(0f, -8f); npc.velocity = (npc.velocity * 21f + value43) / 10f; - npc.dontTakeDamage = true; return; } @@ -5565,10 +5540,6 @@ namespace CalamityMod.NPCs npc.Calamity().CurrentlyEnraged = biomeEnraged; - // If the player isn't in the ocean biome or Old Duke is transitioning between phases, become immune - if (!phase3AI) - npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f; - // Enrage if (biomeEnraged) { @@ -6464,8 +6435,6 @@ namespace CalamityMod.NPCs // Pause before teleport else if (npc.ai[0] == 12f) { - npc.dontTakeDamage = true; - // Alpha if (npc.alpha < 255 && npc.ai[2] >= num12 - 15f) { @@ -6521,8 +6490,6 @@ namespace CalamityMod.NPCs if (npc.ai[3] >= 9f) npc.ai[3] = 0f; - npc.dontTakeDamage = false; - npc.netUpdate = true; } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 714289c965..c629787d58 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1123,7 +1123,7 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.DukeFishron) { - npc.lifeMax = (int)(npc.lifeMax * 1.2); + npc.lifeMax = (int)(npc.lifeMax * 1.4); npc.npcSlots = 20f; } else if (npc.type == NPCID.Sharkron || npc.type == NPCID.Sharkron2) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 16ee319a67..dc9b357ef5 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.HiveMind npc.width = 178; npc.height = 122; npc.defense = 8; - npc.LifeMaxNERB(7800, 9360, 350000); + npc.LifeMaxNERB(8500, 10200, 350000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -405,8 +405,6 @@ namespace CalamityMod.NPCs.HiveMind npc.frame.Y = 0; npc.noGravity = true; npc.noTileCollide = true; - npc.Calamity().DR = 0f; - npc.Calamity().unbreakableDR = false; npc.scale = 1f; npc.alpha = 0; npc.dontTakeDamage = false; @@ -468,20 +466,6 @@ namespace CalamityMod.NPCs.HiveMind } } - if (expertMode) - { - if (NPC.AnyNPCs(ModContent.NPCType())) - { - npc.Calamity().DR = 0.9999f; - npc.Calamity().unbreakableDR = true; - } - else - { - npc.Calamity().DR = 0f; - npc.Calamity().unbreakableDR = false; - } - } - if (npc.ai[3] == 0f && npc.life > 0) npc.ai[3] = npc.lifeMax; diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index c714c86257..3c024e8268 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.OldDuke npc.GetNPCDamage(); npc.defense = 90; npc.DR_NERD(0.5f, null, null, null, true); - npc.LifeMaxNERB(412500, 495000, 400000); + npc.LifeMaxNERB(495000, 594000, 400000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; @@ -65,7 +65,6 @@ namespace CalamityMod.NPCs.OldDuke public override void SendExtraAI(BinaryWriter writer) { - writer.Write(npc.dontTakeDamage); writer.Write(npc.localAI[0]); writer.Write(npc.localAI[1]); writer.Write(npc.rotation); @@ -76,7 +75,6 @@ namespace CalamityMod.NPCs.OldDuke public override void ReceiveExtraAI(BinaryReader reader) { - npc.dontTakeDamage = reader.ReadBoolean(); npc.localAI[0] = reader.ReadSingle(); npc.localAI[1] = reader.ReadSingle(); npc.rotation = reader.ReadSingle(); diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 71ca8e8142..569603dcc2 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -47,7 +47,7 @@ namespace CalamityMod.NPCs.Perforator npc.width = 110; npc.height = 100; npc.defense = 4; - npc.LifeMaxNERB(4500, 5400, 270000); + npc.LifeMaxNERB(5000, 6000, 270000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -170,27 +170,22 @@ namespace CalamityMod.NPCs.Perforator npc.timeLeft = 1800; int wormsAlive = 0; - bool largeWormAlive = false; if (NPC.AnyNPCs(ModContent.NPCType())) - { wormsAlive++; - largeWormAlive = true; - } if (NPC.AnyNPCs(ModContent.NPCType())) wormsAlive++; if (NPC.AnyNPCs(ModContent.NPCType())) wormsAlive++; - npc.dontTakeDamage = largeWormAlive && expertMode; - if (npc.ai[3] == 0f && npc.life > 0) npc.ai[3] = npc.lifeMax; - if (npc.life > 0) + bool canSpawnWorms = !small || !medium || !large; + if (npc.life > 0 && canSpawnWorms) { if (Main.netMode != NetmodeID.MultiplayerClient) { - int num660 = (int)(npc.lifeMax * 0.3); + int num660 = (int)(npc.lifeMax * 0.25); if ((npc.life + num660) < npc.ai[3]) { npc.ai[3] = npc.life; @@ -209,8 +204,30 @@ namespace CalamityMod.NPCs.Perforator large = true; wormType = ModContent.NPCType(); } - NPC.NewNPC((int)npc.Center.X, (int)(npc.Center.Y + 800f), wormType, 1); + NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, wormType, 1); npc.TargetClosest(); + + Main.PlaySound(SoundID.NPCDeath23, npc.position); + + for (int num621 = 0; num621 < 16; num621++) + { + int num622 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 170, 0f, 0f, 100, default, 1f); + Main.dust[num622].velocity *= 2f; + if (Main.rand.NextBool(2)) + { + Main.dust[num622].scale = 0.25f; + Main.dust[num622].fadeIn = 1f + Main.rand.Next(10) * 0.1f; + } + } + + for (int num623 = 0; num623 < 32; num623++) + { + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1.5f); + Main.dust[num624].noGravity = true; + Main.dust[num624].velocity *= 3f; + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 5, 0f, 0f, 100, default, 1f); + Main.dust[num624].velocity *= 2f; + } } } } diff --git a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs index 742aede064..97c4c59b7d 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DestroyerAI.cs @@ -605,18 +605,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses { bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; - // 2 seconds of immunity to prevent spawn killing - if (npc.Calamity().newAI[1] < 120f) - { - npc.Calamity().newAI[1] += 1f; - if (npc.Calamity().newAI[1] % 15f == 0f) - npc.SyncExtraAI(); - - npc.dontTakeDamage = true; - } - else - npc.dontTakeDamage = false; - // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(); @@ -705,9 +693,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses else if (npc.velocity.Y > num5) npc.velocity.Y -= acceleration; - if (npc.Calamity().newAI[1] >= 120f) - npc.localAI[0] += 1f; - + npc.localAI[0] += 1f; if (npc.justHit) npc.localAI[0] = 0f; diff --git a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs index f94643714c..5ccfb282c2 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/DukeFishronAI.cs @@ -143,10 +143,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && enrage; - // If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune - if (!phase3AI) - npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f; - // Enrage if (enrage || malice) { @@ -807,9 +803,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Phase 3 else if (npc.ai[0] == 10f && !player.dead) { - npc.dontTakeDamage = false; - npc.chaseable = false; - // Alpha if (npc.alpha < 255) { @@ -929,9 +922,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Charge else if (npc.ai[0] == 11f) { - npc.dontTakeDamage = false; - npc.chaseable = true; - // Accelerate npc.velocity *= 1.01f; @@ -971,9 +961,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses // Pause before teleport else if (npc.ai[0] == 12f) { - npc.dontTakeDamage = true; - npc.chaseable = false; - // Alpha if (npc.alpha < 255) { diff --git a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs index ad7f737569..fa305112fb 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/PlanteraAI.cs @@ -365,7 +365,6 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses calamityGlobalNPC.unbreakableDR = false; npc.defense = 10; npc.damage = (int)(npc.defDamage * 1.4f); - npc.chaseable = true; // Spawn tentacles if (Main.netMode != NetmodeID.MultiplayerClient) @@ -559,51 +558,43 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } } - // Heal if on surface and it's daytime, else, gain defense + // Heal if on surface if (surface) { - if (Main.dayTime) + if (Main.rand.NextBool(Main.dayTime ? 3 : 6)) { - if (Main.rand.NextBool(3)) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, default, 0.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 0.75f; - Main.dust[dust].fadeIn = 1.3f; - Vector2 vector = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - vector.Normalize(); - vector *= Main.rand.Next(50, 100) * 0.04f; - Main.dust[dust].velocity = vector; - vector.Normalize(); - vector *= 86f; - Main.dust[dust].position = npc.Center - vector; - } + int dust = Dust.NewDust(npc.position, npc.width, npc.height, 55, 0f, 0f, 200, default, 0.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0.75f; + Main.dust[dust].fadeIn = 1.3f; + Vector2 vector = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + vector.Normalize(); + vector *= Main.rand.Next(50, 100) * 0.04f; + Main.dust[dust].velocity = vector; + vector.Normalize(); + vector *= 86f; + Main.dust[dust].position = npc.Center - vector; + } - // Heal, 25 seconds to reach full HP from 0 - calamityGlobalNPC.newAI[1] += 1f; - if (calamityGlobalNPC.newAI[1] >= 15f) + // Heal, 100 (50 during daytime) seconds to reach full HP from 0 + calamityGlobalNPC.newAI[1] += 1f; + if (calamityGlobalNPC.newAI[1] >= (Main.dayTime ? 30f : 60f)) + { + calamityGlobalNPC.newAI[1] = 0f; + if (Main.netMode != NetmodeID.MultiplayerClient) { - calamityGlobalNPC.newAI[1] = 0f; - if (Main.netMode != NetmodeID.MultiplayerClient) + int healAmt = npc.lifeMax / 100; + if (healAmt > npc.lifeMax - npc.life) + healAmt = npc.lifeMax - npc.life; + + if (healAmt > 0) { - int healAmt = npc.lifeMax / 100; - if (healAmt > npc.lifeMax - npc.life) - healAmt = npc.lifeMax - npc.life; - - if (healAmt > 0) - { - npc.life += healAmt; - npc.HealEffect(healAmt, true); - npc.netUpdate = true; - } + npc.life += healAmt; + npc.HealEffect(healAmt, true); + npc.netUpdate = true; } } } - else - { - calamityGlobalNPC.DR = 0.9999f; - calamityGlobalNPC.unbreakableDR = true; - } } if (npc.ai[0] == 0f && npc.life > 0) diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs index 5808fb1849..68975358c8 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronAI.cs @@ -126,9 +126,7 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses } bool handsDead = num156 == 0; npc.chaseable = handsDead; - calamityGlobalNPC.DR = (malice ? 0.45f : 0.05f) + num156 * 0.45f; - if (calamityGlobalNPC.DR > 0.95f) - calamityGlobalNPC.DR = 0.95f; + calamityGlobalNPC.DR = num156 > 0 ? 0.9999f : 0.05f; // Teleport if (handsDead || phase2) diff --git a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs index f6ff4a02fe..c771a76d03 100644 --- a/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCOverrides/Bosses/SkeletronPrimeAI.cs @@ -108,12 +108,11 @@ namespace CalamityMod.NPCs.VanillaNPCOverrides.Bosses else if (allArmsDead) npc.damage = npc.defDamage; - int defenseBoost = malice ? 100 : 20; - npc.defense = npc.defDefense + (cannonAlive ? defenseBoost : 0) + (laserAlive ? defenseBoost : 0) + (viceAlive ? defenseBoost : 0) + (sawAlive ? defenseBoost : 0); + npc.defense = npc.defDefense; // Phases - bool phase2 = lifeRatio < 0.66f; - bool phase3 = lifeRatio < 0.33f; + bool phase2 = lifeRatio < 0.5f; + bool phase3 = lifeRatio < 0.25f; // Kill all arms if Prime Head enters phase 2 if (phase2 && !allArmsDead) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 356ff106eb..0250834484 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.Yharon npc.width = 200; npc.height = 200; npc.defense = 90; - npc.LifeMaxNERB(1085000, 1300000, 370000); + npc.LifeMaxNERB(1302000, 1562400, 370000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.knockBackResist = 0f; @@ -183,14 +183,6 @@ namespace CalamityMod.NPCs.Yharon float acceleration = expertMode ? 0.75f : 0.7f; float velocity = expertMode ? 12f : 11f; - // Damage immunity - if (phase3Change) - npc.dontTakeDamage = phase4Check; - else if (phase2Change) - npc.dontTakeDamage = phase3Check; - else if (phase1Change) - npc.dontTakeDamage = phase2Check; - if (phase3Change) { acceleration = expertMode ? 0.85f : 0.8f; @@ -1528,32 +1520,12 @@ namespace CalamityMod.NPCs.Yharon CalamityUtils.DisplayLocalizedText(key, messageColor); } + npc.dontTakeDamage = false; if (invincibilityCounter < Phase2InvincibilityTime) { + npc.dontTakeDamage = true; phase2 = phase3 = phase4 = false; - invincibilityCounter += 1; - } - else - { - // Damage immunity - switch (secondPhasePhase) - { - case 1: - npc.dontTakeDamage = phase2; - break; - case 2: - npc.dontTakeDamage = phase3; - break; - case 3: - npc.dontTakeDamage = phase4; - break; - case 4: - npc.dontTakeDamage = false; - break; - } - - if (!npc.dontTakeDamage) - npc.dontTakeDamage = npc.ai[0] == 9f; + invincibilityCounter++; } // Acquire target and determine enrage state diff --git a/Projectiles/Ranged/SulphuricBlast.cs b/Projectiles/Ranged/SulphuricBlast.cs index 429fc7ad63..a91996e882 100644 --- a/Projectiles/Ranged/SulphuricBlast.cs +++ b/Projectiles/Ranged/SulphuricBlast.cs @@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Ranged public override void SetDefaults() { - projectile.width = 72; - projectile.height = 72; + projectile.width = 36; + projectile.height = 36; projectile.friendly = true; projectile.ignoreWater = true; projectile.tileCollide = false;