diff --git a/.gitignore b/.gitignore index 96129a0df2..5ff1e4bdd0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ ui/*/index.html # IDE folders .vscode .idea +.history # binaries dist diff --git a/ui/warrior/sim.ts b/ui/warrior/sim.ts index 64457ebeb2..1360e19f61 100644 --- a/ui/warrior/sim.ts +++ b/ui/warrior/sim.ts @@ -213,8 +213,8 @@ export class WarriorSimUI extends IndividualSimUI { // Rank order red gems to use with their associated stat caps const redGemCaps = new Array<[number, Stats]>(); redGemCaps.push([40117, this.calcArpCap(optimizedGear)]); - const expCap = new Stats().withStat(Stat.StatExpertise, 6.5 * 32.79 + 4); - redGemCaps.push([40118, expCap]); + const expCap = this.calcExpCap(); + redGemCaps.push([40118, expCap]); const critCap = this.calcCritCap(optimizedGear); redGemCaps.push([40111, new Stats()]); @@ -240,6 +240,19 @@ export class WarriorSimUI extends IndividualSimUI { await this.fillGemsToCaps(optimizedGear, yellowSockets, yellowGemCaps, 0, 0); } + calcExpCap(): Stats { + let expCap = 6.5 * 32.79 + 4; + const weaponMastery = this.player.getTalents().weaponMastery; + const hasWeaponMasteryTalent = !!weaponMastery; + + if (hasWeaponMasteryTalent) { + expCap -= + weaponMastery * 4 * Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION; + } + + return new Stats().withStat(Stat.StatExpertise, expCap); + } + calcArpCap(gear: Gear): Stats { let arpCap = 1404;