-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #878 from wowsims/rogue-phase-4
Rogue AoE Runes
- Loading branch information
Showing
10 changed files
with
285 additions
and
39 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package rogue | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
"github.com/wowsims/sod/sim/core/proto" | ||
) | ||
|
||
// TODO: 10 yd range | ||
func (rogue *Rogue) registerBlunderbussSpell() { | ||
if !rogue.HasRune(proto.RogueRune_RuneBlunderbuss) { | ||
return | ||
} | ||
|
||
results := make([]*core.SpellResult, min(4, rogue.Env.GetNumTargets())) | ||
|
||
rogue.Blunderbuss = rogue.RegisterSpell(core.SpellConfig{ | ||
ActionID: core.ActionID{SpellID: 436564}, | ||
SpellSchool: core.SpellSchoolPhysical, | ||
DefenseType: core.DefenseTypeRanged, | ||
ProcMask: core.ProcMaskRangedSpecial, | ||
Flags: core.SpellFlagMeleeMetrics | core.SpellFlagAPL, | ||
|
||
EnergyCost: core.EnergyCostOptions{ | ||
Cost: 20, | ||
Refund: 0, | ||
}, | ||
Cast: core.CastConfig{ | ||
DefaultCast: core.Cast{ | ||
GCD: time.Second, | ||
}, | ||
CD: core.Cooldown{ | ||
Timer: rogue.NewTimer(), | ||
Duration: time.Second * 15, | ||
}, | ||
IgnoreHaste: true, | ||
}, | ||
|
||
DamageMultiplier: 1, | ||
ThreatMultiplier: 1, | ||
|
||
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { | ||
rogue.BreakStealth(sim) | ||
baseApDamage := spell.MeleeAttackPower() * 0.48 | ||
|
||
for idx := range results { | ||
results[idx] = spell.CalcDamage(sim, target, rogue.rollBlunderbussDamage(sim)+baseApDamage, spell.OutcomeRangedHitAndCrit) | ||
target = sim.Environment.NextTargetUnit(target) | ||
} | ||
|
||
for _, result := range results { | ||
spell.DealDamage(sim, result) | ||
} | ||
}, | ||
}) | ||
} | ||
|
||
func (rogue *Rogue) rollBlunderbussDamage(sim *core.Simulation) float64 { | ||
baseDamage := rogue.baseRuneAbilityDamage() | ||
return sim.Roll(baseDamage*1.92, baseDamage*2.88) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
package rogue | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
"github.com/wowsims/sod/sim/core/proto" | ||
"github.com/wowsims/sod/sim/core/stats" | ||
) | ||
|
||
func (rogue *Rogue) makeCrimsonTempestHitSpell() *core.Spell { | ||
actionID := core.ActionID{SpellID: 412096} | ||
procMask := core.ProcMaskMeleeMHSpecial | ||
|
||
return rogue.RegisterSpell(core.SpellConfig{ | ||
ActionID: actionID, | ||
SpellSchool: core.SpellSchoolPhysical, | ||
DefenseType: core.DefenseTypeMelee, | ||
ProcMask: procMask, | ||
Flags: core.SpellFlagMeleeMetrics, | ||
|
||
DamageMultiplier: []float64{1, 1.1, 1.2, 1.3}[rogue.Talents.SerratedBlades], | ||
ThreatMultiplier: 1, | ||
|
||
Dot: core.DotConfig{ | ||
Aura: core.Aura{ | ||
Label: "Crimson Tempest", | ||
Tag: RogueBleedTag, | ||
}, | ||
NumberOfTicks: 0, | ||
TickLength: time.Second * 2, | ||
|
||
OnSnapshot: func(sim *core.Simulation, target *core.Unit, dot *core.Dot, isRollover bool) { | ||
dot.Snapshot(target, rogue.CrimsonTempestDamage(rogue.ComboPoints()), isRollover) | ||
}, | ||
OnTick: func(sim *core.Simulation, target *core.Unit, dot *core.Dot) { | ||
dot.CalcAndDealPeriodicSnapshotDamage(sim, target, dot.OutcomeTick) | ||
}, | ||
}, | ||
|
||
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { | ||
result := spell.CalcOutcome(sim, target, spell.OutcomeMeleeSpecialHit) | ||
if result.Landed() { | ||
dot := spell.Dot(target) | ||
dot.Spell = spell | ||
dot.NumberOfTicks = rogue.ComboPoints() + 1 | ||
dot.Apply(sim) | ||
} | ||
spell.DealOutcome(sim, result) | ||
}, | ||
}) | ||
} | ||
|
||
// TODO: Currently bugged and creates "infite loop detected" warning | ||
func (rogue *Rogue) registerCrimsonTempestSpell() { | ||
if !rogue.HasRune(proto.RogueRune_RuneCrimsonTempest) { | ||
return | ||
} | ||
|
||
// Must be updated to match combo points spent | ||
rogue.CrimsonTempestBleed = rogue.makeCrimsonTempestHitSpell() | ||
|
||
rogue.CrimsonTempest = rogue.RegisterSpell(core.SpellConfig{ | ||
ActionID: core.ActionID{SpellID: 412096}, | ||
SpellSchool: core.SpellSchoolPhysical, | ||
DefenseType: core.DefenseTypeMelee, | ||
ProcMask: core.ProcMaskMeleeMHSpecial, | ||
Flags: SpellFlagCarnage, // TODO: Placeholder to prevent use in APL while broken. Replace with rogue.finisherFlags() | ||
MetricSplits: 6, | ||
|
||
EnergyCost: core.EnergyCostOptions{ | ||
Cost: 35, | ||
Refund: 0, | ||
}, | ||
Cast: core.CastConfig{ | ||
DefaultCast: core.Cast{ | ||
GCD: time.Second, | ||
}, | ||
IgnoreHaste: true, | ||
}, | ||
|
||
ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) { | ||
rogue.BreakStealth(sim) | ||
|
||
for _, aoeTarget := range sim.Encounter.TargetUnits { | ||
rogue.CrimsonTempestBleed.Cast(sim, aoeTarget) | ||
} | ||
|
||
rogue.SpendComboPoints(sim, spell) | ||
}, | ||
}) | ||
} | ||
|
||
func (rogue *Rogue) CrimsonTempestDamage(comboPoints int32) float64 { | ||
return []float64{0.15, 0.3, 0.45, 0.6, 0.75, 0.9}[comboPoints] * rogue.GetStat(stats.AttackPower) | ||
} |
Oops, something went wrong.