From cbf128c6753f75e057ab77cd6c2b896787f4ceca Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 18 Feb 2024 00:36:02 -0500 Subject: [PATCH] reorganized balance constants because it is getting rather lengthy --- Balancing/BalancingConstants.cs | 114 +++++++++++++++++--------------- 1 file changed, 62 insertions(+), 52 deletions(-) diff --git a/Balancing/BalancingConstants.cs b/Balancing/BalancingConstants.cs index b9e1171b89..ccdcfef485 100644 --- a/Balancing/BalancingConstants.cs +++ b/Balancing/BalancingConstants.cs @@ -2,6 +2,7 @@ { public static class BalancingConstants { + #region Movement // When the relevant config is enabled: Gives the player a substantial +50% move speed boost at all times internal static readonly float DefaultMoveSpeedBoost = 0.5f; @@ -15,17 +16,9 @@ // Altered jump speed boost provided by Shiny Red Balloon via IL edit // This is a const because it replaces a hardcoded value in vanilla internal const float BalloonJumpSpeedBoost = 0.75f; + #endregion - // Altered default damage deviation - internal const int NewDefaultDamageVariationPercent = 5; - - // Sharpening Station grants this much armor penetration to melee weapons. - internal const float SharpeningStationArmorPenetration = 5f; - - // Beetle Scale Mail stats - internal static readonly float BeetleScaleMailMeleeDamagePerBeetle = 0.1f; - internal static readonly float BeetleScaleMailMeleeSpeedPerBeetle = 0.05f; - + #region Dashes and Dodges // Dash cooldowns (in frames) internal const int UniversalDashCooldown = 30; internal const int UniversalShieldSlamCooldown = 30; @@ -46,8 +39,23 @@ internal static readonly int MirrorDodgeCooldown = 5400; internal static readonly int DaedalusReflectCooldown = 5400; internal static readonly int EvolutionReflectCooldown = 5400; + #endregion - // Internal vanilla item damage variables + #region Damage + // Altered default damage deviation + internal const int NewDefaultDamageVariationPercent = 5; + + // Summoner cross class nerf + internal static readonly float SummonerCrossClassNerf = 0.75f; + + // Summon damage bonuses counting less towards "scales with your best class" + internal static readonly float SummonAllClassScalingFactor = 0.75f; + + // Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks + internal static readonly float MinimumAllowedAttackSpeed = 0.25f; + internal static readonly float MaximumAllowedAttackSpeed = 10f; + + // Internal vanilla whip damage variables internal static readonly float LeatherWhipTagDamageMultiplier = 1.08f; internal static readonly float SnapthornTagDamageMultiplier = 1.04f; internal static readonly float SpinalTapTagDamageMultiplier = 1.08f; @@ -57,10 +65,15 @@ internal static readonly float MorningStarTagDamageMultiplier = 1.11f; internal static readonly float KaleidoscopeTagDamageMultiplier = 1.12f; - // Summoner cross class nerf - internal static readonly float SummonerCrossClassNerf = 0.75f; + // Sharpening Station grants this much armor penetration to melee weapons. + internal const float SharpeningStationArmorPenetration = 5f; - // Rogue stealth + // Beetle Scale Mail stats + internal static readonly float BeetleScaleMailMeleeDamagePerBeetle = 0.1f; + internal static readonly float BeetleScaleMailMeleeSpeedPerBeetle = 0.05f; + #endregion + + #region Rogue Base Stats // If stealth is too weak, increase this number. If stealth is too strong, decrease this number. // This value is intentionally not readonly. public static double UniversalStealthStrikeDamageFactor = 0.42; @@ -71,37 +84,9 @@ internal static readonly float BaseStealthGenTime = 4f; // 4 seconds internal static readonly float MovingStealthGenRatio = 0.5f; + #endregion - // Rage - internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default. - internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12. - internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10); - internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30); - internal static readonly float DefaultRageDamageBoost = 0.35f; // +35% - - // Proximity Rage - // These variables should be used in general to classify "enemies" vs "non-enemies" as well. - // See NPCUtils.IsAnEnemy - internal const int TinyHealthThreshold = 5; - internal const int TinyDamageThreshold = 5; - // If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage - internal const int NoContactDamageHealthThreshold = 3000; - internal const int UnreasonableHealthThreshold = 25000000; // 25 million - - // Adrenaline - internal static readonly float AdrenalineDamageBoost = 2f; // +200% - internal static readonly float AdrenalineDamagePerBooster = 0.15f; // +15% - internal static readonly float FullAdrenalineDR = 0.5f; // 50% - internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster - - // Summon damage bonuses counting less towards "scales with your best class" - internal static readonly float SummonAllClassScalingFactor = 0.75f; - - // Minimum and maximum allowed attack speed ratios when using Calamity Global Item Tweaks - internal static readonly float MinimumAllowedAttackSpeed = 0.25f; - internal static readonly float MaximumAllowedAttackSpeed = 10f; - - // Defense Damage + #region Defense and Defense Damage internal const double DefaultDefenseDamageRatio = 0.3333; // Defense damage floor: PHM | HM | PML @@ -111,15 +96,40 @@ // Death Mode: 5 | 12 | 24 // Boss Rush: 25 internal static readonly int DefenseDamageFloor_NormalPHM = 3; - internal static readonly int DefenseDamageFloor_NormalHM = 8; + internal static readonly int DefenseDamageFloor_NormalHM = 8; internal static readonly int DefenseDamageFloor_NormalPML = 16; - internal static readonly int DefenseDamageFloor_RevPHM = 4; - internal static readonly int DefenseDamageFloor_RevHM = 10; - internal static readonly int DefenseDamageFloor_RevPML = 20; - internal static readonly int DefenseDamageFloor_DeathPHM = 5; - internal static readonly int DefenseDamageFloor_DeathHM = 12; - internal static readonly int DefenseDamageFloor_DeathPML = 24; - internal static readonly int DefenseDamageFloor_BossRush = 25; + internal static readonly int DefenseDamageFloor_RevPHM = 4; + internal static readonly int DefenseDamageFloor_RevHM = 10; + internal static readonly int DefenseDamageFloor_RevPML = 20; + internal static readonly int DefenseDamageFloor_DeathPHM = 5; + internal static readonly int DefenseDamageFloor_DeathHM = 12; + internal static readonly int DefenseDamageFloor_DeathPML = 24; + internal static readonly int DefenseDamageFloor_BossRush = 25; + #endregion + + #region Rage and Adrenaline (Rippers) + internal static readonly int DefaultRageDuration = CalamityUtils.SecondsToFrames(9); // Rage lasts 9 seconds by default. + internal static readonly int RageDurationPerBooster = CalamityUtils.SecondsToFrames(1); // Each booster is +1 second: 10, 11, 12. + internal static readonly int RageCombatDelayTime = CalamityUtils.SecondsToFrames(10); + internal static readonly int RageFadeTime = CalamityUtils.SecondsToFrames(30); + internal static readonly float DefaultRageDamageBoost = 0.35f; // +35% + + internal static readonly float AdrenalineDamageBoost = 2f; // +200% + internal static readonly float AdrenalineDamagePerBooster = 0.15f; // +15% + internal static readonly float FullAdrenalineDR = 0.5f; // 50% + internal static readonly float AdrenalineDRPerBooster = 0.05f; // +5% per booster + #endregion + + // TODO -- NPC classification is not done consistently with predictable thresholds. + // These variables should be used in general to classify "enemies" vs "non-enemies" as well. + // See NPCUtils.IsAnEnemy + #region NPC Classification + internal const int TinyHealthThreshold = 5; + internal const int TinyDamageThreshold = 5; + // If an enemy has more health than this, they are considered an enemy even if they have 0 contact damage + internal const int NoContactDamageHealthThreshold = 3000; + internal const int UnreasonableHealthThreshold = 25000000; // 25 million + #endregion // TODO -- Add all balance related constants here that don't belong in other files. // Review all constants and static readonlys in the entire mod to find things to add.