diff --git a/sim/core/apl_values_operators.go b/sim/core/apl_values_operators.go index dbbfee0c47..a98d8d2e96 100644 --- a/sim/core/apl_values_operators.go +++ b/sim/core/apl_values_operators.go @@ -353,6 +353,9 @@ type APLValueMath struct { func (rot *APLRotation) newValueMath(config *proto.APLValueMath) APLValue { lhs, rhs := rot.newAPLValue(config.Lhs), rot.newAPLValue(config.Rhs) + if config.Op == proto.APLValueMath_OpAdd || config.Op == proto.APLValueMath_OpSub { + lhs, rhs = rot.coerceToSameType(lhs, rhs) + } if lhs == nil || rhs == nil { return nil } diff --git a/sim/core/energy.go b/sim/core/energy.go index 05262b05f8..a50e79fa65 100644 --- a/sim/core/energy.go +++ b/sim/core/energy.go @@ -8,8 +8,6 @@ import ( // Time between energy ticks. const EnergyTickDuration = time.Millisecond * 100 - -// Extra 0.2 because Blizzard const EnergyPerTick = 1.0 // OnEnergyGain is called any time energy is increased. diff --git a/sim/core/environment.go b/sim/core/environment.go index b18578421c..b90b0eaf80 100644 --- a/sim/core/environment.go +++ b/sim/core/environment.go @@ -331,3 +331,15 @@ func (unit *Unit) RegisterPrepullAction(doAt time.Duration, action func(*Simulat Action: action, }) } + +func (env *Environment) PrepullStartTime() time.Duration { + if !env.IsFinalized() { + panic("Env not yet finalized") + } + + if len(env.prepullActions) == 0 { + return 0 + } else { + return env.prepullActions[0].DoAt + } +} diff --git a/sim/core/sim.go b/sim/core/sim.go index 2dc24f4e5f..5de0f551f5 100644 --- a/sim/core/sim.go +++ b/sim/core/sim.go @@ -336,7 +336,7 @@ func (sim *Simulation) runPendingActions(max time.Duration) { func (sim *Simulation) PrePull() { if len(sim.Environment.prepullActions) > 0 { - sim.CurrentTime = sim.Environment.prepullActions[0].DoAt + sim.CurrentTime = sim.Environment.PrepullStartTime() for _, prepullAction := range sim.Environment.prepullActions { if prepullAction.DoAt > sim.CurrentTime { diff --git a/sim/rogue/fan_of_knives.go b/sim/rogue/fan_of_knives.go index 64385633a3..fee8ff763e 100644 --- a/sim/rogue/fan_of_knives.go +++ b/sim/rogue/fan_of_knives.go @@ -12,17 +12,20 @@ const FanOfKnivesSpellID int32 = 51723 func (rogue *Rogue) makeFanOfKnivesWeaponHitSpell(isMH bool) *core.Spell { var procMask core.ProcMask var weaponMultiplier float64 + var actionID core.ActionID if isMH { + actionID = core.ActionID{SpellID: FanOfKnivesSpellID}.WithTag(1) weaponMultiplier = core.TernaryFloat64(rogue.HasDagger(core.MainHand), 1.05, 0.7) procMask = core.ProcMaskMeleeMHSpecial } else { + actionID = core.ActionID{SpellID: FanOfKnivesSpellID}.WithTag(2) weaponMultiplier = core.TernaryFloat64(rogue.HasDagger(core.OffHand), 1.05, 0.7) weaponMultiplier *= rogue.dwsMultiplier() procMask = core.ProcMaskMeleeOHSpecial } return rogue.RegisterSpell(core.SpellConfig{ - ActionID: core.ActionID{SpellID: FanOfKnivesSpellID}, + ActionID: actionID, SpellSchool: core.SpellSchoolPhysical, ProcMask: procMask, Flags: core.SpellFlagMeleeMetrics | SpellFlagColdBlooded, diff --git a/ui/core/components/individual_sim_ui/settings_tab.ts b/ui/core/components/individual_sim_ui/settings_tab.ts index 3dfc9c5d51..3b24964da9 100644 --- a/ui/core/components/individual_sim_ui/settings_tab.ts +++ b/ui/core/components/individual_sim_ui/settings_tab.ts @@ -301,8 +301,8 @@ export class SettingsTab extends SimTab { const miscBuffOptions = this.simUI.splitRelevantOptions([ { item: IconInputs.HeroicPresence, stats: [Stat.StatMeleeHit, Stat.StatSpellHit] }, - { item: IconInputs.BraidedEterniumChain, stats: [Stat.StatMeleeCrit] }, - { item: IconInputs.ChainOfTheTwilightOwl, stats: [Stat.StatSpellCrit] }, + { item: IconInputs.BraidedEterniumChain, stats: [Stat.StatMeleeCrit, Stat.StatSpellCrit] }, + { item: IconInputs.ChainOfTheTwilightOwl, stats: [Stat.StatSpellCrit, Stat.StatMeleeCrit] }, { item: IconInputs.FocusMagic, stats: [Stat.StatSpellCrit] }, { item: IconInputs.EyeOfTheNight, stats: [Stat.StatSpellPower] }, { item: IconInputs.Thorns, stats: [Stat.StatArmor] },