From 6de2b154ba22db0417129d91d9b30f8a2ed8eaad Mon Sep 17 00:00:00 2001 From: Nathanael Overton Date: Sun, 26 Jul 2026 14:57:03 -0400 Subject: [PATCH] fix oiled self-applying --- DataStructures/DebuffData.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/DataStructures/DebuffData.cs b/DataStructures/DebuffData.cs index f90196804d..44ebe15fbc 100644 --- a/DataStructures/DebuffData.cs +++ b/DataStructures/DebuffData.cs @@ -289,6 +289,24 @@ namespace CalamityMod.DataStructures /// public static void OiledNPCMethod(NPC npc, int buffType, ref int buffIndex, ref int damage) { + // Exclude Oiled itself from counting as an applicable debuff + bool valid = false; + for (int i = 0; i < npc.buffType.Length; i++) + { + int activeBuff = npc.buffType[i]; + if (activeBuff > 0 && activeBuff != BuffID.Oiled) + { + var data = CalamityBuffSets.DebuffDataset[activeBuff]; + if (data != null && data.HeatDebuffScaling > 0) + { + valid = true; + break; + } + } + } + if (!valid && !(npc.onFrostBurn || npc.onFrostBurn2 || npc.onFire || npc.onFire2 || npc.onFire3 || npc.shadowFlame)) + return; + var cnpc = npc.Calamity(); double totalDPS = ApplyScalingToStatModifer(cnpc.ActiveHeatDebuffMultiplier, Oiled.HeatDebuffScaling).ApplyTo(Oiled.EnemyLostRegen); if (totalDPS <= 0)