Skip to content

Commit

Permalink
Merge pull request #11 from wowsims/new_runes
Browse files Browse the repository at this point in the history
Add new runes to DB
  • Loading branch information
rosenrusinov authored Feb 2, 2024
2 parents 3c18365 + f179b00 commit 60c9bca
Show file tree
Hide file tree
Showing 14 changed files with 469 additions and 164 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
107 changes: 101 additions & 6 deletions assets/database/db.json

Large diffs are not rendered by default.

Binary file modified assets/database/leftover_db.bin
Binary file not shown.
107 changes: 101 additions & 6 deletions assets/database/leftover_db.json

Large diffs are not rendered by default.

314 changes: 205 additions & 109 deletions assets/db_inputs/wowhead_rune_tooltips.csv

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions proto/hunter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@ enum HunterRune {
RuneChestHeartOfTheLion = 409580;
RuneChestLoneWolf = 415370;
RuneChestCobraStrikes = 425713;

RuneHandsBeastmastery = 409368;
RuneHandsChimeraShot = 409433;
RuneHandsExplosiveShot = 409552;
RuneHandsCarve = 425711;

RuneLegsKillCommand = 409379;
RuneLegsFlankingStrike = 415320;
RuneLegsSniperTraining = 415399;
Expand Down
2 changes: 2 additions & 0 deletions proto/warlock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ enum WarlockRune {
RuneChestLakeOfFire = 403666;
RuneChestMasterChanneler = 403668;
RuneChestSoulSiphon = 403511;

RuneHandsChaosBolt = 403629;
RuneHandsHaunt = 403501;
RuneHandsMetamorphosis = 403789;
RuneHandsShadowBoltVolley = 403628;

RuneLegsDemonicGrace = 425463;
RuneLegsDemonicPact = 425464;
RuneLegsEverlastingAffliction = 412689;
Expand Down
4 changes: 3 additions & 1 deletion tools/database/wowhead_tooltips.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (item WowheadItemResponse) GetRequiredClass() proto.Class {
return proto.Class(proto.Class_value[className])
}

var reqSlotRegex = regexp.MustCompile(`Requires (Back|Belt|Bracer|Chest|Cloak|Feet|Gloves|Hands|Head|Helm|Legs|Pants|Ring|Shoulder|Trinket|Waist|Wrist)`)
var reqSlotRegex = regexp.MustCompile(`Requires (Back|Belt|Bracer|Chest|Cloak|Boots|Feet|Gloves|Hands|Head|Helm|Legs|Pants|Ring|Shoulder|Trinket|Waist|Wrist)`)

func (item WowheadItemResponse) GetRequiredItemSlot() proto.ItemType {
slot := item.GetTooltipRegexString(reqSlotRegex, 1)
Expand All @@ -304,6 +304,8 @@ func (item WowheadItemResponse) GetRequiredItemSlot() proto.ItemType {
fallthrough
case "Cloak":
return proto.ItemType_ItemTypeBack
case "Boots":
fallthrough
case "Feet":
return proto.ItemType_ItemTypeFeet
case "Gloves":
Expand Down
7 changes: 0 additions & 7 deletions ui/hunter/apls/blank.apl.json

This file was deleted.

17 changes: 17 additions & 0 deletions ui/hunter/apls/melee.weave.25.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "TypeAPL",
"prepullActions": [
{"action":{"castSpell":{"spellId":{"spellId":14318,"rank":2}}},"doAtValue":{"const":{"val":"-1.5s"}}},
{"action":{"castSpell":{"spellId":{"spellId":13550,"rank":3}}},"doAtValue":{"const":{"val":"0s"}}}
],
"priorityList": [
{"action":{"castSpell":{"spellId":{"spellId":2643,"rank":1}}}},
{"action":{"castSpell":{"spellId":{"spellId":429867}}}},
{"action":{"multidot":{"spellId":{"spellId":13550,"rank":3},"maxDots":3,"maxOverlap":{"const":{"val":"0ms"}}}}},
{"action":{"castSpell":{"spellId":{"spellId":14282,"rank":3}}}},
{"action":{"castSpell":{"spellId":{"spellId":415320}}}},
{"action":{"castSpell":{"spellId":{"spellId":14262,"tag":1,"rank":4}}}},
{"action":{"condition":{"and":{"vals":[{"cmp":{"op":"OpGe","lhs":{"autoTimeToNext":{"autoType":"Ranged"}},"rhs":{"const":{"val":"1.5s"}}}},{"not":{"val":{"spellIsReady":{"spellId":{"spellId":2643,"rank":1}}}}}]}},"move":{"rangeFromTarget":{"const":{"val":"5"}}}}},
{"action":{"condition":{"cmp":{"op":"OpGe","lhs":{"autoTimeToNext":{"autoType":"Melee"}},"rhs":{"const":{"val":"1.5s"}}}},"move":{"rangeFromTarget":{"const":{"val":"8"}}}}}
]
}
1 change: 0 additions & 1 deletion ui/hunter/gear_sets/blank.gear.json

This file was deleted.

19 changes: 19 additions & 0 deletions ui/hunter/gear_sets/phase1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{"items": [
{"id":211510},
{"id":20444},
{"id":2264},
{"id":5193},
{"id":211512,"rune":409580},
{"id":6198},
{"id":211423,"rune":409368},
{"id":209421},
{"id":13114,"rune":415320},
{"id":211511},
{"id":211467},
{"id":1491},
{"id":211449},
{"id":4381},
{"id":209562},
{},
{"id":209534}
]}
18 changes: 6 additions & 12 deletions ui/hunter/presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import {

import * as PresetUtils from '../core/preset_utils.js';

import BlankGear from './gear_sets/blank.gear.json';
import Phase1Gear from './gear_sets/phase1.json';

import BlankApl from './apls/blank.apl.json';
import MeleeWeaveP1 from './apls/melee.weave.25.json';
//import MmApl from './apls/mm.apl.json';
//import MmAdvApl from './apls/mm_advanced.apl.json';
//import SvApl from './apls/sv.apl.json';
Expand All @@ -30,23 +30,17 @@ import BlankApl from './apls/blank.apl.json';
// Eventually we will import these values for the raid sim too, so its good to
// keep them in a separate file.

export const GearBeastMasteryDefault = PresetUtils.makePresetGear('Blank', BlankGear, { talentTree: 0 })
export const GearMarksmanDefault = PresetUtils.makePresetGear('Blank', BlankGear, { talentTree: 1 })
export const GearSurvivalDefault = PresetUtils.makePresetGear('Blank', BlankGear, { talentTree: 2 })
export const GearBeastMasteryDefault = PresetUtils.makePresetGear('Phase 1', Phase1Gear, { talentTree: 0 })
export const GearMarksmanDefault = PresetUtils.makePresetGear('Phase 1', Phase1Gear, { talentTree: 1 })
export const GearSurvivalDefault = PresetUtils.makePresetGear('Phase 1', Phase1Gear, { talentTree: 2 })

export const DefaultSimpleRotation = HunterRotation.create({
type: RotationType.SingleTarget,
sting: StingType.SerpentSting,
multiDotSerpentSting: true,
});

export const ROTATION_PRESET_SIMPLE_DEFAULT = PresetUtils.makePresetSimpleRotation('Simple Default', Spec.SpecHunter, DefaultSimpleRotation);
export const ROTATION_PRESET_BM = PresetUtils.makePresetAPLRotation('BM', BlankApl, { talentTree: 0 });
export const ROTATION_PRESET_MM = PresetUtils.makePresetAPLRotation('MM', BlankApl, { talentTree: 1 });
export const ROTATION_PRESET_MM_ADVANCED = PresetUtils.makePresetAPLRotation('MM (Advanced)', BlankApl, { talentTree: 1 });
export const ROTATION_PRESET_SV = PresetUtils.makePresetAPLRotation('SV', BlankApl, { talentTree: 2 });
export const ROTATION_PRESET_SV_ADVANCED = PresetUtils.makePresetAPLRotation('SV (Advanced)', BlankApl, { talentTree: 2 });
export const ROTATION_PRESET_AOE = PresetUtils.makePresetAPLRotation('AOE', BlankApl);
export const ROTATION_PRESET_MELEE_WEAVE_PHASE1 = PresetUtils.makePresetAPLRotation('Melee Weave P1', MeleeWeaveP1, { talentTree: 0 });

// Default talents. Uses the wowhead calculator format, make the talents on
// https://wowhead.com/classic/talent-calc and copy the numbers in the url.
Expand Down
35 changes: 13 additions & 22 deletions ui/hunter/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,39 +179,30 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecHunter, {
// Preset talents that the user can quickly select.
talents: [
Presets.BeastMasteryTalents,
Presets.MarksmanTalents,
Presets.SurvivalTalents,
],
// Preset rotations that the user can quickly select.
rotations: [
Presets.ROTATION_PRESET_SIMPLE_DEFAULT,
Presets.ROTATION_PRESET_BM,
Presets.ROTATION_PRESET_MM,
Presets.ROTATION_PRESET_MM_ADVANCED,
Presets.ROTATION_PRESET_SV,
Presets.ROTATION_PRESET_SV_ADVANCED,
Presets.ROTATION_PRESET_AOE,
Presets.ROTATION_PRESET_MELEE_WEAVE_PHASE1,
],
// Preset gear configurations that the user can quickly select.
gear: [
Presets.GearBeastMasteryDefault,
Presets.GearMarksmanDefault,
Presets.GearSurvivalDefault,
],
},

autoRotation: (player: Player<Spec.SpecHunter>): APLRotation => {
const talentTree = player.getTalentTree();
const numTargets = player.sim.encounter.targets.length;
if (numTargets >= 4) {
return Presets.ROTATION_PRESET_AOE.rotation.rotation!;
} else if (talentTree == 0) {
return Presets.ROTATION_PRESET_BM.rotation.rotation!;
} else if (talentTree == 1) {
return Presets.ROTATION_PRESET_MM.rotation.rotation!;
} else {
return Presets.ROTATION_PRESET_SV.rotation.rotation!;
}
// const talentTree = player.getTalentTree();
// const numTargets = player.sim.encounter.targets.length;
// if (numTargets >= 4) {
// return Presets.ROTATION_PRESET_AOE.rotation.rotation!;
// } else if (talentTree == 0) {
// return Presets.ROTATION_PRESET_MELEE_WEAVE_PHASE1.rotation.rotation!;
// } else if (talentTree == 1) {
// return Presets.ROTATION_PRESET_MM.rotation.rotation!;
// } else {
// return Presets.ROTATION_PRESET_SV.rotation.rotation!;
// }
return Presets.ROTATION_PRESET_MELEE_WEAVE_PHASE1.rotation.rotation!;
},

simpleRotation: (player: Player<Spec.SpecHunter>, simple: HunterRotation, cooldowns: Cooldowns): APLRotation => {
Expand Down

0 comments on commit 60c9bca

Please sign in to comment.