From 7a522c399b8f08b7580f33918dd1a26263a2dae5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 22 Jul 2025 12:37:38 -0400 Subject: [PATCH 1/2] Yharon briefly slows before fast charge --- NPCs/Yharon/Yharon.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; From 01ad15ed14f7fae16d4d6dccac6b5e40b038ef8d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 22 Jul 2025 12:49:36 -0400 Subject: [PATCH 2/2] Moved the change to SoC via IL edit into the On edit override --- ILEditing/BalancingILChanges.cs | 4 ++-- ILEditing/MechanicILChanges.cs | 21 +-------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index cd24057eb9..e31fcb8264 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