Skip to content

Commit

Permalink
Revert "fix implementation of new DP?"
Browse files Browse the repository at this point in the history
This reverts commit 2a2ca7a.
  • Loading branch information
Tharre committed Sep 2, 2023
1 parent 6fdc416 commit ca89833
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion proto/warlock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ message Warlock {
Armor armor = 1;
Summon summon = 2;
WeaponImbue weaponImbue = 3;
bool newDPBehavior = 4;
bool newDPBehaviour = 4;
}
Options options = 3;
}
18 changes: 10 additions & 8 deletions sim/warlock/talents.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (warlock *Warlock) setupDemonicPact() {

icd := core.Cooldown{
Timer: warlock.NewTimer(),
Duration: core.TernaryDuration(warlock.Options.NewDPBehavior, 1, 5) * time.Second,
Duration: core.TernaryDuration(warlock.Options.NewDPBehaviour, 1, 5) * time.Second,
}

var demonicPactAuras [25]*core.Aura
Expand All @@ -575,17 +575,19 @@ func (warlock *Warlock) setupDemonicPact() {
}

lastBonus := 0.0
newSPBonus := 0.0
if warlock.DemonicPactAura.IsActive() {
lastBonus = warlock.DemonicPactAura.ExclusiveEffects[0].Priority
}

newSPBonus := 0.0
if warlock.Options.NewDPBehavior {
newSPBonus = math.Round(dpMult * warlock.GetStat(stats.SpellPower))
} else {
if warlock.DemonicPactAura.IsActive() {
if warlock.Options.NewDPBehaviour {
newSPBonus = math.Round(dpMult * (warlock.GetStat(stats.SpellPower) - lastBonus))
} else {
newSPBonus = math.Floor(lastBonus*dpMult*dpMult+
(1-dpMult)*dpMult*warlock.GetStat(stats.SpellPower)) + 1
(1-dpMult)*dpMult*warlock.GetStat(stats.SpellPower)) + 1
}
} else {
if warlock.Options.NewDPBehaviour {
newSPBonus = math.Round(dpMult * warlock.GetStat(stats.SpellPower))
} else {
newSPBonus = math.Floor(warlock.GetStat(stats.SpellPower)*(dpMult+dpMult*dpMult)) + 1
}
Expand Down
8 changes: 4 additions & 4 deletions ui/warlock/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export const PetInput = InputHelpers.makeSpecOptionsEnumIconInput<Spec.SpecWarlo
changeEmitter: (player: Player<Spec.SpecWarlock>) => player.changeEmitter,
});

export const NewDPBehavior = InputHelpers.makeSpecOptionsBooleanInput<Spec.SpecWarlock>({
fieldName: 'newDPBehavior',
label: 'Apply new Demonic Pact behavior introduced in 3.4.3',
labelTooltip: 'Updates Demonic Pact calculation to new behavior introduced in 3.4.3: new potential pact is always 10% of spell power and applied on 1 second ICD (rather than 5 seconds)',
export const NewDPBehaviour = InputHelpers.makeSpecOptionsBooleanInput<Spec.SpecWarlock>({
fieldName: 'newDPBehaviour',
label: 'New DP behaviour',
labelTooltip: 'Changes DP to always be 10% of spell power, 1s ICD',
});

export const PrimarySpellInput = InputHelpers.makeRotationEnumIconInput<Spec.SpecWarlock, PrimarySpell>({
Expand Down
2 changes: 1 addition & 1 deletion ui/warlock/sim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class WarlockSimUI extends IndividualSimUI<Spec.SpecWarlock> {
inputs: [
OtherInputs.DistanceFromTarget,
OtherInputs.TankAssignment,
WarlockInputs.NewDPBehavior,
WarlockInputs.NewDPBehaviour,
],
},
encounterPicker: {
Expand Down

0 comments on commit ca89833

Please sign in to comment.