shaman

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StormfuryTotem           = 31031
	TotemOfAncestralGuidance = 32330
	TotemOfStorms            = 23199
	TotemOfTheVoid           = 28248
	TotemOfHex               = 40267
	VentureCoLightningRod    = 38361
	ThunderfallTotem         = 45255
)

Totem Item IDs

View Source
const (
	VentureCoFlameSlicer                      = 38367
	DeadlyGladiatorsTotemOfIndomitability     = 42607
	FuriousGladiatorsTotemOfIndomitability    = 42608
	RelentlessGladiatorsTotemOfIndomitability = 42609
	WrathfulGladiatorsTotemOfIndomitability   = 51507
)

Totem IDs

View Source
const (
	SpellFlagShock     = core.SpellFlagAgentReserved1
	SpellFlagElectric  = core.SpellFlagAgentReserved2
	SpellFlagTotem     = core.SpellFlagAgentReserved3
	SpellFlagFocusable = core.SpellFlagAgentReserved4
)
View Source
const (
	AirTotem int = iota
	EarthTotem
	FireTotem
	WaterTotem
)

Indexes into NextTotemDrops for self buffs

View Source
const (
	// This could be value or bitflag if we ended up needing multiple flags at the same time.
	//1 to 5 are used by MaelstromWeapon Stacks
	CastTagLightningOverload int32 = 6
)
View Source
const PetExpertiseScale = 3.25
View Source
const TotemRefreshTime5M = time.Second * 295

Start looking to refresh 5 minute totems at 4:55.

Variables

View Source
var ItemSetCataclysmHarness = core.NewItemSet(core.ItemSet{
	Name: "Cataclysm Harness",
	Bonuses: map[int32]core.ApplyEffect{
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetCataclysmRegalia = core.NewItemSet(core.ItemSet{
	Name: "Cataclysm Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			manaMetrics := shaman.NewManaMetrics(core.ActionID{SpellID: 37237})
			shaman.RegisterAura(core.Aura{
				Label:    "Cataclysm Regalia 4pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
						return
					}
					if !result.Outcome.Matches(core.OutcomeCrit) || sim.RandomFloat("cata4p") > 0.25 {
						return
					}
					shaman.AddMana(sim, 120, manaMetrics)
				},
			})
		},
	},
})
View Source
var ItemSetCycloneHarness = core.NewItemSet(core.ItemSet{
	Name: "Cyclone Harness",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetCycloneRegalia = core.NewItemSet(core.ItemSet{
	Name: "Cyclone Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()

			procAura := shaman.RegisterAura(core.Aura{
				Label:    "Cyclone Regalia 4pc Proc",
				Duration: time.Second * 15,
				OnGain: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.CostReduction += 270
				},
				OnExpire: func(aura *core.Aura, sim *core.Simulation) {
					aura.Unit.PseudoStats.CostReduction -= 270
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					aura.Deactivate(sim)
				},
			})

			shaman.RegisterAura(core.Aura{
				Label:    "Cyclone Regalia 4pc",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					if spell.ProcMask.Matches(core.ProcMaskMeleeOrRanged) {
						return
					}
					if !result.Outcome.Matches(core.OutcomeCrit) || sim.RandomFloat("cycl4p") > 0.11 {
						return
					}
					procAura.Activate(sim)
				},
			})
		},
	},
})
View Source
var ItemSetEarthShatterGarb = core.NewItemSet(core.ItemSet{
	Name: "Earthshatter Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetEarthshatterBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Earthshatter Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetFrostWitchBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Frost Witch's Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetFrostWitchRegalia = core.NewItemSet(core.ItemSet{
	Name: "Frost Witch's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.RegisterAura(core.Aura{
				Label:    "Shaman T10 Elemental 4P Bonus",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
					fsDot := shaman.FlameShock.Dot(result.Target)
					if fsDot.IsActive() {

						fsDot.Duration = fsDot.RemainingDuration(sim) + time.Second*6
						fsDot.Refresh(sim)
					}
				},
			})
		},
	},
})
View Source
var ItemSetGladiatorsEarthshaker = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Earthshaker",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.AddStat(stats.AttackPower, 50)
			shaman.AddStat(stats.Resilience, 100)
		},
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.AddStat(stats.AttackPower, 150)

		},
	},
})
View Source
var ItemSetGladiatorsWartide = core.NewItemSet(core.ItemSet{
	Name: "Gladiator's Wartide",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.AddStat(stats.SpellPower, 29)
			shaman.AddStat(stats.Resilience, 100)
		},
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.AddStat(stats.SpellPower, 88)
		},
	},
})
View Source
var ItemSetSkyshatterHarness = core.NewItemSet(core.ItemSet{
	Name: "Skyshatter Harness",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetSkyshatterRegalia = core.NewItemSet(core.ItemSet{
	Name: "Skyshatter Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()

			if shaman.Totems.Air == proto.AirTotem_NoAirTotem ||
				shaman.Totems.Water == proto.WaterTotem_NoWaterTotem ||
				shaman.Totems.Earth == proto.EarthTotem_NoEarthTotem ||
				shaman.Totems.Fire == proto.FireTotem_NoFireTotem {
				return
			}

			shaman.AddStat(stats.MP5, 19)
			shaman.AddStat(stats.SpellCrit, 35)
			shaman.AddStat(stats.SpellPower, 45)
		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetThrallsBattlegear = core.NewItemSet(core.ItemSet{
	Name:            "Thrall's Battlegear",
	AlternativeName: "Nobundo's Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetThrallsRegalia = core.NewItemSet(core.ItemSet{
	Name:            "Thrall's Regalia",
	AlternativeName: "Nobundo's Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetTidefury = core.NewItemSet(core.ItemSet{
	Name: "Tidefury Raiment",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()

			if shaman.SelfBuffs.Shield == proto.ShamanShield_WaterShield {
				shaman.AddStat(stats.MP5, 3)
			}
		},
	},
})
View Source
var ItemSetWorldbreakerBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Worldbreaker Battlegear",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var ItemSetWorldbreakerGarb = core.NewItemSet(core.ItemSet{
	Name: "Worldbreaker Garb",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {

		},
		4: func(agent core.Agent) {

		},
	},
})
View Source
var StormstrikeActionID = core.ActionID{SpellID: 17364}
View Source
var TalentTreeSizes = [3]int{25, 29, 26}
View Source
var TotemOfDueling int32 = 40322
View Source
var TotemOfSplintering int32 = 40710
View Source
var TotemOfTheAstralWinds int32 = 27815
View Source
var TotemOfTheDancingFlame int32 = 45169

