This commit is contained in:
Doze-Zoze committed 2025-07-22 11:50:48 -05:00
commit 93f58bf9aa
3 files changed
+7 -26

No files matched your search

+2 -2
View File
@@ -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
+1 -20
View File
@@ -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<Player>("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
+4 -4
View File
@@ -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;