From 28cca67bac8a91e0b48a2ca5f4da45303941ecfc Mon Sep 17 00:00:00 2001
From: CongratsIsTrash <1q2w3e4dasd@gmail.com>
Date: Tue, 17 Jun 2025 23:52:33 -0400
Subject: [PATCH] Removed abyssBreathLossStat var
And the external variable + mod call
---
CalPlayer/CalamityPlayer.cs | 5 -----
CalPlayer/CalamityPlayerMiscEffects.cs | 5 +----
Items/Accessories/StatMeter.cs | 1 -
.../Mods.CalamityMod.Items.Accessories.hjson | 6 +++---
ModSupport/ModCalls.cs | 21 -------------------
5 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs
index 960ea05b63..2b27f394ac 100644
--- a/CalPlayer/CalamityPlayer.cs
+++ b/CalPlayer/CalamityPlayer.cs
@@ -198,7 +198,6 @@ namespace CalamityMod.CalPlayer
#region External variables -- Not used by Calamity, only via Mod.Call or reflection
public int externalAbyssLight = 0;
- public float externalBreathLossMultBoost = 0f;
public float externalBreathTickBoost = 0f;
public float externalFlightTimeMultBoost = 0f;
@@ -662,8 +661,6 @@ namespace CalamityMod.CalPlayer
#endregion
#region Abyss
- /// The amount of breath lost on each tick while in the Abyss.
- public float abyssBreathLossStat = 0;
/// The rate at which breath is lost while in the Abyss.
public float abyssBreathLossRateStat = 0;
/// The rate at which health is decreased after running out of breath while in the Abyss.
@@ -2045,7 +2042,6 @@ namespace CalamityMod.CalPlayer
DashID = string.Empty;
externalAbyssLight = 0;
- externalBreathLossMultBoost = 0f;
externalBreathTickBoost = 0f;
externalFlightTimeMultBoost = 0f;
externalRageEnabled = externalAdrenalineEnabled = null;
@@ -2906,7 +2902,6 @@ namespace CalamityMod.CalPlayer
demonSwordKillMode = false;
externalAbyssLight = 0;
- externalBreathLossMultBoost = 0f;
externalBreathTickBoost = 0f;
externalFlightTimeMultBoost = 0f;
externalColdImmunity = externalHeatImmunity = false;
diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs
index 72470410da..54d4014ed4 100644
--- a/CalPlayer/CalamityPlayerMiscEffects.cs
+++ b/CalPlayer/CalamityPlayerMiscEffects.cs
@@ -2959,9 +2959,6 @@ namespace CalamityMod.CalPlayer
// Breath lost while at zero breath
double breathLoss = Main.remixWorld ? (point.Y < abyssLevel1 ? 1D : 0D) : (point.Y > abyssLevel1 ? 1D : 0D);
- // Record the final breath loss for the stat meter
- abyssBreathLossStat = (float)breathLoss;
-
// Defense loss
int defenseLoss = (int)(120D * depthRatio);
@@ -3013,7 +3010,7 @@ namespace CalamityMod.CalPlayer
(Player.arcticDivingGear ? 5D : 0D) +
(aquaticEmblem ? 5D : 0D) +
(Player.accMerman ? 8D : 0D) +
- (victideSet ? 3D : 0D) +
+ (victideSet ? 2D : 0D) +
((aquaticHeart && NPC.downedBoss3) ? 8D : 0D) +
(abyssalDivingSuit ? 8D : 0D) +
externalBreathTickBoost;
diff --git a/Items/Accessories/StatMeter.cs b/Items/Accessories/StatMeter.cs
index 931dd0c47e..10edb5b418 100644
--- a/Items/Accessories/StatMeter.cs
+++ b/Items/Accessories/StatMeter.cs
@@ -223,7 +223,6 @@ namespace CalamityMod.Items.Accessories
// Detailed Abyss stats only render if the player is in the Abyss.
string stats4 = "\n" + (!modPlayer.ZoneAbyss ? this.GetLocalizedValue("AbyssStatsHidden") : this.GetLocalization("AbyssStats").Format(
player.GetCurrentAbyssLightLevel(),
- TwoPlaces(modPlayer.abyssBreathLossStat),
TwoPlaces(modPlayer.abyssBreathLossRateStat),
modPlayer.abyssLifeLostAtZeroBreathStat,
modPlayer.abyssDefenseLossStat));
diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
index ef1dc5d284..c2d6c55739 100644
--- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
+++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson
@@ -1822,9 +1822,9 @@ StatMeter: {
AbyssStats:
'''
Abyss Light Strength: {0}
- Breath Lost Per Tick: {1} | Breath Loss Rate: {2}
- Life Lost Per Tick at Zero Breath: {3}
- Defense Lost From Pressure: {4}
+ Breath Loss Rate: {1}
+ Life Lost Per Tick at Zero Breath: {2}
+ Defense Lost From Pressure: {3}
'''
AbyssStatsHidden: Abyss stats are only displayed while in the Abyss
}
diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs
index bce9cbdf27..ebf1420994 100644
--- a/ModSupport/ModCalls.cs
+++ b/ModSupport/ModCalls.cs
@@ -671,12 +671,6 @@ namespace CalamityMod
p.Calamity().externalAbyssLight += add;
}
- public static void AddBreathLossMult(Player p, float add)
- {
- if (p != null)
- p.Calamity().externalBreathLossMultBoost += add;
- }
-
public static void AddBreathTick(Player p, float add)
{
if (p != null)
@@ -1271,21 +1265,6 @@ namespace CalamityMod
AddAbyssLightStrength(castPlayer(args[1]), light);
return null;
- case "BreathMult":
- case "BreathLossMult":
- case "AddBreathMult":
- case "AddBreathLossMult":
- if (args.Length < 2)
- return new ArgumentNullException("ERROR: Must specify both a Player object (or int index of a Player) and breath loss mult change as a float.");
- if (args.Length < 3)
- return new ArgumentNullException("ERROR: Must specify breath loss mult change as a float.");
- if (!(args[2] is float breathLossMult))
- return new ArgumentException("ERROR: The second argument to \"AddBreathLossMult\" must be a float.");
- if (!isValidPlayerArg(args[1]))
- return new ArgumentException("ERROR: The first argument to \"AddBreathLossMult\" must be a Player or an int.");
- AddBreathLossMult(castPlayer(args[1]), breathLossMult);
- return null;
-
case "BreathTick":
case "AbyssBreathTick":
case "AddBreathTick":