From 74f55f1af5622cd7f50e6aca036024eae7dfd954 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 8 Jan 2026 00:41:04 -0500 Subject: [PATCH] 1 - GFB Nurse meteor is now undodgeable 2 - Fixed Daedalus armor melee set bonus and The Evolution's dodges working against undodgeable attacks --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- ILEditing/BalancingILChanges.cs | 13 +++++++++++++ ILEditing/ILChangesLoading.cs | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 3b3e343ee7..6d439a268a 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -883,7 +883,7 @@ namespace CalamityMod.CalPlayer return; } } - if (proj.active && proj.hostile && proj.damage > 0) + if (proj.active && proj.hostile && modifiers.Dodgeable && proj.damage > 0) { double dodgeDamageGateValuePercent = 0.05; int dodgeDamageGateValue = (int)Math.Round(Player.statLifeMax2 * dodgeDamageGateValuePercent); diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 8807cc2714..bb03985b48 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -1,6 +1,7 @@ using System; using CalamityMod.Balancing; using CalamityMod.Enums; +using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Mono.Cecil.Cil; using MonoMod.Cil; @@ -673,5 +674,17 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.And); } #endregion + + #region Make GFB Nurse Meteor Undodgeable + private static bool GFBNurseMeteorUndodgeable(On_Projectile.orig_IsDamageDodgable orig, Projectile self) + { + // Make the Leviathan meteor that spawns when talking to the Nurse in GFB undodgeable + // Unfortunately the Dodgeable value in HurtModifiers cannot be set in the hook, thus On editing a vanilla function + if (self.type == ModContent.ProjectileType() && self.damage == 9999) + return false; + else + return orig(self); + } + #endregion } } diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 49741c87c6..0011e04de2 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -109,6 +109,7 @@ namespace CalamityMod.ILEditing IL_Projectile.AI_099_2 += LimitTerrarianProjectiles; IL_Projectile.AI_120_StardustGuardian += StardustGuardianAttackBuffs; On_Player.ConsumeSolarFlare += SolarWingsDashChange; + On_Projectile.IsDamageDodgable += GFBNurseMeteorUndodgeable; IL_Player.UpdateBuffs += UpdateBuffsBalancingChanges; IL_Player.ApplyVanillaHurtEffectModifiers += RemoveBeetleAndSolarFlareMultiplicativeDR;