Skip to content

Commit

Permalink
Initial presets fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbtaylorjr committed Nov 24, 2024
1 parent d305fae commit bcd3900
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 175 deletions.
24 changes: 12 additions & 12 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<img src="https://wow.zamimg.com/images/wow/icons/large/class_priest.jpg" class="sim-link-icon" />
<div class="d-flex flex-column">
<span class="sim-link-title">Priest</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -116,7 +116,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Druid</span>
<span class="sim-link-title">Balance</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -128,7 +128,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Druid</span>
<span class="sim-link-title">Feral DPS</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand Down Expand Up @@ -164,7 +164,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<img src="https://wow.zamimg.com/images/wow/icons/large/class_hunter.jpg" class="sim-link-icon" />
<div class="d-flex flex-column">
<span class="sim-link-title">Hunter</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -186,7 +186,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Shaman</span>
<span class="sim-link-title">Elemental</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -198,7 +198,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Shaman</span>
<span class="sim-link-title">Enhancement</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -210,7 +210,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Shaman</span>
<span class="sim-link-title">Warden</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -223,7 +223,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<img src="https://wow.zamimg.com/images/wow/icons/large/class_mage.jpg" class="sim-link-icon" />
<div class="d-flex flex-column">
<span class="sim-link-title">Mage</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand Down Expand Up @@ -256,7 +256,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Paladin</span>
<span class="sim-link-title">Protection</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -268,7 +268,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Paladin</span>
<span class="sim-link-title">Retribution</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -293,7 +293,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Warrior</span>
<span class="sim-link-title">DPS</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand All @@ -307,7 +307,7 @@ <h3 class="expansion-title w-100 mb-0">Classic</h3>
<div class="d-flex flex-column">
<span class="sim-link-label">Warrior</span>
<span class="sim-link-title">Tank</span>
<span class="launch-status-label text-brand">Phase 5 - Alpha</span>
<span class="launch-status-label text-brand">Phase 1 - Alpha</span>
</div>
</div>
</a>
Expand Down
8 changes: 8 additions & 0 deletions ui/shadow_priest/apls/p1.apl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "TypeAPL",
"prepullActions": [],
"priorityList": [
{"action":{"autocastOtherCooldowns":{}}},
{"action":{"castSpell":{"spellId":{"spellId":8103,"rank":3}}}}
]
}
15 changes: 0 additions & 15 deletions ui/shadow_priest/apls/phase_1.apl.json

This file was deleted.

19 changes: 0 additions & 19 deletions ui/shadow_priest/apls/phase_2.apl.json

This file was deleted.

21 changes: 0 additions & 21 deletions ui/shadow_priest/apls/phase_3.apl.json

This file was deleted.

28 changes: 0 additions & 28 deletions ui/shadow_priest/apls/phase_4.apl.json

This file was deleted.

30 changes: 0 additions & 30 deletions ui/shadow_priest/apls/phase_5.apl.json

This file was deleted.

1 change: 0 additions & 1 deletion ui/shadow_priest/gear_sets/blank.gear.json

This file was deleted.

19 changes: 19 additions & 0 deletions ui/shadow_priest/gear_sets/p0.bis.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{"items": [
{"id":16693},
{},
{"id":16695},
{},
{"id":16690},
{"id":16697},
{"id":16692},
{"id":16696},
{"id":16694},
{"id":16691},
{},
{},
{},
{},
{},
{},
{}
]}
19 changes: 19 additions & 0 deletions ui/shadow_priest/gear_sets/p1.bis.gear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{"items": [
{"id":16813},
{},
{"id":16816},
{},
{"id":16815},
{"id":16819},
{"id":16812},
{"id":16817},
{"id":16814},
{"id":16811},
{},
{},
{},
{},
{},
{},
{}
]}
55 changes: 15 additions & 40 deletions ui/shadow_priest/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ import {
} from '../core/proto/common.js';
import { ShadowPriest_Options as Options } from '../core/proto/priest.js';
import { SavedTalents } from '../core/proto/ui.js';
import Phase1APL from './apls/phase_1.apl.json';
import Phase2APL from './apls/phase_2.apl.json';
import Phase3APL from './apls/phase_3.apl.json';
import Phase4APL from './apls/phase_4.apl.json';
import Phase5APL from './apls/phase_5.apl.json';
import BlankGear from './gear_sets/blank.gear.json';
import P1APL from './apls/p1.apl.json';
import P0BISGear from './gear_sets/p0.bis.gear.json';
import P1BISGear from './gear_sets/p1.bis.gear.json';

