diff --git a/sim/shaman/chain_heal.go b/sim/shaman/chain_heal.go index 16c399876a..ba51ec5c71 100644 --- a/sim/shaman/chain_heal.go +++ b/sim/shaman/chain_heal.go @@ -8,7 +8,7 @@ import ( ) const ChainHealRanks = 3 -const ChainHealTargetCount = 3 +const ChainHealTargetCount = int32(3) var ChainHealSpellId = [ChainHealRanks + 1]int32{0, 1064, 10622, 10623} var ChainHealBaseHealing = [ChainHealRanks + 1][]float64{{0}, {332, 381}, {416, 477}, {567, 646}} @@ -40,6 +40,9 @@ func (shaman *Shaman) registerChainHealSpell() { } func (shaman *Shaman) newChainHealSpellConfig(rank int, isOverload bool) core.SpellConfig { + hasOverloadRune := shaman.HasRune(proto.ShamanRune_RuneChestOverload) + hasCoherenceRune := shaman.HasRune(proto.ShamanRune_RuneCloakCoherence) + spellId := ChainHealSpellId[rank] baseHealingLow := ChainHealBaseHealing[rank][0] * (1 + shaman.purificationHealingModifier()) baseHealingHigh := ChainHealBaseHealing[rank][1] * (1 + shaman.purificationHealingModifier()) @@ -53,10 +56,14 @@ func (shaman *Shaman) newChainHealSpellConfig(rank int, isOverload bool) core.Sp flags |= core.SpellFlagAPL } - // 50% reduction per bounce or 35% with Coherence - ChainHealBounceCoeff := core.TernaryFloat64(shaman.HasRune(proto.ShamanRune_RuneCloakCoherence), .65, .5) + bounceCoef := .5 // 50% reduction per bounce + targetCount := ChainHealTargetCount + if hasCoherenceRune { + bounceCoef = .65 // 35% reduction per bounce + targetCount += 2 + } - canOverload := !isOverload && shaman.HasRune(proto.ShamanRune_RuneChestOverload) + canOverload := !isOverload && hasOverloadRune spell := core.SpellConfig{ ActionID: core.ActionID{SpellID: spellId}, @@ -93,7 +100,7 @@ func (shaman *Shaman) newChainHealSpellConfig(rank int, isOverload bool) core.Sp BonusCoefficient: spellCoeff, ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { - targets := sim.Environment.Raid.GetFirstNPlayersOrPets(ChainHealTargetCount) + targets := sim.Environment.Raid.GetFirstNPlayersOrPets(targetCount) curTarget := targets[0] origMult := spell.DamageMultiplier // TODO: This bounces to most hurt friendly... @@ -106,7 +113,7 @@ func (shaman *Shaman) newChainHealSpellConfig(rank int, isOverload bool) core.Sp shaman.ChainHealOverload[rank].Cast(sim, target) } - spell.DamageMultiplier *= ChainHealBounceCoeff + spell.DamageMultiplier *= bounceCoef curTarget = targets[hitIndex] } spell.DamageMultiplier = origMult diff --git a/sim/shaman/chain_lightning.go b/sim/shaman/chain_lightning.go index a03f36e51d..c35a7bf795 100644 --- a/sim/shaman/chain_lightning.go +++ b/sim/shaman/chain_lightning.go @@ -8,7 +8,7 @@ import ( ) const ChainLightningRanks = 4 -const ChainLightningTargetCount = 3 +const ChainLightningTargetCount = int32(3) var ChainLightningSpellId = [ChainLightningRanks + 1]int32{0, 421, 930, 2860, 10605} var ChainLightningBaseDamage = [ChainLightningRanks + 1][]float64{{0}, {200, 227}, {288, 323}, {383, 430}, {505, 564}} @@ -42,6 +42,11 @@ func (shaman *Shaman) registerChainLightningSpell() { } func (shaman *Shaman) newChainLightningSpellConfig(rank int, cdTimer *core.Timer, isOverload bool) core.SpellConfig { + hasOverloadRune := shaman.HasRune(proto.ShamanRune_RuneChestOverload) + hasRollingThunderRune := shaman.HasRune(proto.ShamanRune_RuneBracersRollingThunder) + hasCoherenceRune := shaman.HasRune(proto.ShamanRune_RuneCloakCoherence) + hasStormEarthAndFireRune := shaman.HasRune(proto.ShamanRune_RuneCloakStormEarthAndFire) + spellId := ChainLightningSpellId[rank] baseDamageLow := ChainLightningBaseDamage[rank][0] baseDamageHigh := ChainLightningBaseDamage[rank][1] @@ -52,15 +57,16 @@ func (shaman *Shaman) newChainLightningSpellConfig(rank int, cdTimer *core.Timer cooldown := time.Second * 6 castTime := time.Millisecond * 2500 - // 30% reduction per bounce or 20% with Coherence - ChainLightningBounceCoeff := core.TernaryFloat64(shaman.HasRune(proto.ShamanRune_RuneCloakCoherence), .8, .7) + bounceCoef := .7 // 30% reduction per bounce + targetCount := ChainLightningTargetCount + if hasCoherenceRune { + bounceCoef = .8 // 20% reduction per bounce + targetCount += 2 + } - canOverload := !isOverload && shaman.HasRune(proto.ShamanRune_RuneChestOverload) + canOverload := !isOverload && hasOverloadRune overloadChance := .1667 - hasRollingThunderRune := shaman.HasRune(proto.ShamanRune_RuneBracersRollingThunder) - hasStormEarthAndFireRune := shaman.HasRune(proto.ShamanRune_RuneCloakStormEarthAndFire) - spell := shaman.newElectricSpellConfig( core.ActionID{SpellID: spellId}, manaCost, @@ -80,7 +86,7 @@ func (shaman *Shaman) newChainLightningSpellConfig(rank int, cdTimer *core.Timer } } - results := make([]*core.SpellResult, min(ChainLightningTargetCount, shaman.Env.GetNumTargets())) + results := make([]*core.SpellResult, min(targetCount, shaman.Env.GetNumTargets())) spell.ApplyEffects = func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { origMult := spell.DamageMultiplier @@ -88,7 +94,7 @@ func (shaman *Shaman) newChainLightningSpellConfig(rank int, cdTimer *core.Timer baseDamage := sim.Roll(baseDamageLow, baseDamageHigh) results[hitIndex] = spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMagicHitAndCrit) target = sim.Environment.NextTargetUnit(target) - spell.DamageMultiplier *= ChainLightningBounceCoeff + spell.DamageMultiplier *= bounceCoef } for _, result := range results { diff --git a/sim/shaman/enhancement/TestEnhancement.results b/sim/shaman/enhancement/TestEnhancement.results index 8dba5ee72d..c28588d464 100644 --- a/sim/shaman/enhancement/TestEnhancement.results +++ b/sim/shaman/enhancement/TestEnhancement.results @@ -198,11 +198,11 @@ stat_weights_results: { key: "TestEnhancement-Lvl40-StatWeights-Default" value: { weights: 1.04539 - weights: 0.73909 + weights: 0.63198 weights: 0 weights: 0 weights: 0 - weights: 0.43274 + weights: 0.43279 weights: 0 weights: 0 weights: 0 @@ -215,8 +215,8 @@ stat_weights_results: { weights: 0 weights: 0 weights: 0.47518 - weights: 4.25847 - weights: 6.6203 + weights: 4.12925 + weights: 6.42624 weights: 0 weights: 0 weights: 0 @@ -246,7 +246,7 @@ stat_weights_results: { stat_weights_results: { key: "TestEnhancement-Lvl50-StatWeights-Default" value: { - weights: 1.49726 + weights: 1.49731 weights: 0.81835 weights: 0 weights: 0 @@ -263,8 +263,8 @@ stat_weights_results: { weights: 0 weights: 0 weights: 0 - weights: 0.63016 - weights: 7.73259 + weights: 0.63018 + weights: 7.44819 weights: 10.72329 weights: 0 weights: 0 @@ -477,364 +477,364 @@ dps_results: { dps_results: { key: "TestEnhancement-Lvl40-Average-Default" value: { - dps: 825.3879 - tps: 876.66896 + dps: 825.36675 + tps: 876.62151 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { dps: 384.96692 - tps: 423.44088 + tps: 423.08067 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 385.14023 - tps: 437.22535 + tps: 432.79267 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 379.83926 - tps: 432.14551 + tps: 427.65679 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { - dps: 219.79499 - tps: 247.48148 + dps: 221.23602 + tps: 248.58415 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 242.65786 - tps: 283.96263 + tps: 284.20567 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 237.17548 - tps: 278.09385 + tps: 278.48916 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { dps: 384.96692 - tps: 423.44088 + tps: 423.08067 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 385.14023 - tps: 437.22535 + tps: 432.79267 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 379.83926 - tps: 432.14551 + tps: 427.65679 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { - dps: 219.79499 - tps: 247.48148 + dps: 221.23602 + tps: 248.58415 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 242.65786 - tps: 283.96263 + tps: 284.20567 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Orc-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 237.17548 - tps: 278.09385 + tps: 278.48916 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { dps: 386.70586 - tps: 427.67165 + tps: 426.81639 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 392.73876 - tps: 445.0805 + tps: 440.06643 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-FullBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 390.90003 - tps: 443.95809 + tps: 438.53499 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { - dps: 217.68978 - tps: 244.78241 + dps: 219.10254 + tps: 246.15914 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 246.87796 - tps: 288.26821 + tps: 288.46938 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Auto-phase_2-NoBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 243.01206 - tps: 284.03625 + tps: 284.55914 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { dps: 386.70586 - tps: 427.67165 + tps: 426.81639 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 392.73876 - tps: 445.0805 + tps: 440.06643 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-FullBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 390.90003 - tps: 443.95809 + tps: 438.53499 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/FT-LongSingleTarget" value: { - dps: 217.68978 - tps: 244.78241 + dps: 219.10254 + tps: 246.15914 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/FT-ShortSingleTarget" value: { dps: 246.87796 - tps: 288.26821 + tps: 288.46938 } } dps_results: { key: "TestEnhancement-Lvl40-Settings-Troll-phase_2-Sync Delay OH-phase_2-NoBuffs-Phase 2 Consumes WF/WF-ShortSingleTarget" value: { dps: 243.01206 - tps: 284.03625 + tps: 284.55914 } } dps_results: { key: "TestEnhancement-Lvl40-SwitchInFrontOfTarget-Default" value: { - dps: 765.82279 - tps: 813.14861 + dps: 765.82195 + tps: 813.17359 } } dps_results: { key: "TestEnhancement-Lvl50-Average-Default" value: { - dps: 1609.92138 - tps: 1186.54907 + dps: 1609.94338 + tps: 1186.82703 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 782.40266 - tps: 568.80673 + tps: 568.30507 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 777.63996 - tps: 558.51992 + tps: 564.92079 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 774.33711 - tps: 550.10106 + tps: 555.71461 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 408.22032 - tps: 313.25421 + tps: 312.78833 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 419.89224 - tps: 317.25302 + tps: 316.12845 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 420.24945 - tps: 314.06653 + tps: 311.94835 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 782.40266 - tps: 568.80673 + tps: 568.30507 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 777.63996 - tps: 558.51992 + tps: 564.92079 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 774.33711 - tps: 550.10106 + tps: 555.71461 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 408.22032 - tps: 313.25421 + tps: 312.78833 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 419.89224 - tps: 317.25302 + tps: 316.12845 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Orc-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 420.24945 - tps: 314.06653 + tps: 311.94835 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 774.31372 - tps: 564.37777 + tps: 563.82541 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 792.05485 - tps: 574.52159 + tps: 575.81413 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-FullBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 797.48709 - tps: 570.58894 + tps: 576.41919 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { - dps: 404.62957 - tps: 310.92439 + dps: 404.86564 + tps: 310.735 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 428.22343 - tps: 322.82045 + tps: 321.69549 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Auto-phase_3-NoBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 432.8313 - tps: 323.48791 + tps: 322.20997 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { dps: 774.31372 - tps: 564.37777 + tps: 563.82541 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 792.05485 - tps: 574.52159 + tps: 575.81413 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-FullBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 797.48709 - tps: 570.58894 + tps: 576.41919 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/FT-LongSingleTarget" value: { - dps: 404.62957 - tps: 310.92439 + dps: 404.86564 + tps: 310.735 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/FT-ShortSingleTarget" value: { dps: 428.22343 - tps: 322.82045 + tps: 321.69549 } } dps_results: { key: "TestEnhancement-Lvl50-Settings-Troll-phase_3-Sync Delay OH-phase_3-NoBuffs-Phase 3 Consumes WF/WF-ShortSingleTarget" value: { dps: 432.8313 - tps: 323.48791 + tps: 322.20997 } } dps_results: { key: "TestEnhancement-Lvl50-SwitchInFrontOfTarget-Default" value: { - dps: 1488.43438 - tps: 1099.54688 + dps: 1488.41139 + tps: 1099.88336 } }