-
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 branch 'master' into warrior-fix
- Loading branch information
Showing
62 changed files
with
2,226 additions
and
1,197 deletions.
There are no files selected for viewing
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
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
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,81 @@ | ||
package shaman | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
) | ||
|
||
const WindfuryTotemRanks = 3 | ||
|
||
var WindfuryTotemSpellId = [WindfuryTotemRanks + 1]int32{0, 8512, 10613, 10614} | ||
var WindfuryTotemBonusDamage = [WindfuryTotemRanks + 1]float64{0, 122, 229, 315} | ||
var WindfuryTotemManaCost = [WindfuryTotemRanks + 1]float64{0, 115, 175, 250} | ||
var WindfuryTotemLevel = [WindfuryTotemRanks + 1]int{0, 32, 42, 52} | ||
|
||
func (shaman *Shaman) registerWindfuryTotemSpell() { | ||
shaman.WindfuryTotem = make([]*core.Spell, WindfuryTotemRanks+1) | ||
|
||
for rank := 1; rank <= WindfuryTotemRanks; rank++ { | ||
config := shaman.newWindfuryTotemSpellConfig(rank) | ||
|
||
if config.RequiredLevel <= int(shaman.Level) { | ||
shaman.WindfuryTotem[rank] = shaman.RegisterSpell(config) | ||
} | ||
} | ||
} | ||
|
||
func (shaman *Shaman) newWindfuryTotemSpellConfig(rank int) core.SpellConfig { | ||
spellId := WindfuryTotemSpellId[rank] | ||
// TODO: The sim won't respect the value of a totem dropped via the APL. It uses hard-coded values from buffs.go | ||
// bonusDamage := WindfuryTotemBonusDamage[rank] | ||
manaCost := WindfuryTotemManaCost[rank] | ||
level := WindfuryTotemLevel[rank] | ||
|
||
duration := time.Second * 120 | ||
|
||
spell := shaman.newTotemSpellConfig(manaCost, spellId) | ||
spell.RequiredLevel = level | ||
spell.Rank = rank | ||
spell.ApplyEffects = func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) { | ||
shaman.TotemExpirations[AirTotem] = sim.CurrentTime + duration | ||
} | ||
return spell | ||
} | ||
|
||
const GraceOfAirTotemRanks = 3 | ||
|
||
var GraceOfAirTotemSpellId = [GraceOfAirTotemRanks + 1]int32{0, 8835, 10627, 25359} | ||
var GraceOfAirTotemBonusAgi = [GraceOfAirTotemRanks + 1]float64{0, 43, 67, 77} | ||
var GraceOfAirTotemManaCost = [GraceOfAirTotemRanks + 1]float64{0, 155, 250, 310} | ||
var GraceOfAirTotemLevel = [GraceOfAirTotemRanks + 1]int{0, 42, 56, 60} | ||
|
||
func (shaman *Shaman) registerGraceOfAirTotemSpell() { | ||
shaman.GraceOfAirTotem = make([]*core.Spell, GraceOfAirTotemRanks+1) | ||
|
||
for rank := 1; rank <= GraceOfAirTotemRanks; rank++ { | ||
config := shaman.newGraceOfAirTotemSpellConfig(rank) | ||
|
||
if config.RequiredLevel <= int(shaman.Level) { | ||
shaman.GraceOfAirTotem[rank] = shaman.RegisterSpell(config) | ||
} | ||
} | ||
} | ||
|
||
func (shaman *Shaman) newGraceOfAirTotemSpellConfig(rank int) core.SpellConfig { | ||
spellId := GraceOfAirTotemSpellId[rank] | ||
// TODO: The sim won't respect the value of a totem dropped via the APL. It uses hard-coded values from buffs.go | ||
// bonusDamage := GraceOfAirTotemBonusAgi[rank] | ||
manaCost := GraceOfAirTotemManaCost[rank] | ||
level := GraceOfAirTotemLevel[rank] | ||
|
||
duration := time.Second * 120 | ||
|
||
spell := shaman.newTotemSpellConfig(manaCost, spellId) | ||
spell.RequiredLevel = level | ||
spell.Rank = rank | ||
spell.ApplyEffects = func(sim *core.Simulation, _ *core.Unit, _ *core.Spell) { | ||
shaman.TotemExpirations[AirTotem] = sim.CurrentTime + duration | ||
} | ||
return spell | ||
} |
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,92 @@ | ||
package shaman | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/wowsims/sod/sim/core" | ||
) | ||
|
||
const StrengthOfEarthTotemRanks = 5 | ||
|
||
var StrengthOfEarthTotemSpellId = [StrengthOfEarthTotemRanks + 1]int32{0, 8075, 8160, 8161, 10442, 25361} | ||
var StrengthOfEarthTotemManaCost = [StrengthOfEarthTotemRanks + 1]float64{0, 25, 65, 125, 225, 275} | ||
var StrengthOfEarthTotemLevel = [StrengthOfEarthTotemRanks + 1]int{0, 10, 24, 38, 52, 60} | ||
|
||
func (shaman *Shaman) registerStrengthOfEarthTotemSpell() { | ||
shaman.StrengthOfEarthTotem = make([]*core.Spell, StrengthOfEarthTotemRanks+1) | ||
|
||
for rank := 1; rank <= StrengthOfEarthTotemRanks; rank++ { | ||
config := shaman.newStrengthOfEarthTotemSpellConfig(rank) | ||
|
||
if config.RequiredLevel <= int(shaman.Level) { | ||
shaman.StrengthOfEarthTotem[rank] = shaman.RegisterSpell(config) | ||
} | ||
} | ||
} | ||
|
||
func (shaman *Shaman) newStrengthOfEarthTotemSpellConfig(rank int) core.SpellConfig { | ||
spellId := StrengthOfEarthTotemSpellId[rank] | ||
manaCost := StrengthOfEarthTotemManaCost[rank] | ||
level := StrengthOfEarthTotemLevel[rank] | ||
|
||
duration := time.Second * 120 | ||
|
||
spell := shaman.newTotemSpellConfig(manaCost, spellId) | ||
spell.RequiredLevel = level | ||
spell.Rank = rank | ||
spell.ApplyEffects = func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) { | ||
shaman.TotemExpirations[EarthTotem] = sim.CurrentTime + duration | ||
shaman.ActiveTotems[EarthTotem] = spell | ||
} | ||
return spell | ||
} | ||
|
||
const StoneskinTotemRanks = 6 | ||
|
||
var StoneskinTotemSpellId = [StoneskinTotemRanks + 1]int32{0, 8071, 8154, 8155, 10406, 10407, 10408} | ||
var StoneskinTotemManaCost = [StoneskinTotemRanks + 1]float64{0, 30, 60, 90, 115, 160, 210} | ||
var StoneskinTotemLevel = [StoneskinTotemRanks + 1]int{0, 4, 14, 24, 34, 44, 54} | ||
|
||
func (shaman *Shaman) registerStoneskinTotemSpell() { | ||
shaman.StoneskinTotem = make([]*core.Spell, StoneskinTotemRanks+1) | ||
|
||
for rank := 1; rank <= StoneskinTotemRanks; rank++ { | ||
config := shaman.newStoneskinTotemSpellConfig(rank) | ||
|
||
if config.RequiredLevel <= int(shaman.Level) { | ||
shaman.StoneskinTotem[rank] = shaman.RegisterSpell(config) | ||
} | ||
} | ||
} | ||
|
||
func (shaman *Shaman) newStoneskinTotemSpellConfig(rank int) core.SpellConfig { | ||
spellId := StoneskinTotemSpellId[rank] | ||
manaCost := StoneskinTotemManaCost[rank] | ||
level := StoneskinTotemLevel[rank] | ||
|
||
duration := time.Second * 120 | ||
|
||
spell := shaman.newTotemSpellConfig(manaCost, spellId) | ||
spell.RequiredLevel = level | ||
spell.Rank = rank | ||
spell.ApplyEffects = func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) { | ||
shaman.TotemExpirations[EarthTotem] = sim.CurrentTime + duration | ||
shaman.ActiveTotems[EarthTotem] = spell | ||
} | ||
return spell | ||
} | ||
|
||
func (shaman *Shaman) registerTremorTotemSpell() { | ||
spellId := int32(8143) | ||
manaCost := float64(60) | ||
duration := time.Second * 120 | ||
level := 18 | ||
|
||
spell := shaman.newTotemSpellConfig(manaCost, spellId) | ||
spell.RequiredLevel = level | ||
spell.ApplyEffects = func(sim *core.Simulation, _ *core.Unit, spell *core.Spell) { | ||
shaman.TotemExpirations[EarthTotem] = sim.CurrentTime + duration | ||
shaman.ActiveTotems[EarthTotem] = spell | ||
} | ||
shaman.TremorTotem = shaman.RegisterSpell(spell) | ||
} |
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
Oops, something went wrong.