Skip to content

Commit

Permalink
Merge pull request #852 from wowsims/feature/enhancement-auto-reforge
Browse files Browse the repository at this point in the history
[SHAMAN] Enhancement - Suggest reforge and EPs
  • Loading branch information
1337LutZ authored Jul 17, 2024
2 parents 1277638 + e15ffcd commit 8990df8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 15 deletions.
26 changes: 13 additions & 13 deletions ui/shaman/enhancement/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ export const P1_EP_PRESET = PresetUtils.makePresetEpWeights(
'P1',
Stats.fromMap(
{
[Stat.StatIntellect]: 1.48,
[Stat.StatAgility]: 1.59,
[Stat.StatStrength]: 1.1,
[Stat.StatSpellPower]: 1.13,
[Stat.StatSpellHit]: 0, //default EP assumes cap
[Stat.StatSpellCrit]: 0.91,
[Stat.StatSpellHaste]: 0.37,
[Stat.StatIntellect]: 0.07,
[Stat.StatAgility]: 2.47,
[Stat.StatSpellPower]: 0,
[Stat.StatSpellHit]: 0.89,
[Stat.StatSpellCrit]: 0.26,
[Stat.StatSpellHaste]: 0.22,
[Stat.StatAttackPower]: 1.0,
[Stat.StatMeleeHit]: 1.38,
[Stat.StatMeleeCrit]: 0.81,
[Stat.StatMeleeHaste]: 1.61, //haste is complicated
[Stat.StatExpertise]: 0, //default EP assumes cap
[Stat.StatMeleeHit]: 0.6,
[Stat.StatMeleeCrit]: 0.58,
[Stat.StatMeleeHaste]: 0.44,
[Stat.StatExpertise]: 1.3,
[Stat.StatMastery]: 1.21,
},
{
[PseudoStat.PseudoStatMainHandDps]: 5.21,
[PseudoStat.PseudoStatOffHandDps]: 2.21,
[PseudoStat.PseudoStatMainHandDps]: 3.05,
[PseudoStat.PseudoStatOffHandDps]: 2.56,
},
),
);
Expand Down
16 changes: 14 additions & 2 deletions ui/shaman/enhancement/sim.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { FireElementalSection } from '../../core/components/fire_elemental_inputs.js';
import * as BuffDebuffInputs from '../../core/components/inputs/buffs_debuffs.js';
import * as OtherInputs from '../../core/components/inputs/other_inputs.js';
import { ReforgeOptimizer } from '../../core/components/suggest_reforges_action';
import * as Mechanics from '../../core/constants/mechanics';
import { IndividualSimUI, registerSpecConfig } from '../../core/individual_sim_ui.js';
import { Player } from '../../core/player.js';
import { PlayerClasses } from '../../core/player_classes';
import { APLRotation } from '../../core/proto/apl.js';
import { Faction, IndividualBuffs, ItemSlot, PartyBuffs, PseudoStat, Race, Spec, Stat, TristateEffect, UnitStats } from '../../core/proto/common.js';
import { ShamanImbue } from '../../core/proto/shaman.js';
import { Faction, IndividualBuffs, ItemSlot, PartyBuffs, PseudoStat, Race, Spec, Stat, UnitStats } from '../../core/proto/common.js';
import { Stats } from '../../core/proto_utils/stats.js';
import * as ShamanInputs from '../inputs.js';
import * as EnhancementInputs from './inputs.js';
Expand Down Expand Up @@ -85,6 +86,13 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, {
gear: Presets.P1ORC_PRESET.gear,
// Default EP weights for sorting gear in the gear picker.
epWeights: Presets.P1_EP_PRESET.epWeights,
// Default stat caps for the Reforge optimizer
statCaps: (() => {
const spellHitCap = new Stats().withStat(Stat.StatSpellHit, 17 * Mechanics.SPELL_HIT_RATING_PER_HIT_CHANCE);
const expCap = new Stats().withStat(Stat.StatExpertise, 6.5 * 4 * Mechanics.EXPERTISE_PER_QUARTER_PERCENT_REDUCTION);

return spellHitCap.add(expCap);
})(),
other: Presets.OtherDefaults,
// Default consumes settings.
consumes: Presets.DefaultConsumes,
Expand Down Expand Up @@ -159,5 +167,9 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, {
export class EnhancementShamanSimUI extends IndividualSimUI<Spec.SpecEnhancementShaman> {
constructor(parentElem: HTMLElement, player: Player<Spec.SpecEnhancementShaman>) {
super(parentElem, player, SPEC_CONFIG);

player.sim.waitForInit().then(() => {
new ReforgeOptimizer(this);
});
}
}

0 comments on commit 8990df8

Please sign in to comment.