From 6860e9cdd28724dff30d86f8be8ccd631419c673 Mon Sep 17 00:00:00 2001 From: Saeyon Date: Sun, 24 Nov 2024 15:54:26 -0800 Subject: [PATCH 1/6] PK swap implemented --- proto/rogue.proto | 1 + sim/rogue/poisons.go | 11 +++++++++++ ui/rogue/inputs.ts | 6 ++++++ ui/rogue/presets.ts | 1 + ui/rogue/sim.ts | 4 ++-- ui/tank_rogue/inputs.ts | 6 ++++++ ui/tank_rogue/presets.ts | 1 + ui/tank_rogue/sim.ts | 3 ++- 8 files changed, 30 insertions(+), 3 deletions(-) diff --git a/proto/rogue.proto b/proto/rogue.proto index 62f7eeca1e..e928e6866c 100644 --- a/proto/rogue.proto +++ b/proto/rogue.proto @@ -111,6 +111,7 @@ enum RogueRune { message RogueOptions { int32 HonorAmongThievesCritRate = 1; + bool pkSwap = 2; } message Rogue { diff --git a/sim/rogue/poisons.go b/sim/rogue/poisons.go index 75fdaa47c4..c8c96891d6 100644 --- a/sim/rogue/poisons.go +++ b/sim/rogue/poisons.go @@ -83,6 +83,17 @@ func (rogue *Rogue) applyPoisons() { rogue.applySebaciousPoison() rogue.applyAtrophicPoison() rogue.applyNumbingPoison() + + if rogue.Options.PkSwap && rogue.HasRune(proto.RogueRune_RunePoisonedKnife) { + rogue.RegisterAura(core.Aura{ + Label: "Apply Sebacious on pull (PK Swap)", + Duration: core.NeverExpires, + OnReset: func(aura *core.Aura, sim *core.Simulation) { + rogue.SebaciousPoison[1].Cast(sim, sim.GetTargetUnit(0)) + aura.Activate(sim) + }, + }) + } } // Apply Deadly Brew Instant Poison procs diff --git a/ui/rogue/inputs.ts b/ui/rogue/inputs.ts index b18da189ff..a623ce2e0d 100644 --- a/ui/rogue/inputs.ts +++ b/ui/rogue/inputs.ts @@ -11,4 +11,10 @@ export const HonorOfThievesCritRate = InputHelpers.makeSpecOptionsNumberInput({ + fieldName: 'pkSwap', + label: 'PK Swap', + labelTooltip: 'Apply sebacious poison to the boss on pull', }); \ No newline at end of file diff --git a/ui/rogue/presets.ts b/ui/rogue/presets.ts index f825b15773..df09344b13 100644 --- a/ui/rogue/presets.ts +++ b/ui/rogue/presets.ts @@ -358,6 +358,7 @@ export const PresetBuildSaberSlashIEA = PresetUtils.makePresetBuild('Saber Slash export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, + pkSwap: true }); /////////////////////////////////////////////////////////////////////////// diff --git a/ui/rogue/sim.ts b/ui/rogue/sim.ts index 72c84488ee..382bdbc6aa 100644 --- a/ui/rogue/sim.ts +++ b/ui/rogue/sim.ts @@ -6,7 +6,7 @@ import { Player } from '../core/player.js'; import { Class, Faction, ItemSlot, PartyBuffs, PseudoStat, Race, Spec, Stat, Target, WeaponType } from '../core/proto/common.js'; import { Stats } from '../core/proto_utils/stats.js'; import { getSpecIcon } from '../core/proto_utils/utils.js'; -import { HonorOfThievesCritRate } from './inputs'; +import { HonorOfThievesCritRate, pkSwap } from './inputs'; import * as Presets from './presets.js'; const SPEC_CONFIG = registerSpecConfig(Spec.SpecRogue, { @@ -143,7 +143,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRogue, { excludeBuffDebuffInputs: [], // Inputs to include in the 'Other' section on the settings tab. otherInputs: { - inputs: [OtherInputs.TankAssignment, OtherInputs.InFrontOfTarget, HonorOfThievesCritRate], + inputs: [OtherInputs.TankAssignment, OtherInputs.InFrontOfTarget, HonorOfThievesCritRate, pkSwap], }, encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/tank_rogue/inputs.ts b/ui/tank_rogue/inputs.ts index b18da189ff..a623ce2e0d 100644 --- a/ui/tank_rogue/inputs.ts +++ b/ui/tank_rogue/inputs.ts @@ -11,4 +11,10 @@ export const HonorOfThievesCritRate = InputHelpers.makeSpecOptionsNumberInput({ + fieldName: 'pkSwap', + label: 'PK Swap', + labelTooltip: 'Apply sebacious poison to the boss on pull', }); \ No newline at end of file diff --git a/ui/tank_rogue/presets.ts b/ui/tank_rogue/presets.ts index 9f07f7fad7..4e24d507c3 100644 --- a/ui/tank_rogue/presets.ts +++ b/ui/tank_rogue/presets.ts @@ -208,6 +208,7 @@ export const PresetBuildEncounterVael = PresetUtils.makePresetBuild('Vael', { export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, + pkSwap: false }); /////////////////////////////////////////////////////////////////////////// diff --git a/ui/tank_rogue/sim.ts b/ui/tank_rogue/sim.ts index 88ba70dd62..6518c04290 100644 --- a/ui/tank_rogue/sim.ts +++ b/ui/tank_rogue/sim.ts @@ -6,7 +6,7 @@ import { Player } from '../core/player'; import { Class, Faction, PartyBuffs, PseudoStat, Race, Spec, Stat } from '../core/proto/common'; import { Stats } from '../core/proto_utils/stats'; import { getSpecIcon } from '../core/proto_utils/utils'; -import { HonorOfThievesCritRate } from './inputs'; +import { HonorOfThievesCritRate, pkSwap } from './inputs'; import * as Presets from './presets.js'; const SPEC_CONFIG = registerSpecConfig(Spec.SpecTankRogue, { @@ -130,6 +130,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecTankRogue, { OtherInputs.HpPercentForDefensives, OtherInputs.InspirationUptime, HonorOfThievesCritRate, + pkSwap ], }, encounterPicker: { From 9317beb68e372ad5e2388b8fe113b56850af04da Mon Sep 17 00:00:00 2001 From: Saeyon Date: Sun, 24 Nov 2024 15:59:56 -0800 Subject: [PATCH 2/6] pk swap should default to false --- ui/rogue/presets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/rogue/presets.ts b/ui/rogue/presets.ts index df09344b13..21dce4f149 100644 --- a/ui/rogue/presets.ts +++ b/ui/rogue/presets.ts @@ -358,7 +358,7 @@ export const PresetBuildSaberSlashIEA = PresetUtils.makePresetBuild('Saber Slash export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, - pkSwap: true + pkSwap: false }); /////////////////////////////////////////////////////////////////////////// From 05d97a4f6eb2a7a4771ff105d8a685af629f86b3 Mon Sep 17 00:00:00 2001 From: Saeyon Date: Sun, 24 Nov 2024 17:47:28 -0800 Subject: [PATCH 3/6] feral tank set bonus --- sim/druid/druid.go | 2 ++ sim/druid/item_sets_pve.go | 50 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/sim/druid/druid.go b/sim/druid/druid.go index cbd6ed431a..34b44f66db 100644 --- a/sim/druid/druid.go +++ b/sim/druid/druid.go @@ -121,6 +121,8 @@ type Druid struct { SolarEclipseProcAura *core.Aura LunarEclipseProcAura *core.Aura WildStrikesBuffAura *core.Aura + Tank2PieceAqAura *core.Aura + Tank2PieceAqProcAura *core.Aura BleedCategories core.ExclusiveCategoryArray SavageRoarDurationTable [6]time.Duration diff --git a/sim/druid/item_sets_pve.go b/sim/druid/item_sets_pve.go index e378579253..be940adf0a 100644 --- a/sim/druid/item_sets_pve.go +++ b/sim/druid/item_sets_pve.go @@ -677,11 +677,57 @@ var ItemSetGenesisFury = core.NewItemSet(core.ItemSet{ Bonuses: map[int32]core.ApplyEffect{ // Each time you Dodge while in Dire Bear Form, you gain 10% increased damage on your next Mangle or Swipe, stacking up to 5 times. 2: func(agent core.Agent) { - // TODO Bear + druid := agent.(DruidAgent).GetDruid() + + druid.Tank2PieceAqProcAura = druid.RegisterAura(core.Aura{ + Label: "Feral 2P Bonus Proc", + ActionID: core.ActionID{SpellID: 1213188}, + Duration: time.Second * 10, + MaxStacks: 5, + OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) { + if newStacks == 0 { + druid.MangleBear.DamageMultiplierAdditive -= float64(oldStacks) * .1 + druid.SwipeBear.DamageMultiplierAdditive -= float64(oldStacks) * .1 + } else { + druid.MangleBear.DamageMultiplierAdditive += .1 + druid.SwipeBear.DamageMultiplierAdditive += .1 + } + }, + }) + + druid.Tank2PieceAqAura = druid.RegisterAura(core.Aura{ + Label: "S03 - Item - TAQ - Druid - Feral 2P Bonus", + ActionID: core.ActionID{SpellID: 1213188}, + ActionIDForProc: core.ActionID{SpellID: 1213190}, + Duration: core.NeverExpires, + OnReset: func(aura *core.Aura, sim *core.Simulation) { + aura.Activate(sim) + }, + OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { + if druid.HasRageBar() && spell.ProcMask.Matches(core.ProcMaskMelee|core.ProcMaskRanged) && result.Outcome.Matches(core.OutcomeDodge) { + druid.Tank2PieceAqProcAura.Activate(sim) + druid.Tank2PieceAqProcAura.AddStack(sim) + } + }, + OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { + if spell.SpellID == druid.MangleBear.SpellID || spell.SpellID == druid.SwipeBear.SpellID { + druid.Tank2PieceAqProcAura.SetStacks(sim, 0) + } + }, + }) }, // Reduces the cooldown on Mangle (Bear) by 1.5 sec. 4: func(agent core.Agent) { - // TODO Bear + druid := agent.(DruidAgent).GetDruid() + if !druid.HasRune(proto.DruidRune_RuneHandsMangle) { + return + } + druid.RegisterAura(core.Aura{ + Label: "S03 - Item - TAQ - Druid - Feral 4P Bonus", + OnInit: func(aura *core.Aura, sim *core.Simulation) { + druid.MangleBear.CD.Duration -= (time.Second + 500*time.Millisecond) + }, + }) }, }, }) From 8794b8ca1fe7dc7fb9cc7556c528e7d7aaca979b Mon Sep 17 00:00:00 2001 From: Saeyon Date: Sun, 24 Nov 2024 17:49:17 -0800 Subject: [PATCH 4/6] Revert "pk swap should default to false" This reverts commit 9317beb68e372ad5e2388b8fe113b56850af04da. --- ui/rogue/presets.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/rogue/presets.ts b/ui/rogue/presets.ts index 21dce4f149..df09344b13 100644 --- a/ui/rogue/presets.ts +++ b/ui/rogue/presets.ts @@ -358,7 +358,7 @@ export const PresetBuildSaberSlashIEA = PresetUtils.makePresetBuild('Saber Slash export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, - pkSwap: false + pkSwap: true }); /////////////////////////////////////////////////////////////////////////// From af9bb85d2e2d5533b0edfe58ef171c8e50d5a72f Mon Sep 17 00:00:00 2001 From: Saeyon Date: Sun, 24 Nov 2024 17:49:30 -0800 Subject: [PATCH 5/6] Revert "PK swap implemented" This reverts commit 6860e9cdd28724dff30d86f8be8ccd631419c673. --- proto/rogue.proto | 1 - sim/rogue/poisons.go | 11 ----------- ui/rogue/inputs.ts | 6 ------ ui/rogue/presets.ts | 1 - ui/rogue/sim.ts | 4 ++-- ui/tank_rogue/inputs.ts | 6 ------ ui/tank_rogue/presets.ts | 1 - ui/tank_rogue/sim.ts | 3 +-- 8 files changed, 3 insertions(+), 30 deletions(-) diff --git a/proto/rogue.proto b/proto/rogue.proto index e928e6866c..62f7eeca1e 100644 --- a/proto/rogue.proto +++ b/proto/rogue.proto @@ -111,7 +111,6 @@ enum RogueRune { message RogueOptions { int32 HonorAmongThievesCritRate = 1; - bool pkSwap = 2; } message Rogue { diff --git a/sim/rogue/poisons.go b/sim/rogue/poisons.go index c8c96891d6..75fdaa47c4 100644 --- a/sim/rogue/poisons.go +++ b/sim/rogue/poisons.go @@ -83,17 +83,6 @@ func (rogue *Rogue) applyPoisons() { rogue.applySebaciousPoison() rogue.applyAtrophicPoison() rogue.applyNumbingPoison() - - if rogue.Options.PkSwap && rogue.HasRune(proto.RogueRune_RunePoisonedKnife) { - rogue.RegisterAura(core.Aura{ - Label: "Apply Sebacious on pull (PK Swap)", - Duration: core.NeverExpires, - OnReset: func(aura *core.Aura, sim *core.Simulation) { - rogue.SebaciousPoison[1].Cast(sim, sim.GetTargetUnit(0)) - aura.Activate(sim) - }, - }) - } } // Apply Deadly Brew Instant Poison procs diff --git a/ui/rogue/inputs.ts b/ui/rogue/inputs.ts index a623ce2e0d..b18da189ff 100644 --- a/ui/rogue/inputs.ts +++ b/ui/rogue/inputs.ts @@ -11,10 +11,4 @@ export const HonorOfThievesCritRate = InputHelpers.makeSpecOptionsNumberInput({ - fieldName: 'pkSwap', - label: 'PK Swap', - labelTooltip: 'Apply sebacious poison to the boss on pull', }); \ No newline at end of file diff --git a/ui/rogue/presets.ts b/ui/rogue/presets.ts index df09344b13..f825b15773 100644 --- a/ui/rogue/presets.ts +++ b/ui/rogue/presets.ts @@ -358,7 +358,6 @@ export const PresetBuildSaberSlashIEA = PresetUtils.makePresetBuild('Saber Slash export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, - pkSwap: true }); /////////////////////////////////////////////////////////////////////////// diff --git a/ui/rogue/sim.ts b/ui/rogue/sim.ts index 382bdbc6aa..72c84488ee 100644 --- a/ui/rogue/sim.ts +++ b/ui/rogue/sim.ts @@ -6,7 +6,7 @@ import { Player } from '../core/player.js'; import { Class, Faction, ItemSlot, PartyBuffs, PseudoStat, Race, Spec, Stat, Target, WeaponType } from '../core/proto/common.js'; import { Stats } from '../core/proto_utils/stats.js'; import { getSpecIcon } from '../core/proto_utils/utils.js'; -import { HonorOfThievesCritRate, pkSwap } from './inputs'; +import { HonorOfThievesCritRate } from './inputs'; import * as Presets from './presets.js'; const SPEC_CONFIG = registerSpecConfig(Spec.SpecRogue, { @@ -143,7 +143,7 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecRogue, { excludeBuffDebuffInputs: [], // Inputs to include in the 'Other' section on the settings tab. otherInputs: { - inputs: [OtherInputs.TankAssignment, OtherInputs.InFrontOfTarget, HonorOfThievesCritRate, pkSwap], + inputs: [OtherInputs.TankAssignment, OtherInputs.InFrontOfTarget, HonorOfThievesCritRate], }, encounterPicker: { // Whether to include 'Execute Duration (%)' in the 'Encounter' section of the settings tab. diff --git a/ui/tank_rogue/inputs.ts b/ui/tank_rogue/inputs.ts index a623ce2e0d..b18da189ff 100644 --- a/ui/tank_rogue/inputs.ts +++ b/ui/tank_rogue/inputs.ts @@ -11,10 +11,4 @@ export const HonorOfThievesCritRate = InputHelpers.makeSpecOptionsNumberInput({ - fieldName: 'pkSwap', - label: 'PK Swap', - labelTooltip: 'Apply sebacious poison to the boss on pull', }); \ No newline at end of file diff --git a/ui/tank_rogue/presets.ts b/ui/tank_rogue/presets.ts index 4e24d507c3..9f07f7fad7 100644 --- a/ui/tank_rogue/presets.ts +++ b/ui/tank_rogue/presets.ts @@ -208,7 +208,6 @@ export const PresetBuildEncounterVael = PresetUtils.makePresetBuild('Vael', { export const DefaultOptions = RogueOptions.create({ honorAmongThievesCritRate: 100, - pkSwap: false }); /////////////////////////////////////////////////////////////////////////// diff --git a/ui/tank_rogue/sim.ts b/ui/tank_rogue/sim.ts index 6518c04290..88ba70dd62 100644 --- a/ui/tank_rogue/sim.ts +++ b/ui/tank_rogue/sim.ts @@ -6,7 +6,7 @@ import { Player } from '../core/player'; import { Class, Faction, PartyBuffs, PseudoStat, Race, Spec, Stat } from '../core/proto/common'; import { Stats } from '../core/proto_utils/stats'; import { getSpecIcon } from '../core/proto_utils/utils'; -import { HonorOfThievesCritRate, pkSwap } from './inputs'; +import { HonorOfThievesCritRate } from './inputs'; import * as Presets from './presets.js'; const SPEC_CONFIG = registerSpecConfig(Spec.SpecTankRogue, { @@ -130,7 +130,6 @@ const SPEC_CONFIG = registerSpecConfig(Spec.SpecTankRogue, { OtherInputs.HpPercentForDefensives, OtherInputs.InspirationUptime, HonorOfThievesCritRate, - pkSwap ], }, encounterPicker: { From e6714b77e24c8dee9f3edea71ae604d33f6359cd Mon Sep 17 00:00:00 2001 From: emsimpson92 Date: Wed, 27 Nov 2024 15:12:53 -0800 Subject: [PATCH 6/6] Update sim/druid/item_sets_pve.go Co-authored-by: Kayla Glick <12898988+kayla-glick@users.noreply.github.com> --- sim/druid/item_sets_pve.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sim/druid/item_sets_pve.go b/sim/druid/item_sets_pve.go index be940adf0a..a9e0258fea 100644 --- a/sim/druid/item_sets_pve.go +++ b/sim/druid/item_sets_pve.go @@ -685,13 +685,8 @@ var ItemSetGenesisFury = core.NewItemSet(core.ItemSet{ Duration: time.Second * 10, MaxStacks: 5, OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) { - if newStacks == 0 { - druid.MangleBear.DamageMultiplierAdditive -= float64(oldStacks) * .1 - druid.SwipeBear.DamageMultiplierAdditive -= float64(oldStacks) * .1 - } else { - druid.MangleBear.DamageMultiplierAdditive += .1 - druid.SwipeBear.DamageMultiplierAdditive += .1 - } + druid.MangleBear.DamageMultiplierAdditive += 0.1 * (newStacks - oldStacks) + druid.SwipeBear.DamageMultiplierAdditive += 0.1 * (newStacks - oldStacks) }, })