From db0bc0e10ee10ea716543245303e33ae9a9030e1 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 20 Sep 2023 16:45:03 -0400 Subject: [PATCH] Sun Stone and Moon Stone now reduce the DoT of Holy Flames and Nightwither instead of granting full immunity --- CalPlayer/CalamityPlayer.cs | 4 ++++ CalPlayer/CalamityPlayerLifeRegen.cs | 4 ++-- Items/CalamityGlobalItem.cs | 10 +++++----- Items/CalamityGlobalItemTooltip.cs | 10 +++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 046760ef8d..8c8fda8af1 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -93,6 +93,8 @@ namespace CalamityMod.CalPlayer public bool blockAllDashes = false; public bool resetHeightandWidth = false; public bool noLifeRegen = false; + public bool reducedHolyFlamesDamage = false; + public bool reducedNightwitherDamage = false; public float rangedAmmoCost = 1f; public float healingPotBonus = 1f; public bool heldGaelsLastFrame = false; @@ -1698,6 +1700,8 @@ namespace CalamityMod.CalPlayer CryoStoneVanity = false; voidField = false; copyrightInfringementShield = false; + reducedHolyFlamesDamage = false; + reducedNightwitherDamage = false; daedalusReflect = false; daedalusSplit = false; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 69fc91b8a4..8de42d878d 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -100,8 +100,8 @@ namespace CalamityMod.CalPlayer ApplyDoTDebuff(bBlood, 8, purity); ApplyDoTDebuff(vaporfied, 8, purity); ApplyDoTDebuff(bFlames, 30, purity); - ApplyDoTDebuff(nightwither, 40, purity); - ApplyDoTDebuff(hFlames, 40, purity); + ApplyDoTDebuff(nightwither, reducedNightwitherDamage ? 20 : 40, purity); + ApplyDoTDebuff(hFlames, reducedHolyFlamesDamage ? 20 : 40, purity); ApplyDoTDebuff(vHex, 30); ApplyDoTDebuff(cDepth, 18, purity); ApplyDoTDebuff(astralInfection, 24, infectedJewel || purity); diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index e124f2eb55..77f8fd128c 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -1126,15 +1126,15 @@ namespace CalamityMod.Items player.buffImmune[BuffID.OnFire] = true; } - // Nightwither immunity pre-Moon Lord and Holy Flames immunity pre-Profaned Guardians. + // Reduced Nightwither and Holy Flames damage. if (item.type == ItemID.MoonStone) - player.buffImmune[ModContent.BuffType()] = true; + modPlayer.reducedNightwitherDamage = true; if (item.type == ItemID.SunStone) - player.buffImmune[ModContent.BuffType()] = true; + modPlayer.reducedHolyFlamesDamage = true; if (item.type == ItemID.CelestialStone || item.type == ItemID.CelestialShell) { - player.buffImmune[ModContent.BuffType()] = true; - player.buffImmune[ModContent.BuffType()] = true; + modPlayer.reducedHolyFlamesDamage = true; + modPlayer.reducedNightwitherDamage = true; } if (item.type == ItemID.FairyBoots) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 9c8e4b6600..e0d5ddc425 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -592,25 +592,25 @@ namespace CalamityMod.Items if (item.type == ItemID.ArmorPolish || item.type == ItemID.ArmorBracing) EditTooltipByNum(0, (line) => line.Text += " and Armor Crunch"); - // Nightwither immunity pre-Moon Lord and Holy Flames immunity pre-Profaned Guardians and melee speed removal. + // Reduced Nightwither and Holy Flames damage, and melee speed removal. if (item.type == ItemID.MoonStone) { - EditTooltipByNum(2, (line) => line.Text += "\nGrants immunity to Nightwither"); + EditTooltipByNum(2, (line) => line.Text += "\nReduces the damage of the Nightwither debuff"); EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("melee speed, ", "")); } if (item.type == ItemID.SunStone) { - EditTooltipByNum(2, (line) => line.Text += "\nGrants immunity to Holy Flames"); + EditTooltipByNum(2, (line) => line.Text += "\nReduces the damage of the Holy Flames debuff"); EditTooltipByNum(1, (line) => line.Text = line.Text.Replace("melee speed, ", "")); } if (item.type == ItemID.CelestialStone) { - EditTooltipByNum(2, (line) => line.Text += "\nGrants immunity to Nightwither and Holy Flames"); + EditTooltipByNum(2, (line) => line.Text += "\nReduces the damage of the Nightwither and Holy Flames debuffs"); EditTooltipByNum(0, (line) => line.Text = line.Text.Replace(" melee speed,", "")); } if (item.type == ItemID.CelestialShell) { - EditTooltipByNum(4, (line) => line.Text += "\nGrants immunity to Nightwither and Holy Flames"); + EditTooltipByNum(4, (line) => line.Text += "\nReduces the damage of the Nightwither and Holy Flames debuffs"); EditTooltipByNum(2, (line) => line.Text = line.Text.Replace(" melee speed,", "")); }