Skip to content

Commit

Permalink
Merge pull request #1056 from wowsims/feature/mage-p3
Browse files Browse the repository at this point in the history
[UI][MAGE] Add P3 preset
  • Loading branch information
1337LutZ authored Sep 25, 2024
2 parents 9102be2 + 3c5b307 commit 93c2302
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sim/druid/feral/feral.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (cat *FeralDruid) Initialize() {
cat.UpdateBleedPower(cat.Rip, sim, cat.CurrentTarget, false, true)
cat.UpdateBleedPower(cat.Rake, sim, cat.CurrentTarget, false, true)

if cat.Rip.NewSnapshotPower > previousRipSnapshotPower + 0.001 {
if cat.Rip.NewSnapshotPower > previousRipSnapshotPower+0.001 {
cat.tempSnapshotAura = aura
} else if cat.tempSnapshotAura.IsActive() {
cat.Rip.NewSnapshotPower = previousRipSnapshotPower
Expand Down
42 changes: 42 additions & 0 deletions sim/mage/fire/TestFire.results
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,48 @@ dps_results: {
tps: 22773.20786
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-FullBuffs-0.0yards-LongMultiTarget"
value: {
dps: 63220.5719
tps: 63489.21954
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-FullBuffs-0.0yards-LongSingleTarget"
value: {
dps: 39082.10141
tps: 37470.64419
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-FullBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 49650.74417
tps: 47726.22147
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-NoBuffs-0.0yards-LongMultiTarget"
value: {
dps: 43625.34615
tps: 46545.92351
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-NoBuffs-0.0yards-LongSingleTarget"
value: {
dps: 26495.1196
tps: 25325.90584
}
}
dps_results: {
key: "TestFire-Settings-Troll-p3_fire-Fire-fire-NoBuffs-0.0yards-ShortSingleTarget"
value: {
dps: 29936.7804
tps: 28325.80597
}
}
dps_results: {
key: "TestFire-SwitchInFrontOfTarget-Default"
value: {
Expand Down
5 changes: 4 additions & 1 deletion sim/mage/fire/fire_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ func TestFire(t *testing.T) {
Class: proto.Class_ClassMage,
Race: proto.Race_RaceTroll,

GearSet: core.GetGearSet("../../../ui/mage/fire/gear_sets", "p1_fire"),
GearSet: core.GetGearSet("../../../ui/mage/fire/gear_sets", "p1_fire"),
OtherGearSets: []core.GearSetCombo{
core.GetGearSet("../../../ui/mage/fire/gear_sets", "p3_fire"),
},
Talents: FireTalents,
Glyphs: FireGlyphs,
Consumes: FullFireConsumes,
Expand Down
16 changes: 8 additions & 8 deletions ui/core/player_classes/mage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ export class Mage extends PlayerClass<Class.ClassMage> {
[FrostMage.friendlyName]: FrostMage,
};
static races: Race[] = [
// [H]
Race.RaceTroll,
Race.RaceGoblin,
Race.RaceOrc,
Race.RaceUndead,
Race.RaceBloodElf,
// [A]
Race.RaceGnome,
Race.RaceWorgen,
Race.RaceHuman,
Race.RaceDwarf,
Race.RaceNightElf,
Race.RaceGnome,
Race.RaceDraenei,
Race.RaceWorgen,
// [H]
Race.RaceOrc,
Race.RaceUndead,
Race.RaceTroll,
Race.RaceBloodElf,
Race.RaceGoblin,
];
static armorTypes: ArmorType[] = [ArmorType.ArmorTypeCloth];
static weaponTypes: EligibleWeaponType[] = [
Expand Down
21 changes: 21 additions & 0 deletions ui/mage/fire/gear_sets/p3_fire.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"items": [
{ "id": 71508, "enchant": 4207, "gems": [68780, 52207], "reforging": 165 },
{ "id": 71472, "gems": [52207], "reforging": 165 },
{ "id": 71511, "enchant": 4200, "gems": [52205], "reforging": 144 },
{ "id": 71434, "enchant": 4115, "reforging": 165 },
{ "id": 71510, "enchant": 4102, "gems": [52239, 52217] },
{ "id": 71471, "enchant": 4257, "gems": [0], "reforging": 144 },
{ "id": 71614, "enchant": 4068, "gems": [52207, 0], "reforging": 144 },
{ "id": 71613, "gems": [52207, 52207], "reforging": 165 },
{ "id": 71509, "enchant": 4112, "gems": [52207, 52207], "reforging": 165 },
{ "id": 71447, "enchant": 4104, "gems": [52207], "reforging": 151 },
{ "id": 71217, "gems": [52207] },
{ "id": 71449, "reforging": 165 },
{ "id": 69110 },
{ "id": 62047, "reforging": 165 },
{ "id": 71086, "enchant": 4097, "gems": [52207, 52207, 52207], "reforging": 152 },
{},
{ "id": 71575, "reforging": 137 }
]
}
13 changes: 8 additions & 5 deletions ui/mage/fire/presets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as PresetUtils from '../../core/preset_utils';
import { Consumes, Debuffs, Flask, Food, Glyphs, Potions, Profession, PseudoStat, RaidBuffs, Stat } from '../../core/proto/common';
import { Consumes, Debuffs, Flask, Food, Glyphs, Potions, Profession, PseudoStat, RaidBuffs, Stat, TinkerHands } from '../../core/proto/common';
import {
FireMage_Options as MageOptions,
MageMajorGlyph as MajorGlyph,
Expand All @@ -12,13 +12,15 @@ import FireApl from './apls/fire.apl.json';
//import FireAoeApl from './apls/fire_aoe.apl.json';
import P1FireBisGear from './gear_sets/p1_fire.gear.json';
import P1FirePrebisGear from './gear_sets/p1_fire_prebis_gear.json';
import P3FireBisGear from './gear_sets/p3_fire.gear.json';

// Preset options for this spec.
// Eventually we will import these values for the raid sim too, so its good to
// keep them in a separate file.

export const FIRE_P1_PRESET = PresetUtils.makePresetGear('Fire P1 Preset', P1FireBisGear, { talentTree: 1 });
export const FIRE_P1_PREBIS = PresetUtils.makePresetGear('Fire P1 Pre-raid', P1FirePrebisGear, { talentTree: 1 });
export const FIRE_P1_PRESET = PresetUtils.makePresetGear('P1 Preset', P1FireBisGear, { talentTree: 1 });
export const FIRE_P1_PREBIS = PresetUtils.makePresetGear('P1 Pre-raid', P1FirePrebisGear, { talentTree: 1 });
export const FIRE_P3_PRESET = PresetUtils.makePresetGear('P3 Preset', P3FireBisGear, { talentTree: 1 });

/* export const DefaultSimpleRotation = MageRotation.create({
primaryFireSpell: PrimaryFireSpell.Fireball,
Expand All @@ -29,8 +31,8 @@ export const FIRE_P1_PREBIS = PresetUtils.makePresetGear('Fire P1 Pre-raid', P1F
export const FIRE_ROTATION_PRESET_DEFAULT = PresetUtils.makePresetAPLRotation('Fire', FireApl, { talentTree: 1 });

// Preset options for EP weights
export const P1_EP_PRESET = PresetUtils.makePresetEpWeights(
'Fire P1',
export const DEFAULT_EP_PRESET = PresetUtils.makePresetEpWeights(
'Default',
Stats.fromMap({
[Stat.StatIntellect]: 1.33,
[Stat.StatSpellPower]: 1.0,
Expand Down Expand Up @@ -87,6 +89,7 @@ export const DefaultFireConsumes = Consumes.create({
food: Food.FoodSeafoodFeast,
defaultPotion: Potions.VolcanicPotion,
prepopPotion: Potions.VolcanicPotion,
tinkerHands: TinkerHands.TinkerHandsSynapseSprings,
});

export const DefaultDebuffs = Debuffs.create({
Expand Down
19 changes: 14 additions & 5 deletions ui/mage/fire/sim.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,22 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFireMage, {
// Default equipped gear.
gear: Presets.FIRE_P1_PRESET.gear,
// Default EP weights for sorting gear in the gear picker.
epWeights: Presets.P1_EP_PRESET.epWeights,
epWeights: Presets.DEFAULT_EP_PRESET.epWeights,
// Default stat caps for the Reforge Optimizer
statCaps: (() => {
return new Stats().withPseudoStat(PseudoStat.PseudoStatSpellHitPercent, 17);
})(),
// Default soft caps for the Reforge optimizer
softCapBreakpoints: (() => {
// Set up Mastery breakpoints for integer % damage increments.
// These should be removed once the bugfix to make Mastery
// continuous goes live!
const masterySoftCapConfig = StatCap.fromStat(Stat.StatMasteryRating, {
breakpoints: [(23 / Mechanics.masteryPercentPerPoint.get(Spec.SpecFireMage)!) * Mechanics.MASTERY_RATING_PER_MASTERY_POINT],
capType: StatCapType.TypeThreshold,
postCapEPs: [0],
});

const hasteSoftCapConfig = StatCap.fromPseudoStat(PseudoStat.PseudoStatSpellHastePercent, {
breakpoints: [
hasteBreakpoints.get('5-tick - LvB/Pyro')!,
Expand All @@ -66,7 +75,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFireMage, {
postCapEPs: [0.61 * Mechanics.HASTE_RATING_PER_HASTE_PERCENT],
});

return [hasteSoftCapConfig];
return [masterySoftCapConfig, hasteSoftCapConfig];
})(),
// Default consumes settings.
consumes: Presets.DefaultFireConsumes,
Expand Down Expand Up @@ -107,16 +116,16 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecFireMage, {
},

presets: {
epWeights: [Presets.P1_EP_PRESET],
epWeights: [Presets.DEFAULT_EP_PRESET],
// Preset rotations that the user can quickly select.
rotations: [Presets.FIRE_ROTATION_PRESET_DEFAULT],
// Preset talents that the user can quickly select.
talents: [Presets.FireTalents],
// Preset gear configurations that the user can quickly select.
gear: [Presets.FIRE_P1_PRESET, Presets.FIRE_P1_PREBIS],
gear: [Presets.FIRE_P1_PRESET, Presets.FIRE_P1_PREBIS, Presets.FIRE_P3_PRESET],
},

autoRotation: (player: Player<Spec.SpecFireMage>): APLRotation => {
autoRotation: (_player): APLRotation => {
/*const numTargets = player.sim.encounter.targets.length;
if (numTargets > 3) {
return Presets.FIRE_ROTATION_PRESET_AOE.rotation.rotation!;
Expand Down

0 comments on commit 93c2302

Please sign in to comment.