Functions

This section is empty.

Types

type FireElemental

type FireElemental struct {
	core.Pet

	FireBlast *core.Spell
	FireNova  *core.Spell

	FireShieldAura *core.Aura
	// contains filtered or unexported fields
}

func (*FireElemental) GetPet

func (fireElemental *FireElemental) GetPet() *core.Pet

func (*FireElemental) Initialize

func (fireElemental *FireElemental) Initialize()

func (*FireElemental) OnGCDReady

func (fireElemental *FireElemental) OnGCDReady(sim *core.Simulation)

func (*FireElemental) Reset

func (fireElemental *FireElemental) Reset(sim *core.Simulation)

func (*FireElemental) TryCast

func (fireElemental *FireElemental) TryCast(sim *core.Simulation, target *core.Unit, spell *core.Spell, maxCastCount int32) bool

type SelfBuffs

type SelfBuffs struct {
	Bloodlust bool
	Shield    proto.ShamanShield
	ImbueMH   proto.ShamanImbue
	ImbueOH   proto.ShamanImbue
}

Which buffs this shaman is using.

type Shaman

type Shaman struct {
	core.Character

	ShamanisticRageManaThreshold float64 //% of mana to use sham. rage at

	Talents   *proto.ShamanTalents
	SelfBuffs SelfBuffs

	Totems *proto.ShamanTotems

	// The type of totem which should be dropped next and time to drop it, for
	// each totem type (earth, air, fire, water).
	NextTotemDropType [4]int32
	NextTotemDrops    [4]time.Duration

	LightningBolt   *core.Spell
	LightningBoltLO *core.Spell

	ChainLightning     *core.Spell
	ChainLightningHits []*core.Spell
	ChainLightningLOs  []*core.Spell

	//LavaBurst   *core.Spell
	FireNova    *core.Spell
	LavaLash    *core.Spell
	Stormstrike *core.Spell

	LightningShield     *core.Spell
	LightningShieldAura *core.Aura

	Thunderstorm *core.Spell

	EarthShock *core.Spell
	FlameShock *core.Spell
	FrostShock *core.Spell

	FeralSpirit  *core.Spell
	SpiritWolves *SpiritWolves

	FireElemental      *FireElemental
	FireElementalTotem *core.Spell

	MagmaTotem           *core.Spell
	ManaSpringTotem      *core.Spell
	SearingTotem         *core.Spell
	StrengthOfEarthTotem *core.Spell
	TotemOfWrath         *core.Spell
	TremorTotem          *core.Spell
	StoneskinTotem       *core.Spell
	WindfuryTotem        *core.Spell
	WrathOfAirTotem      *core.Spell
	FlametongueTotem     *core.Spell

	MaelstromWeaponAura *core.Aura
	// contains filtered or unexported fields
}

Shaman represents a shaman character.

func NewShaman

