From 1d184c0c469b88d1fab9e1f214b54292d2f11ff7 Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 8 Aug 2024 14:07:53 +0200 Subject: [PATCH 1/4] Fix Demo lock Mastery flooring breakpoints --- ui/core/components/character_stats.tsx | 1 + ui/core/components/suggest_reforges_action.tsx | 13 ++++++++++--- ui/warlock/affliction/sim.ts | 5 ++--- ui/warlock/demonology/sim.ts | 5 +++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ui/core/components/character_stats.tsx b/ui/core/components/character_stats.tsx index 42c1eb877c..9f948fde54 100644 --- a/ui/core/components/character_stats.tsx +++ b/ui/core/components/character_stats.tsx @@ -340,6 +340,7 @@ export class CharacterStats extends Component { displayStr += ` (${statAsPercentageOrPoint.toFixed(2)}%)`; } else if (stat == Stat.StatMastery) { displayStr += ` (${(statAsPercentageOrPoint + (includeBase ? this.player.getBaseMastery() : 0)).toFixed(2)} Points)`; + console.log(statAsPercentageOrPoint, displayStr); } return displayStr; diff --git a/ui/core/components/suggest_reforges_action.tsx b/ui/core/components/suggest_reforges_action.tsx index 11a6f940ad..40a5933d0e 100644 --- a/ui/core/components/suggest_reforges_action.tsx +++ b/ui/core/components/suggest_reforges_action.tsx @@ -256,17 +256,24 @@ export class ReforgeOptimizer { {breakpoints.map((breakpoint, breakpointIndex) => ( {Math.round(breakpoint)} - {statToPercentageOrPoints(stat, breakpoint, new Stats()).toFixed(2)} + + {stat === Stat.StatMastery + ? ( + (statToPercentageOrPoints(stat, breakpoint, new Stats()) + this.player.getBaseMastery()) * + this.player.getMasteryPerPointModifier() + ).toFixed(2) + : statToPercentageOrPoints(stat, breakpoint, new Stats()).toFixed(2)} + {capType === StatCapType.TypeThreshold ? postCapEPs[0] : postCapEPs[breakpointIndex]} ))} {index !== this.softCapsConfig.length - 1 && ( <> - + - + )} diff --git a/ui/warlock/affliction/sim.ts b/ui/warlock/affliction/sim.ts index e7bf6ef12e..52461239e1 100644 --- a/ui/warlock/affliction/sim.ts +++ b/ui/warlock/affliction/sim.ts @@ -53,11 +53,10 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecAfflictionWarlock, { // These should be removed once the bugfix to make Mastery // continuous goes live! const masteryRatingBreakpoints = []; + const masteryPercentPerPoint = Mechanics.masteryPercentPerPoint.get(Spec.SpecAfflictionWarlock)!; for (let masteryPercent = 14; masteryPercent <= 200; masteryPercent++) { - masteryRatingBreakpoints.push( - (masteryPercent / Mechanics.masteryPercentPerPoint.get(Spec.SpecAfflictionWarlock)!) * Mechanics.MASTERY_RATING_PER_MASTERY_POINT, - ); + masteryRatingBreakpoints.push((masteryPercent / masteryPercentPerPoint) * Mechanics.MASTERY_RATING_PER_MASTERY_POINT); } const masterySoftCapConfig = { diff --git a/ui/warlock/demonology/sim.ts b/ui/warlock/demonology/sim.ts index ec7b3258bc..8ef3274055 100644 --- a/ui/warlock/demonology/sim.ts +++ b/ui/warlock/demonology/sim.ts @@ -52,10 +52,11 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDemonologyWarlock, { // These should be removed once the bugfix to make Mastery // continuous goes live! const masteryRatingBreakpoints = []; - + const masteryPercentPerPoint = Mechanics.masteryPercentPerPoint.get(Spec.SpecDemonologyWarlock)!; + const initialMasteryOffset = Math.round((Mechanics.MASTERY_RATING_PER_MASTERY_POINT / masteryPercentPerPoint) * 0.6); for (let masteryPercent = 19; masteryPercent <= 200; masteryPercent++) { masteryRatingBreakpoints.push( - (masteryPercent / Mechanics.masteryPercentPerPoint.get(Spec.SpecDemonologyWarlock)!) * Mechanics.MASTERY_RATING_PER_MASTERY_POINT, + Math.round(initialMasteryOffset + masteryPercent * (Mechanics.MASTERY_RATING_PER_MASTERY_POINT / masteryPercentPerPoint)), ); } From 710af832aff92797d64654680de809b4754349ae Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 8 Aug 2024 14:12:01 +0200 Subject: [PATCH 2/4] Remove console log --- ui/core/components/character_stats.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/core/components/character_stats.tsx b/ui/core/components/character_stats.tsx index 9f948fde54..42c1eb877c 100644 --- a/ui/core/components/character_stats.tsx +++ b/ui/core/components/character_stats.tsx @@ -340,7 +340,6 @@ export class CharacterStats extends Component { displayStr += ` (${statAsPercentageOrPoint.toFixed(2)}%)`; } else if (stat == Stat.StatMastery) { displayStr += ` (${(statAsPercentageOrPoint + (includeBase ? this.player.getBaseMastery() : 0)).toFixed(2)} Points)`; - console.log(statAsPercentageOrPoint, displayStr); } return displayStr; From 8057f062c290e8af48f3af304fc9a9a0f4c08f4a Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 8 Aug 2024 14:34:41 +0200 Subject: [PATCH 3/4] Widen mastery % caps --- ui/warlock/affliction/sim.ts | 2 +- ui/warlock/demonology/sim.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/warlock/affliction/sim.ts b/ui/warlock/affliction/sim.ts index 52461239e1..d97bdf2d6c 100644 --- a/ui/warlock/affliction/sim.ts +++ b/ui/warlock/affliction/sim.ts @@ -55,7 +55,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecAfflictionWarlock, { const masteryRatingBreakpoints = []; const masteryPercentPerPoint = Mechanics.masteryPercentPerPoint.get(Spec.SpecAfflictionWarlock)!; - for (let masteryPercent = 14; masteryPercent <= 200; masteryPercent++) { + for (let masteryPercent = 1; masteryPercent <= 200; masteryPercent++) { masteryRatingBreakpoints.push((masteryPercent / masteryPercentPerPoint) * Mechanics.MASTERY_RATING_PER_MASTERY_POINT); } diff --git a/ui/warlock/demonology/sim.ts b/ui/warlock/demonology/sim.ts index 8ef3274055..1f3f370a4d 100644 --- a/ui/warlock/demonology/sim.ts +++ b/ui/warlock/demonology/sim.ts @@ -54,7 +54,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecDemonologyWarlock, { const masteryRatingBreakpoints = []; const masteryPercentPerPoint = Mechanics.masteryPercentPerPoint.get(Spec.SpecDemonologyWarlock)!; const initialMasteryOffset = Math.round((Mechanics.MASTERY_RATING_PER_MASTERY_POINT / masteryPercentPerPoint) * 0.6); - for (let masteryPercent = 19; masteryPercent <= 200; masteryPercent++) { + for (let masteryPercent = 0; masteryPercent <= 200; masteryPercent++) { masteryRatingBreakpoints.push( Math.round(initialMasteryOffset + masteryPercent * (Mechanics.MASTERY_RATING_PER_MASTERY_POINT / masteryPercentPerPoint)), ); From e953c6bf92dd6a1eaf091866409080e422aa81f7 Mon Sep 17 00:00:00 2001 From: Adrian Klingen Date: Thu, 8 Aug 2024 14:38:43 +0200 Subject: [PATCH 4/4] Remove base mastery from reforge --- ui/core/components/suggest_reforges_action.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/ui/core/components/suggest_reforges_action.tsx b/ui/core/components/suggest_reforges_action.tsx index 40a5933d0e..00c54c396e 100644 --- a/ui/core/components/suggest_reforges_action.tsx +++ b/ui/core/components/suggest_reforges_action.tsx @@ -667,7 +667,6 @@ export class ReforgeOptimizer { this.player.setGear(TypedEvent.nextEventID(), gear); await this.sim.updateCharacterStats(TypedEvent.nextEventID()); let baseStats = Stats.fromProto(this.player.getCurrentStats().finalStats); - baseStats = baseStats.addStat(Stat.StatMastery, this.player.getBaseMastery() * Mechanics.MASTERY_RATING_PER_MASTERY_POINT); if (this.updateGearStatsModifier) baseStats = this.updateGearStatsModifier(baseStats); return baseStats.withHasteMultipliers(this.playerClass); }