Removed unused/unnecessary player variables

Also renamed a couple
This commit is contained in:
CongratsIsTrash authored and Cameron Ewell committed 2026-06-22 14:39:20 -04:00
1 parent 66768e3d3f
commit 65c931a8b6
37 files changed
+40 -227

No files matched your search

+12 -80
View File
@@ -402,19 +402,15 @@ namespace CalamityMod.CalPlayer
/// </summary>
public int hInfernoBoost = 0;
public int packetTimer = 0;
public int navyRodAuraTimer = 0;
/// <summary> Timer variable used to time when Hydrothermic armor's set bonus inferno ring deals damage to targets. </summary>
public int hydrothermicInfernoTimer = 0;
/// <summary> Timer variable used to time when Tarragon armor's set bonus life aura deals damage to targets. </summary>
public int tarraLifeAuraTimer = 0;
public int bloodflareHeartTimer = 300;
/// <summary> Counter variable used to determine when to spawn Dragon Rage's fireballs. Fireballs are spawned after 10 hits. </summary>
public int dragonRageHits = 0;
/// <summary> Cooldown variable for Dragon Rage's fireball spawning to prevent spamming projectiles when hitting multiple enemies simultaneously. </summary>
public int dragonRageCooldown = 0;
/// <summary> Counter variable which controls Aquatic Emblem's stat boosts while underwater. </summary>
public float aquaticBoost = 0;
public int galileoCooldown = 0;
/// <summary> Used to track Prideful Hunter's Planar Ripper's movement speed boost, along with its visual effects. </summary>
public int planarSpeedBoost = 0;
public int profanedSoulWeaponUsage = 0;
@@ -844,15 +840,11 @@ namespace CalamityMod.CalPlayer
public bool shouldTriggerBeeCooldown = false;
public int theBeeCooldown = 0;
public bool aFossil = false;
public bool aPowder = false;
public bool fallingBlockProtection = false;
public bool trapProtection = false;
public bool alluringBait = false;
public bool enchantedPearl = false;
public bool fishingStation = false;
public bool rBrain = false;
public bool bloodyWormTooth = false;
public bool ivDrip = false;
/// <summary> NOT the primary Affliction variable, used instead for the Afflicted buff which is given to teammates. </summary>
public bool afflicted = false;
public bool chiRegen = false;
@@ -866,13 +858,11 @@ namespace CalamityMod.CalPlayer
public bool vexation = false;
public bool dodgeScarf = false;
public bool evasionScarf = false;
public bool badgeOfBravery = false;
public bool WarbanneroftheRighteous = false;
public bool warbannerGlow = false;
public float warbannerDamageMult = 0;
public bool tesla = false;
public bool teslaVisuals = true;
public bool cryogenSoul = false;
public bool ascendantInsignia = false;
public int ascendantInsigniaBuffTime = 0;
public int ascendantInsigniaCooldown = 0;
@@ -891,8 +881,6 @@ namespace CalamityMod.CalPlayer
/// Feral Claws = 1, Power Glove = 2, Mechanical Glove = 3, Fire Gauntlet = 4, Elemental Gauntlet = 5
/// </summary>
public int gloveLevel = 0;
public bool alreadyHasFrogLeg = false; // Unused, intended to prevent Frog Leg tinker stacking
public bool eTalisman = false;
public bool lastDashWasTabi = false;
public bool statisNinjaBelt = false;
public bool voidSashVisuals = true;
@@ -930,12 +918,8 @@ namespace CalamityMod.CalPlayer
/// </summary>
bool _hasNoNaturalRegen = false;
public bool hadLifeRegenHinderingDebuff = false;
public bool alwaysHoneyRegen = false;
public float alwaysHoneyRegenAmount = 0;
public bool honeyTurboRegen = false;
public bool honeyDew = false;
public bool livingDew = false;
public int jewelBonusDefense = 0;
/// <summary>
/// Counter variable for spawning Toxic Heart's pulses.<br/>
/// Incremented on every frame by <see cref="pulseRate"/>, and when it reaches 420, it is reset and a pulse is spawned.
@@ -963,8 +947,6 @@ namespace CalamityMod.CalPlayer
public bool sGlyph = false;
public bool sRegen = false;
public bool tracersDust = false;
public bool moonWalkers = false;
public bool voidStriders = false;
public bool seraphTracers = false;
public bool frostFlare = false;
public bool evolution = false;
@@ -976,7 +958,7 @@ namespace CalamityMod.CalPlayer
public int nanotechHitCooldown = 0;
public bool deadshotBrooch = false;
public bool shadowMinions = false;
public bool holyMinions = false;
public bool statisMinions = false;
public bool alchFlask = false;
public bool toxicHeart = false;
public bool toxicHeartVisuals = false;
@@ -1008,12 +990,9 @@ namespace CalamityMod.CalPlayer
public int chaliceHitOriginalDamage = 0;
public bool chaliceHeartStyle = false;
public bool elementalHeart = false;
public bool crownJewel = false;
public bool infectedJewel = false;
public bool purity = false;
/// <summary> If true, reduces the damage of electricity debuffs by 50%. </summary>
public bool eleResist = false;
public bool harpyRing = false;
public bool angelTreads = false;
/// <summary> Makes Flesh Knuckles and its upgrades increase the player's max health. </summary>
@@ -1061,9 +1040,7 @@ namespace CalamityMod.CalPlayer
public bool baroclaw = false;
public bool IsFirstDashFrame = true;
public int fallingBootVelCheckTimer = 0;
public bool voidOfCalamity = false;
public bool apollyon = false;
public bool fragmentsOfAnotherWorld = false;
public bool crushingEgo = false;
public bool fadedIdolatry = false;
public bool pSoulArtifact = false;
@@ -1087,7 +1064,6 @@ namespace CalamityMod.CalPlayer
public bool ursaSergeant = false;
public bool ursaSergeantVisual = false;
public bool scuttlersJewel = false;
public int scuttlerCooldown = 0;
public bool thiefsDime = false;
public bool dynamoStemCells = false;
public bool etherealExtorter = false;
@@ -1123,7 +1099,6 @@ namespace CalamityMod.CalPlayer
public int mageCrownTimer = 0;
public int mageCrownCount = 0;
public bool dragonScales = false;
public bool gloveOfPrecision = false;
public bool gloveOfRecklessness = false;
public bool vampiricTalisman = false;
public bool electricianGlove = false;
@@ -1155,8 +1130,6 @@ namespace CalamityMod.CalPlayer
public float frozenCubeDebuffBoost = 0;
public float frozenCubeElumphantBoost = 0;
public int frozenCubeUsedDefense = 0;
public bool miniOldDuke = false;
public bool miniOldDukeVanity = false;
public bool starbusterCore = false;
public bool starTaintedGenerator = false;
public bool hallowedRune = false;
@@ -1228,15 +1201,13 @@ namespace CalamityMod.CalPlayer
public bool meteorSet = false;
/// <summary> Calamity's Necro armor set bonus; gives a temporary 10 second revive when the player is killed before actually dying. </summary>
public bool necroSet = false;
/// <summary> Calamity's Frost armor set bonus; gives a combined 20% damage boost split between melee and ranged based on distance from the closest enemy. </summary>
/// <summary> Calamity's Frost armor set bonus; gives a combined damage boost split between melee and ranged based on distance from the closest enemy. </summary>
public bool frostSet = false;
public bool victideSet = false;
public bool victideSummoner = false;
public bool sulphurSet = false;
public bool sulphurJump = false;
public int sulphurBubbleCooldown = 0;
public bool aeroSet = false;
public bool statigelSet = false;
public bool tarraSet = false;
public bool tarraMelee = false;
public bool tarragonCloak = false;
@@ -1260,7 +1231,7 @@ namespace CalamityMod.CalPlayer
public bool bloodflareSummon = false;
public int bloodflareSummonTimer = 0;
public bool godSlayer = false;
public bool godSlayerDamage = false;
public bool godSlayerMelee = false;
public bool godSlayerRanged = false;
public bool godSlayerThrowing = false;
public bool godSlayerDashHotKeyPressed = false;
@@ -1279,8 +1250,7 @@ namespace CalamityMod.CalPlayer
public bool shadeRegen = false;
/// <summary> Demonshade Greaves' movement speed boost. </summary>
public bool shadowSpeed = false;
public bool dsSetBonus = false;
public bool auricSetMelee = false;
public bool demonshadeSet = false;
public bool daedalusReflect = false;
public bool daedalusSplit = false;
public bool titanHeartSet = false;
@@ -1291,7 +1261,6 @@ namespace CalamityMod.CalPlayer
public bool reaverSpeed = false;
public bool reaverDefense = false;
public bool reaverExplore = false;
public bool fathomSwarmer = false;
public bool fathomSwarmerVisage = false;
public bool fathomSwarmerBreastplate = false;
public bool fathomSwarmerTail = false;
@@ -1301,7 +1270,6 @@ namespace CalamityMod.CalPlayer
public int tailFrame = 0;
public bool astralStarRain = false;
public int astralStarRainCooldown = 0;
public int VoidCooldown = 0;
public int ursaSergeantCooldown = 0;
public int AlchFlaskCooldown = 0;
public bool plagueReaper = false;
@@ -1349,7 +1317,6 @@ namespace CalamityMod.CalPlayer
/// <summary> Calamity's Adamantite armor set bonus; adds half of DR to crit chance, and makes landing hits give a stacking defense boost. </summary>
public bool AdamantiteSet = false;
public int AdamantiteSetDecayDelay = 0;
public int ChlorophyteHealDelay = 0;
/// <summary>
/// If true, the player is wearing a post-Moon Lord summoner armor set.<br/>
/// Currently unused.
@@ -1588,7 +1555,7 @@ namespace CalamityMod.CalPlayer
public bool sCrystal = false;
/// <summary> Elemental in a Bottle. </summary>
public bool sandEleBuff = false;
/// <summary> Rare Elemental in a Bottle. </summary>
/// <summary> Oasis Elemental in a Bottle. </summary>
public bool oasisEleBuff = false;
/// <summary> Eye of the Storm. </summary>
public bool cloudEleBuff = false;
@@ -1705,7 +1672,6 @@ namespace CalamityMod.CalPlayer
public bool abyssDeath = false;
public int abyssBreathCD;
public float caveDarkness = 0f;
#endregion
#region Transformation
@@ -1722,11 +1688,9 @@ namespace CalamityMod.CalPlayer
public bool aquaticHeartPrevious;
public bool aquaticHeart;
public bool snowmanNoseless;
public bool meldTransformationPrevious;
public bool meldTransformation;
public bool meldTransformationForce;
public bool meldTransformationPower;
public bool omegaBlueTransformationPrevious;
public bool omegaBlueTransformation;
public bool omegaBlueTransformationForce;
public bool omegaBlueTransformationPower;
@@ -2318,8 +2282,6 @@ namespace CalamityMod.CalPlayer
rimehound = false;
crysthamyr = false;
ExoChair = false;
miniOldDuke = false;
miniOldDukeVanity = false;
aquaticHeartWaterBuff = false;
aquaticHeartIce = false;
@@ -2336,7 +2298,7 @@ namespace CalamityMod.CalPlayer
nebulousCore = false;
godSlayer = false;
godSlayerDamage = false;
godSlayerMelee = false;
godSlayerRanged = false;
godSlayerThrowing = false;
@@ -2345,8 +2307,6 @@ namespace CalamityMod.CalPlayer
silvaSummon = false;
auricSet = false;
auricSetMelee = false;
GemTechSet = false;
CobaltSet = false;
@@ -2373,7 +2333,7 @@ namespace CalamityMod.CalPlayer
shadeRegen = false;
shadowSpeed = false;
dsSetBonus = false;
demonshadeSet = false;
wearingRogueArmor = false;
blockAllDashes = false;
@@ -2399,17 +2359,12 @@ namespace CalamityMod.CalPlayer
protolithBangle = false; // Marble band
protolithBangleVisual = false;
aFossil = false;
aPowder = false;
fallingBlockProtection = false;
trapProtection = false;
alluringBait = false;
enchantedPearl = false;
fishingStation = false;
rBrain = false;
bloodyWormTooth = false;
ivDrip = false;
vexation = false;
badgeOfBravery = false;
// Clear the Warbanner "cooldown" if not wearing Warbanner. This has absolutely zero effect for a casual player, but is useful for resetting the cooldown's duration.
if (!WarbanneroftheRighteous)
cooldowns.Remove(WarbanneroftheRighteousBuff.ID);
@@ -2443,7 +2398,6 @@ namespace CalamityMod.CalPlayer
deadshotBrooch = false;
tesla = false;
teslaVisuals = true;
cryogenSoul = false;
ascendantInsignia = false;
fishStocks = false;
magmaStoneVisuals = true;
@@ -2454,14 +2408,12 @@ namespace CalamityMod.CalPlayer
statisNinjaBelt = false;
if (Player.dashDelay != -1)
statisVoidSash = false;
alreadyHasFrogLeg = false;
eTalisman = false;
nucleogenesis = false;
nuclearFuelRod = false;
heartOfDarkness = false;
profanedSoulRelicBuff = false;
shadowMinions = false;
holyMinions = false;
statisMinions = false;
alchFlask = false;
toxicHeart = false;
toxicHeartVisuals = false;
@@ -2483,7 +2435,6 @@ namespace CalamityMod.CalPlayer
chaliceOfTheBloodGod = false;
chaliceHeartStyle = false;
chaliceBleedoutToApplyOnHurt = 0; // Resets every frame so it doesn't improperly carry over between hits
elementalHeart = false;
crownJewel = false;
infectedJewel = false;
purity = false;
@@ -2493,9 +2444,7 @@ namespace CalamityMod.CalPlayer
darkSunRing = false;
crawCarapace = false;
baroclaw = false;
voidOfCalamity = false;
apollyon = false;
fragmentsOfAnotherWorld = false;
crushingEgo = false;
fadedIdolatry = false;
pSoulArtifact = false;
@@ -2517,8 +2466,6 @@ namespace CalamityMod.CalPlayer
hallowedRegen = false;
hallowedPower = false;
tracersDust = false;
moonWalkers = false;
voidStriders = false;
seraphTracers = false;
ursaSergeant = false;
ursaSergeantVisual = false;
@@ -2614,9 +2561,6 @@ namespace CalamityMod.CalPlayer
sulphurSet = false;
aeroSet = false;
statigelSet = false;
titanHeartSet = false;
titanHeartMask = false;
titanHeartMantle = false;
@@ -2624,7 +2568,6 @@ namespace CalamityMod.CalPlayer
plagueReaper = false;
plaguebringerPatronSet = false;
plaguebringerCarapace = false;
fathomSwarmer = false;
fathomSwarmerVisage = false;
fathomSwarmerBreastplate = false;
fathomSwarmerTail = false;
@@ -2662,7 +2605,6 @@ namespace CalamityMod.CalPlayer
moonCrown = false;
mageCrownVisibility = false;
dragonScales = false;
gloveOfPrecision = false;
gloveOfRecklessness = false;
vampiricTalisman = false;
electricianGlove = false;
@@ -2971,10 +2913,8 @@ namespace CalamityMod.CalPlayer
pscState = 0;
pscLerpColor = Color.White;
meldTransformationPrevious = meldTransformation;
meldTransformation = meldTransformationForce = meldTransformationPower = false;
omegaBlueTransformationPrevious = omegaBlueTransformation;
omegaBlueTransformation = omegaBlueTransformationForce = omegaBlueTransformationPower = false;
rageModeActive = false;
@@ -3102,7 +3042,6 @@ namespace CalamityMod.CalPlayer
arsenalCooldown = 0;
andromedaState = AndromedaPlayerState.Inactive;
planarSpeedBoost = 0;
galileoCooldown = 0;
soundCooldown = 0;
dogTextCooldown = 0;
auralisStealthCounter = 0f;
@@ -3131,7 +3070,6 @@ namespace CalamityMod.CalPlayer
gSabatonTempJumpSpeed = 0;
rOfDelivarenceRam = false;
astralStarRainCooldown = 0;
VoidCooldown = 0;
AlchFlaskCooldown = 0;
ascendantInsigniaCooldown = 0;
transformerCooldown = 0;
@@ -3150,14 +3088,12 @@ namespace CalamityMod.CalPlayer
externalColdImmunity = externalHeatImmunity = false;
externalDefenseDamageImmunity = false;
dragonRageHits = 0;
dragonRageCooldown = 0;
spectralVeilImmunity = 0;
jetPackDash = 0;
jetPackDirection = 0;
andromedaCripple = 0;
theBeeCooldown = 0;
scuttlerCooldown = 0;
mageCrownTimer = 0;
wingProjectileCooldown = 0;
hallowedRuneCooldown = 0;
@@ -3349,12 +3285,11 @@ namespace CalamityMod.CalPlayer
miningSetCooldown = 0;
shadowSpeed = false;
godSlayer = false;
godSlayerDamage = false;
godSlayerMelee = false;
godSlayerRanged = false;
godSlayerThrowing = false;
godSlayerDashHotKeyPressed = false;
SpeedBlasterDashStarted = false;
auricSetMelee = false;
silvaSet = false;
silvaMage = false;
silvaSummon = false;
@@ -3368,7 +3303,6 @@ namespace CalamityMod.CalPlayer
AdamantiteSet = false;
WearingPostMLSummonerSet = false;
AdamantiteSetDecayDelay = 0;
ChlorophyteHealDelay = 0;
omegaBlueChestplate = false;
omegaBlueSet = false;
molluskHelmet = false;
@@ -3387,13 +3321,12 @@ namespace CalamityMod.CalPlayer
reaverDefense = false;
reaverExplore = false;
shadeRegen = false;
dsSetBonus = false;
demonshadeSet = false;
titanHeartSet = false;
titanHeartMask = false;
titanHeartMantle = false;
titanCooldown = 0;
umbraphileSet = false;
fathomSwarmer = false;
fathomSwarmerVisage = false;
fathomSwarmerBreastplate = false;
fathomSwarmerTail = false;
@@ -3424,7 +3357,6 @@ namespace CalamityMod.CalPlayer
victideSet = false;
aeroSet = false;
sulphurSet = false;
statigelSet = false;
tarraSet = false;
tarraMelee = false;
tarragonCloak = false;
@@ -4099,7 +4031,7 @@ namespace CalamityMod.CalPlayer
dust.velocity *= 6.6f;
}
}
if (dsSetBonus)
if (demonshadeSet)
{
SoundEngine.PlaySound(DemonshadeHelm.ActivationSound, Player.Center);
for (int i = 0; i < 36; i++)
@@ -5838,7 +5770,7 @@ namespace CalamityMod.CalPlayer
rainbow.noGravity = true;
}
}
if (dsSetBonus)
if (demonshadeSet)
{
if (Main.rand.NextBool(3))
{
+1 -1
View File
@@ -431,7 +431,7 @@ namespace CalamityMod.CalPlayer
#region Armor Visuals
// Demonshade Armor
if (calamityPlayer.dsSetBonus && drawInfo.shadow == 0f)
if (calamityPlayer.demonshadeSet && drawInfo.shadow == 0f)
{
if (Player != null && !Player.dead)
{
+2 -2
View File
@@ -2484,7 +2484,7 @@ namespace CalamityMod.CalPlayer
}
}
}
else if (godSlayerDamage) //god slayer melee helm
else if (godSlayerMelee) //god slayer melee helm
{
var source = Player.GetSource_OnHurt(hurtInfo.DamageSource);
if (hurtInfo.Damage > GodSlayerHeadMelee.SetBonusHurtDamageThreshold)
@@ -2506,7 +2506,7 @@ namespace CalamityMod.CalPlayer
}
}
}
else if (dsSetBonus)
else if (demonshadeSet)
{
if (Player.whoAmI == Main.myPlayer)
{
+5 -5
View File
@@ -73,9 +73,9 @@ namespace CalamityMod.CalPlayer
if (Player.electrified)
{
totalVanillaDoT += eleResist ? 4 : 8;
totalVanillaDoT += 8;
if (Player.controlLeft || Player.controlRight)
totalVanillaDoT += eleResist ? 16 : 32;
totalVanillaDoT += 32;
}
// Tally up total current vanilla DoT so it can be added as extra DoT from Death Mode
@@ -109,7 +109,7 @@ namespace CalamityMod.CalPlayer
ApplyDoTDebuff(burningBlood, 8);
ApplyDoTDebuff(brainRot, 8);
ApplyDoTDebuff(vaporfied, 8);
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3) / (eleResist ? 2 : 1);
int staticDoT = ((Player.controlLeft || Player.controlRight) ? 12 : 3);
ApplyDoTDebuff(staticDischarge, staticDoT);
ApplyDoTDebuff(heavybleeding, 16);
ApplyDoTDebuff(crushDepth, 18);
@@ -130,7 +130,7 @@ namespace CalamityMod.CalPlayer
// Profaned Soul Crystal turns you into Providence, a God, and you take more damage from God Slayer Inferno
ApplyDoTDebuff(godSlayerInferno, profanedCrystalBuffs ? 50 : 40);
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10) / (eleResist ? 2 : 1);
int fluxDoT = ((Player.controlLeft || Player.controlRight) ? 50 : 10);
ApplyDoTDebuff(vermillionFlux, fluxDoT);
ApplyDoTDebuff(elementalMix, 50); // Never inflicted on the player
ApplyDoTDebuff(trueVHex, 50);
@@ -138,7 +138,7 @@ namespace CalamityMod.CalPlayer
ApplyDoTDebuff(dragonFire, dragonfireDoT);
ApplyDoTDebuff(miracleBlight, 60);
ApplyDoTDebuff(banishingFire, 60); // Never inflicted on the player
int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 80 : 16) / (eleResist ? 2 : 1);
int rebukeDoT = ((Player.controlLeft || Player.controlRight) ? 80 : 16);
ApplyDoTDebuff(auricRebuke, rebukeDoT);
// Slowly increase the sulphuric water poisoning effect. Once it's high enough, the player takes damage and the meter resets.
+3 -31
View File
@@ -1457,7 +1457,6 @@ namespace CalamityMod.CalPlayer
}
// Death Mode effects
caveDarkness = 0f;
if (CalamityWorld.death || Main.getGoodWorld)
{
if (Player.whoAmI == Main.myPlayer)
@@ -2241,7 +2240,7 @@ namespace CalamityMod.CalPlayer
// First Shadowflame is +1, Statis' Blessing is +2, Statis' Curse inherits both for +3
if (shadowMinions)
Player.maxMinions++;
if (holyMinions)
if (statisMinions)
Player.maxMinions += 2;
if (starTaintedGenerator)
@@ -2358,8 +2357,6 @@ namespace CalamityMod.CalPlayer
phantomicHeartRegen--;
if (phantomicBulwarkCooldown > 0)
phantomicBulwarkCooldown--;
if (galileoCooldown > 0)
galileoCooldown--;
if (gladiatorTimer > 0)
gladiatorTimer--;
if (dragonRageCooldown > 0)
@@ -2372,8 +2369,6 @@ namespace CalamityMod.CalPlayer
raiderSoundCooldown--;
if (astralStarRainCooldown > 0)
astralStarRainCooldown--;
if (VoidCooldown > 0)
VoidCooldown--;
if (ursaSergeantCooldown > 0)
ursaSergeantCooldown--;
if (generalBandCooldown > 0)
@@ -2445,8 +2440,6 @@ namespace CalamityMod.CalPlayer
ataxiaDmg = 0f;
if (hydroHealTimer > 0f)
hydroHealTimer -= 0.05f;
if (ataxiaDmg < 0f)
ataxiaDmg = 0f;
if (xerocDmg > 0f)
xerocDmg -= 2f;
if (xerocDmg < 0f)
@@ -2582,8 +2575,6 @@ namespace CalamityMod.CalPlayer
}
else
adamantiteSetDefenseBoostInterpolant = 0f;
if (ChlorophyteHealDelay > 0)
ChlorophyteHealDelay--;
if (monolithAccursedShader > 0)
monolithAccursedShader--;
if (monolithBossRushShader > 0)
@@ -3179,11 +3170,7 @@ namespace CalamityMod.CalPlayer
// Nebula Headcrab darkness effect
if (!Player.headcovered)
{
float screenObstructionAmt = MathHelper.Clamp(caveDarkness, 0f, 0.95f);
float targetValue = MathHelper.Clamp(screenObstructionAmt * 0.7f, 0.1f, 0.3f);
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, screenObstructionAmt, targetValue);
}
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, 0f, 0.1f);
// Breath lost while at zero breath
double breathLoss = Main.remixWorld ? (point.Y < abyssLevel1 ? 1D : 0D) : (point.Y > abyssLevel1 ? 1D : 0D);
@@ -3310,14 +3297,10 @@ namespace CalamityMod.CalPlayer
{
if (Vector2.Distance(Main.LocalPlayer.Center, Main.npc[CalamityGlobalNPC.signus].Center) <= 5200f)
{
float darkRatio = MathHelper.Clamp(caveDarkness, 0f, 1f);
float signusLifeRatio = 1f - (Main.npc[CalamityGlobalNPC.signus].life / Main.npc[CalamityGlobalNPC.signus].lifeMax);
// Reduce the power of Signus darkness based on your light level.
float multiplier = 1f;
float signusDarkness = signusLifeRatio * multiplier;
darkRatio = MathHelper.Clamp(signusDarkness, 0f, 1f);
float darkRatio = MathHelper.Clamp(signusLifeRatio, 0f, 1f);
ScreenObstruction.screenObstruction = MathHelper.Lerp(ScreenObstruction.screenObstruction, LightingEffectsSystem.MaxGFBSignusDarkness * -darkRatio, 0.3f);
}
}
@@ -3902,11 +3885,6 @@ namespace CalamityMod.CalPlayer
Player.GetDamage<MagicDamageClass>() += MathHelper.Lerp(0.05f, 0.15f, manaRatio);
}
if (bloodyWormTooth)
{
Player.GetDamage<MeleeDamageClass>() += 0.1f;
}
// While making the rogue update verify if we should allow these to stack again - Shade
if (filthyGlove)
{
@@ -4391,12 +4369,6 @@ namespace CalamityMod.CalPlayer
Player.GetDamage<GenericDamageClass>() += beeBoost;
}
if (badgeOfBravery)
{
Player.GetDamage<MeleeDamageClass>() += 0.1f;
Player.GetCritChance<MeleeDamageClass>() += 10;
}
// Amalgam boosts
if (Main.myPlayer == Player.whoAmI)
{
-1
View File
@@ -27,7 +27,6 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.pickSpeed -= MiningSpeedBoost;
player.Calamity().aPowder = true;
player.Calamity().fallingBlockProtection = true;
player.Calamity().trapProtection = true;
+2 -2
View File
@@ -21,8 +21,8 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.badgeOfBravery = true;
player.GetDamage<MeleeDamageClass>() += 0.1f;
player.GetCritChance<MeleeDamageClass>() += 10;
player.GetArmorPenetration<MeleeDamageClass>() += 5;
}
+1 -2
View File
@@ -22,8 +22,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.bloodyWormTooth = true;
player.GetDamage<MeleeDamageClass>() += 0.1f;
player.endurance += 0.1f;
}
+1 -2
View File
@@ -21,8 +21,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.bloodyWormTooth = true;
player.GetDamage<MeleeDamageClass>() += 0.1f;
}
public override void AddRecipes()
+1 -1
View File
@@ -23,7 +23,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().elementalHeart;
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override void UpdateAccessory(Player player, bool hideVisual)
{
-3
View File
@@ -73,9 +73,6 @@ namespace CalamityMod.Items.Accessories
#endregion
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.eTalisman = true;
player.manaMagnet = true;
if (manaFlowerEnabled)
player.manaFlower = true;
+1 -9
View File
@@ -26,15 +26,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.elementalHeart)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override void UpdateAccessory(Player player, bool hideVisual)
{
@@ -33,9 +33,6 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.fragmentsOfAnotherWorld = true;
player.buffImmune[ModContent.BuffType<WhisperingDeath>()] = true;
player.GetAttackSpeed<MeleeDamageClass>() += MeleeSpeedIncrease;
player.specialistDamage *= RangedSpecialistDmgMult;
-1
View File
@@ -21,7 +21,6 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.gloveOfPrecision = true;
player.GetDamage<RogueDamageClass>() += 0.10f;
player.GetCritChance<RogueDamageClass>() += 10;
modPlayer.rogueVelocity += 0.15f;
-2
View File
@@ -51,7 +51,6 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allElementals = true;
modPlayer.elementalHeart = true;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
int siren = ProjectileType<WaterElementalMinion>();
@@ -115,7 +114,6 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.allElementalsVanity = true;
// modPlayer.elementalHeart = true;
int brimmy = ProjectileType<BrimstoneElementalMinion>();
int siren = ProjectileType<WaterElementalMinion>();
+1 -1
View File
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Accessories
CalamityPlayer modPlayer = player.Calamity();
modPlayer.nucleogenesis = true;
modPlayer.shadowMinions = true; //shadowflame
modPlayer.holyMinions = true; //holy flames
modPlayer.statisMinions = true;
modPlayer.voltaicJelly = true; //static discharge
modPlayer.starTaintedGenerator = true; //astral infection and irradiated
player.GetKnockback<SummonDamageClass>() += 3f;
+1 -9
View File
@@ -26,15 +26,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.elementalHeart)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -29,15 +29,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.elementalHeart)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -9
View File
@@ -26,15 +26,7 @@ namespace CalamityMod.Items.Accessories
Item.accessory = true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded)
{
CalamityPlayer modPlayer = player.Calamity();
if (modPlayer.elementalHeart)
{
return false;
}
return true;
}
public override bool CanEquipAccessory(Player player, int slot, bool modded) => !player.Calamity().allElementals;
public override void UpdateAccessory(Player player, bool hideVisual)
{
+1 -1
View File
@@ -22,7 +22,7 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.holyMinions = true;
modPlayer.statisMinions = true;
player.GetKnockback<SummonDamageClass>() += 2.5f;
player.GetDamage<SummonDamageClass>() += 0.12f;
}
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.Items.Accessories
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.shadowMinions = true;
modPlayer.holyMinions = true;
modPlayer.statisMinions = true;
player.GetKnockback<SummonDamageClass>() += 2.75f;
player.GetDamage<SummonDamageClass>() += 0.12f;
player.buffImmune[ModContent.BuffType<Shadowflame>()] = true;
@@ -23,7 +23,6 @@ namespace CalamityMod.Items.Accessories
player.accFishingLine = true;
player.accTackleBox = true;
player.accLavaFishing = true;
player.Calamity().fishingStation = true;
}
public override void AddRecipes()
-2
View File
@@ -31,8 +31,6 @@ namespace CalamityMod.Items.Accessories
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.voidOfCalamity = true;
player.GetDamage<GenericDamageClass>() += 0.12f;
if (player.whoAmI == Main.myPlayer)
{
-1
View File
@@ -121,7 +121,6 @@ namespace CalamityMod.Items.Accessories.Wings
modPlayer.angelTreads = true;
}
modPlayer.tracersDust = !hideVisual && toggleEnabled;
modPlayer.moonWalkers = true;
}
public override void AddRecipes()
-1
View File
@@ -41,7 +41,6 @@ namespace CalamityMod.Items.Accessories.Wings
public override void UpdateAccessory(Player player, bool hideVisual)
{
CalamityPlayer modPlayer = player.Calamity();
modPlayer.cryogenSoul = true;
if (modPlayer.wingProjectileCooldown <= 0)
{
if (player.controlJump && player.jump == 0 && player.velocity.Y != 0f && !player.mount.Active && !player.mount.Cart)
-1
View File
@@ -123,7 +123,6 @@ namespace CalamityMod.Items.Accessories.Wings
modPlayer.angelTreads = true;
}
modPlayer.tracersDust = !hideVisual && toggleEnabled;
modPlayer.voidStriders = true;
}
public override void AddRecipes()
+1 -2
View File
@@ -52,9 +52,8 @@ namespace CalamityMod.Items.Armor.Auric
modPlayer.bloodflareSet = true;
modPlayer.bloodflareMelee = true;
modPlayer.godSlayer = true;
modPlayer.godSlayerDamage = true;
modPlayer.godSlayerMelee = true;
modPlayer.auricSet = true;
modPlayer.auricSetMelee = true;
player.aggro += SetBonusAggroBoost;
if (modPlayer.godSlayerDashHotKeyPressed || (player.dashDelay != 0 && modPlayer.LastUsedDashID == GodslayerArmorDash.ID))
+1 -1
View File
@@ -55,7 +55,7 @@ namespace CalamityMod.Items.Armor.Demonshade
{
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), CalamityUtils.GetArmorSetBonusKey(), EnrageDuration.FramesToSeconds(), (1f + MultDamageBoost).Round(), (1D + MultDamageTakenBoost).Round());
var modPlayer = player.Calamity();
modPlayer.dsSetBonus = true;
modPlayer.demonshadeSet = true;
modPlayer.wearingRogueArmor = true;
modPlayer.WearingPostMLSummonerSet = true;
player.maxMinions += SetBonusMinionSlotBoost;
@@ -40,7 +40,6 @@ namespace CalamityMod.Items.Armor.FathomSwarmer
{
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusMinionSlotBoost, SetBonusSummonDamageBoost.ToPercent(), SetBonusSubmergedSummonDamageBoost.ToPercent(), SetBonusSubmergedDefenseBoost, SetBonusSubmergedRegenBoost.ToRegenPerSecond());
var modPlayer = player.Calamity();
modPlayer.fathomSwarmer = true;
player.spikedBoots = 2;
player.maxMinions += SetBonusMinionSlotBoost;
player.GetDamage<SummonDamageClass>() += SetBonusSummonDamageBoost;
+1 -1
View File
@@ -42,7 +42,7 @@ namespace CalamityMod.Items.Armor.GodSlayer
{
var modPlayer = player.Calamity();
modPlayer.godSlayer = true;
modPlayer.godSlayerDamage = true;
modPlayer.godSlayerMelee = true;
var hotkey = CalamityKeybinds.GodSlayerDashHotKey.TooltipHotkeyString();
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusHurtDamageThreshold, hotkey, GodSlayerChestplate.DashCooldown.FramesToSeconds());
player.aggro += SetBonusAggroBoost;
@@ -33,8 +33,6 @@ namespace CalamityMod.Items.Armor.Statigel
public override void UpdateArmorSet(Player player)
{
player.setBonus = CalamityUtils.GetTextFromModItem<StatigelArmor>("CommonSetBonus").Format(StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent());
var modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.GetJumpState<StatigelJump>().Enable();
Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15);
player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost;
@@ -35,8 +35,6 @@ namespace CalamityMod.Items.Armor.Statigel
public override void UpdateArmorSet(Player player)
{
player.setBonus = this.GetLocalization("SetBonus").Format(StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent());
var modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.GetJumpState<StatigelJump>().Enable();
Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15);
player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost;
@@ -31,8 +31,6 @@ namespace CalamityMod.Items.Armor.Statigel
public override void UpdateArmorSet(Player player)
{
player.setBonus = CalamityUtils.GetTextFromModItem<StatigelArmor>("CommonSetBonus").Format(StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent());
var modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.GetJumpState<StatigelJump>().Enable();
Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15);
player.jumpSpeedBoost += StatigelArmor.SetBonusJumpSpeedBoost;
@@ -36,7 +36,6 @@ namespace CalamityMod.Items.Armor.Statigel
{
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusRogueStealth.ToStealth(), StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent());
var modPlayer = player.Calamity();
modPlayer.statigelSet = true;
player.GetJumpState<StatigelJump>().Enable();
modPlayer.rogueStealthMax += SetBonusRogueStealth;
modPlayer.wearingRogueArmor = true;
@@ -39,7 +39,6 @@ namespace CalamityMod.Items.Armor.Statigel
{
player.setBonus = this.GetLocalization("SetBonus").Format(SetBonusSummonDamageBoost.ToPercent(), StatigelArmor.SetBonusJumpSpeedBoost.ToJumpSpeedPercent());
var modPlayer = player.Calamity();
modPlayer.statigelSet = true;
modPlayer.slimeGod = true;
player.GetJumpState<StatigelJump>().Enable();
Player.jumpHeight += (int)(StatigelArmor.SetBonusJumpHeightPercentBoost * 15);
-24
View File
@@ -1131,30 +1131,6 @@ namespace CalamityMod.Items
// The Frog Leg line is prevented from stacking.
// Additionally, Amphibian boots are directly nerfed so they aren't the best in slot boots at all times.
//
// 21MAY2024: Ozzatron: Disabled this code. Frog Leg is allowed to stack. Amphibian Boots specific nerf is applied below.
/*
switch (item.type)
{
default:
break;
case ItemID.AmphibianBoots:
if (modPlayer.alreadyHasFrogLeg)
player.jumpSpeedBoost -= BalancingConstants.VanillaFrogLegJumpSpeedBoost;
else
player.jumpSpeedBoost += BalancingConstants.AmphibianBootsJumpSpeedBoost - BalancingConstants.VanillaFrogLegJumpSpeedBoost;
modPlayer.alreadyHasFrogLeg = true;
break;
case ItemID.FrogLeg:
case ItemID.FrogFlipper:
case ItemID.FrogGear:
case ItemID.FrogWebbing:
if (modPlayer.alreadyHasFrogLeg)
player.jumpSpeedBoost -= BalancingConstants.VanillaFrogLegJumpSpeedBoost;
modPlayer.alreadyHasFrogLeg = true;
break;
}
*/
if (item.type == ItemID.AmphibianBoots)
player.jumpSpeedBoost += BalancingConstants.AmphibianBootsJumpSpeedBoost - BalancingConstants.VanillaFrogLegJumpSpeedBoost;
+2 -9
View File
@@ -14,15 +14,11 @@ namespace CalamityMod.Systems
{
public const float MaxSignusDarkness = -0.4f;
public const float MaxGFBSignusDarkness = MaxSignusDarkness * 2f;
public const float MaxAbyssDarkness = -0.7f;
public override void ModifyLightingBrightness(ref float scale)
{
// Apply the calculated darkness value for the local player.
CalamityPlayer modPlayer = Main.LocalPlayer.Calamity();
float darkRatio = MathHelper.Clamp(modPlayer.caveDarkness, 0f, 1f);
if (modPlayer.ZoneAbyss)
scale += MaxAbyssDarkness * darkRatio;
if (CalamityWorld.revenge)
{
@@ -34,11 +30,8 @@ namespace CalamityMod.Systems
{
float signusLifeRatio = 1f - (Main.npc[CalamityGlobalNPC.signus].life / Main.npc[CalamityGlobalNPC.signus].lifeMax);
float multiplier = 1f;
// Total darkness
float signusDarkness = signusLifeRatio * multiplier;
darkRatio = MathHelper.Clamp(signusDarkness, 0f, 1f);
float darkRatio = MathHelper.Clamp(signusLifeRatio, 0f, 1f);
scale += (Main.zenithWorld ? MaxGFBSignusDarkness : MaxSignusDarkness) * darkRatio;
}
}