Skip to content

Commit

Permalink
Merge branch 'master' into feature/mage-simple-apl
Browse files Browse the repository at this point in the history
  • Loading branch information
1337LutZ committed Oct 4, 2024
2 parents 37eed69 + aefd209 commit 6305e10
Show file tree
Hide file tree
Showing 9 changed files with 711 additions and 662 deletions.
1,252 changes: 626 additions & 626 deletions sim/shaman/enhancement/TestEnhancement.results

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions sim/shaman/enhancement/enhancement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ func TestEnhancement(t *testing.T) {
Race: proto.Race_RaceDraenei,
OtherRaces: []proto.Race{proto.Race_RaceOrc, proto.Race_RaceTroll},

//{"id":65367,"randomSuffix":-136,"reforging":151},
// The above line is the actual line for the ring but it is causing an error in the test
GearSet: core.GetGearSet("../../../ui/shaman/enhancement/gear_sets", "p1draenei"),
GearSet: core.GetGearSet("../../../ui/shaman/enhancement/gear_sets", "p3.orc"),
Talents: StandardTalents,
Glyphs: StandardGlyphs,
Consumes: FullConsumes,
Expand Down
35 changes: 18 additions & 17 deletions ui/shaman/enhancement/apls/default.apl.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"castSpell":{"spellId":{"spellId":324}}},"doAtValue":{"const":{"val":"-6s"}}},
{"action":{"castSpell":{"spellId":{"spellId":66842}}},"doAtValue":{"const":{"val":"-3s"}}},
{"action":{"castSpell":{"spellId":{"spellId":51533}}},"doAtValue":{"const":{"val":"-1.5s"}}}
],
"priorityList": [
{"action":{"autocastOtherCooldowns":{}}},
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":8050,"tag":1}}}}},"castSpell":{"spellId":{"spellId":8050}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLe","lhs":{"dotRemainingTime":{"spellId":{"spellId":3599}}},"rhs":{"const":{"val":"100ms"}}}}]}},"castSpell":{"spellId":{"spellId":3599}}}},
{"action":{"castSpell":{"spellId":{"spellId":17364}}}},
{"action":{"castSpell":{"spellId":{"spellId":78146}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"math":{"op":"OpAdd","lhs":{"inputDelay":{}},"rhs":{"spellCastTime":{"spellId":{"spellId":403}}}}},"rhs":{"autoTimeToNext":{}}}},{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":51530}}},"rhs":{"const":{"val":"2"}}}}]}},"castSpell":{"spellId":{"spellId":403}}}},
{"action":{"castSpell":{"spellId":{"spellId":73680}}}},
{"action":{"castSpell":{"spellId":{"spellId":8042}}}}
]
}
"type": "TypeAPL",
"prepullActions": [
{"action":{"castSpell":{"spellId":{"spellId":324}}},"doAtValue":{"const":{"val":"-6s"}}},
{"action":{"castSpell":{"spellId":{"spellId":66842}}},"doAtValue":{"const":{"val":"-3s"}}},
{"action":{"castSpell":{"spellId":{"spellId":51533}}},"doAtValue":{"const":{"val":"-1.5s"}}}
],
"priorityList": [
{"action":{"autocastOtherCooldowns":{}}},
{"action":{"condition":{"not":{"val":{"dotIsActive":{"spellId":{"spellId":8050,"tag":1}}}}},"castSpell":{"spellId":{"spellId":8050}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLe","lhs":{"dotRemainingTime":{"spellId":{"spellId":3599}}},"rhs":{"const":{"val":"100ms"}}}}]}},"castSpell":{"spellId":{"spellId":3599}}}},
{"action":{"castSpell":{"spellId":{"spellId":17364}}}},
{"action":{"castSpell":{"spellId":{"spellId":78146}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpLt","lhs":{"math":{"op":"OpAdd","lhs":{"inputDelay":{}},"rhs":{"spellCastTime":{"spellId":{"spellId":403}}}}},"rhs":{"autoTimeToNext":{}}}},{"cmp":{"op":"OpGe","lhs":{"auraNumStacks":{"auraId":{"spellId":51530}}},"rhs":{"const":{"val":"2"}}}}]}},"castSpell":{"spellId":{"spellId":403}}}},
{"action":{"castSpell":{"spellId":{"spellId":73680}}}},
{"action":{"castSpell":{"spellId":{"spellId":8042}}}},
{"action":{"condition":{"and":{"vals":[{"auraIsKnown":{"sourceUnit":{"type":"CurrentTarget"},"auraId":{"spellId":99212}}},{"cmp":{"op":"OpGe","lhs":{"dotRemainingTime":{"spellId":{"spellId":8050}}},"rhs":{"const":{"val":"2"}}}},{"cmp":{"op":"OpGe","lhs":{"autoTimeToNext":{}},"rhs":{"const":{"val":"1"}}}}]}},"castSpell":{"spellId":{"spellId":51505}}}}
]
}
21 changes: 21 additions & 0 deletions ui/shaman/enhancement/gear_sets/p3.draenei.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"items": [
{ "id": 71549, "enchant": 4209, "gems": [52291, 52220], "reforging": 151 },
{ "id": 71610, "reforging": 151 },
{ "id": 71551, "enchant": 4204, "gems": [52204], "reforging": 140 },
{ "id": 71415, "enchant": 4118, "gems": [52212, 52212] },
{ "id": 71547, "enchant": 4102, "gems": [52212, 52204], "reforging": 158 },
{ "id": 71561, "enchant": 4258, "gems": [0], "reforging": 154 },
{ "id": 71548, "enchant": 4107, "gems": [52220, 0] },
{ "id": 71255, "gems": [52220, 52212], "reforging": 153 },
{ "id": 71429, "enchant": 4126, "gems": [52212, 52220] },
{ "id": 71457, "enchant": 4076, "gems": [52212], "reforging": 147 },
{ "id": 71216, "gems": [52212], "reforging": 151 },
{ "id": 71401, "reforging": 153 },
{ "id": 69150 },
{ "id": 69001 },
{ "id": 71783, "enchant": 4099, "reforging": 154 },
{ "id": 71783, "enchant": 4099, "reforging": 154 },
{ "id": 71567, "gems": [52212], "reforging": 144 }
]
}
21 changes: 21 additions & 0 deletions ui/shaman/enhancement/gear_sets/p3.orc.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"items": [
{ "id": 71549, "enchant": 4209, "gems": [52291, 52220], "reforging": 152 },
{ "id": 71610, "reforging": 151 },
{ "id": 71551, "enchant": 4204, "gems": [52204], "reforging": 161 },
{ "id": 71415, "enchant": 4118, "gems": [52212, 52212] },
{ "id": 71547, "enchant": 4102, "gems": [52212, 52204], "reforging": 158 },
{ "id": 71561, "enchant": 4258, "gems": [0], "reforging": 154 },
{ "id": 71548, "enchant": 4107, "gems": [52220, 0] },
{ "id": 71255, "gems": [52220, 52212], "reforging": 151 },
{ "id": 71429, "enchant": 4126, "gems": [52212, 52220] },
{ "id": 71457, "enchant": 4076, "gems": [52212], "reforging": 147 },
{ "id": 71216, "gems": [52212], "reforging": 151 },
{ "id": 71401, "reforging": 151 },
{ "id": 69150 },
{ "id": 69001 },
{ "id": 71454, "enchant": 4099, "reforging": 161 },
{ "id": 71454, "enchant": 4099, "reforging": 161 },
{ "id": 71567, "gems": [52212] }
]
}
33 changes: 20 additions & 13 deletions ui/shaman/enhancement/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,46 @@ import {
import { SavedTalents } from '../../core/proto/ui.js';
import { Stats } from '../../core/proto_utils/stats';
import DefaultApl from './apls/default.apl.json';
import P1DraeneiGear from './gear_sets/p1draenei.gear.json';
import P1OrcGear from './gear_sets/p1orc.gear.json';
import P1DraeneiGear from './gear_sets/p1.draenei.gear.json';
import P1OrcGear from './gear_sets/p1.orc.gear.json';
import P3DraeneiGear from './gear_sets/p3.draenei.gear.json';
import P3OrcGear from './gear_sets/p3.orc.gear.json';
import PreraidGear from './gear_sets/preraid.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 PRERAID_PRESET = PresetUtils.makePresetGear('Pre-raid Preset', PreraidGear);
export const P1ORC_PRESET = PresetUtils.makePresetGear('P1 Orc Preset', P1OrcGear);
export const P1DRAENEI_PRESET = PresetUtils.makePresetGear('P1 Draenei Preset', P1DraeneiGear);
export const PRERAID_PRESET = PresetUtils.makePresetGear('Pre-raid', PreraidGear);

export const P1_ORC_PRESET = PresetUtils.makePresetGear('P1 - Orc', P1OrcGear);
export const P1_DRAENEI_PRESET = PresetUtils.makePresetGear('P1 - Draenei', P1DraeneiGear);

export const P3_ORC_PRESET = PresetUtils.makePresetGear('P3 - Orc', P3OrcGear);
export const P3_DRAENEI_PRESET = PresetUtils.makePresetGear('P3 - Draenei', P3DraeneiGear);

export const ROTATION_PRESET_DEFAULT = PresetUtils.makePresetAPLRotation('Default', DefaultApl);

// Preset options for EP weights
export const P1_EP_PRESET = PresetUtils.makePresetEpWeights(
'P1',
'Default',
Stats.fromMap(
{
[Stat.StatIntellect]: 0.07,
[Stat.StatAgility]: 2.47,
[Stat.StatSpellPower]: 0,
[Stat.StatHitRating]: (0.89 + 0.6),
[Stat.StatCritRating]: (0.26 + 0.58),
[Stat.StatHasteRating]: (0.22 + 0.44),
[Stat.StatHitRating]: 0.89 + 0.6,
[Stat.StatCritRating]: 0.26 + 0.58,
[Stat.StatHasteRating]: 0.22 + 0.44,
[Stat.StatAttackPower]: 1.0,
[Stat.StatExpertiseRating]: 1.3,
[Stat.StatMasteryRating]: 1.21,
},
{
[PseudoStat.PseudoStatMainHandDps]: 3.05,
[PseudoStat.PseudoStatOffHandDps]: 2.56,
[PseudoStat.PseudoStatSpellHitPercent]: (0.89 * Mechanics.SPELL_HIT_RATING_PER_HIT_PERCENT),
[PseudoStat.PseudoStatPhysicalHitPercent]: (0.6 * Mechanics.PHYSICAL_HIT_RATING_PER_HIT_PERCENT),
[PseudoStat.PseudoStatSpellHitPercent]: 0.89 * Mechanics.SPELL_HIT_RATING_PER_HIT_PERCENT,
[PseudoStat.PseudoStatPhysicalHitPercent]: 0.6 * Mechanics.PHYSICAL_HIT_RATING_PER_HIT_PERCENT,
},
),
);
Expand All @@ -69,7 +75,7 @@ export const StandardTalents = {
prime2: ShamanPrimeGlyph.GlyphOfStormstrike,
prime3: ShamanPrimeGlyph.GlyphOfFeralSpirit,
major1: ShamanMajorGlyph.GlyphOfLightningShield,
major2: ShamanMajorGlyph.GlyphOfChainLightning,
major2: ShamanMajorGlyph.GlyphOfHealingStreamTotem,
major3: ShamanMajorGlyph.GlyphOfFireNova,
minor1: ShamanMinorGlyph.GlyphOfWaterWalking,
minor2: ShamanMinorGlyph.GlyphOfRenewedLife,
Expand Down Expand Up @@ -113,9 +119,10 @@ export const DefaultOptions = EnhancementShamanOptions.create({
});

export const OtherDefaults = {
duration: 180,
distanceFromTarget: 5,
profession1: Profession.Engineering,
profession2: Profession.Tailoring,
distanceFromTarget: 5,
};

export const DefaultConsumes = Consumes.create({
Expand Down
8 changes: 4 additions & 4 deletions ui/shaman/enhancement/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, {

defaults: {
// Default equipped gear.
gear: Presets.P1ORC_PRESET.gear,
gear: Presets.P1_ORC_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
Expand Down Expand Up @@ -133,7 +133,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, {
// Preset rotations that the user can quickly select.
rotations: [Presets.ROTATION_PRESET_DEFAULT],
// Preset gear configurations that the user can quickly select.
gear: [Presets.PRERAID_PRESET, Presets.P1ORC_PRESET, Presets.P1DRAENEI_PRESET],
gear: [Presets.PRERAID_PRESET, Presets.P1_ORC_PRESET, Presets.P1_DRAENEI_PRESET,Presets.P3_ORC_PRESET, Presets.P3_DRAENEI_PRESET],
},

autoRotation: (player: Player<Spec.SpecEnhancementShaman>): APLRotation => {
Expand All @@ -153,10 +153,10 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecEnhancementShaman, {
},
defaultGear: {
[Faction.Alliance]: {
1: Presets.P1DRAENEI_PRESET.gear,
1: Presets.P1_DRAENEI_PRESET.gear,
},
[Faction.Horde]: {
1: Presets.P1ORC_PRESET.gear,
1: Presets.P1_ORC_PRESET.gear,
},
[Faction.Unknown]: {},
},
Expand Down

0 comments on commit 6305e10

Please sign in to comment.