func NewShaman(character core.Character, talents string, totems *proto.ShamanTotems, selfBuffs SelfBuffs, thunderstormRange bool) *Shaman

func (*Shaman) AddPartyBuffs

func (shaman *Shaman) AddPartyBuffs(partyBuffs *proto.PartyBuffs)

func (*Shaman) AddRaidBuffs

func (shaman *Shaman) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*Shaman) ApplyFlametongueImbueToItem

func (shaman *Shaman) ApplyFlametongueImbueToItem(item *core.Item, isDownranked bool)

func (*Shaman) ApplyTalents

func (shaman *Shaman) ApplyTalents()

func (*Shaman) BloodlustActionID

func (shaman *Shaman) BloodlustActionID() core.ActionID

func (*Shaman) ElementalCritMultiplier

func (shaman *Shaman) ElementalCritMultiplier(secondary float64) float64

func (*Shaman) FrostbrandDebuffAura

func (shaman *Shaman) FrostbrandDebuffAura(target *core.Unit) *core.Aura

func (*Shaman) GetCharacter

func (shaman *Shaman) GetCharacter() *core.Character

func (*Shaman) HasMajorGlyph

func (shaman *Shaman) HasMajorGlyph(glyph proto.ShamanMajorGlyph) bool

func (*Shaman) HasMinorGlyph

func (shaman *Shaman) HasMinorGlyph(glyph proto.ShamanMinorGlyph) bool

func (*Shaman) Initialize

func (shaman *Shaman) Initialize()

func (*Shaman) IsFireNovaCastable

func (shaman *Shaman) IsFireNovaCastable(sim *core.Simulation) bool

func (*Shaman) IsLavaLashCastable

func (shaman *Shaman) IsLavaLashCastable(sim *core.Simulation) bool

func (*Shaman) NewFireElemental

func (shaman *Shaman) NewFireElemental() *FireElemental

func (*Shaman) NewSpiritWolf

func (shaman *Shaman) NewSpiritWolf(index int) *SpiritWolf

func (*Shaman) NextTotemAt

func (shaman *Shaman) NextTotemAt(_ *core.Simulation) time.Duration

func (*Shaman) RegisterFlametongueDownrankImbue

func (shaman *Shaman) RegisterFlametongueDownrankImbue(mh bool, oh bool)

func (*Shaman) RegisterFlametongueImbue

func (shaman *Shaman) RegisterFlametongueImbue(mh bool, oh bool)

func (*Shaman) RegisterFrostbrandImbue

func (shaman *Shaman) RegisterFrostbrandImbue(mh bool, oh bool)

func (*Shaman) RegisterOnItemSwapWithImbue

func (shaman *Shaman) RegisterOnItemSwapWithImbue(effectID int32, procMask *core.ProcMask, aura *core.Aura)

func (*Shaman) RegisterWindfuryImbue

func (shaman *Shaman) RegisterWindfuryImbue(mh bool, oh bool)

func (*Shaman) Reset

func (shaman *Shaman) Reset(sim *core.Simulation)

func (*Shaman) ShockCD

func (shaman *Shaman) ShockCD() time.Duration

func (*Shaman) StormstrikeDebuffAura

func (shaman *Shaman) StormstrikeDebuffAura(target *core.Unit) *core.Aura

func (*Shaman) TryDropTotems

func (shaman *Shaman) TryDropTotems(sim *core.Simulation) bool

TryDropTotems will check to see if totems need to be re-cast.

Returns whether we tried to cast a totem, regardless of whether it succeeded.

type ShamanAgent

type ShamanAgent interface {
	core.Agent

	// The Shaman controlled by this Agent.
	GetShaman() *Shaman
}

Implemented by each Shaman spec.

type SpiritWolf

type SpiritWolf struct {
	core.Pet
	// contains filtered or unexported fields
}

func (*SpiritWolf) GetPet

func (spiritWolf *SpiritWolf) GetPet() *core.Pet

func (*SpiritWolf) Initialize

func (spiritWolf *SpiritWolf) Initialize()

func (*SpiritWolf) OnGCDReady

func (spiritWolf *SpiritWolf) OnGCDReady(sim *core.Simulation)

func (*SpiritWolf) Reset

func (spiritWolf *SpiritWolf) Reset(sim *core.Simulation)

type SpiritWolves

type SpiritWolves struct {
	SpiritWolf1 *SpiritWolf
	SpiritWolf2 *SpiritWolf
}

func (*SpiritWolves) CancelGCDTimer

func (SpiritWolves *SpiritWolves) CancelGCDTimer(sim *core.Simulation)

func (*SpiritWolves) EnableWithTimeout

func (SpiritWolves *SpiritWolves) EnableWithTimeout(sim *core.Simulation)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL