Skip to content

Commit

Permalink
Merge pull request #169 from wowsims/enchanting_oils
Browse files Browse the repository at this point in the history
add enchanting oils
  • Loading branch information
rosenrusinov authored Feb 12, 2024
2 parents 9e51ead + 9bf10fb commit af4ac63
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 18 deletions.
9 changes: 8 additions & 1 deletion proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,17 @@ enum FrostPowerBuff {
ElixirOfFrostPower = 1;
}

// NextIndex: 13
// NextIndex: 16
enum WeaponImbue {
// Weapon Oils
WeaponImbueUnknown = 0;
BrilliantManaOil = 1;
BrillianWizardOil = 2;
MinorWizardOil = 13;
MinorManaOil = 15;
LesserWizardOil = 14;

// Sharpening Stones
DenseSharpeningStone = 3;
ElementalSharpeningStone = 4;
BlackfathomManaOil = 5;
Expand All @@ -366,6 +372,7 @@ enum WeaponImbue {
FlametongueWeapon = 10;
FrostbrandWeapon = 11;
WindfuryWeapon = 12;

}

enum Food {
Expand Down
12 changes: 12 additions & 0 deletions sim/core/consumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,18 @@ func applyConsumeEffects(agent Agent, partyBuffs *proto.PartyBuffs) {
func addImbueStats(character *Character, imbue proto.WeaponImbue, isMh bool) {
if imbue != proto.WeaponImbue_WeaponImbueUnknown {
switch imbue {
case proto.WeaponImbue_MinorWizardOil:
character.AddStats(stats.Stats{
stats.SpellPower: 8,
})
case proto.WeaponImbue_MinorManaOil:
character.AddStats(stats.Stats{
stats.MP5: 4,
})
case proto.WeaponImbue_LesserWizardOil:
character.AddStats(stats.Stats{
stats.SpellPower: 16,
})
case proto.WeaponImbue_BrillianWizardOil:
character.AddStats(stats.Stats{
stats.SpellPower: 36,
Expand Down
2 changes: 1 addition & 1 deletion sim/warlock/shadowflame.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func (warlock *Warlock) registerShadowflameSpell() {
}

level := float64(warlock.GetCharacter().Level)
baseSpellCoeff := 0.715
baseSpellCoeff := 0.0715
dotSpellCoeff := 0.022

baseCalc := (6.568597 + 0.672028*level + 0.031721*level*level)
Expand Down
10 changes: 7 additions & 3 deletions sim/warlock/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func (warlock *Warlock) ApplyTalents() {
warlock.applyImprovedShadowBolt()
}

warlock.applyWeaponImbue()
warlock.applyNightfall()
warlock.applyMasterDemonologist()
warlock.applyDemonicSacrifice()
Expand Down Expand Up @@ -287,14 +288,17 @@ func (warlock *Warlock) applyFirestone() {
})

core.MakePermanent(warlock.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: spellId},
Label: "Firestone Proc",
Label: "Firestone Proc",
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if !result.Landed() {
return
}

if !ppm.Proc(sim, spell.ProcMask, "Firestone Proc") {
if !spell.ProcMask.Matches(core.ProcMaskMelee) {
return
}

if !ppm.Proc(sim, core.ProcMaskMelee, "Firestone Proc") {
return
}

Expand Down
2 changes: 0 additions & 2 deletions sim/warlock/warlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ func NewWarlock(character *core.Character, options *proto.Player, warlockOptions
warlock.Pet = warlock.NewWarlockPet()
}

warlock.applyWeaponImbue()

return warlock
}

Expand Down
44 changes: 33 additions & 11 deletions ui/core/components/inputs/consumables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,24 @@ export const WildStrikes: ConsumableInputConfig<WeaponImbue> = {

// Other Imbues

export const ElementalSharpeningStone: ConsumableInputConfig<WeaponImbue> = {
// Weapon Oils
export const MinorWizardOil: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 18262, minLevel: 50 },
{ id: 20744, minLevel: 5, maxLevel: 29 },
]),
value: WeaponImbue.ElementalSharpeningStone,
value: WeaponImbue.MinorWizardOil,
};
export const LesserWizardOil: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 20746, minLevel: 30, maxLevel: 44 },
]),
value: WeaponImbue.LesserWizardOil,
};
export const MinorManaOil: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 20745, minLevel: 20, maxLevel: 44 },
]),
value: WeaponImbue.MinorManaOil,
};
export const BrillianWizardOil: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
Expand All @@ -571,18 +584,24 @@ export const BrilliantManaOil: ConsumableInputConfig<WeaponImbue> = {
]),
value: WeaponImbue.BrilliantManaOil,
};
export const DenseSharpeningStone: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 12404, minLevel: 35 },
]),
value: WeaponImbue.DenseSharpeningStone,
};
export const BlackfathomManaOil: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 211848, minLevel: 25 },
]),
value: WeaponImbue.BlackfathomManaOil,
};
export const ElementalSharpeningStone: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 18262, minLevel: 50 },
]),
value: WeaponImbue.ElementalSharpeningStone,
};
export const DenseSharpeningStone: ConsumableInputConfig<WeaponImbue> = {
actionId: (player) => player.getMatchingItemActionId([
{ id: 12404, minLevel: 35 },
]),
value: WeaponImbue.DenseSharpeningStone,
};
export const BlackfathomSharpeningStone: ConsumableInputConfig<WeaponImbue> = {
actionId: () => ActionId.fromItemId(211845),
value: WeaponImbue.BlackfathomSharpeningStone,
Expand All @@ -596,11 +615,14 @@ const SHAMAN_IMBUES: ConsumableStatOption<WeaponImbue>[] = [
]

const CONSUMABLES_IMBUES: ConsumableStatOption<WeaponImbue>[] = [
{ config: ElementalSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: MinorWizardOil, stats: [Stat.StatSpellPower] },
{ config: LesserWizardOil, stats: [Stat.StatSpellPower] },
{ config: BrillianWizardOil, stats: [Stat.StatSpellPower] },
{ config: MinorManaOil, stats: [Stat.StatHealing, Stat.StatSpellPower] },
{ config: BrilliantManaOil, stats: [Stat.StatHealing, Stat.StatSpellPower] },
{ config: DenseSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BlackfathomManaOil, stats: [Stat.StatSpellPower, Stat.StatMP5] },
{ config: ElementalSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: DenseSharpeningStone, stats: [Stat.StatAttackPower] },
{ config: BlackfathomSharpeningStone, stats: [Stat.StatMeleeHit] },
]

Expand Down

0 comments on commit af4ac63

Please sign in to comment.