From 5ccd9d08fd5e1a56262adab3198ffcb0ac97c667 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 18 Oct 2023 14:33:10 -0400 Subject: [PATCH] Fix for "im not gonna sugarcoat it" --- NPCs/CalamityGlobalNPC.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index c8a30e5b72..37bbf763e1 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -859,19 +859,25 @@ namespace CalamityMod.NPCs } // Daybroken + // 18OCT2023: Ozzatron: im not gonna sugarcoat it + // vanilla debuff damage from Daybreak impales scales linearly up to 8 for 800 DPS + // instead of allowing this entire 800 DPS to be multiplied by heat weakness + heat DoT bonuses, + // each Daybreak spear beyond the first is only affected 25% as much by weaknesses or resistances. + // This also stops Daybreak's DPS from being utterly shafted by heat resistance. + // As no other weapon can stack Daybroken, this has no effect on other weapons (they count as "1 Daybreak spear") if (npc.daybreak) { - int projAmt = 0; + int numImpaledSpears = 0; for (int k = 0; k < Main.maxProjectiles; k++) { if (Main.projectile[k].active && Main.projectile[k].type == ProjectileID.Daybreak && Main.projectile[k].ai[0] == 1f && Main.projectile[k].ai[1] == npc.whoAmI) - projAmt++; + numImpaledSpears++; } - if (projAmt == 0) - projAmt = 1; + // If there are no Daybreak impaled spears, Daybroken has 1x potency (it was applied some other way) + float daybrokenMultiplier = numImpaledSpears <= 1 ? 1f : (1f + 0.25f * (numImpaledSpears - 1)); - int baseDaybreakDoTValue = (int)(projAmt * 2 * 100 * vanillaHeatDamageMult); + int baseDaybreakDoTValue = (int)(daybrokenMultiplier * 2 * 100 * vanillaHeatDamageMult); npc.lifeRegen -= baseDaybreakDoTValue; if (damage < baseDaybreakDoTValue / 4) damage = baseDaybreakDoTValue / 4;