77 "github.com/wowsims/mop/sim/core/stats"
88)
99
10- // The numbers in this file are VERY rough approximations based on logs.
11-
1210func (Mage * FrostMage ) registerSummonWaterElementalSpell () {
1311
1412 Mage .SummonWaterElemental = Mage .RegisterSpell (core.SpellConfig {
@@ -35,9 +33,8 @@ func (Mage *FrostMage) registerSummonWaterElementalSpell() {
3533 })
3634
3735 Mage .AddMajorCooldown (core.MajorCooldown {
38- Spell : Mage .SummonWaterElemental ,
39- Priority : core .CooldownPriorityDrums + 1000 , // Always prefer to cast before drums or lust so the ele gets their benefits.
40- Type : core .CooldownTypeDPS ,
36+ Spell : Mage .SummonWaterElemental ,
37+ Type : core .CooldownTypeDPS ,
4138 })
4239}
4340
@@ -46,14 +43,10 @@ type WaterElemental struct {
4643
4744 mageOwner * FrostMage
4845
49- // Water Ele almost never just stands still and spams like we want, it sometimes
50- // does its own thing. This controls how much it does that.
51- disobeyChance float64
52-
5346 Waterbolt * core.Spell
5447}
5548
56- func (Mage * FrostMage ) NewWaterElemental (disobeyChance float64 ) * WaterElemental {
49+ func (Mage * FrostMage ) NewWaterElemental () * WaterElemental {
5750 waterElemental := & WaterElemental {
5851 Pet : core .NewPet (core.PetConfig {
5952 Name : "Water Elemental" ,
@@ -63,8 +56,7 @@ func (Mage *FrostMage) NewWaterElemental(disobeyChance float64) *WaterElemental
6356 EnabledOnStart : true ,
6457 IsGuardian : true ,
6558 }),
66- mageOwner : Mage ,
67- disobeyChance : disobeyChance ,
59+ mageOwner : Mage ,
6860 }
6961 waterElemental .EnableManaBarWithModifier (0.333 )
7062
@@ -86,41 +78,29 @@ func (we *WaterElemental) Reset(_ *core.Simulation) {
8678
8779func (we * WaterElemental ) ExecuteCustomRotation (sim * core.Simulation ) {
8880 spell := we .Waterbolt
89-
90- if sim .Proc (we .disobeyChance , "Disobey" ) {
91- // Water ele has decided not to cooperate, so just wait for the cast time
92- // instead of casting.
93- we .WaitUntil (sim , sim .CurrentTime + spell .DefaultCast .CastTime )
94- return
95- }
96-
9781 spell .Cast (sim , we .CurrentTarget )
9882}
9983
100- // These numbers are just rough guesses based on looking at some logs.
10184var waterElementalBaseStats = stats.Stats {
102- // TODO update. taken at level 80 on beta
103- stats .Mana : 16123 ,
104- stats .Intellect : 369 , //unsure on beta
85+ // Mana seems to always be at 300k on beta
86+ stats .Mana : 300000 ,
10587}
10688
10789var waterElementalStatInheritance = func (ownerStats stats.Stats ) stats.Stats {
108- // These numbers are just rough guesses based on looking at some logs.
10990 return stats.Stats {
110- // TODO Pet stats scale dynamically in combat
111- stats .Stamina : ownerStats [stats .Stamina ] * 0.2 ,
112- stats .Intellect : ownerStats [stats .Intellect ] * 0.3 ,
113- stats .SpellPower : ownerStats [stats .SpellPower ] * 0.333 ,
114-
115- // TODO test crit chance. It does crit, so figure out how often and if it scales
116- /* Results: owner 5% crit, Waterbolt 13% crit
117- owner 18% crit, waterbolt 18% crit
118- */
91+ stats .Stamina : ownerStats [stats .Stamina ] * 0.2 ,
92+ stats .Intellect : ownerStats [stats .Intellect ] * 0.3 ,
93+ stats .SpellPower : ownerStats [stats .SpellPower ],
11994 stats .HasteRating : ownerStats [stats .HasteRating ],
120- stats .SpellCritPercent : ownerStats [stats .SpellCritPercent ],
95+ stats .SpellCritPercent : ownerStats [stats .SpellCritPercent ] * 0.5 ,
96+ // 500 hits 85 misses 4.2% crit with character at 8.09% crit, it's likely around 50%
12197 }
12298}
12399
100+ var waterboltVariance = 0.25 // Per https://wago.tools/db2/SpellEffect?build=5.5.0.60802&filter%5BSpellID%5D=31707 Field: "Variance"
101+ var waterboltScale = 0.5 // Per https://wago.tools/db2/SpellEffect?build=5.5.0.60802&filter%5BSpellID%5D=31707 Field: "Coefficient"
102+ var waterboltCoefficient = 0.5 // Per https://wago.tools/db2/SpellEffect?build=5.5.0.60802&filter%5BSpellID%5D=31707 Field: "BonusCoefficient"
103+
124104func (we * WaterElemental ) registerWaterboltSpell () {
125105 we .Waterbolt = we .RegisterSpell (core.SpellConfig {
126106 ActionID : core.ActionID {SpellID : 31707 },
@@ -140,11 +120,14 @@ func (we *WaterElemental) registerWaterboltSpell() {
140120 DamageMultiplier : 1 ,
141121 CritMultiplier : we .mageOwner .DefaultCritMultiplier (),
142122 ThreatMultiplier : 1 ,
143- BonusCoefficient : 0.833 ,
123+ BonusCoefficient : waterboltCoefficient ,
144124
145125 ApplyEffects : func (sim * core.Simulation , target * core.Unit , spell * core.Spell ) {
146- baseDamage := .405 * we .mageOwner .ClassSpellScaling
147- spell .CalcAndDealDamage (sim , target , baseDamage , spell .OutcomeMagicHitAndCrit )
126+ baseDamage := we .CalcAndRollDamageRange (sim , waterboltScale , waterboltVariance )
127+ result := spell .CalcDamage (sim , target , baseDamage , spell .OutcomeMagicHitAndCrit )
128+ spell .WaitTravelTime (sim , func (sim * core.Simulation ) {
129+ spell .DealDamage (sim , result )
130+ })
148131 },
149132 })
150133}
0 commit comments