Skip to content

Commit 096b3f7

Browse files
committed
Fixing up some things from review!
1 parent 30be5f2 commit 096b3f7

4 files changed

Lines changed: 65 additions & 62 deletions

File tree

sim/mage/frost/brain_freeze.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,18 @@ func (frost *FrostMage) registerBrainFreeze() {
4343
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
4444
// https://github.com/simulationcraft/simc/blob/e1190fed141feec2ec7a489e80caec5138c3a6ab/engine/class_modules/sc_mage.cpp#L4169
4545
if spell.Matches(mage.MageSpellLivingBombDot | mage.MageSpellLivingBombExplosion) {
46-
var livingBombProcChance = 0.25
47-
if sim.Proc(livingBombProcChance, "BrainFreezeProc") {
46+
if sim.Proc(0.25, "BrainFreezeProc") {
4847
buff.Activate(sim)
4948
}
5049
} else if spell.Matches(mage.MageSpellFrostBomb) {
51-
var frostBombProcChance = 1.0
52-
if sim.Proc(frostBombProcChance, "BrainFreezeProc") {
50+
if sim.Proc(1.0, "BrainFreezeProc") {
5351
buff.Activate(sim)
5452
}
5553
} else {
56-
var netherTempestProcChance = 0.09
57-
if sim.Proc(netherTempestProcChance, "BrainFreezeProc") {
54+
if sim.Proc(0.09, "BrainFreezeProc") {
5855
buff.Activate(sim)
5956
}
6057
}
61-
buff.Activate(sim)
6258
},
6359
})
6460

sim/mage/frost/icy_veins.go

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package frost
2+
3+
import (
4+
"time"
5+
6+
"github.com/wowsims/mop/sim/core"
7+
"github.com/wowsims/mop/sim/core/proto"
8+
"github.com/wowsims/mop/sim/mage"
9+
)
10+
11+
func (frostMage *FrostMage) registerIcyVeinsCD() {
12+
icyVeinsMod := frostMage.AddDynamicMod(core.SpellModConfig{
13+
ClassMask: mage.MageSpellsAll,
14+
FloatValue: -0.2,
15+
Kind: core.SpellMod_CastTime_Pct,
16+
})
17+
18+
actionID := core.ActionID{SpellID: 12472}
19+
frostMage.icyVeinsAura = frostMage.RegisterAura(core.Aura{
20+
Label: "Icy Veins",
21+
ActionID: actionID,
22+
Duration: time.Second * 20,
23+
OnGain: func(aura *core.Aura, sim *core.Simulation) {
24+
if !frostMage.HasMajorGlyph(proto.MageMajorGlyph_GlyphOfIcyVeins) {
25+
icyVeinsMod.Activate()
26+
}
27+
},
28+
OnExpire: func(_ *core.Aura, sim *core.Simulation) {
29+
if !frostMage.HasMajorGlyph(proto.MageMajorGlyph_GlyphOfIcyVeins) {
30+
icyVeinsMod.Deactivate()
31+
}
32+
},
33+
})
34+
35+
frostMage.IcyVeins = frostMage.RegisterSpell(core.SpellConfig{
36+
ActionID: actionID,
37+
ClassSpellMask: mage.MageSpellIcyVeins,
38+
Flags: core.SpellFlagNoOnCastComplete,
39+
40+
Cast: core.CastConfig{
41+
CD: core.Cooldown{
42+
Timer: frostMage.NewTimer(),
43+
Duration: time.Minute * 3,
44+
},
45+
DefaultCast: core.Cast{
46+
NonEmpty: true,
47+
},
48+
},
49+
50+
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) {
51+
frostMage.icyVeinsAura.Activate(sim)
52+
},
53+
})
54+
55+
frostMage.AddMajorCooldown(core.MajorCooldown{
56+
Spell: frostMage.IcyVeins,
57+
Type: core.CooldownTypeDPS,
58+
})
59+
}

sim/mage/mage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,15 @@ func (mage *Mage) applyArmorSpells() {
262262
},
263263
})
264264

265-
var hasteToAdd = float64(stats.HasteRating) * 1.06
266265
frostArmor := mage.RegisterAura(core.Aura{
267266
ActionID: core.ActionID{SpellID: 7302},
268267
Label: "Frost Armor",
269268
Duration: core.NeverExpires,
270269
OnGain: func(aura *core.Aura, sim *core.Simulation) {
271-
mage.AddStatDynamic(sim, stats.HasteRating, hasteToAdd) // NOTE: I know this isn't correct
270+
mage.MultiplyCastSpeed(1.07)
272271
},
273272
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
274-
mage.AddStatDynamic(sim, stats.HasteRating, -hasteToAdd)
273+
mage.MultiplyCastSpeed(1 / 1.07)
275274
},
276275
})
277276

@@ -351,6 +350,7 @@ const (
351350
MageSpellCombustion
352351
MageSpellCombustionApplication
353352
MageSpellLast
353+
MageSpellIcicle
354354
MageSpellsAll = MageSpellLast<<1 - 1
355355
MageSpellLivingBomb = MageSpellLivingBombDot | MageSpellLivingBombExplosion
356356
MageSpellFireMastery = MageSpellLivingBombDot | MageSpellPyroblastDot | MageSpellCombustion // Ignite done manually in spell due to unique mechanic

sim/mage/talents_frost.go

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package mage
22

33
import (
4-
//"github.com/wowsims/mop/sim/core/proto"
5-
64
"time"
75

86
"github.com/wowsims/mop/sim/core"
@@ -68,56 +66,6 @@ func (mage *Mage) ApplyFrostTalents() {
6866

6967
}
7068

71-
func (mage *Mage) registerIcyVeinsCD() {
72-
if !mage.Spec.Frost {
73-
return
74-
}
75-
76-
icyVeinsMod := mage.AddDynamicMod(core.SpellModConfig{
77-
ClassMask: MageSpellsAll,
78-
FloatValue: -0.2,
79-
Kind: core.SpellMod_CastTime_Pct,
80-
})
81-
82-
actionID := core.ActionID{SpellID: 12472}
83-
icyVeinsAura := mage.RegisterAura(core.Aura{
84-
Label: "Icy Veins",
85-
ActionID: actionID,
86-
Duration: time.Second * 20,
87-
OnGain: func(aura *core.Aura, sim *core.Simulation) {
88-
icyVeinsMod.Activate()
89-
},
90-
OnExpire: func(_ *core.Aura, sim *core.Simulation) {
91-
icyVeinsMod.Deactivate()
92-
},
93-
})
94-
95-
mage.IcyVeins = mage.RegisterSpell(core.SpellConfig{
96-
ActionID: actionID,
97-
ClassSpellMask: MageSpellIcyVeins,
98-
Flags: core.SpellFlagNoOnCastComplete,
99-
100-
Cast: core.CastConfig{
101-
CD: core.Cooldown{
102-
Timer: mage.NewTimer(),
103-
Duration: time.Second * 180,
104-
},
105-
DefaultCast: core.Cast{
106-
NonEmpty: true,
107-
},
108-
},
109-
110-
ApplyEffects: func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) {
111-
icyVeinsAura.Activate(sim)
112-
},
113-
})
114-
115-
mage.AddMajorCooldown(core.MajorCooldown{
116-
Spell: mage.IcyVeins,
117-
Type: core.CooldownTypeDPS,
118-
})
119-
}
120-
12169
func (mage *Mage) applyFingersOfFrost() {
12270
if mage.Talents.FingersOfFrost == 0 {
12371
return

0 commit comments

Comments
 (0)