// Preset options for this spec.
// Eventually we will import these values for the raid sim too, so its good to
Expand All @@ -35,35 +32,27 @@ import BlankGear from './gear_sets/blank.gear.json';
// Gear Presets
///////////////////////////////////////////////////////////////////////////

export const GearBlank = PresetUtils.makePresetGear('Blank', BlankGear);
export const GearP0BIS = PresetUtils.makePresetGear('Pre-BiS', P0BISGear);
export const GearP1BIS = PresetUtils.makePresetGear('P1 BiS', P1BISGear);

export const GearPresets = {};
export const GearPresets = {
[Phase.Phase1]: [GearP0BIS, GearP1BIS],
};

export const DefaultGear = GearBlank;
export const DefaultGear = GearP0BIS;

///////////////////////////////////////////////////////////////////////////
// APL Presets
///////////////////////////////////////////////////////////////////////////

export const APLPhase1 = PresetUtils.makePresetAPLRotation('Phase 1', Phase1APL, { customCondition: player => player.getLevel() === 25 });
export const APLPhase2 = PresetUtils.makePresetAPLRotation('Phase 2', Phase2APL, { customCondition: player => player.getLevel() === 40 });
export const APLPhase3 = PresetUtils.makePresetAPLRotation('Phase 3', Phase3APL, { customCondition: player => player.getLevel() === 50 });
export const APLPhase4 = PresetUtils.makePresetAPLRotation('Phase 4', Phase4APL, { customCondition: player => player.getLevel() === 60 });
export const APLPhase5 = PresetUtils.makePresetAPLRotation('Phase 5', Phase5APL, { customCondition: player => player.getLevel() === 60 });
export const APLP1Shadow = PresetUtils.makePresetAPLRotation('Shadow', P1APL, { customCondition: player => player.getLevel() === 60 });

export const APLPresets = {
[Phase.Phase1]: [APLPhase1],
[Phase.Phase2]: [APLPhase2],
[Phase.Phase3]: [APLPhase3],
[Phase.Phase4]: [APLPhase4],
[Phase.Phase5]: [APLPhase5],
[Phase.Phase1]: [APLP1Shadow],
};

export const DefaultAPLs: Record<number, PresetUtils.PresetRotation> = {
25: APLPresets[Phase.Phase1][0],
40: APLPresets[Phase.Phase2][0],
50: APLPresets[Phase.Phase3][0],
60: APLPresets[Phase.Phase4][0],
60: APLPresets[Phase.Phase1][0],
};

///////////////////////////////////////////////////////////////////////////
Expand All @@ -73,29 +62,15 @@ export const DefaultAPLs: Record<number, PresetUtils.PresetRotation> = {
// Default talents. Uses the wowhead calculator format, make the talents on
// https://wowhead.com/classic/talent-calc and copy the numbers in the url.

export const TalentsPhase1 = PresetUtils.makePresetTalents('Level 25', SavedTalents.create({ talentsString: '-20535000001' }), {
customCondition: player => player.getLevel() === 25,
});
export const TalentsPhase2 = PresetUtils.makePresetTalents('Level 40', SavedTalents.create({ talentsString: '--5022204002501251' }), {
customCondition: player => player.getLevel() === 40,
});
export const TalentsPhase3 = PresetUtils.makePresetTalents('Level 50', SavedTalents.create({ talentsString: '-0055-5022204002501251' }), {
customCondition: player => player.getLevel() === 50,
});
export const TalentsPhase4 = PresetUtils.makePresetTalents('Level 60', SavedTalents.create({ talentsString: '0512301302--5002504103501251' }), {
export const TalentsP1Shadow = PresetUtils.makePresetTalents('Shadow', SavedTalents.create({ talentsString: '0512301302--5002504103501251' }), {
customCondition: player => player.getLevel() === 60,
});

export const TalentPresets = {
[Phase.Phase1]: [TalentsPhase1],
[Phase.Phase2]: [TalentsPhase2],
[Phase.Phase3]: [TalentsPhase3],
[Phase.Phase4]: [TalentsPhase4],
[Phase.Phase5]: [],
[Phase.Phase1]: [TalentsP1Shadow],
};

// TODO: Add Phase 3 preset and pull from map
export const DefaultTalents = TalentPresets[Phase.Phase4][0];
export const DefaultTalents = TalentPresets[Phase.Phase1][0];

///////////////////////////////////////////////////////////////////////////
// Options
Expand Down
Loading

0 comments on commit bcd3900

Please sign in to comment.