diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index dd63a2813b..10f32dbc9e 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -528,7 +528,7 @@ namespace CalamityMod.ILEditing } #endregion - #region SoC Buffs & Vortex Booster keeping stealth + #region SoC Buffs & Vortex Booster Keeping Stealth private static void DashMovementEdits(On_Player.orig_DashMovement orig, Player self) { //This is a modified version of Vanilla's Shield of Cthulhu dash collision checks @@ -568,7 +568,7 @@ namespace CalamityMod.ILEditing self.ApplyDamageToNPC(hitNPC, (int)dmg, kb, direction, crit, DamageClass.Melee); } self.eocDash = 10; - self.dashDelay = 30; + self.dashDelay = BalancingConstants.OnShieldBonkCooldown; self.velocity.X = -direction * 9; self.velocity.Y = -4f; self.GiveImmuneTimeForCollisionAttack(8); //This is normally 4 in vanilla diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 9060f3013b..81b88266bb 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -161,26 +161,7 @@ namespace CalamityMod.ILEditing // This will occur precisely when the player has no vanilla OR Calamity dash items equipped. cursor.Emit(OpCodes.Or); - // - // SHIELD OF CTHULHU - // - - // Move to Shield of Cthulhu's code by finding its function call for iframes. - if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchCall("GiveImmuneTimeForCollisionAttack"))) - { - LogFailure("Vanilla Dash Fixes", "Could not locate function call for Shield of Cthulhu iframes."); - return; - } - - if (!cursor.TryGotoPrev(MoveType.AfterLabel, i => i.MatchLdcI4(30))) - { - LogFailure("Vanilla Dash Fixes", "Could not locate amount of frames of dash cooldown applied on impact with Shield of Cthulhu."); - return; - } - - // Remove the instruction and replace it with one which gives Calamity's (customizable) amount of dash cooldown. - cursor.Remove(); - cursor.Emit(OpCodes.Ldc_I4, BalancingConstants.OnShieldBonkCooldown); + // CIT 22JUL2025: Shield of Cthulhu bonk is reimplemented in a separate On edit; removed the change made to it via this IL edit. // // SOLAR FLARE ARMOR diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index c7a3538504..48f8c236ac 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.Yharon Vector2 distanceFromDestination = destination - NPC.Center; Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - NPC.velocity) * velocity; - if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance) + if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance && NPC.localAI[1] <= fastChargeTelegraphTime * 0.5f) NPC.SimpleFlyMovement(desiredVelocity, acceleration); else NPC.velocity *= 0.98f; @@ -826,7 +826,7 @@ namespace CalamityMod.NPCs.Yharon Vector2 distanceFromDestination = destination - NPC.Center; Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - NPC.velocity) * velocity; - if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance) + if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance && NPC.localAI[1] <= fastChargeTelegraphTime * 0.5f) NPC.SimpleFlyMovement(desiredVelocity, acceleration); else NPC.velocity *= 0.98f; @@ -1193,7 +1193,7 @@ namespace CalamityMod.NPCs.Yharon Vector2 distanceFromDestination = destination - NPC.Center; Vector2 desiredVelocity = Vector2.Normalize(distanceFromDestination - NPC.velocity) * velocity; - if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance) + if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance && NPC.localAI[1] <= fastChargeTelegraphTime * 0.5f) NPC.SimpleFlyMovement(desiredVelocity, acceleration); else NPC.velocity *= 0.98f; @@ -1837,7 +1837,7 @@ namespace CalamityMod.NPCs.Yharon if (!targetDead) { - if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance) + if (Vector2.Distance(NPC.Center, destination) > reduceSpeedChargeDistance && NPC.localAI[1] <= fastChargeTelegraphTime * 0.5f) NPC.SimpleFlyMovement(desiredVelocity, acceleration); else NPC.velocity *= 0.98f;